Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
 def activate_open(self, action):
     tempdict = icalHandler.importiCalFromFile("/home/astromme/icaltest.ics")
     icalHandler.addTasksFromCalDict(tempdict)
     self.treeview_both.set_model(self.__create_model_both(nuclasses.tasks, nuclasses.events))
     self.treeview.set_model(self.__create_model_tasks(nuclasses.tasks))