Example #1
0
  def delete(self, notifyObj, action):
    """catch the delete button click

    Args: 
      self
      notifyObj - the notify2 object
      action - text field from add_action
    """
    zw_lib.delete(self.ourMsg.get_id())
    if debug:
      print("deleted")
    return
Example #2
0
 def on_selection_button_clicked(self, widget):
   """Called on any of the button clicks"""
   action = widget.get_label()
   if action == "New":
     newmsg(None)
   elif action == "Reply":
     newmsg(None, self.selected[0])
   elif action == "Mark Read":
     zw_lib.mark_read(self.selected[3])
     self.selected[0] = deboldify(self.selected[0])
     self.selected[1] = deboldify(self.selected[1])
     self.selected[2] = deboldify(self.selected[2])
   elif action == "Delete":
     zw_lib.delete(self.selected[3])
     model, paths = self.treeview.get_selection().get_selected_rows()
     for path in paths:
       iter = model.get_iter(path)
       model.remove(iter)