Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 384 → Rev 385

/branches/BR-0.4/basico/core/mod_win.py
301,10 → 301,10
 
## Right pane
 
vpaned = self.srvgui.add_widget('gtk_vpaned_visor', Gtk.VPaned())
vpaned.set_property('margin-bottom', 6)
vpaned.set_wide_handle(True)
vpaned.set_position(0)
# ~ vpaned = self.srvgui.add_widget('gtk_vpaned_visor', Gtk.VPaned())
# ~ vpaned.set_property('margin-bottom', 6)
# ~ vpaned.set_wide_handle(True)
# ~ vpaned.set_position(0)
 
box = Gtk.VBox()
box.set_hexpand(True)
332,16 → 332,18
stack_main.add_titled(stack_child, "settings", "Basico Settings")
 
 
## Annotation widget (down)
boxannotations = self.srvgui.add_widget('gtk_vbox_container_annotations', Gtk.VBox())
self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
widget_annotation = self.srvgui.add_widget('widget_annotation', AnnotationWidget(self.controller))
boxannotations.add(widget_annotation) # <--
## Annotation widget stack child
stack_child = self.srvgui.add_widget('widget_annotation', AnnotationWidget(self.controller))
stack_main.add_titled(stack_child, "annotations", "Annotation widget")
# ~ boxannotations = self.srvgui.add_widget('gtk_vbox_container_annotations', Gtk.VBox())
# ~ self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
# ~ widget_annotation = self.srvgui.add_widget('widget_annotation', AnnotationWidget(self.controller))
# ~ boxannotations.add(widget_annotation) # <--
 
vpaned.add1(box)
vpaned.add2(boxannotations)
# ~ vpaned.add1(box)
# ~ vpaned.add2(boxannotations)
 
paned.add2(vpaned)
paned.add2(box)
mainbox.pack_start(paned, True, True, 0)
 
# Statusbar
/branches/BR-0.4/basico/services/srv_callbacks.py
361,9 → 361,10
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')
stack_main = self.srvgui.get_widget('gtk_stack_main')
widget = self.srvgui.get_widget('gtk_label_timestamp_created')
vpaned = self.srvgui.get_widget('gtk_vpaned_visor')
vpaned.set_position(0)
# ~ vpaned = self.srvgui.get_widget('gtk_vpaned_visor')
# ~ vpaned.set_position(0)
 
if action == 'create':
self.gui_annotation_widget_clear()
381,7 → 382,8
self.log.debug("Action: %s annotation with Id: %s", action, aid)
 
widget_annotation.set_metadata_to_widget(aid, action)
self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', True)
stack_main.set_visible_child_name('annotations')
 
self.srvuif.grab_focus()
 
 
672,7 → 674,7
visor_annotations.populate()
visor_sapnotes.populate()
self.gui_annotation_widget_clear()
self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
# ~ self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
self.srvuif.grab_focus()
 
 
679,11 → 681,12
def action_annotation_cancel(self, *args):
statusbar = self.srvgui.get_widget('widget_statusbar')
self.gui_annotation_widget_clear()
self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
button = self.srvgui.get_widget('gtk_togglebutton_maximize_annotation_widget')
button.set_active(False)
# ~ self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
# ~ button = self.srvgui.get_widget('gtk_togglebutton_maximize_annotation_widget')
# ~ button.set_active(False)
self.log.debug('Annotation canceled')
self.srvuif.statusbar_msg("Annotation canceled")
self.gui_show_dashboard()
self.srvuif.grab_focus()
 
 
829,9 → 832,11
 
 
def gui_annotation_widget_hide(self):
self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
# ~ self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
self.log.debug("Fix gui_annotation_widget_hide callback!")
 
 
 
