diff options
-rw-r--r-- | portato/gui/gtk/__init__.py | 5 | ||||
-rw-r--r-- | portato/gui/qt/__init__.py | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/portato/gui/gtk/__init__.py b/portato/gui/gtk/__init__.py index db9e6e1..17d6299 100644 --- a/portato/gui/gtk/__init__.py +++ b/portato/gui/gtk/__init__.py @@ -25,11 +25,12 @@ def show_ebuild (pkg): def _show (pkg): gtk.main_quit() + pkg = system.new_package(pkg) hook = plugin.hook("open_ebuild", pkg, None) - ew = hook(EbuildWindow)(None, system.new_package(pkg)) + ew = hook(EbuildWindow)(None, pkg) ew.window.connect("destroy", lambda *x: gtk.main_quit()) - ew.window.set_title("Portato Ebuild Viewer - %s" % pkg) + ew.window.set_title("Portato Ebuild Viewer - %s" % pkg.get_cpv()) gtk.main() diff --git a/portato/gui/qt/__init__.py b/portato/gui/qt/__init__.py index 4882a73..3f83aeb 100644 --- a/portato/gui/qt/__init__.py +++ b/portato/gui/qt/__init__.py @@ -26,10 +26,11 @@ def show_ebuild (pkg): app = QApplication([]) def _show (pkg): + pkg = system.new_package(pkg) hook = plugin.hook("open_ebuild", pkg, None) - ew = hook(EbuildDialog)(None, system.new_package(pkg)) - ew.setWindowTitle("Portato Ebuild Viewer - %s" % pkg) + ew = hook(EbuildDialog)(None, pkg) + ew.setWindowTitle("Portato Ebuild Viewer - %s" % pkg.get_cpv()) ew.exec_() s = SearchDialog(None, [x.get_cpv() for x in system.sort_package_list(system.find_all_packages(pkg, True))], _show) |