Changeset 069aae2 in sasview
- Timestamp:
- Jul 19, 2015 4:57:30 PM (9 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:
- 957af0d
- Parents:
- 24386b9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/guiframe/gui_manager.py
r24386b9 r069aae2 52 52 The application directory is the one where the default custom_config.py 53 53 file resides. 54 55 :returns: app_path - the path to the applicatin directory 54 56 """ 55 57 # First, try the directory of the executable we are running … … 68 70 69 71 # Finally, try the directory of the sasview module 70 # TODO: gui_manager will have to know about sasview until we72 # TODO: gui_manager will have to know about sasview until we 71 73 # clean all these module variables and put them into a config class 72 74 # that can be passed by sasview.py. … … 834 836 def PushStatusText(self, *args, **kwds): 835 837 """ 836 FIXME: No message is passed. What is this supposed to do?838 .. todo:: No message is passed. What is this supposed to do? 837 839 """ 838 840 field = self.sb.get_msg_position() 839 841 wx.Frame.PushStatusText(self, field=field, 840 string="FIXME :PushStatusText called without text")842 string="FIXME - PushStatusText called without text") 841 843 842 844 def add_perspective(self, plugin): … … 894 896 :param dir: directory in which to look for plug-ins 895 897 896 :return : list of plug-ins898 :returns: list of plug-ins 897 899 898 900 """ … … 945 947 file.close() 946 948 except: 947 # Should raise and catch at a higher level and 949 # Should raise and catch at a higher level and 948 950 # display error on status bar 949 951 logging.error(sys.exc_value) … … 992 994 993 995 # Set up welcome panel 994 # TODO: this needs serious simplification996 # TODO: this needs serious simplification 995 997 if self.welcome_panel_class is not None: 996 998 welcome_panel = MDIFrame(self, None, 'None', (100, 200)) … … 1082 1084 def onfreeze(self, theory_id): 1083 1085 """ 1086 Saves theory/model and passes to data loader. 1087 1088 ..warning:: This seems to be the exact same code as the next 1089 function called simply freeze. This probably needs fixing 1084 1090 """ 1085 1091 data_state_list = self._data_manager.freeze(theory_id) … … 1093 1099 def freeze(self, data_id, theory_id): 1094 1100 """ 1101 Saves theory/model and passes to data loader. 1102 1103 ..warning:: This seems to be the exact same code as the next 1104 function called simply freeze. This probably needs fixing 1095 1105 """ 1096 1106 data_state_list = self._data_manager.freeze_theory(data_id=data_id, … … 1157 1167 :param p: panel object to add to the AUI manager 1158 1168 1159 :return : ID of the event associated with the new panel [int]1169 :returns: ID of the event associated with the new panel [int] 1160 1170 1161 1171 """ … … 1178 1188 # Append nummber 1179 1189 captions = self._get_plotpanel_captions() 1180 # FIXME: Fix this aweful loop1190 # FIXME: Fix this awful loop 1181 1191 while (1): 1182 1192 caption = windowcaption + '%s' % str(self.graph_num) … … 2050 2060 version_info = json.loads(content) 2051 2061 except: 2052 msg = traceback.format_exc()2053 logging.info(msg)2054 2062 logging.info("Failed to connect to www.sasview.org") 2055 2063 version_info = {"version": "0.0.0"} … … 2458 2466 """ 2459 2467 Save file as txt 2460 :TODO: Refactor and remove this method. See TODO in _onSave. 2468 2469 .. todo:: Refactor and remove this method. See 'TODO' in _onSave. 2461 2470 """ 2462 2471 if not path == None: … … 2886 2895 # Append nummber 2887 2896 inc = 1 2888 # FIXME: fix this terrible loop2897 # FIXME: fix this terrible loop 2889 2898 while (1): 2890 2899 caption = new_caption + '_%s' % str(inc) … … 2909 2918 2910 2919 :param name: window_name in AuiPaneInfo 2911 :return : AuiPaneInfo of the name2920 :returns: AuiPaneInfo of the name 2912 2921 """ 2913 2922 for panel in self.plot_panels.values(): … … 3081 3090 pass 3082 3091 3083 # Draw all panels 3092 # Draw all panels 3084 3093 if count == 1: 3085 3094 f_draw(self.schedule_full_draw_list[0]) 3086 3095 else: 3087 3096 map(f_draw, self.schedule_full_draw_list) 3088 # Reset the attr 3097 # Reset the attr 3089 3098 if len(self.schedule_full_draw_list) == 0: 3090 3099 self.set_schedule(False) … … 3127 3136 Get window size 3128 3137 3129 :return size: tuple 3138 :returns: size 3139 :rtype: tuple 3130 3140 """ 3131 3141 width, height = self.GetSizeTuple() … … 3148 3158 pass 3149 3159 3150 # restart idle 3160 # restart idle 3151 3161 self._redraw_idle(*args, **kwargs) 3152 3162 … … 3156 3166 Restart Idle 3157 3167 """ 3158 # restart idle 3168 # restart idle 3159 3169 self.idletimer.Restart(100 * TIME_FACTOR, *args, **kwargs) 3160 3170 … … 3316 3326 """ 3317 3327 is_maximized = False 3318 # Get size of screen without 3328 # Get size of screen without 3319 3329 for screenCount in range(wx.Display().GetCount()): 3320 3330 screen = wx.Display(screenCount) … … 3333 3343 customHeight = displayHeight * 0.9 3334 3344 else: 3335 # If the custom screen is bigger than the 3345 # If the custom screen is bigger than the 3336 3346 # window screen than make maximum size 3337 3347 if customWidth > displayWidth: … … 3431 3441 def show_data_panel(self, action): 3432 3442 """ 3443 Turns on the data panel 3444 3445 The the data panel is optional. Most of its functions can be 3446 performed from the menu bar and from the plots. 3433 3447 """ 3434 3448 self.parent.show_data_panel(action)
Note: See TracChangeset
for help on using the changeset viewer.