summaryrefslogtreecommitdiff
path: root/plugins/package_details.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 04:05:31 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 04:05:31 +0200
commitf6facfb4193a582b94fa884f4bd2c4b70c862250 (patch)
tree5feb62db91cc3c9ff5051d209a92eae761986dc2 /plugins/package_details.py
parent1c9dfd130bf317afe6c78a3d0bdea6001f67a060 (diff)
downloadportato-f6facfb4193a582b94fa884f4bd2c4b70c862250.tar.gz
portato-f6facfb4193a582b94fa884f4bd2c4b70c862250.tar.bz2
portato-f6facfb4193a582b94fa884f4bd2c4b70c862250.zip
Doc
Diffstat (limited to 'plugins/package_details.py')
-rw-r--r--plugins/package_details.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/package_details.py b/plugins/package_details.py
index 3c96cf6..88dfc6c 100644
--- a/plugins/package_details.py
+++ b/plugins/package_details.py
@@ -17,6 +17,11 @@ from portato.gui import views
from portato.backend import system
class Detail (WidgetPlugin):
+ """
+ The baseclass for a detail.
+ This inherits from `WidgetPlugin` and manages the basic things, like adding to the Notebook.
+ """
+
__author__ = "René 'Necoro' Neumann"
_view_ = None
old_pkg = None
@@ -27,6 +32,7 @@ class Detail (WidgetPlugin):
def widget_init (self):
self.add_widget("Package Notebook", (self._widget_, self._widget_name_))
+ # if the detail was updated before it was actually initialized, update it again :)
if self._old_pkg is not None:
self._update(self._old_pkg)
@@ -39,14 +45,19 @@ class Detail (WidgetPlugin):
self._view_.update(pkg, force = force)
self._old_pkg = None
- else:
+
+ else: # save
self._old_pkg = pkg
class ScrolledDetail (Detail):
+ """
+ Add a ScrolledWindow.
+ """
def widget_init (self):
self._widget_ = gtk.ScrolledWindow()
self._widget_.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+
if self._view_ is not None:
self._widget_.add(self._view_)
@@ -67,6 +78,7 @@ class ChangelogDetail (ScrolledDetail):
class EbuildDetail (ScrolledDetail):
__description__ = _("Shows the ebuild of a package")
__name__ = "Detail: Ebuild"
+ __dependency__ = [">=dev-python/pygtksourceview-2.4.0"]
_widget_name_ = _("Ebuild")
def widget_init(self):
@@ -196,6 +208,7 @@ class DependencyDetail (ScrolledDetail):
return store
+# register them
register(DependencyDetail)
register(EbuildDetail)
register(FilesDetail)
s='deletions'>-102/+96 2008-03-19install dbus_init pluginRené 'Necoro' Neumann1-1/+1 2008-03-19Init dbus threads using a pluginRené 'Necoro' Neumann3-1/+20 2008-03-19Make logger thread-safeRené 'Necoro' Neumann1-3/+6 2008-03-18Fixed new_use_flag creation errorRené 'Necoro' Neumann1-3/+3 2008-03-18keep i18n up2dateRené 'Necoro' Neumann3-326/+366 2008-03-18corrected header commentRené 'Necoro' Neumann1-2/+2 2008-03-18Removed gtk subdirRené 'Necoro' Neumann21-134/+79 2008-03-18Removed wrapperRené 'Necoro' Neumann2-238/+184 2008-03-18Split and renamed gui_helperRené 'Necoro' Neumann4-249/+266 2008-03-18Splitted windows.pyRené 'Necoro' Neumann10-424/+549 2008-03-12Moved get_dependencies to top package classRené 'Necoro' Neumann4-50/+85 2008-03-11improved performance by caching the use_expand queriesRené 'Necoro' Neumann1-5/+14 2008-03-11use catapult varsRené 'Necoro' Neumann2-4/+6 2008-03-11Updated catapult stuffRené 'Necoro' Neumann5-56/+108 2008-03-10Generate correct KeyNotFoundExceptionRené 'Necoro' Neumann1-2/+2 2008-03-09Small changesRené 'Necoro' Neumann3-1/+4 2008-03-07Better session handlingRené 'Necoro' Neumann1-5/+54 2008-03-07Small changesRené 'Necoro' Neumann1-1/+4 2008-03-07Updated shm module to 1.2René 'Necoro' Neumann1-8/+21 2008-03-07Update TODORené 'Necoro' Neumann1-3/+1 2008-03-07hmm ... yesRené 'Necoro' Neumann1-1/+1 2008-03-06Used better exceptions for configuration parserRené 'Necoro' Neumann1-26/+114 2008-03-06Update translationRené 'Necoro' Neumann2-349/+393 2008-03-06Update createpot.shRené 'Necoro' Neumann1-3/+2 2008-03-06Use 'nofork' instead of 'nolistener'René 'Necoro' Neumann1-3/+3 2008-03-05Install glade files into template dir and not data dirRené 'Necoro' Neumann2-2/+1 2008-03-05Added dependency listRené 'Necoro' Neumann3-117/+237