summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 03:01:29 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 03:01:29 +0200
commit69c297fe956f174af2525ea94c07a17833674548 (patch)
tree42fa3697ad9a470eb62300a6bb43236a1dabcb6a
parent07201291ae3a145e4b7c66253370b2acd9206db1 (diff)
downloadportato-69c297fe956f174af2525ea94c07a17833674548.tar.gz
portato-69c297fe956f174af2525ea94c07a17833674548.tar.bz2
portato-69c297fe956f174af2525ea94c07a17833674548.zip
Also ported EbuildDetail
Diffstat (limited to '')
-rw-r--r--plugins/package_details.py14
-rw-r--r--portato/gui/templates/MainWindow.ui23
-rw-r--r--portato/gui/windows/main.py4
3 files changed, 14 insertions, 27 deletions
diff --git a/plugins/package_details.py b/plugins/package_details.py
index 2ae9f56..49a88ad 100644
--- a/plugins/package_details.py
+++ b/plugins/package_details.py
@@ -56,7 +56,19 @@ class ChangelogDetail (ScrolledDetail):
_widget_name_ = "Changelog"
def widget_init (self):
- self._view_ = HighlightView(lambda p: os.path.join(p.get_package_path(), "ChangeLog"), ["changelog"])
+ self._view_ = HighlightView(self.view_update, ["changelog"])
ScrolledDetail.widget_init(self)
+ def view_update (self, pkg):
+ return os.path.join(pkg.get_package_path(), "Changelog")
+
+class EbuildDetail (ScrolledDetail):
+ __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"])
+ ScrolledDetail.widget_init(self)
+
+register(EbuildDetail)
register(ChangelogDetail)
diff --git a/portato/gui/templates/MainWindow.ui b/portato/gui/templates/MainWindow.ui
index 0d6a56a..e26a337 100644
--- a/portato/gui/templates/MainWindow.ui
+++ b/portato/gui/templates/MainWindow.ui
@@ -804,29 +804,6 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="ebuildScroll">
- <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="label16">
- <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">Ebuild</property>
- </object>
- <packing>
- <property name="position">3</property>
- <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>
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 26ee7f4..0eec034 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -98,7 +98,7 @@ class PackageTable:
# views
self.views = map (lambda x: self.tree.get_widget(x).get_child(),
[
- "ebuildScroll", "filesScroll",
+ "filesScroll",
"dependencyScroll", "useListScroll"
])
@@ -522,8 +522,6 @@ class MainWindow (Window):
slots.NotebookSlot(self.pkgNotebook, gtk.Widget, "Package Notebook")
# the different scrolls
- ebuildScroll = self.tree.get_widget("ebuildScroll")
- ebuildScroll.add(HighlightView(lambda p: p.get_ebuild_path(), ["gentoo", "sh"]))
def show_files (p):
try: