From 22a0baf7f459b267febfb16c7bc90cf460323a87 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sat, 10 Mar 2007 20:48:27 +0000 Subject: Added plugin-data to about-dialog --- portato/gui/gtk/glade/portato.glade | 439 ++++++++++++++++++++---------------- portato/gui/gtk/windows.py | 19 +- portato/plugin.py | 3 + 3 files changed, 264 insertions(+), 197 deletions(-) diff --git a/portato/gui/gtk/glade/portato.glade b/portato/gui/gtk/glade/portato.glade index 2aab717..89f52d2 100644 --- a/portato/gui/gtk/glade/portato.glade +++ b/portato/gui/gtk/glade/portato.glade @@ -389,49 +389,73 @@ 4 2 - + True - 1 - True - - - True - True - Installed - True - - - - False - - + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC - + True - True - Masked - True - - - False - 1 - + + + 2 + 2 + 3 + 5 + 5 + + + + + True - - True - True - Testing - True - - - - False - 2 - + + + 1 + 2 + GTK_FILL + 5 + + + + + True + GTK_JUSTIFY_CENTER + True + + + 2 + GTK_FILL + + 10 + + + + + True + True + <span foreground='red'><b>MISSING KEYWORD</b></span> + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + True + <b>Installed, but not in portage anymore</b> + True + 1 2 @@ -495,79 +519,55 @@ - - True - True - <b>Installed, but not in portage anymore</b> - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - True - <span foreground='red'><b>MISSING KEYWORD</b></span> - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - GTK_JUSTIFY_CENTER - True - - - 2 - GTK_FILL - - 10 - - - - + True + 1 + True - + + True + True + Installed + True + + + + False + - - - 1 - 2 - GTK_FILL - 5 - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - + True + True + Masked + True + + + False + 1 + + + + + True + True + Testing + True + + + + False + 2 + + 1 2 - 2 - 3 - 5 - 5 + 1 + 2 + GTK_FILL @@ -750,11 +750,60 @@ True - + True - True - GTK_JUSTIFY_CENTER - True + + + True + True + GTK_JUSTIFY_CENTER + True + + + False + + + + + True + About + + + tab + False + False + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + False + + + + + 1 + False + + + + + True + Plugins + + + tab + 1 + False + False + + @@ -1028,186 +1077,186 @@ - + True + 0 + 5 + <u><i>Masking Keywords</i></u> + True + True - 1 - 2 - 3 - 4 + 7 + 8 + 5 - + True 0 - File name to use, if package.use is a directory: + 5 + <u><i>Testing Keywords</i></u> + True True - 3 - 4 + 4 + 5 + 5 - + True - Add only exact version to package.use - True + 0 + 5 + <u><i>Use-Flags</i></u> + True + True + + + 1 + 2 + 6 + + + + + True + + + True + 0 + GTK_SHADOW_OUT + + + True + 0 + <u>You may use the following placeholders:</u> + + <i>$(cat)</i>: category + <i>$(pkg)</i>: package name + <i>$(cat-1)/$(cat-2)</i>: first/second part of the category + True + + + + + + label_item + + + + 2 - 2 - 3 - + True - Add only exact version to package.keywords + Add only exact version to package.mask/package.unmask True 2 - 5 - 6 + 8 + 9 - + True 0 - File name to use, if package.keywords is a directory: + File name to use, if package.mask/package.unmask is a directory: True - 6 - 7 + 9 + 10 - + True 1 2 - 6 - 7 + 9 + 10 - + True 1 2 - 9 - 10 + 6 + 7 - + True 0 - File name to use, if package.mask/package.unmask is a directory: + File name to use, if package.keywords is a directory: True - 9 - 10 + 6 + 7 - + True - Add only exact version to package.mask/package.unmask + Add only exact version to package.keywords True 2 - 8 - 9 + 5 + 6 - + True - - - True - 0 - GTK_SHADOW_OUT - - - True - 0 - <u>You may use the following placeholders:</u> - - <i>$(cat)</i>: category - <i>$(pkg)</i>: package name - <i>$(cat-1)/$(cat-2)</i>: first/second part of the category - True - - - - - - label_item - - - - + Add only exact version to package.use + True 2 + 2 + 3 - - True - 0 - 5 - <u><i>Use-Flags</i></u> - True - True - - - 1 - 2 - 6 - - - - + True 0 - 5 - <u><i>Testing Keywords</i></u> - True + File name to use, if package.use is a directory: True - 4 - 5 - 5 + 3 + 4 - + True - 0 - 5 - <u><i>Masking Keywords</i></u> - True - True - 7 - 8 - 5 + 1 + 2 + 3 + 4 diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py index 5638741..2e5fd85 100644 --- a/portato/gui/gtk/windows.py +++ b/portato/gui/gtk/windows.py @@ -102,7 +102,7 @@ class AbstractDialog (Window): class AboutWindow (AbstractDialog): """A window showing the "about"-informations.""" - def __init__ (self, parent): + def __init__ (self, parent, plugins): """Constructor. @param parent: the parent window @@ -121,6 +121,21 @@ Copyright (C) 2006-2007 René 'Necoro' Neumann <necoro@necoro.net> Thanks to Fred for support and ideas :P """ % VERSION) + view = self.tree.get_widget("pluginList") + store = gtk.ListStore(str,str) + + view.set_model(store) + + cell = gtk.CellRendererText() + col = gtk.TreeViewColumn("Plugin", cell, markup = 0) + view.append_column(col) + + col = gtk.TreeViewColumn("Authors", cell, text = 1) + view.append_column(col) + + for p in [(""+n+"",a) for n,a in plugins]: + store.append(p) + self.window.show_all() class SearchWindow (AbstractDialog): @@ -983,7 +998,7 @@ class MainWindow (Window): return True def cb_about_clicked (self, button): - AboutWindow(self.window) + AboutWindow(self.window, self.pluginQueue.get_plugin_data()) return True def cb_right_click (self, object, event): diff --git a/portato/plugin.py b/portato/plugin.py index 70d27e1..4d49fc9 100644 --- a/portato/plugin.py +++ b/portato/plugin.py @@ -197,6 +197,9 @@ class PluginQueue: if load: self._load() + def get_plugin_data (self): + return [(x.name, x.author) for x in self.list] + def hook (self, hook, *hargs, **hkwargs): """This is a method taking care of calling the plugins. -- cgit v1.2.3-54-g00ecf