def gui_annotation_previous_row(self, *args):
visor_annotations = self.srvgui.get_widget('visor_annotations')
visor_annotations.row_previous()
913,16 → 918,16
model.foreach(get_selected_sapnotes)
 
 
def gui_maximize_annotation_window(self, *args):
vpaned = self.srvgui.get_widget('gtk_vpaned_visor')
stack_main = self.srvgui.get_widget('gtk_stack_main')
toggle_button = self.srvgui.get_widget('gtk_togglebutton_maximize_annotation_widget')
if toggle_button.get_active():
# ~ def gui_maximize_annotation_window(self, *args):
# ~ vpaned = self.srvgui.get_widget('gtk_vpaned_visor')
# ~ stack_main = self.srvgui.get_widget('gtk_stack_main')
# ~ toggle_button = self.srvgui.get_widget('gtk_togglebutton_maximize_annotation_widget')
# ~ if toggle_button.get_active():
# ~ stack_main.hide()
vpaned.set_position(0)
else:
# ~ vpaned.set_position(0)
# ~ else:
# ~ stack_main.show_all()
vpaned.set_position(450)
# ~ vpaned.set_position(450)
 
 
def gui_attachment_add_to_sapnote(self, button, sid):
/branches/BR-0.4/basico/widgets/wdg_annot.py
207,18 → 207,18
self.tool_bar.insert(tool, -1)
 
# Maximize toggle button
tool = Gtk.ToolItem()
tool.set_expand(False)
icon = self.srvicm.get_new_image_icon('basico-fullscreen', 24, 24)
box = self.srvgui.add_widget('gtk_box_container_icon_maximize', Gtk.Box())
box.pack_start(icon, False, False, 0)
button = self.srvgui.add_widget('gtk_togglebutton_maximize_annotation_widget', Gtk.ToggleButton())
button.set_relief(Gtk.ReliefStyle.NONE)
button.connect('toggled', self.srvclb.gui_maximize_annotation_window)
button.add(box)
tool.add(button)
tool.set_tooltip_markup('<b>Fullscreen/Window mode</b>')
self.tool_bar.insert(tool, -1)
# ~ tool = Gtk.ToolItem()
# ~ tool.set_expand(False)
# ~ icon = self.srvicm.get_new_image_icon('basico-fullscreen', 24, 24)
# ~ box = self.srvgui.add_widget('gtk_box_container_icon_maximize', Gtk.Box())
# ~ box.pack_start(icon, False, False, 0)
# ~ button = self.srvgui.add_widget('gtk_togglebutton_maximize_annotation_widget', Gtk.ToggleButton())
# ~ button.set_relief(Gtk.ReliefStyle.NONE)
# ~ button.connect('toggled', self.srvclb.gui_maximize_annotation_window)
# ~ button.add(box)
# ~ tool.add(button)
# ~ tool.set_tooltip_markup('<b>Fullscreen/Window mode</b>')
# ~ self.tool_bar.insert(tool, -1)
 
# Toolbar initial settings
self.set_visible(True)
/branches/BR-0.4/basico/widgets/wdg_visor_annotations.py
663,8 → 663,8
aid = model[treeiter][10]
is_valid = self.srvant.is_valid(aid)
if is_valid:
fullscreen_annotation = self.srvgui.get_widget('gtk_togglebutton_maximize_annotation_widget')
fullscreen_annotation.set_active(True)
# ~ fullscreen_annotation = self.srvgui.get_widget('gtk_togglebutton_maximize_annotation_widget')
# ~ fullscreen_annotation.set_active(True)
self.srvclb.action_annotation_preview(aid)
else:
# ~ aid = None
698,10 → 698,10
popover.set_pointing_to(rect)
box = self.build_popover(aid, popover, component)
if box is not None:
vpaned = self.srvgui.get_widget('gtk_vpaned_visor')
# ~ vpaned = self.srvgui.get_widget('gtk_vpaned_visor')
visor_annotations = self.srvgui.get_widget('visor_annotations')
width, height = visor_annotations.get_size_request()
vpaned.set_position(1000)
# ~ vpaned.set_position(1000)
popover.add(box)
self.srvclb.gui_show_popover(None, popover)