From 2bc56023454736f1741aa5a5a27778e27e25a0f6 Mon Sep 17 00:00:00 2001 From: Emmanuel Branlard Date: Mon, 21 Oct 2024 20:07:30 -0400 Subject: [PATCH] GUI: About with cwd and matplotlibrc (#189 and #190) --- pydatview/GUICommon.py | 3 +++ pydatview/main.py | 15 +++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pydatview/GUICommon.py b/pydatview/GUICommon.py index 5e0aae5..aac3df9 100644 --- a/pydatview/GUICommon.py +++ b/pydatview/GUICommon.py @@ -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) diff --git a/pydatview/main.py b/pydatview/main.py index 53500ba..80501c7 100644 --- a/pydatview/main.py +++ b/pydatview/main.py @@ -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()