Changeset 2dda7ae1 in sasview for sansview/welcome_panel.py


Ignore:
Timestamp:
Apr 18, 2012 1:58:41 PM (13 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:
2e0053e
Parents:
499fe7a
Message:

Fixing code style problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/welcome_panel.py

    r3bc6090 r2dda7ae1  
    11""" 
    22    Welcome panel for SansView 
    3 """ 
    4 """ 
     3 
    54This software was developed by the University of Tennessee as part of the 
    65Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
     
    1817import os, sys 
    1918import local_config as config 
    20 import logging 
    2119from wx.lib.scrolledpanel import ScrolledPanel 
    2220from sans.guiframe.panel_base import PanelBase 
     
    4038    
    4139     
    42     def __init__(self,parent, *args, **kwds): 
     40    def __init__(self, parent, *args, **kwds): 
    4341         
    4442        kwds["style"] = wx.aui.AUI_NB_DEFAULT_STYLE 
     
    5250        self.AddPage(page=welcome_page, caption="Welcome") 
    5351         
    54         pageClosedEvent = wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE 
    5552        self.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.on_close_page) 
    5653        self.Center() 
     
    7067        event.Veto()  
    7168         
    72     def set_data(self, list=[]): 
     69    def set_data(self, list=None): 
    7370        """ 
    7471        """ 
     
    9592        ScrolledPanel.__init__(self, parent, **kwds) 
    9693        self.SetupScrolling() 
    97         path = os.getcwd() 
    98         import local_config 
    99         #icon_path = os.path.join(path, "images") 
    100         #print "PPP", icon_path,path 
    10194        image = os.path.join(local_config._welcome_image) 
    10295        self.SetWindowVariant(variant = FONT_VARIANT) 
     
    107100        self.label_acknowledgement = wx.StaticText(self, -1, config._acknowledgement) 
    108101         
    109         self.hyperlink_license = wx.StaticText(self, -1, "Comments? Bugs? Requests?") 
     102        self.hyperlink_license = wx.StaticText(self, -1,  
     103                                               "Comments? Bugs? Requests?") 
    110104        self.hyperlink_paper = wx.lib.hyperlink.HyperLinkCtrl(self, -1, 
    111                                          "Send us a ticket at:  sansdanse@gmail.com",URL=config._license) 
     105            "Send us a ticket at:  sansdanse@gmail.com", URL=config._license) 
    112106         
    113         verwords = config.__version__.split('.') 
    114         version = '.'.join(verwords[:-1]) 
    115         revision = verwords[-1] 
    116         self.label_title = wx.StaticText(self, -1, config.__appname__+ " "+str(config.__version__))#(version)) 
     107        self.label_title = wx.StaticText(self, -1,  
     108            config.__appname__+ " "+str(config.__version__)) 
    117109        try: 
    118110            build_num = str(config.__build__) 
     
    127119        sizer_header.Add(self.bitmap_logo, 0, wx.EXPAND|wx.LEFT, 5) 
    128120         
    129         sizer_build.Add(self.label_acknowledgement,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
     121        sizer_build.Add(self.label_acknowledgement, 0, 
     122                        wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
    130123        sizer_build.Add((5,5)) 
    131         sizer_build.Add(self.label_title ,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
    132         sizer_build.Add(self.label_build,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
    133         sizer_build.Add( self.label_copyright,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
    134         sizer_build.Add((5,5)) 
    135         sizer_build.Add( self.hyperlink_license,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
    136         sizer_build.Add( self.hyperlink_paper,0,wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
     124        sizer_build.Add(self.label_title, 0, 
     125                        wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
     126        sizer_build.Add(self.label_build, 0,  
     127                        wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)   
     128        sizer_build.Add(self.label_copyright, 0, 
     129                        wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
     130        sizer_build.Add((5, 5)) 
     131        sizer_build.Add(self.hyperlink_license, 0, 
     132                        wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
     133        sizer_build.Add(self.hyperlink_paper, 0, 
     134                        wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)  
    137135         
    138136        sizer_main.Add(sizer_header, 0, wx.TOP|wx.EXPAND, 3) 
    139137        sizer_main.Add(self.static_line_1, 0, wx.EXPAND, 0) 
    140         sizer_main.Add(sizer_build,0, wx.BOTTOM|wx.EXPAND, 3) 
     138        sizer_main.Add(sizer_build,0 , wx.BOTTOM|wx.EXPAND, 3) 
    141139         
    142140        self.SetAutoLayout(True) 
     
    144142        self.Fit() 
    145143         
    146     def set_data(self, list=[]): 
     144    def set_data(self, list=None): 
    147145        """ 
    148146        """ 
     
    150148 
    151149class ViewApp(wx.App): 
     150    """ 
     151        Test application 
     152    """ 
    152153    def OnInit(self): 
    153154        self.frame = WelcomeFrame(None, -1, "Test App")     
     
    156157 
    157158class WelcomeFrame(wx.Frame): 
     159    """ 
     160        Test frame 
     161    """ 
    158162    def __init__(self, parent, id, title): 
    159163        wx.Frame.__init__(self, parent, id, title, size=(570, 400)) 
Note: See TracChangeset for help on using the changeset viewer.