Changeset 9a56619 in sasview for calculatorview/src/sans


Ignore:
Timestamp:
Oct 15, 2011 5:20:55 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:
64f9fa6
Parents:
70e439f
Message:

added frame icons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/calculator.py

    r8e4a562 r9a56619  
    7474        frame = DataEditorWindow(parent=self.parent, data=[], 
    7575                                  title="Data Editor") 
     76        self.put_icon(frame) 
    7677        frame.Show(True) 
    7778        event.Skip() 
     
    8384        from kiessig_calculator_panel import KiessigWindow 
    8485        frame = KiessigWindow() 
     86        self.put_icon(frame) 
    8587        frame.Show(True)  
    8688     
     
    9193        from sld_panel import SldWindow 
    9294        frame = SldWindow(base=self.parent) 
     95        self.put_icon(frame) 
    9396        frame.Show(True)  
    9497        
     
    98101        """ 
    99102        from slit_length_calculator_panel import SlitLengthCalculatorWindow 
    100         frame = SlitLengthCalculatorWindow(parent=self.parent)     
     103        frame = SlitLengthCalculatorWindow(parent=self.parent)   
     104        self.put_icon(frame)   
    101105        frame.Show(True) 
    102106         
     
    107111        from resolution_calculator_panel import ResolutionWindow 
    108112        frame = ResolutionWindow(parent=self.parent) 
     113        self.put_icon(frame) 
    109114        frame.Show(True)  
    110115   
     
    129134        from pyconsole import PyConsole 
    130135        frame = PyConsole(parent=self.parent) 
     136        self.put_icon(frame) 
    131137        frame.Show(True)  
    132138     
    133      
     139    def put_icon(self, frame): 
     140        """ 
     141        Put icon in the frame title bar 
     142        """ 
     143        if hasattr(frame, "IsIconized"): 
     144            if not frame.IsIconized(): 
     145                try: 
     146                    icon = self.parent.GetIcon() 
     147                    frame.SetIcon(icon) 
     148                except: 
     149                    pass       
    134150   
    135151     
Note: See TracChangeset for help on using the changeset viewer.