From 148255a3007c6743e7e02b8fdd6e6598a2c4cee3 Mon Sep 17 00:00:00 2001
From: necoro <>
Date: Tue, 7 Nov 2006 13:02:40 +0000
Subject: re-enabled oneshot; fixes
---
geneticone/gui/gtk/wrapper.py | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
(limited to 'geneticone/gui/gtk/wrapper.py')
diff --git a/geneticone/gui/gtk/wrapper.py b/geneticone/gui/gtk/wrapper.py
index 6f3cdd8..7597a8a 100644
--- a/geneticone/gui/gtk/wrapper.py
+++ b/geneticone/gui/gtk/wrapper.py
@@ -25,6 +25,34 @@ class GtkTree (Tree):
self.tree = tree
self.cpv_col = col
+ self.emergeIt = self.append(None, ["Emerge", ""])
+ self.unmergeIt = self.append(None, ["Unmerge", ""])
+
+ def build_append_value (self, cpv, oneshot = False, update = False, version = None):
+ string = ""
+
+ if oneshot:
+ string += "oneshot"
+ if update: string += "; "
+
+ if update:
+ string += "updating"
+ if version != None:
+ string += " from version %s" % version
+
+ return [cpv, string]
+
+ def get_emerge_it (self):
+ return self.emergeIt
+
+ def get_unmerge_it (self):
+ return self.unmergeIt
+
+ def is_in_emerge (self, it):
+ return self.get_path_from_iter(it).split(":")[0] == self.get_path_from_iter(self.emergeIt)
+
+ def is_in_unmerge (self, it):
+ return self.get_path_from_iter(it).split(":")[0] == self.get_path_from_iter(self.unmergeIt)
def iter_has_parent (self, it):
return (self.tree.iter_parent(it) != None)
--
cgit v1.2.3-54-g00ecf