def activate(self, leaf): title, body = textutils.extract_title_body(leaf.object) if body: uiutils.show_notification(title, body, icon_name=self.get_icon_name()) else: uiutils.show_notification(title)
def activate(self, leaf): interface, apiver = _create_dbus_connection(True) title, body = textutils.extract_title_body(leaf.object) if apiver == 1: interface.open_new_task(title, body) else: interface.OpenNewTask(title, body)
def _prepare_note_text(text): ## split the text into a title + newline + rest of the text ## if we only get the title, put in two helpful newlines title, body = textutils.extract_title_body(text) if body.lstrip(): return u"%s\n%s" % (title, body) else: return u"%s\n\n" % (title, )
def _prepare_note_text(text): ## split the text into a title + newline + rest of the text ## if we only get the title, put in two helpful newlines title, body = textutils.extract_title_body(text) if body.lstrip(): return "%s\n%s" % (title, body) else: return "%s\n\n" % (title, )
def activate(self, leaf): interface = _create_dbus_connection(True) title, body = textutils.extract_title_body(leaf.object) interface.open_new_task(title, body)
def _prepare_note_text(text): title, body = textutils.extract_title_body(text) if body.lstrip(): return u"%s\n%s" % (title, body) return title