Changeset 1480

Show
Ignore:
Timestamp:
07/10/08 18:14:33 (4 months ago)
Author:
rob
Message:

Added ProjectPlugin? configuration from within the Project Settings dialog
* added notebook to ProjectSettings? dialog
* added getPluginInfo to PeppyPluginManager? to return PluginInfo? object for requested class

Location:
trunk/peppy
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/peppy/plugins/project.py

    r1472 r1480  
    2222from peppy.actions.minibuffer import * 
    2323from peppy.lib.userparams import * 
     24from peppy.lib.pluginmanager import * 
    2425from peppy.lib.processmanager import * 
    2526 
     
    356357 
    357358        sizer = wx.BoxSizer(wx.VERTICAL) 
    358          
    359         self.panel = InstancePanel(self, project) 
    360         sizer.Add(self.panel, 1, wx.EXPAND) 
     359        self.notebook = wx.Notebook(self) 
     360        sizer.Add(self.notebook, 1, wx.EXPAND) 
     361         
     362        self.local = InstancePanel(self.notebook, project) 
     363        self.notebook.AddPage(self.local, _("This Project")) 
     364         
     365        pm = wx.GetApp().plugin_manager 
     366        plugins = pm.getPluginInfo(ProjectPlugin) 
     367        dprint(plugins) 
     368         
     369        self.plugin = PluginPanel(self.notebook, plugins[0]) 
     370        self.notebook.AddPage(self.plugin, _("Global Project Settings")) 
    361371         
    362372        btnsizer = wx.StdDialogButtonSizer() 
     
    376386     
    377387    def applyPreferences(self): 
    378         self.panel.update() 
     388        self.local.update() 
     389        self.plugin.update() 
    379390 
    380391 
  • trunk/peppy/yapsy/PeppyPluginManager.py

    r603 r1480  
    5252        IPeppyPlugin.setStartupComplete() 
    5353 
     54    def getPluginInfo(self, interface=IPeppyPlugin): 
     55        """Return the list of all plugin_info objects of the requested class 
     56        """ 
     57        info = [] 
     58        all = self.getAllPlugins() 
     59        for plugin in all: 
     60            #print "checking plugin %s for interface %s" % (plugin.name, interface) 
     61            obj = plugin.plugin_object 
     62            if isinstance(obj, interface): 
     63                info.append(plugin) 
     64        return info 
     65     
    5466    def getActivePluginObjects(self, interface=IPeppyPlugin): 
    5567        """