diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-07-08 15:00:20 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-07-08 15:00:20 +0200 |
commit | 276451a383052ffdc67f561082825cc84aa83bd7 (patch) | |
tree | a148e31c8d201ecc61903eae18a495b9cfdf80be /portato/gui/windows/main.py | |
parent | 0a8814713917548767f0ff823e34d412061b3ffe (diff) | |
parent | 8b6db38a2d27fca00d0fe037e86eefc941d559e4 (diff) | |
download | portato-276451a383052ffdc67f561082825cc84aa83bd7.tar.gz portato-276451a383052ffdc67f561082825cc84aa83bd7.tar.bz2 portato-276451a383052ffdc67f561082825cc84aa83bd7.zip |
Merged in the new plugin system
Diffstat (limited to '')
-rw-r--r-- | portato/gui/windows/main.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 364810d..265d4dd 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -607,13 +607,13 @@ class MainWindow (Window): # set plugins and plugin-menu splash(_("Loading Plugins")) - plugin.load_plugins("gtk") - menus = plugin.get_plugin_queue().get_plugin_menus() + plugin.load_plugins() + menus = [p.menus for p in plugin.get_plugin_queue().get_plugins()] if menus: self.tree.get_widget("pluginMenuItem").set_no_show_all(False) pluginMenu = self.tree.get_widget("pluginMenu") - for m in menus: + for m in itt.chain(*menus): item = gtk.MenuItem(m.label) item.connect("activate", m.call) pluginMenu.append(item) @@ -1082,13 +1082,11 @@ class MainWindow (Window): def save_plugin (p): def _save (): - stat_on = p.status >= p.STAT_ENABLED - hard_on = not p.get_option("disabled") - - if stat_on != hard_on: - return int(stat_on) - else: + if p.status == p.STAT_HARD_DISABLED: return "" + + return int(p.status >= p.STAT_ENABLED) + return _save # SESSION VERSION @@ -1553,9 +1551,9 @@ class MainWindow (Window): if queue is None: plugins = [] else: - plugins = queue.get_plugins() - - PluginWindow(self.window, plugins) + plugins = list(queue.get_plugins()) + + PluginWindow(self.window, plugins, self.queue) return True def cb_show_updates_clicked (self, *args): |