diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2013-12-25 16:34:18 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2013-12-25 16:34:18 (GMT) |
commit | 762122d87df2013f1841a5aff2aa2cfd6c76b404 (patch) | |
tree | 1991174f6453d354b483d6ba8294b2d41c95a47c /points_list.py | |
parent | 0f295a9a5f6d3e7913a73cb365a161c3bef4520a (diff) |
works with details
Diffstat (limited to 'points_list.py')
-rw-r--r-- | points_list.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/points_list.py b/points_list.py index 25f739b..0f5ce28 100644 --- a/points_list.py +++ b/points_list.py @@ -81,7 +81,7 @@ class Data(gtk.TreeView): def _label_changed(self, cell, path, new_text, model): model[path][0] = new_text - + self.emit("label-changed", str(path), new_text) def _value_changed(self, cell, path, new_text, model, activity): @@ -90,6 +90,16 @@ class Data(gtk.TreeView): self.emit("value-changed", str(path), new_text) - - + def get_info(self): + l = [] + for row in self.model: + name = row[1] + pos = row[0] + pos = pos.replace('(', '') + pos = pos.replace(')', '') + pos = pos.split(',') + pos = [float(pos[0]), float(pos[1])] + pos = (int(pos[0]), int(pos[1])) + l.append((name, pos)) + return l |