Changeset f932c02 in sasview for guiframe/gui_toolbar.py


Ignore:
Timestamp:
Apr 14, 2011 11:50:37 AM (14 years ago)
Author:
Jae Cho <jhjcho@…>
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:
0cf97c5
Parents:
56fb77f
Message:

added save button in toolbar, and repositioned menu items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_toolbar.py

    ra1a252e rf932c02  
    5959        drag_bmp = drag_im.ConvertToBitmap() 
    6060        self.AddSeparator() 
     61        save_im = GUIFRAME_ICON.SAVE_ICON 
     62        save_im.Rescale(tbar_size[0], tbar_size[1], wx.IMAGE_QUALITY_HIGH) 
     63        save_bmp = save_im.ConvertToBitmap() 
     64        disable_save_bmp = wx.NullBitmap 
     65        self.AddLabelTool(GUIFRAME_ID.SAVE_ID, 'Save', save_bmp, 
     66                   disable_save_bmp, button_type,'Save') 
     67        self.AddSeparator() 
    6168        report_im = GUIFRAME_ICON.REPORT_ICON 
    6269        report_im.Rescale(tbar_size[0], tbar_size[1], wx.IMAGE_QUALITY_HIGH) 
     
    141148            self.parent.Bind(wx.EVT_TOOL, self.parent.on_reset_panel, 
    142149                             id=GUIFRAME_ID.RESET_ID) 
     150            self.parent.Bind(wx.EVT_TOOL, self.parent.on_save_panel, 
     151                             id=GUIFRAME_ID.SAVE_ID) 
    143152            self.parent.Bind(wx.EVT_TOOL, self.parent.on_preview_panel, 
    144153                             id=GUIFRAME_ID.PREVIEW_ID) 
     
    161170            self.EnableTool(GUIFRAME_ID.PREVIEW_ID, False) 
    162171            self.EnableTool(GUIFRAME_ID.RESET_ID, False) 
     172            self.EnableTool(GUIFRAME_ID.SAVE_ID, False) 
    163173            self._bookmark_bt.Disable() 
    164174             
     
    169179            self.EnableTool(GUIFRAME_ID.PREVIEW_ID, panel.get_preview_flag()) 
    170180            self.EnableTool(GUIFRAME_ID.RESET_ID, panel.get_reset_flag()) 
     181            self.EnableTool(GUIFRAME_ID.SAVE_ID, panel.get_save_flag()) 
    171182            self._bookmark_bt.Enable(panel.get_bookmark_flag()) 
    172183        self.Realize() 
Note: See TracChangeset for help on using the changeset viewer.