summaryrefslogtreecommitdiff
path: root/portato/gui/windows
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-07-28 22:07:16 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-07-28 22:07:16 +0200
commit4e2dd870b22419e6f24fc7a4ad38e8bd42cc56d8 (patch)
tree4e236927dc2717577d22f96f4dbc28baccda19de /portato/gui/windows
parentea1b27e48a607324270b90f9c54e032fe349100d (diff)
downloadportato-4e2dd870b22419e6f24fc7a4ad38e8bd42cc56d8.tar.gz
portato-4e2dd870b22419e6f24fc7a4ad38e8bd42cc56d8.tar.bz2
portato-4e2dd870b22419e6f24fc7a4ad38e8bd42cc56d8.zip
Disable '--oneshot' button if senseless
Diffstat (limited to '')
-rw-r--r--portato/gui/windows/main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index c50940a..1b7c0f0 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -1279,11 +1279,14 @@ class MainWindow (Window):
store, it = selection.get_selected()
if it:
- if self.queueTree.is_in_emerge(it) and self.queueTree.iter_has_parent(it):
+ parent = self.queueTree.parent_iter(it)
+ if self.queueTree.is_in_emerge(it) and parent and not self.queueTree.iter_has_parent(parent):
package = store.get_value(it, 0)
+ self.queueOneshot.set_sensitive(True)
set_val(package in self.queue.oneshotmerge)
return True
+ self.queueOneshot.set_sensitive(False)
set_val(False)
return True