Changeset 17175ad in sasview
- Timestamp:
- Aug 5, 2011 2:48:37 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:
- ae3e17e
- Parents:
- 9abd9a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/sansviewtool.py
r3be3a80 r17175ad 12 12 import wx 13 13 from sans.guiframe import gui_manager 14 14 15 # For py2exe, import config here 15 16 import local_config 16 17 import logging 17 18 18 # Application dimensions19 APP_HEIGHT = 8020 APP_WIDTH = 36021 22 19 class SansViewToolApp(gui_manager.ViewApp): 23 20 """ 24 21 """ 25 def OnInit(self):26 """27 """28 screen_size = wx.GetDisplaySize()29 app_height = APP_HEIGHT if screen_size[1]>APP_HEIGHT else screen_size[1]-5030 app_width = APP_WIDTH if screen_size[0]>APP_WIDTH else screen_size[0]-5031 32 self.frame = gui_manager.ViewerFrame(None, -1, local_config.__appname__,33 window_height=app_height, window_width=app_width)34 35 self.frame.Show(True)36 37 if hasattr(self.frame, 'special'):38 self.frame.special.SetCurrent()39 self.SetTopWindow(self.frame)40 return True41 22 42 23 43 44 24 class SansViewTool(): 45 25 """ … … 62 42 #Calculator perspective 63 43 try: 64 import perspectives.calculator as module65 calculator_plug = module.Plugin(standalone= True)44 import sans.perspectives.calculator as module 45 calculator_plug = module.Plugin(standalone=False) 66 46 self.gui.add_perspective(calculator_plug) 67 47 except: 68 logging.error("SansView: could not find Calculator plug-in module") 48 logging.error("SansView: could not find Calculator plug-in module") 49 logging.error(sys.exc_value) 69 50 70 51 71 52 # Build the GUI 72 53 self.gui.build_gui() 73 54 74 55 # Start the main loop 75 self.gui.MainLoop() 76 56 self.gui.MainLoop() 57 77 58 78 59 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.