+ def remove_fp(self, *args):
+ selection = self.treeview.get_selection()
+ model, path = selection.get_selected()
+ if path:
+ position = model[path][0]
+ for i in self.balls:
+ if i.position == int(position):
+ self.balls.remove(i)
+ del model[path]
+
+ def save_fp_list(self, *args):
+ assert self.project is not None
+
+ # if the project has no
+ if self.project and not self.project.focus_points_file:
+ fc = gtk.FileChooserDialog(_('Save the focus points file'),
+ self.window,
+ action=gtk.FILE_CHOOSER_ACTION_SAVE,
+ buttons=(gtk.STOCK_CANCEL,
+ gtk.RESPONSE_CANCEL,
+ gtk.STOCK_SAVE,
+ gtk.RESPONSE_OK))
+ if fc.run() == gtk.RESPONSE_OK:
+ self.project.focus_points_file = fc.get_filename()
+ fc.destroy()
+ else:
+ fc.destroy()
+ return
+
+ self.balls.save_to_file(self.project.focus_points_file)
+