summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-10-05 14:37:19 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-10-05 14:37:19 +0200
commit5ae4fda6f6fdcc8a21253dd6dc9d6051c99af34f (patch)
tree502a757c8271576beaa49968a444c69522051fa0
parent82a7ed53f40fa4e7dd6f716b5150b2f1374ae93b (diff)
downloadportato-5ae4fda6f6fdcc8a21253dd6dc9d6051c99af34f.tar.gz
portato-5ae4fda6f6fdcc8a21253dd6dc9d6051c99af34f.tar.bz2
portato-5ae4fda6f6fdcc8a21253dd6dc9d6051c99af34f.zip
First quick hack to have a world list
Diffstat (limited to '')
-rw-r--r--portato/gui/templates/MainWindow.menu10
-rw-r--r--portato/gui/windows/main.py9
-rw-r--r--portato/gui/windows/update.py7
3 files changed, 24 insertions, 2 deletions
diff --git a/portato/gui/templates/MainWindow.menu b/portato/gui/templates/MainWindow.menu
index 1cce3be..5d8e8e0 100644
--- a/portato/gui/templates/MainWindow.menu
+++ b/portato/gui/templates/MainWindow.menu
@@ -72,7 +72,7 @@
<child>
<object class="GtkAction" id="updateAction">
<property name="name">updateAction</property>
- <property name="label" translatable="yes">Update _World</property>
+ <property name="label" translatable="yes">Up_date World</property>
<signal handler="cb_update_clicked" name="activate"/>
</object>
</child>
@@ -84,6 +84,13 @@
</object>
</child>
<child>
+ <object class="GtkAction" id="showWorldPkgsAction">
+ <property name="name">showWorldPkgsAction</property>
+ <property name="label" translatable="yes">Show _World Packages</property>
+ <signal handler="cb_show_world_clicked" name="activate"/>
+ </object>
+ </child>
+ <child>
<object class="GtkToggleAction" id="showInstalledAction">
<property name="name">showInstalledAction</property>
<property name="label" translatable="yes">Show _Only Installed Packages</property>
@@ -170,6 +177,7 @@
<menuitem name="unmergeMenuItem" action="unmergeAction"/>
<menuitem name="updateMenuItem" action="updateAction"/>
<menuitem name="showUpdatesMenuItem" action="showUpdatesAction"/>
+ <menuitem name="showWorldPkgsMenuItem" action="showWorldPkgsAction" />
<menuitem name="showInstalledMenuItem" action="showInstalledAction"/>
<separator/>
<menuitem name="syncMenuItem" action="syncAction"/>
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 1b67747..c99790c 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -50,7 +50,7 @@ from .about import AboutWindow
from .plugin import PluginWindow
from .preference import PreferenceWindow
from .search import SearchWindow
-from .update import UpdateWindow
+from .update import UpdateWindow, WorldListWindow
class PackageTable:
"""A window with data about a specfic package."""
@@ -1624,6 +1624,13 @@ class MainWindow (Window):
GtkThread(name="Show Updates Thread", target = __update).start()
return True
+ def cb_show_world_clicked (self, *args):
+ """
+ Show the list of world packages.
+ """
+ WorldListWindow(self.window, system.find_packages(pkgSet = "world"), self.queue, self.jump_to)
+ return True
+
def cb_show_installed_toggled (self, *args):
"""
Toggle the "show only installed" option.
diff --git a/portato/gui/windows/update.py b/portato/gui/windows/update.py
index 8e32dd9..d77d257 100644
--- a/portato/gui/windows/update.py
+++ b/portato/gui/windows/update.py
@@ -115,3 +115,10 @@ class UpdateWindow (AbstractDialog):
store = self.view.get_model()
store[path][0] = not store[path][0]
return True
+
+class WorldListWindow (UpdateWindow):
+ __file__ = __window__ = "UpdateWindow"
+
+ def __init__ (self, *args, **kwargs):
+ UpdateWindow.__init__(self, *args, **kwargs)
+ self.window.set_title(_("World Packages"))