def create_link_and_notify(self, link, privacy='PUBLIC'): rtn = self.dapi.link(link, privacy) if rtn.is_error(): print rtn.get_message() notify.show(rtn.get_message()['shortlink']) clip = gtk.clipboard_get() clip.set_text(rtn.get_message()['shortlink']) clip.store()
def create_note_and_notify(self, text, content_type='text/plain'): rtn = self.dapi.note(text, content_type) if rtn.is_error(): print rtn.get_message() notify.show(rtn.get_message()['shortlink']) clip = gtk.clipboard_get() clip.set_text(rtn.get_message()['shortlink']) clip.store()
def upload_file_and_notify(self, filename): rtn = self.dapi.upload(filename) if rtn.is_error(): print rtn.get_message() notify.show(rtn.get_message()['shortlink']) clip = gtk.clipboard_get() clip.set_text(rtn.get_message()['shortlink']) clip.store()