Changeset 3835dbd in sasview for src/sas


Ignore:
Timestamp:
Mar 16, 2016 4:43:49 PM (9 years ago)
Author:
butler
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:
0d534de
Parents:
d7922506
Message:

fix position of Analysis and Fitting menu items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/gui_manager.py

    rd7922506 r3835dbd  
    13211321                for (menu, name) in menu_list: 
    13221322                    if self._applications_menu_pos == -1: 
    1323                         # Find the Help position and insert just before it if possible 
    1324                         help_pos = self._menubar.FindMenu("Help") 
    1325                         if help_pos == -1: 
     1323                        # Find the Analysis position and insert just after it if possible 
     1324                        analysis_pos = self._menubar.FindMenu("Analysis") 
     1325                        if analysis_pos == -1: 
    13261326                            self._menubar.Append(menu, name) 
    13271327                            self._applications_menu_pos = -1 
    13281328                        else: 
    1329                             self._menubar.Insert(help_pos-1, menu, name) 
    1330                             self._applications_menu_pos = help_pos - 1 
     1329                            self._menubar.Insert(analysis_pos+1, menu, name) 
     1330                            self._applications_menu_pos = analysis_pos + 1 
    13311331                    else: 
    13321332                        self._menubar.Insert(self._applications_menu_pos, menu, name) 
     
    14921492            if not plug_data_count or not plug_no_data_count: 
    14931493                self._applications_menu.RemoveItem(separator) 
    1494             self._menubar.Append(self._applications_menu, '&Analysis') 
     1494            #Windows introduces a "Window" menu item during the layout process 
     1495            #somehow.  We want it to be next to the last item with Help as 
     1496            #last. However Analysis gets stuck after Window in normal ordering 
     1497            #so force it to be next after the Tools menu item.  Should we add 
     1498            #another menu item will need to check if this is still where we  
     1499            #want Analysis.  This is NOT an issue on the Mac which does not 
     1500            #have the extra Window menu item. 
     1501            #      March 2016 Code Camp  -- PDB  
     1502            Tools_pos = self._menubar.FindMenu("Tool") 
     1503            self._menubar.Insert(Tools_pos+1,self._applications_menu, 
     1504                                 '&Analysis') 
    14951505            self._check_applications_menu() 
    14961506 
Note: See TracChangeset for help on using the changeset viewer.