Changeset 98816c43 in sasview


Ignore:
Timestamp:
Apr 10, 2014 9:29:35 AM (10 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
92c6c36
Parents:
062ebef
Message:

Clean up Window menu

Location:
src/sans/guiframe
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sans/guiframe/gui_manager.py

    r12a1631 r98816c43  
    2323warnings.simplefilter("ignore") 
    2424import logging 
    25 #import urllib2 
    2625import httplib 
    2726 
     
    263262        self._data_menu = None 
    264263        self._view_menu = None 
    265         self._window_menu = None 
    266264        self._data_panel_menu = None 
    267265        self._help_menu = None 
     
    763761        # WX 3.0 needs us to create the menu bar first. 
    764762        self._menubar = wx.MenuBar() 
    765         self.SetMenuBar(self._menubar) 
     763        if wx.VERSION_STRING >= '3.0.0.0': 
     764            self.SetMenuBar(self._menubar) 
    766765        self._add_menu_file() 
    767766        self._add_menu_edit() 
     
    777776        # Append item from plugin under menu file if necessary 
    778777        self._populate_file_menu() 
     778        if not wx.VERSION_STRING >= '3.0.0.0': 
     779            self.SetMenuBar(self._menubar) 
    779780         
    780781        try: 
     
    28852886                    data_panel.cb_plotpanel.SetString(pos, caption) 
    28862887                    data_panel.cb_plotpanel.SetStringSelection(caption) 
    2887         # update window Show menu 
    2888         if self._window_menu != None: 
    2889             for item in self._window_menu.GetMenuItems(): 
    2890                 pos = self._window_menu.FindItem(old_caption) 
    2891                 if self._window_menu.GetLabel(pos) == str(old_caption): 
    2892                     self._window_menu.SetLabel(pos, caption) 
    2893                 break 
    28942888        # New Caption 
    28952889        pane_info.SetTitle(caption) 
  • src/sans/guiframe/local_perspectives/plotting/Plotter1D.py

    rcafa75f r98816c43  
    417417 
    418418    def remove_data_by_id(self, id): 
    419         """' 
    420         remove data from plot 
     419        """ 
     420            Remove data from plot 
    421421        """ 
    422422        if id in self.plots.keys(): 
     
    430430            if id in theory_list.keys(): 
    431431                data = theory_list[id] 
    432             # Update Graph menu and help string         
    433             #h_id = self.parent._window_menu.FindItem(self.window_caption) 
    434             if data != None: 
    435                 if data.__class__.__name__ == 'list': 
    436                     label = data[0].label 
    437                 else: 
    438                     label = data.label 
    439             else: 
    440                 label = '???' 
    441             #helpString = self.parent._window_menu.GetHelpString(h_id)  
    442             d_string = (' ' + str(label) +';') 
    443             #new_tip = helpString.replace(d_string, '') 
    444             #self.parent._window_menu.SetHelpString(h_id, new_tip)   
    445  
     432                 
    446433            del self.plots[id] 
    447434            self.graph.render(self) 
     
    450437                #onRemove: graph is empty must be the panel must be destroyed 
    451438                self.parent.delete_panel(self.uid) 
    452              
    453439         
    454440    def plot_data(self, data): 
     
    480466                self._onEVT_FUNC_PROPERTY() 
    481467            except Exception, exc: 
    482                 msg=" Encountered singular points..." 
    483468                wx.PostEvent(self.parent, StatusEvent(status=\ 
    484469                    "Plotting Error: %s"% str(exc), info="error")) 
     
    498483                    self.canvas._onDrawIdle() 
    499484            except Exception,exc: 
    500                 msg=" Encountered singular points..." 
    501485                wx.PostEvent(self.parent, StatusEvent(status=\ 
    502486                    "Plotting Error: %s"% str(exc), info="error")) 
    503487            self.toolbar.update() 
    504488            self.is_zoomed = False 
    505             # Update Graph menu and help string         
    506             #pos = self.parent._window_menu.FindItem(self.window_caption) 
    507             helpString = 'Show/Hide Graph: ' 
    508             for plot in  self.plots.itervalues(): 
    509                 helpString += (' ' + str(plot.label) +';') 
    510             #self.parent._window_menu.SetHelpString(pos, helpString)   
    511                  
     489             
    512490    def draw_plot(self): 
    513491        """ 
     
    850828                        self.get_symbol_label()[info[2]]  
    851829            self.appearance_selected_plot.label = str(info[3]) 
    852  
    853             #pos = self.parent._window_menu.FindItem(self.window_caption) 
    854             #helpString = 'Show/Hide Graph: ' 
    855             #for plot in  self.plots.itervalues(): 
    856             #    helpString += (' ' + str(plot.label) + ';') 
    857             #    self.parent._window_menu.SetHelpString(pos, helpString) 
    858             #    self._is_changed_legend_label = True 
    859                  
    860830        self.appD.Destroy() 
    861831        self._check_zoom_plot() 
    862  
    863832 
    864833    def modifyGraphAppearance(self, event): 
     
    878847                                  self.is_xtick, self.is_ytick) 
    879848        self.graphApp.Bind(wx.EVT_CLOSE, self.on_graphApp_close) 
    880      
    881849 
    882850    def on_graphApp_close(self, event): 
  • src/sans/guiframe/local_perspectives/plotting/Plotter2D.py

    rcafa75f r98816c43  
    241241                                   color=self.title_color) 
    242242            self.subplot.figure.canvas.draw_idle()     
    243         # Update Graph menu and help string         
    244         #pos = self.parent._window_menu.FindItem(self.window_caption) 
    245         helpString = 'Show/Hide Graph: ' 
    246         helpString += (' ' + str(data.label) +';') 
    247         #self.parent._window_menu.SetHelpString(pos, helpString) 
    248243        ## store default value of zmin and zmax  
    249244        self.default_zmin_ctl = self.zmin_2D 
     
    458453        dial.Destroy() 
    459454         
    460         # Update Graph menu and help string  
    461         if self.title_label != None:      
    462             #pos = self.parent._window_menu.FindItem(self.window_caption) 
    463             helpString = 'Show/Hide Graph: ' 
    464             helpString += (' ' + str(self.title_label) +';') 
    465             #self.parent._window_menu.SetHelpString(pos, helpString) 
    466  
    467          
    468455    def _onEditDetector(self, event): 
    469456        """ 
Note: See TracChangeset for help on using the changeset viewer.