def on_button_add_clicked(self, widget): tld = TaskListDialog() if tld.run() == Gtk.ResponseType.ACCEPT: tld.hide() newtasklist = self.tasks.create_tasklist(tld.get_title()) self.store.append([newtasklist]) tld.destroy()
def menu_add_new_tasklist(self,widget): widget.set_sensitive(False) tld = TaskListDialog() if tld.run() == Gtk.ResponseType.ACCEPT: tld.hide() self.tasks.create_tasklist(tld.get_title()) tld.destroy() self.menu_update() widget.set_sensitive(True)
def on_button_add_clicked(self,widget): tld = TaskListDialog() if tld.run() == Gtk.ResponseType.ACCEPT: tld.hide() newtasklist = self.tasks.create_tasklist(tld.get_title()) self.store.append([newtasklist]) tld.destroy()
def menu_add_new_tasklist(self, widget): widget.set_sensitive(False) tld = TaskListDialog() if tld.run() == Gtk.ResponseType.ACCEPT: tld.hide() new_tasklist = self.tasks.create_tasklist(tld.get_title()) if self.tasklist_id is None: self.tasklist_id = new_tasklist['id'] self.mant.set_visible(self.tasklist_id is not None) self.menu_update() tld.destroy() widget.set_sensitive(True)
def menu_add_new_tasklist(self,widget): widget.set_sensitive(False) tld = TaskListDialog() if tld.run() == Gtk.ResponseType.ACCEPT: tld.hide() new_tasklist = self.tasks.create_tasklist(tld.get_title()) if self.tasklist_id is None: self.tasklist_id = new_tasklist['id'] self.mant.set_visible(self.tasklist_id is not None) self.menu_update() tld.destroy() widget.set_sensitive(True)
def __init__(self): if dbus.SessionBus().request_name("es.atareao.google-tasks-indicator") != dbus.bus.REQUEST_NAME_REPLY_PRIMARY_OWNER: print("application already running") exit(0) self.indicator = appindicator.Indicator.new('Google-Tasks-Indicator', 'Google-Tasks-Indicator', appindicator.IndicatorCategory.APPLICATION_STATUS) self.notification = Notify.Notification.new('','', None) self.tasks = googletasksapi.TaskAlone() self.tasks.restore() if self.tasks.tasklists == {}: tld = TaskListDialog() if tld.run() == Gtk.ResponseType.ACCEPT: tld.hide() self.tasks.create_tasklist(tld.get_title()) tld.destroy() self.read_preferences() self.set_menu() self.menu_update()
def on_button_edit_clicked(self,widget): selection = self.treeview.get_selection() if selection: model,iter = selection.get_selected() path = model.get_path(iter) alist = model.get_value(iter,0) p = TaskListDialog(tasklist = alist) if p.run() == Gtk.ResponseType.ACCEPT: p.hide() alist.set_title(p.get_title()) print(self.taskAlone.edit_tasklist(alist)) self.store.clear() self.read_tasklists() selection.select_path(path) p.destroy()