summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 03:16:04 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 03:16:04 +0200
commit794bca2b17086ff4fa89bda6c0915815571d2aa9 (patch)
tree8314e86546e04c64e1befd3d82b37bb5e080866a
parent69c297fe956f174af2525ea94c07a17833674548 (diff)
downloadportato-794bca2b17086ff4fa89bda6c0915815571d2aa9.tar.gz
portato-794bca2b17086ff4fa89bda6c0915815571d2aa9.tar.bz2
portato-794bca2b17086ff4fa89bda6c0915815571d2aa9.zip
Also port FilesDetail
-rw-r--r--plugins/package_details.py33
-rw-r--r--portato/gui/templates/MainWindow.ui23
-rw-r--r--portato/gui/windows/main.py11
3 files changed, 24 insertions, 43 deletions
diff --git a/plugins/package_details.py b/plugins/package_details.py
index 49a88ad..cda3c94 100644
--- a/plugins/package_details.py
+++ b/plugins/package_details.py
@@ -12,7 +12,7 @@
import gtk
import os
-from portato.gui.views import HighlightView
+from portato.gui import views
class Detail (WidgetPlugin):
__author__ = "René 'Necoro' Neumann"
@@ -49,26 +49,41 @@ class ScrolledDetail (Detail):
self._widget_.add(self._view_)
Detail.widget_init(self)
- self._widget_.show_all()
class ChangelogDetail (ScrolledDetail):
- __description__ = "Shows the Changelog of a package"
- _widget_name_ = "Changelog"
+ __description__ = _("Shows the Changelog of a package")
+ _widget_name_ = _("Changelog")
def widget_init (self):
- self._view_ = HighlightView(self.view_update, ["changelog"])
+ self._view_ = views.HighlightView(self.view_update, ["changelog"])
ScrolledDetail.widget_init(self)
def view_update (self, pkg):
- return os.path.join(pkg.get_package_path(), "Changelog")
+ return os.path.join(pkg.get_package_path(), "ChangeLog")
class EbuildDetail (ScrolledDetail):
- __description__ = "Shows the ebuild of a package"
- _widget_name_ = "Ebuild"
+ __description__ = _("Shows the ebuild of a package")
+ _widget_name_ = _("Ebuild")
def widget_init(self):
- self._view_ = HighlightView(lambda p: p.get_ebuild_path(), ["gentoo", "sh"])
+ self._view_ = views.HighlightView(lambda p: p.get_ebuild_path(), ["gentoo", "sh"])
ScrolledDetail.widget_init(self)
+class FilesDetail (ScrolledDetail):
+ __description__ = _("Shows the installed files of a package")
+ _widget_name_ = _("Files")
+
+ def widget_init (self):
+ self._view_ = views.InstalledOnlyView(self.show_files)
+ ScrolledDetail.widget_init(self)
+
+ def show_files (self, pkg):
+ try:
+ for f in pkg.get_files():
+ yield " %s\n" % f
+ except IOError, e:
+ yield _("Error: %s") % e.strerror
+
register(EbuildDetail)
+register(FilesDetail)
register(ChangelogDetail)
diff --git a/portato/gui/templates/MainWindow.ui b/portato/gui/templates/MainWindow.ui
index e26a337..5577f9b 100644
--- a/portato/gui/templates/MainWindow.ui
+++ b/portato/gui/templates/MainWindow.ui
@@ -803,29 +803,6 @@
<property name="tab_fill">False</property>
</packing>
</child>
- <child>
- <object class="GtkScrolledWindow" id="filesScroll">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Files</property>
- </object>
- <packing>
- <property name="position">5</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
</object>
<packing>
<property name="position">1</property>
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 0eec034..184d29b 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -98,7 +98,6 @@ class PackageTable:
# views
self.views = map (lambda x: self.tree.get_widget(x).get_child(),
[
- "filesScroll",
"dependencyScroll", "useListScroll"
])
@@ -523,16 +522,6 @@ class MainWindow (Window):
# the different scrolls
- def show_files (p):
- try:
- for f in p.get_files():
- yield " %s\n" % f
- except IOError, e:
- yield _("Error: %s") % e.strerror
-
- filesScroll = self.tree.get_widget("filesScroll")
- filesScroll.add(InstalledOnlyView(show_files))
-
depScroll = self.tree.get_widget("dependencyScroll")
depScroll.add(self.build_dep_list())
mit/plugins/new_version.py?id=4627e66cf3cfd39fd0c8e02351fba3a177650dac&follow=1'>Wrong debug message in new_version pluginRené 'Necoro' Neumann1-1/+1 2009-10-24Update TRANSLATING to use gitRené 'Necoro' Neumann1-2/+15 2009-10-24Also show revision during startup and with -vRené 'Necoro' Neumann1-1/+5 2009-10-24Adding revison info to version output.René 'Necoro' Neumann3-2/+44 As the revision is no longer encoded in the version, it needs to be printed whereever it is useful. This commit adds it to the 'About' window and to the exception infos. 2009-10-23Turn new_version plugin from a mess into sth useful.René 'Necoro' Neumann2-10/+10 2009-10-23Honor branches different from masterRené 'Necoro' Neumann1-2/+4 2009-10-23Change the new_version plugin to use git.René 'Necoro' Neumann2-32/+33 Use 'git ls-remote' to check for the current HEAD revision. Additionally the revision is no longer put into the version number, but into an extra variable REVISION. 2009-10-15Objectified all the functional stuff in backend.__init__.René 'Necoro' Neumann2-32/+34 Moved all the function in backend.__init__ into the SystemWrapper class. And also make loading the real system lazy. Reason: So I do not need to care about whether anything imports the system before the MainWindow is started. 2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9 Now the splash window is forced to stay on top. Hopes no users are going to complain ;). Additionally, the splash window is destroyed opposed to only hidden. As it is not reused, there is no use in keeping it alive. (cherry picked from commit 0a30d24e34493a2f56ba801facf4daba711d363e) 2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9 Now the splash window is forced to stay on top. Hopes no users are going to complain ;). Additionally, the splash window is destroyed opposed to only hidden. As it is not reused, there is no use in keeping it alive. 2009-10-05Some more stuff to ignoreRené 'Necoro' Neumann1-0/+3 2009-10-05Renamed the ignore fileRené 'Necoro' Neumann1-0/+0 2009-10-05Update NEWSRené 'Necoro' Neumann1-0/+1 2009-10-05Also allow 'unselect all' in the PkgListRené 'Necoro' Neumann1-1/+10 2009-10-05Now have it the sorted way in PkgListsRené 'Necoro' Neumann2-3/+9 2009-10-05Enhanced system.sort_package_list to also sort CPVsRené 'Necoro' Neumann5-27/+38 2009-10-05Added an PkgList window and rewrote UpdateWindow and WorldListWindow to use itRené 'Necoro' Neumann3-39/+63 2009-10-05Add uninstall button and rename to PkgListWindowRené 'Necoro' Neumann1-2/+17 2009-10-05First quick hack to have a world listRené 'Necoro' Neumann3-2/+24