diff options
Diffstat (limited to 'activity.py')
-rwxr-xr-x | activity.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activity.py b/activity.py index e6437b5..7b7032a 100755 --- a/activity.py +++ b/activity.py @@ -58,6 +58,11 @@ class Activity(activity.Activity): add_point.set_tooltip(_("Add a point")) toolbar_box.toolbar.insert(add_point, -1) + rem_point = ToolButton("row-remove") + rem_point.connect("clicked", self._remove_point) + rem_point.set_tooltip(_("Remove the selected point")) + toolbar_box.toolbar.insert(rem_point, -1) + # separator and stop button separator = gtk.SeparatorToolItem() separator.props.draw = False @@ -123,6 +128,10 @@ class Activity(activity.Activity): def _add_point(self, widget, label="", value="City"): pos = self.labels_and_values.add_value(label, value) + def _remove_point(self, widget): + path = self.labels_and_values.remove_selected_value() + self._update_points() + def _add_coor(self, pos): if self._image is not None: self.labels_and_values.update_selected_value(pos) |