Changeset 37c36d9 in sasview for sansguiframe
- Timestamp:
- Sep 3, 2011 5:17:11 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:
- 53cf669
- Parents:
- dc51a7f
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
rd9c5777 r37c36d9 2351 2351 self.cpanel_on_focus.on_reset(event) 2352 2352 2353 def on_change_caption(self, name, old_caption, new_caption): 2354 """ 2355 Change the panel caption 2356 2357 :param name: window_name of the pane 2358 :param old_caption: current caption [string] 2359 :param new_caption: new caption [string] 2360 """ 2361 # wx.aui.AuiPaneInfo 2362 pane_info = self.get_paneinfo(name) 2363 # New Caption 2364 pane_info.Caption(new_caption) 2365 # update the data_panel.cb_plotpanel 2366 if 'data_panel' in self.panels.keys(): 2367 # remove from data_panel combobox 2368 data_panel = self.panels["data_panel"] 2369 if data_panel.cb_plotpanel is not None: 2370 pos = data_panel.cb_plotpanel.FindString(str(old_caption)) 2371 if pos != wx.NOT_FOUND: 2372 data_panel.cb_plotpanel.SetString(pos, new_caption) 2373 data_panel.cb_plotpanel.SetStringSelection(new_caption) 2374 # update window Show menu 2375 if self._window_menu != None: 2376 for item in self._window_menu.GetMenuItems(): 2377 pos = self._window_menu.FindItem(old_caption) 2378 if self._window_menu.GetLabel(pos) == str(old_caption): 2379 self._window_menu.SetLabel(pos, new_caption) 2380 break 2381 # update aui manager 2382 self._mgr.Update() 2383 2384 def get_paneinfo(self, name): 2385 """ 2386 Get pane Caption from window_name 2387 2388 :param name: window_name in AuiPaneInfo 2389 : return: AuiPaneInfo of the name 2390 """ 2391 return self._mgr.GetPane(name) 2392 2353 2393 def enable_undo(self): 2354 2394 """ … … 2507 2547 except: 2508 2548 pass 2509 #print self.callback,self.schedule,self.schedule_full_draw_list2510 2549 2511 2550 # Draw all panels -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
rdc51a7f r37c36d9 50 50 window_name = "plotpanel" 51 51 ## Title to appear on top of the window 52 window_caption = " Plot Panel"52 window_caption = "Graph" 53 53 ## Flag to tell the GUI manager that this panel is not 54 54 # tied to any perspective … … 458 458 self._slicerpop.AppendSeparator() 459 459 id = wx.NewId() 460 self._slicerpop.Append(id, '&Reset Graph')460 self._slicerpop.Append(id, '&Reset Range') 461 461 wx.EVT_MENU(self, id, self.onResetGraph) 462 462 try: … … 466 466 pos_x, pos_y = self.toolbar.GetPositionTuple() 467 467 pos = (pos_x, pos_y + 5) 468 468 469 self._slicerpop.AppendSeparator() 470 id = wx.NewId() 471 self._slicerpop.Append(id, '&Window Title') 472 wx.EVT_MENU(self, id, self.onChangeCaption) 473 469 474 self.PopupMenu(self._slicerpop, pos) 470 475 -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py
rdc51a7f r37c36d9 390 390 pos = (pos_x, pos_y + 5) 391 391 self.PopupMenu(slicerpop, pos) 392 393 slicerpop.AppendSeparator() 394 id = wx.NewId() 395 slicerpop.Append(id, '&Window Title') 396 wx.EVT_MENU(self, id, self.onChangeCaption) 397 398 self.PopupMenu(self._slicerpop, pos) 392 399 393 400 def onEditLabels(self, event):
Note: See TracChangeset
for help on using the changeset viewer.