Changeset df7a7e3 in sasview for sansguiframe


Ignore:
Timestamp:
Sep 17, 2012 7:11:50 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
b71a53b
Parents:
cf7653d3
Message:

merging category branch

Location:
sansguiframe/src/sans/guiframe
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/__init__.py

    r8c347a6 rdf7a7e3  
    7070    for f in findall(path): 
    7171        data_files.append(('media/guiframe_media', [f])) 
     72    path = get_media_path(media="catdata") 
     73    for f in findall(path): 
     74        data_files.append(('.', [f])) 
     75 
    7276    return data_files 
  • sansguiframe/src/sans/guiframe/events.py

    r643a82a rdf7a7e3  
    3030##color event 
    3131(NewColorEvent, EVT_NEW_COLOR) = wx.lib.newevent.NewEvent() 
     32##change category event 
     33(ChangeCategoryEvent, EVT_CATEGORY) = wx.lib.newevent.NewEvent() 
  • sansguiframe/src/sans/guiframe/gui_manager.py

    rc329f4d rdf7a7e3  
    2525import urllib2 
    2626 
     27from sans.guiframe.events import EVT_CATEGORY 
    2728from sans.guiframe.events import EVT_STATUS 
    2829from sans.guiframe.events import EVT_APPEND_BOOKMARK 
     
    3940from sans.guiframe.data_processor import GridFrame 
    4041from sans.guiframe.events import EVT_NEW_BATCH 
     42from sans.guiframe.CategoryManager import CategoryManager 
    4143from sans.dataloader.loader import Loader 
    4244 
     
    211213        Initialize the Frame object 
    212214        """ 
    213          
     215 
    214216        wx.Frame.__init__(self, parent=parent, title=title, pos=pos, size=size) 
    215217        # title 
     
    319321        self.Bind(EVT_NEW_BATCH, self.on_batch_selection) 
    320322        self.Bind(EVT_NEW_COLOR, self.on_color_selection) 
     323        self.Bind(EVT_CATEGORY, self.on_change_categories) 
    321324        self.setup_custom_conf() 
    322325         
     
    342345                    pass   
    343346         
     347    def on_change_categories(self, evt): 
     348        # ILL 
     349        fitpanel = None 
     350        for item in self.plugins: 
     351            if hasattr(item, "get_panels"): 
     352                if hasattr(item, "fit_panel"): 
     353                    fitpanel = item.fit_panel 
     354 
     355        if fitpanel != None: 
     356            for i in range(0,fitpanel.GetPageCount()): 
     357                fitpanel.GetPage(i)._populate_listbox() 
     358 
     359 
     360 
    344361    def on_set_batch_result(self, data_outputs, data_inputs=None, 
    345362                             plugin_name=""): 
     
    13851402            wx.EVT_MENU(self, id, self._on_preference_menu) 
    13861403             
     1404        id = wx.NewId() 
     1405        self._view_menu.AppendSeparator() 
     1406        self._view_menu.Append(id, 'Category Manager', 'Edit model categories') 
     1407        wx.EVT_MENU(self, id, self._on_category_manager) 
     1408 
    13871409        self._menubar.Append(self._view_menu, '&View')    
    13881410          
     
    13951417        self.batch_frame.Show(True) 
    13961418         
     1419    def _on_category_manager(self, event): 
     1420        CategoryManager(self, -1, 'Model Category Manager') 
     1421 
    13971422    def _on_preference_menu(self, event):      
    13981423        """ 
Note: See TracChangeset for help on using the changeset viewer.