Changeset f9e803e in sasview


Ignore:
Timestamp:
Jul 24, 2009 8:23:35 PM (15 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:
5612152
Parents:
f50330b7
Message:

guiframe: add functionality to set an application welcome panel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    rc9454bb rf9e803e  
    119119         
    120120        # Define a panel 
    121         mypanel = DefaultPanel(self.parent, -1) 
     121        defaultpanel = DefaultPanel(self.parent, -1) 
    122122         
    123123        # If needed, add its name to the perspective list 
     
    125125 
    126126        # Return the list of panels 
    127         return [mypanel] 
     127        return [defaultpanel] 
    128128     
    129129    def get_context_menu(self, graph=None): 
     
    222222        self._default_save_location = os.getcwd()         
    223223 
    224         ## Default welcome panel 
    225         self.defaultPanel    = DefaultPanel(self, -1, style=wx.RAISED_BORDER) 
    226          
     224        # Welcome panel 
     225        self.defaultPanel = None 
     226 
    227227        # Check for update 
    228228        self._check_update(None) 
     
    349349        return plugins 
    350350     
    351          
     351    def set_welcome_panel(self, panel_class): 
     352        """ 
     353           Sets the default panel as the given welcome panel  
     354           @param panel_class: class of the welcome panel to be instantiated 
     355        """ 
     356        self.defaultPanel    = panel_class(self, -1, style=wx.RAISED_BORDER) 
    352357       
    353358    def _load_panels(self): 
     
    366371        # It also sets the size of the application windows 
    367372        #TODO: Use this for slpash screen 
     373        if self.defaultPanel is None: 
     374            self.defaultPanel    = DefaultPanel(self, -1, style=wx.RAISED_BORDER) 
     375             
    368376        self.panels["default"] = self.defaultPanel 
    369377         
     
    893901        self.frame.post_init() 
    894902         
     903    def set_welcome_panel(self, panel_class): 
     904        """ 
     905            Set the welcome panel 
     906            @param panel_class: class of the welcome panel to be instantiated 
     907        """ 
     908        self.frame.set_welcome_panel(panel_class) 
     909         
    895910    def add_perspective(self, perspective): 
    896911        """ 
Note: See TracChangeset for help on using the changeset viewer.