summaryrefslogtreecommitdiff
path: root/geneticone/gui/gtk/wrapper.py
diff options
context:
space:
mode:
authornecoro <>2006-11-07 13:02:40 +0000
committernecoro <>2006-11-07 13:02:40 +0000
commit148255a3007c6743e7e02b8fdd6e6598a2c4cee3 (patch)
tree05b148cbf5102b5c11357b5439a6c22d5dd57d26 /geneticone/gui/gtk/wrapper.py
parente54728989f062431ebcb939f9c9c4753a6f2f521 (diff)
downloadportato-148255a3007c6743e7e02b8fdd6e6598a2c4cee3.tar.gz
portato-148255a3007c6743e7e02b8fdd6e6598a2c4cee3.tar.bz2
portato-148255a3007c6743e7e02b8fdd6e6598a2c4cee3.zip
re-enabled oneshot; fixes
Diffstat (limited to '')
-rw-r--r--geneticone/gui/gtk/wrapper.py28
1 files changed, 28 insertions, 0 deletions
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 += "<i>oneshot</i>"
+ if update: string += "; "
+
+ if update:
+ string += "<i>updating</i>"
+ if version != None:
+ string += "<i> from version %s</i>" % 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)