Changeset 3704e33 in sasview for sansguiframe/src/sans/guiframe/gui_manager.py
- Timestamp:
- Apr 30, 2013 4:32:02 PM (12 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:
- 6d4df13
- Parents:
- 53f9e40
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r53f9e40 r3704e33 280 280 # plot duck cleanup option 281 281 self.cleanup_plots = CLEANUP_PLOT 282 # (un)-focus color283 #self.color = '#b3b3b3'284 282 ## Find plug-ins 285 283 # Modify this so that we can specify the directory to look into … … 627 625 frame = plugin.get_frame() 628 626 frame.Show(True) 629 #self._check_applications_menu()630 627 #break 631 628 else: … … 964 961 return panel_width, panel_height 965 962 if hasattr(p, "CENTER_PANE") and p.CENTER_PANE: 966 #style = self.__gui_style & (GUIFRAME.PLOTTING_ON|GUIFRAME.MANAGER_ON)967 #if style == (GUIFRAME.PLOTTING_ON|GUIFRAME.MANAGER_ON):968 963 panel_width = self._window_width * 0.45 969 964 if custom_config != None: … … 975 970 elif p == self.defaultPanel: 976 971 return self._window_width, panel_height 977 #total_width = panel_width + self._window_width - 2.3 * panel_width978 972 return panel_width, panel_height 979 973 … … 1008 1002 frame.Show(True) 1009 1003 #add data panel 1010 1011 #w, h = self._get_panels_size(self._data_panel)1012 1004 win = MDIFrame(self, None, 'None', (100, 200)) 1013 #win.EnableCloseButton(False)1014 1005 data_panel = DataPanel(parent=win, id=-1) 1015 1006 win.set_panel(data_panel) 1016 #data_panel.set_frame(win)1017 1007 self.panels["data_panel"] = data_panel 1018 1008 self._data_panel = data_panel … … 1145 1135 """ 1146 1136 frame = event.GetEventObject() 1147 #panel = frame.panel1148 #if panel.IsMaximized():1149 # self._mgr.RestoreMaximizedPane()1150 1137 for ID in self.plot_panels.keys(): 1151 1138 if self.plot_panels[ID].window_name == frame.name: … … 1174 1161 p_panel_height = int(p_panel_width * 0.76) 1175 1162 p.frame.SetSize((p_panel_width, p_panel_height)) 1176 """1177 dw, dh = self._get_panels_size(self._data_panel)1178 dw += p_panel_width1179 _, dh = self.GetToolBar().GetSizeTuple()1180 p.frame.SetPosition((dw, -dh))1181 """1182 1163 self.graph_num += 1 1183 1164 if p.window_caption.split()[0] in NOT_SO_GRAPH_LIST: 1184 1165 windowcaption = p.window_caption 1185 1166 else: 1186 windowcaption = 'Graph' #p.window_caption1167 windowcaption = 'Graph' 1187 1168 windowname = p.window_name 1188 1169 … … 1200 1181 p.window_caption = caption 1201 1182 p.window_name = windowname + str(self.graph_num) 1202 1203 #style1 = self.__gui_style & GUIFRAME.FIXED_PANEL1204 #style2 = self.__gui_style & GUIFRAME.FLOATING_PANEL1205 1183 1206 1184 p.frame.SetTitle(p.window_caption) … … 1475 1453 add menu application 1476 1454 """ 1477 #style = self.__gui_style & GUIFRAME.MULTIPLE_APPLICATIONS1478 #if style == GUIFRAME.MULTIPLE_APPLICATIONS:1479 1455 if self._num_perspectives > 1: 1480 1456 plug_data_count = False … … 1498 1474 wx.EVT_MENU(self, id, plug.on_perspective) 1499 1475 1500 #self._applications_menu.1501 1476 if (not plug_data_count or not plug_no_data_count): 1502 1477 self._applications_menu.RemoveItem(separator) … … 1549 1524 wx.EVT_MENU(self, id, self._on_save_project) 1550 1525 if style1 == GUIFRAME.MULTIPLE_APPLICATIONS: 1551 #self._file_menu.AppendSeparator()1552 1526 id = wx.NewId() 1553 1527 self._save_appl_menu = self._file_menu.Append(id, … … 1688 1662 self.panel_on_focus = None 1689 1663 panel = self.panels[ID] 1690 #self._mgr.DetachPane(panel) 1664 1691 1665 if hasattr(panel, "connect"): 1692 1666 panel.connect.disconnect() 1693 1667 self._plotting_plugin.delete_panel(panel.group_id) 1694 #panel.Hide() 1695 #panel.clear() 1696 #panel.Close() 1668 1697 1669 if panel in self.schedule_full_draw_list: 1698 1670 self.schedule_full_draw_list.remove(panel) … … 2070 2042 content = res.read() 2071 2043 conn.close() 2072 #f=urllib2.urlopen(config.__update_URL__,2073 # timeout=1.0)2074 #content = f.read()2075 2044 except: 2076 2045 content = "0.0.0" … … 2251 2220 frame = pane.get_frame() 2252 2221 if label == 'Show Data Explorer': 2253 #if not pane.IsShown():2254 2222 if action: 2255 2223 frame.Show(True) … … 2629 2597 if data.dqy_data != None: 2630 2598 dy_val = data.dqy_data[index] 2631 #if data.mask != None: mask_val = data.mask[index]2632 2599 2633 2600 text += "%s \t%s \t%s \t%s \t%s \t%s \t%s\n" % (index, … … 2761 2728 flag = self.cpanel_on_focus.get_paste_flag() 2762 2729 self._edit_menu.Enable(GUIFRAME_ID.PASTE_ID, flag) 2763 #flag = self.cpanel_on_focus.get_print_flag() 2764 #self._edit_menu.Enable(GUIFRAME_ID.PRINT_ID, flag) 2730 2765 2731 flag = self.cpanel_on_focus.get_preview_flag() 2766 2732 self._edit_menu.Enable(GUIFRAME_ID.PREVIEW_ID, flag) … … 2773 2739 self._edit_menu.Enable(GUIFRAME_ID.COPY_ID, flag) 2774 2740 self._edit_menu.Enable(GUIFRAME_ID.PASTE_ID, flag) 2775 #self._edit_menu.Enable(GUIFRAME_ID.PRINT_ID, flag) 2741 2776 2742 self._edit_menu.Enable(GUIFRAME_ID.PREVIEW_ID, flag) 2777 2743 self._edit_menu.Enable(GUIFRAME_ID.RESET_ID, flag) … … 3014 2980 drag 3015 2981 """ 3016 #if self.cpanel_on_focus is not None: 3017 # self._toolbar.enable_drag(self.panel_on_focus) 2982 #Not implemeted 3018 2983 3019 2984 def enable_reset(self): … … 3100 3065 raise 3101 3066 3102 # Draw all panels 3103 #map(f_draw, self.schedule_full_draw_list) 3104 f_draw(self.schedule_full_draw_list[0]) 3067 # Draw all panels 3068 if count == 1: 3069 f_draw(self.schedule_full_draw_list[0]) 3070 else: 3071 map(f_draw, self.schedule_full_draw_list) 3105 3072 # Reset the attr 3106 3073 if len(self.schedule_full_draw_list) == 0: … … 3234 3201 logging.error(msg) 3235 3202 self.frame.Show() 3236 3237 #if hasattr(self.frame, 'special'): 3238 # self.frame.special.SetCurrent() 3203 3239 3204 self.SetTopWindow(self.frame) 3240 3205 … … 3309 3274 raise 3310 3275 self.frame.build_gui() 3311 #if self.s_screen is not None and self.s_screen.IsShown():3312 # self.s_screen.Close()3313 3276 3314 3277 def set_welcome_panel(self, panel_class):
Note: See TracChangeset
for help on using the changeset viewer.