Skip to content

Commit

Permalink
GUI: About with cwd and matplotlibrc (#189 and #190)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebranlard committed Oct 22, 2024
1 parent 7c3c19c commit 2bc5602
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 3 additions & 0 deletions pydatview/GUICommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def __init__(self, parent, title, message):
text = wx.TextCtrl(self, style=wx.TE_READONLY|wx.BORDER_NONE|wx.TE_MULTILINE|wx.TE_AUTO_URL)
text.SetValue(message)
text.SetBackgroundColour(wx.SystemSettings.GetColour(4))
# box_sizer = wx.BoxSizer(wx.VERTICAL)
# box_sizer.Add(text)
# self.SetSizerAndFit(box_sizer)
self.ShowModal()
self.Destroy()
MessageBox(parent, 'About', message)
Expand Down
15 changes: 11 additions & 4 deletions pydatview/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,18 @@ def onSave(self, event=None):
Error(self,'Open one or more file first.')

def onAbout(self, event=None):
import matplotlib
io_userpath = os.path.join(weio.defaultUserDataDir(), 'pydatview_io')
About(self,PROG_NAME+' '+PROG_VERSION+'\n\n'
'pyDatView config file:\n {}\n'.format(configFilePath())+
'pyDatView io data directory:\n {}\n'.format(io_userpath)+
'\n\nVisit http://github.com/ebranlard/pyDatView for documentation.')
matplotlibrc = matplotlib.matplotlib_fname()
startedpath= os.getcwd()
aboutMsg = ' - Version:\n {}\n'.format(PROG_NAME+' '+PROG_VERSION)
aboutMsg += '- Started in:\n {}\n'.format(startedpath)
aboutMsg += '- Config file:\n {}\n'.format(configFilePath())
aboutMsg += '- IO data directory:\n {}\n'.format(io_userpath)
aboutMsg += '- matplolibrc file:\n {}\n'.format(matplotlibrc)
aboutMsg += '\nVisit http://github.com/ebranlard/pyDatView for documentation.'

About(self, aboutMsg)

def onReset (self, event=None):
configFile = configFilePath()
Expand Down

0 comments on commit 2bc5602

Please sign in to comment.