Changeset 1242


Ignore:
Timestamp:
Mar 4, 2013 11:29:19 AM (9 years ago)
Author:
jemian
Message:

improve the about box slightly, add starter script for user2idd

Location:
mda2idd_report/src
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • mda2idd_report/src/mda2idd_gui.py

    r1241 r1242  
    101101                              help=u'Save MDA data to ASCII text file')
    102102        self.Bind(wx.EVT_MENU, self.OnMenuFileItemSave, id=item.GetId())
    103         #print "menu item: ", item.GetId(), item.GetLabel()
    104103
    105104        item = self.menu_file.Append(
     
    108107            help=u'Convert all MDA files in current directory to ASCII text files')
    109108        self.Bind(wx.EVT_MENU, self.OnConvertAll, id=item.GetId())
    110         #print "menu item: ", item.GetId(), item.GetLabel()
    111109       
    112110        self.menu_file.AppendSeparator()
     
    118116        self.Bind(wx.EVT_MENU, self.OnMenuFileItemReportStyle, id=item.GetId())
    119117        self.id_menu_report = item.GetId()
    120         #print "menu item: ", item.GetId(), item.GetLabel()
    121118
    122119        # TODO: provide a control to let user edit self.preferences_file
     
    133130        self.menu_file.Enable(item.GetId(), False)
    134131        self.mrud_insertion_pos = self.menu_file.GetMenuItemCount()
    135         #print "menu item: ", item.GetId(), item.GetLabel()
    136132
    137133        self.menu_file.AppendSeparator()
     
    140136                              help=u'Quit this application')
    141137        self.Bind(wx.EVT_MENU, self.OnMenuFileItemExit, id=item.GetId())
    142         #print "menu item: ", item.GetId(), item.GetLabel()
    143138
    144139        self.menu_edit = wx.Menu(title='')
     
    148143                              help=u'About this application')
    149144        self.Bind(wx.EVT_MENU, self.OnAbout, id=item.GetId())
    150         #print "menu item: ", item.GetId(), item.GetLabel()
    151145
    152146        self.menuBar1 = wx.MenuBar()
     
    295289    def setCurrentDirectory(self, directory):
    296290        '''set the current directory'''
    297         #print "set directory:", str(directory)
    298291        self.dir.ExpandPath(directory)
    299292        self.dirPicker.SetPath(directory)
     
    301294    def setSummaryText(self, text):
    302295        '''post new text to the summary TextCtrl, clearing any existing text'''
    303         #print "new summary:", str(text)
    304296        self.textCtrl1.ChangeValue(str(text))
    305297   
    306298    def appendSummaryText(self, text):
    307299        '''post new text to the summary TextCtrl, appending to any existing text'''
    308         #print "additional summary:", str(text)
    309300        self.textCtrl1.AppendText(str(text))
    310301   
    311302    def setStatusText(self, text):
    312303        '''post new text to the status bar'''
    313         #print "new status:", str(text)
    314304        self.statusBar.SetStatusText(text)
    315305
     
    462452                item = self.menu_file.Insert(position, wx.ID_ANY, text=text)
    463453                self.Bind(wx.EVT_MENU, self.OnMrudItem, id=item.GetId())
    464                 #print "menu item: ", item.GetId(), item.GetLabel()
    465454                counter += 1
    466455       
     
    468457        '''handle MRUD menu items'''
    469458        label = self.menu_file.GetLabelText(event.GetId())
    470         #print "onMrudItem: ", event.GetId(), str(label)
    471459        self.setCurrentDirectory(label)
    472 #        self.setStatusText(label)
    473460       
    474461    def OnAbout(self, event):
     
    477464        # First we create and fill the info object
    478465        info = wx.AboutDialogInfo()
    479         info.SetName( sys.argv[0] )
    480         info.SetVersion( __version__ ) 
    481         info.SetDescription( __doc__ )
     466        info.SetName( os.path.basename(sys.argv[0]) )
     467        info.SetVersion( __version__ )
     468        info.SetDescription( sys.argv[0] + '\n\n' + __doc__ )
    482469        if float(wx.VERSION_STRING[0:3]) < 2.9: # pre-phoenix wxPython support
    483470            info.SetWebSite( __url__ )
    484471        else:                                           # phoenix wxPython support
    485472            info.SetWebSite( __url__, desc=__svnid__ )
    486         author = __author__ +  " <" + __author_email__ + ">"
    487473        info.SetDevelopers(
    488474          (
     
    491477          )
    492478        )
    493         # Then we call wx.AboutBox giving it the info object
    494479        wx.AboutBox(info)
    495480       
     
    500485        # use path from self.dirPicker widget
    501486        #path = self.dirPicker.GetPath()
    502         #print "convert directory:", path
    503487        self.setStatusText('Converting all MDA files to ASCII in directory: ' + path)
    504488        self.convertMdaDir(path)
Note: See TracChangeset for help on using the changeset viewer.