Changeset 2dda7ae1 in sasview for sansview/welcome_panel.py
- Timestamp:
- Apr 18, 2012 1:58:41 PM (13 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/welcome_panel.py
r3bc6090 r2dda7ae1 1 1 """ 2 2 Welcome panel for SansView 3 """ 4 """ 3 5 4 This software was developed by the University of Tennessee as part of the 6 5 Distributed Data Analysis of Neutron Scattering Experiments (DANSE) … … 18 17 import os, sys 19 18 import local_config as config 20 import logging21 19 from wx.lib.scrolledpanel import ScrolledPanel 22 20 from sans.guiframe.panel_base import PanelBase … … 40 38 41 39 42 def __init__(self, parent, *args, **kwds):40 def __init__(self, parent, *args, **kwds): 43 41 44 42 kwds["style"] = wx.aui.AUI_NB_DEFAULT_STYLE … … 52 50 self.AddPage(page=welcome_page, caption="Welcome") 53 51 54 pageClosedEvent = wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE55 52 self.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.on_close_page) 56 53 self.Center() … … 70 67 event.Veto() 71 68 72 def set_data(self, list= []):69 def set_data(self, list=None): 73 70 """ 74 71 """ … … 95 92 ScrolledPanel.__init__(self, parent, **kwds) 96 93 self.SetupScrolling() 97 path = os.getcwd()98 import local_config99 #icon_path = os.path.join(path, "images")100 #print "PPP", icon_path,path101 94 image = os.path.join(local_config._welcome_image) 102 95 self.SetWindowVariant(variant = FONT_VARIANT) … … 107 100 self.label_acknowledgement = wx.StaticText(self, -1, config._acknowledgement) 108 101 109 self.hyperlink_license = wx.StaticText(self, -1, "Comments? Bugs? Requests?") 102 self.hyperlink_license = wx.StaticText(self, -1, 103 "Comments? Bugs? Requests?") 110 104 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) 112 106 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__)) 117 109 try: 118 110 build_num = str(config.__build__) … … 127 119 sizer_header.Add(self.bitmap_logo, 0, wx.EXPAND|wx.LEFT, 5) 128 120 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) 130 123 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) 137 135 138 136 sizer_main.Add(sizer_header, 0, wx.TOP|wx.EXPAND, 3) 139 137 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) 141 139 142 140 self.SetAutoLayout(True) … … 144 142 self.Fit() 145 143 146 def set_data(self, list= []):144 def set_data(self, list=None): 147 145 """ 148 146 """ … … 150 148 151 149 class ViewApp(wx.App): 150 """ 151 Test application 152 """ 152 153 def OnInit(self): 153 154 self.frame = WelcomeFrame(None, -1, "Test App") … … 156 157 157 158 class WelcomeFrame(wx.Frame): 159 """ 160 Test frame 161 """ 158 162 def __init__(self, parent, id, title): 159 163 wx.Frame.__init__(self, parent, id, title, size=(570, 400))
Note: See TracChangeset
for help on using the changeset viewer.