summaryrefslogtreecommitdiff
path: root/portato/gui/gtk
diff options
context:
space:
mode:
authornecoro <>2007-06-15 13:26:33 +0000
committernecoro <>2007-06-15 13:26:33 +0000
commit7a87171db82eb2bd4b46dc1077e04dfcba2c7393 (patch)
treeb6d4e9edc38f8f1bf2a471d1987983175a141994 /portato/gui/gtk
parentfdb59c4e6f967c0c133f2aba1fb0c290d1e05f5b (diff)
downloadportato-7a87171db82eb2bd4b46dc1077e04dfcba2c7393.tar.gz
portato-7a87171db82eb2bd4b46dc1077e04dfcba2c7393.tar.bz2
portato-7a87171db82eb2bd4b46dc1077e04dfcba2c7393.zip
added ability of passing "&&" to the sync command
Diffstat (limited to '')
-rw-r--r--portato/gui/gtk/__init__.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/portato/gui/gtk/__init__.py b/portato/gui/gtk/__init__.py
index 5e164db..db9e6e1 100644
--- a/portato/gui/gtk/__init__.py
+++ b/portato/gui/gtk/__init__.py
@@ -10,8 +10,31 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from windows import MainWindow
+import gtk
+from portato import plugin
+from portato.backend import system
+from windows import MainWindow, SearchWindow, EbuildWindow
def run ():
m = MainWindow()
m.main()
+
+def show_ebuild (pkg):
+ plugin.load_plugins("gtk")
+
+ def _show (pkg):
+ gtk.main_quit()
+
+ hook = plugin.hook("open_ebuild", pkg, None)
+
+ ew = hook(EbuildWindow)(None, system.new_package(pkg))
+ ew.window.connect("destroy", lambda *x: gtk.main_quit())
+ ew.window.set_title("Portato Ebuild Viewer - %s" % pkg)
+
+ gtk.main()
+
+ s = SearchWindow(None, [x.get_cpv() for x in system.sort_package_list(system.find_all_packages(pkg, True))], _show)
+ s.window.set_title("Portato Ebuild Viewer - Search")
+ s.window.connect("destroy", lambda *x: gtk.main_quit())
+
+ gtk.main()