Ignore:
Timestamp:
Sep 20, 2014 8:27:59 PM (7 years ago)
Author:
toby
Message:

track with relative phase & histogram numbers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/logging/GSASII.py

    r1497 r1505  
    16251625
    16261626       
     1627    def OnMacroRecordStatus(self,event,setvalue=None):
     1628        import log
     1629        nextvalue = log.ShowLogStatus() != True
     1630        if setvalue is not None:
     1631            nextvalue = setvalue
     1632        if nextvalue:
     1633            log.LogOn()
     1634            setto = True
     1635        else:
     1636            log.LogOff()
     1637            setto = False
     1638        for menuitem in self.MacroStatusList:
     1639            menuitem.Check(setto)
     1640
    16271641    def _init_Macro(self):
     1642        import log
    16281643        menu = self.MacroMenu
    1629         self.MacroRecordStatus = menu.Append(
    1630             help='Start or stop recording of menu actions, etc.', id=wx.ID_ANY,
    1631             kind=wx.ITEM_NORMAL,text='Record actions')
    1632         self.MacroRecordStatus.SetText('Stop recording') # debug, start w/logging enabled
    1633         import log
    1634         log.LogOn()           
    1635         def OnMacroRecordStatus(event):
    1636             import log
    1637             if 'actions' in self.MacroRecordStatus.GetText():
    1638                 self.MacroRecordStatus.SetText('Stop recording')
    1639                 log.LogOn()           
    1640             else:
    1641                 self.MacroRecordStatus.SetText('Record actions')
    1642                 log.LogOff()
    1643         self.Bind(wx.EVT_MENU, OnMacroRecordStatus, self.MacroRecordStatus)
     1644        item = menu.Append(
     1645                help='Start or stop recording of menu actions, etc.', id=wx.ID_ANY,
     1646                kind=wx.ITEM_CHECK,text='Record actions')
     1647        self.MacroStatusList.append(item)
     1648        item.Check(log.ShowLogStatus())
     1649        self.Bind(wx.EVT_MENU, self.OnMacroRecordStatus, item)
    16441650       
    16451651        item = menu.Append(
     
    18731879    def FillMainMenu(self,menubar):
    18741880        '''Define contents of the main GSAS-II menu for the (main) data tree window
    1875         in the mac, used also for the data item windows as well.
     1881        For the mac this is also call for the data item windows as well.
    18761882        '''
    18771883        File = wx.Menu(title='')
     
    19581964        # create a list of all dataframe menus (appended in PrefillDataMenu)
    19591965        self.dataMenuBars = [self.GSASIIMenu]
     1966        self.MacroStatusList = []
    19601967        self.FillMainMenu(self.GSASIIMenu)
    19611968        self.SetMenuBar(self.GSASIIMenu)
Note: See TracChangeset for help on using the changeset viewer.