def activate_action(self, action): dialog = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, 'You activated action: "%s" of type "%s"' % (action.get_name(), type(action))) # Close dialog on user response dialog.connect ("response", lambda d, r: d.destroy()) a = icalHandler.tasksToVObject(nuclasses.tasks) (b, c) = icalHandler.itemsFromVObject(a.serialize()) icalHandler.addTasksFromCalDict(b) dialog.show()
def activate_save(self, action): icalObject = icalHandler.tasksToVObject(nuclasses.tasks) icalHandler.exportiCalToFile(icalObject, "/home/astromme/icaltest.ics",1)