- Timestamp:
- Feb 4, 2011 4:21:17 PM (14 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:
- 946d1b1
- Parents:
- 3cd5806
- Location:
- guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
ra45037aa r73b3ae2 111 111 self._edit_menu = None 112 112 self._toolbar_menu = None 113 self._save_appl_menu = None 113 114 #tool bar 114 115 self._toolbar = None … … 160 161 #update edit menu 161 162 self.enable_edit_menu() 162 print "set_panel_on_focus", event.panel.window_caption 163 163 164 164 def build_gui(self): 165 165 """ … … 725 725 self._populate_file_menu() 726 726 id = wx.NewId() 727 self._file_menu.Append(id, '&Save Application', 727 self._save_appl_menu = self._file_menu.Append(id, 728 '&Save Application', 728 729 'Save state of the current active application') 729 730 wx.EVT_MENU(self, id, self._on_save_application) … … 940 941 save the state of the current active application 941 942 """ 942 ## Default file location for save 943 self._default_save_location = os.getcwd() 944 if self._current_perspective is None: 945 return 946 reader, ext = self._current_perspective.get_extensions() 947 path = None 948 dlg = wx.FileDialog(self, "Choose a file", 949 self._default_save_location, "", ext, wx.SAVE) 950 if dlg.ShowModal() == wx.ID_OK: 951 path = dlg.GetPath() 952 self._default_save_location = os.path.dirname(path) 953 else: 954 return None 955 dlg.Destroy() 956 if path is None: 957 return 958 # default cansas xml doc 959 doc = None 960 for panel in self._current_perspective.get_perspective(): 961 doc = on_save_helper(doc, reader, panel, path) 943 if self.panel_on_focus is not None: 944 self.panel_on_focus.on_save(event) 962 945 963 946 def _on_save_project(self, event): -
guiframe/gui_toolbar.py
ra45037aa r73b3ae2 19 19 size=tbar_size) 20 20 self.AddLabelTool(GUIFRAME_ID.SAVE_ID, 'Save', save_bmp, shortHelp='Save') 21 self.AddSeparator() 21 22 22 23 bookmark_bmp = wx.ArtProvider.GetBitmap(wx.ART_ADD_BOOKMARK, wx.ART_TOOLBAR, 23 24 size=tbar_size) 24 25 self.AddLabelTool(GUIFRAME_ID.BOOKMARK_ID, 'Bookmark', bookmark_bmp,shortHelp='Bookmark') 25 26 self.AddSeparator() 26 27 zoom_in_bmp = wx.ArtProvider.GetBitmap(wx.ART_GO_UP, wx.ART_TOOLBAR, 27 28 size=tbar_size) 28 29 self.AddLabelTool(GUIFRAME_ID.ZOOM_IN_ID, 'Zoom in', zoom_in_bmp,shortHelp='Zoom in') 29 30 self.AddSeparator() 30 31 zoom_out_bmp = wx.ArtProvider.GetBitmap(wx.ART_GO_DOWN, wx.ART_TOOLBAR, 31 32 size=tbar_size) 32 33 self.AddLabelTool(GUIFRAME_ID.ZOOM_OUT_ID,'Zoom out',zoom_out_bmp,shortHelp='Zoom out') 33 34 self.AddSeparator() 34 35 zoom_bmp = wx.ArtProvider.GetBitmap(wx.ART_GO_FORWARD, wx.ART_TOOLBAR, 35 36 size=tbar_size) 36 37 self.AddLabelTool(GUIFRAME_ID.ZOOM_ID, 'Zoom', zoom_bmp,shortHelp='Zoom') 37 38 self.AddSeparator() 38 39 drag_bmp = wx.ArtProvider.GetBitmap(wx.ART_REMOVABLE, wx.ART_TOOLBAR, 39 40 size=tbar_size) 40 41 self.AddLabelTool(GUIFRAME_ID.DRAG_ID, 'Drag', drag_bmp,shortHelp='Drag') 41 42 self.AddSeparator() 42 43 preview_bmp = wx.ArtProvider.GetBitmap(wx.ART_REPORT_VIEW, wx.ART_TOOLBAR, 43 44 size=tbar_size) 44 45 self.AddLabelTool(GUIFRAME_ID.PREVIEW_ID, 'Preview', preview_bmp,shortHelp='Report') 45 46 self.AddSeparator() 46 47 print_bmp = wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR, 47 48 size=tbar_size) 48 49 self.AddLabelTool(GUIFRAME_ID.PRINT_ID, 'Print', print_bmp,shortHelp='Print') 49 50 self.AddSeparator() 50 51 undo_bmp = wx.ArtProvider.GetBitmap(wx.ART_UNDO, wx.ART_TOOLBAR, 51 52 size=tbar_size) 52 53 self.AddLabelTool(GUIFRAME_ID.UNDO_ID, 'Undo', undo_bmp,shortHelp='Undo') 53 54 54 self.AddSeparator() 55 55 redo_bmp = wx.ArtProvider.GetBitmap(wx.ART_REDO, wx.ART_TOOLBAR, 56 56 size=tbar_size) 57 57 self.AddLabelTool(GUIFRAME_ID.REDO_ID, 'Redo', redo_bmp,shortHelp='Redo') 58 self.AddSeparator() 58 59 #add button for the current application 59 self.button_application = wx. Button(self, -1, 'Welcome')60 self.button_application = wx.StaticText(self, -1, 'Welcome') 60 61 self.button_application.SetForegroundColour('black') 61 62 self.button_application.SetBackgroundColour('#1874CD') 62 63 self.AddControl(self.button_application) 64 self.AddSeparator() 63 65 #add button for the panel on focus 64 self.button_panel = wx. Button(self, -1, 'No Panel')66 self.button_panel = wx.StaticText(self, -1, 'No Panel') 65 67 self.button_panel.SetForegroundColour('black') 66 68 self.button_panel.SetBackgroundColour('#90EE90')
Note: See TracChangeset
for help on using the changeset viewer.