Changeset ba535a6 in sasview
- Timestamp:
- Apr 9, 2010 11:01:36 AM (15 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:
- 2fc9243
- Parents:
- f71c2de
- Location:
- guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
rb91c736 rba535a6 46 46 import logging 47 47 48 49 50 def quit_guiframe(parent=None): 51 """ 52 Pop up message to make sure the user wants to quit the application 53 """ 54 message = "Do you really want to quit \n" 55 message += "this application?" 56 dial = wx.MessageDialog(parent, message, 'Question', 57 wx.YES_NO|wx.NO_DEFAULT|wx.ICON_QUESTION) 58 if dial.ShowModal() == wx.ID_YES: 59 return True 60 else: 61 return False 62 48 63 class Plugin: 49 64 """ … … 484 499 485 500 id = wx.NewId() 486 self.filemenu.Append(id, '& Open', 'Open a file')501 self.filemenu.Append(id, '&Load Data', 'Load data file into the application') 487 502 wx.EVT_MENU(self, id, self._on_open) 488 503 #self.filemenu.AppendSeparator() … … 710 725 Quit the application 711 726 """ 712 import sys 713 wx.Frame.Close(self) 714 wx.Exit() 715 sys.exit() 716 717 727 flag = quit_guiframe(parent=self) 728 if flag: 729 import sys 730 wx.Frame.Close(self) 731 wx.Exit() 732 sys.exit() 733 718 734 def _check_update(self, event=None): 719 735 """ -
guiframe/local_perspectives/plotting/Plotter1D.py
rc81140c rba535a6 327 327 if hasattr(self.plots[self.graph.selected_plottable], "group_id"): 328 328 new_plot.group_id = self.plots[self.graph.selected_plottable].group_id 329 new_plot.id = self.plots[self.graph.selected_plottable].id 329 if hasattr(self.plots[self.graph.selected_plottable],"id"): 330 new_plot.id = self.plots[self.graph.selected_plottable].id 331 else: 332 new_plot.id = str(time.time()) 330 333 else: 331 334 new_plot.group_id = str(time.time()) … … 408 411 if hasattr(self.plots[self.graph.selected_plottable], "group_id"): 409 412 new_plot.group_id = self.plots[self.graph.selected_plottable].group_id 410 new_plot.id = self.plots[self.graph.selected_plottable].id 413 if hasattr(self.plots[self.graph.selected_plottable],"id"): 414 new_plot.id = self.plots[self.graph.selected_plottable].id 415 else: 416 new_plot.id = str(time.time()) 411 417 else: 412 418 new_plot.group_id = str(time.time())
Note: See TracChangeset
for help on using the changeset viewer.