Changeset 7fb69f26 in sasview


Ignore:
Timestamp:
Apr 18, 2012 10:25:11 AM (12 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:
9e91546
Parents:
31f9d0c2
Message:

added max/min button in plotpanels

Location:
sansguiframe/src/sans/guiframe
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/data_panel.py

    r6605880 r7fb69f26  
    173173        self.layout_batch() 
    174174        self.layout_button() 
    175     
     175         
     176    def disable_app_combo(self, enable): 
     177        """ 
     178        """ 
     179        self.perspective_cbox.Enable(enable) 
     180         
    176181    def define_panel_structure(self): 
    177182        """ 
  • sansguiframe/src/sans/guiframe/gui_manager.py

    re86455b r7fb69f26  
    613613                self.enable_edit_menu() 
    614614     
     615    def disable_app_menu(self,p_panel=None):   
     616        """ 
     617        Disables all menus in the menubar 
     618        """ 
     619        if p_panel == None: 
     620            return 
     621        p_name = p_panel.window_name 
     622        enable = not self._mgr.GetPane(p_name).IsMaximized() 
     623        if self._data_panel is not None: 
     624            self._data_panel.disable_app_combo(enable) 
     625        if self._menubar is not None: 
     626            for menu,_ in self._menubar.GetMenus(): 
     627                for items in menu.GetMenuItems(): 
     628                    items.Enable(enable) 
     629        c_panel = self.cpanel_on_focus 
     630 
     631        if not enable: 
     632            p_panel.on_set_focus(None) 
     633            if self._toolbar is not None: 
     634                self._toolbar.update_toolbar(None) 
     635        else: 
     636            self._toolbar.update_toolbar(c_panel) 
     637         
    615638    def set_panel_on_focus_helper(self): 
    616639        """ 
     
    895918                              Name("default"). 
    896919                              CenterPane(). 
    897                               #CloseButton(False). 
    898                               #MinimizeButton(False). 
    899920                              # This is where we set the size of 
    900921                              # the application window 
     
    910931                              Caption(self._data_panel.window_caption). 
    911932                              Left(). 
    912                               MinimizeButton(). 
    913933                              CloseButton(CLOSE_SHOW). 
    914934                              TopDockable(False). 
     
    10661086                              Right(). 
    10671087                              Dock(). 
    1068                               MinimizeButton(). 
     1088                              MinimizeButton(True).MaximizeButton(True). 
    10691089                              Resizable(True). 
    10701090                              # Use a large best size to make sure the AUI  
     
    10781098            self._mgr.AddPane(p, wx.aui.AuiPaneInfo(). 
    10791099                              Name(p.window_name).Caption(p.window_caption). 
    1080                               MinimizeButton(). 
     1100                              MinimizeButton(True).MaximizeButton(True). 
    10811101                              Resizable(True). 
    10821102                              # Use a large best size to make sure the AUI 
     
    10841104                              BestSize(wx.Size(PLOPANEL_WIDTH,  
    10851105                                               PLOPANEL_HEIGTH))) 
    1086  
     1106             
    10871107            self._popup_floating_panel(p) 
    10881108   
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py

    r0aca693 r7fb69f26  
    190190            self.size, _ = self.GetClientSizeTuple() 
    191191        self.SetSizer(self.sizer) 
     192        wx.CallAfter(self.parent.disable_app_menu,self) 
    192193         
    193194    def set_resizing(self, resizing=False): 
Note: See TracChangeset for help on using the changeset viewer.