Example #1
0
	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)
Example #2
0
	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)
Example #3
0
File: notes.py Project: pbx/kupfer
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, )
Example #4
0
File: notes.py Project: guns/kupfer
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, )
Example #5
0
File: gtg.py Project: jablan/kupfer
 def activate(self, leaf):
     interface = _create_dbus_connection(True)
     title, body = textutils.extract_title_body(leaf.object)
     interface.open_new_task(title, body)
Example #6
0
	def activate(self, leaf):
		interface = _create_dbus_connection(True)
		title, body = textutils.extract_title_body(leaf.object)
		interface.open_new_task(title, body)
Example #7
0
def _prepare_note_text(text):
	title, body = textutils.extract_title_body(text)
	if body.lstrip():
		return u"%s\n%s" % (title, body)
	return title