Changeset 788ff23 in sasview for guiframe/gui_manager.py


Ignore:
Timestamp:
Mar 25, 2011 5:21:08 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
46bf3b1
Parents:
9a608ed
Message:

edit application menu order

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    r56681bd r788ff23  
    773773            plug_no_data_count = False 
    774774            self._applications_menu = wx.Menu() 
     775            pos = 0 
    775776            separator = self._applications_menu.AppendSeparator() 
    776777            for plug in self.plugins: 
     
    778779                    id = wx.NewId() 
    779780                    if plug.use_data(): 
    780                         self._applications_menu.InsertCheckItem(0, id, plug.sub_menu, 
     781                         
     782                        self._applications_menu.InsertCheckItem(pos, id, plug.sub_menu, 
    781783                                      "Switch to application: %s" % plug.sub_menu) 
    782784                        plug_data_count = True 
     785                        pos += 1 
    783786                    else: 
    784787                        plug_no_data_count = True 
     
    786789                                      "Switch to application: %s" % plug.sub_menu) 
    787790                    wx.EVT_MENU(self, id, plug.on_perspective) 
    788             if not (plug_data_count and  plug_no_data_count): 
     791            #self._applications_menu. 
     792            if (not plug_data_count or not plug_no_data_count): 
    789793                self._applications_menu.RemoveItem(separator) 
    790794            self._menubar.Append(self._applications_menu, '&Applications') 
Note: See TracChangeset for help on using the changeset viewer.