diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-10-05 15:37:15 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-10-05 15:37:15 +0200 |
commit | 2fae9ac523385f61d192e9eeb664002c4a952a01 (patch) | |
tree | 21cae5c3280473fe176befec2300e1b928e1dfc0 /portato | |
parent | 63cdb7c521133a9d621f9407c4c956e995018ddd (diff) | |
download | portato-2fae9ac523385f61d192e9eeb664002c4a952a01.tar.gz portato-2fae9ac523385f61d192e9eeb664002c4a952a01.tar.bz2 portato-2fae9ac523385f61d192e9eeb664002c4a952a01.zip |
Also allow 'unselect all' in the PkgList
Diffstat (limited to '')
-rw-r--r-- | portato/gui/windows/pkglist.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/portato/gui/windows/pkglist.py b/portato/gui/windows/pkglist.py index e99e8a1..90915cb 100644 --- a/portato/gui/windows/pkglist.py +++ b/portato/gui/windows/pkglist.py @@ -30,6 +30,11 @@ class PkgListWindow (AbstractDialog): self.installBtn = self.tree.get_widget("installBtn") self.uninstallBtn = self.tree.get_widget("uninstallBtn") + + self.selectBtnLabels = { + False: _("Select _All"), + True: _("Unselect _All")} + self.all_selected = False self.queue = queue @@ -73,11 +78,15 @@ class PkgListWindow (AbstractDialog): self.window.set_geometry_hints(self.window, min_height = val) def cb_select_all_clicked (self, btn): + sel = self.all_selected = not self.all_selected + + btn.set_label(self.selectBtnLabels[sel]) + model = self.view.get_model() iter = model.get_iter_first() while iter: - model.set_value(iter, 0, not self.all_selected) + model.set_value(iter, 0, sel) iter = model.iter_next(iter) return True |