Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 379 → Rev 380

/branches/BR-0.4/basico/services/srv_callbacks.py
357,23 → 357,30
self.srvutl.browse("file://%s" % FILE['HELP_INDEX'])
 
 
def gui_annotation_widget_show(self, widget, sid='0000000000', action='create'):
def gui_annotation_widget_show(self, aid, action='create'):
widget_annotation = self.srvgui.get_widget('widget_annotation')
# ~ stack_annotation = self.srvgui.get_widget('stack_annotation')
widget = self.srvgui.get_widget('gtk_label_timestamp_created')
vpaned = self.srvgui.get_widget('gtk_vpaned_visor')
vpaned.set_position(0)
 
if action == 'create':
self.gui_annotation_widget_clear()
aid = self.srvant.gen_aid(sid)
if aid == '':
aid = self.srvant.gen_aid()
else:
sid = aid
aid = self.srvant.gen_aid(sid)
widget_annotation.set_visible_stack('editor')
elif action == 'edit':
aid = sid
widget_annotation.set_visible_stack('editor')
elif action == 'preview':
widget_annotation.set_visible_stack('preview')
 
self.log.debug("%s %s", action, aid)
widget_annotation.set_metadata_to_widget(aid, action)
stack_annotation = self.srvgui.get_widget('stack_annotation')
stack_annotation.set_visible_child_name('editor')
self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', True)
widget.grab_focus()
self.srvuif.grab_focus()
 
 
def gui_show_popover(self, button, popover):
605,10 → 612,22
window.unfullscreen()
 
 
def action_annotation_create(self):
self.gui_annotation_widget_show('', 'create')
 
 
def action_annotation_create_for_sapnote(self, sid):
self.gui_annotation_widget_show(sid, 'create')
 
 
def action_annotation_edit(self, aid):
self.gui_annotation_widget_show(None, aid, 'edit')
self.gui_annotation_widget_show(aid, 'edit')
 
 
def action_annotation_preview(self, aid):
self.gui_annotation_widget_show(aid, 'preview')
 
 
def action_annotation_duplicate(self, *args):
self.log.debug("ACTION-DUPLICATE: %s" % args)
 
1045,3 → 1064,4
 
def copy_text_to_clipboard(self, widget, text):
self.srvuif.copy_text_to_clipboard(text)
self.srvuif.grab_focus()