Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 385 → Rev 386

/branches/BR-0.4/basico/core/mod_wdg.py
29,7 → 29,7
 
self.log = get_logger(logname)
self.init_section(logname)
self.log.debug("Loading widget: %s", logname)
# ~ self.log.debug("Loading widget: %s", logname)
 
 
def get_traceback(self):
/branches/BR-0.4/basico/core/mod_win.py
82,16 → 82,15
self.set_default_size(1024, 728)
self.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
 
self.log.debug(self.get_name())
#FIX: hack to avoid white background in widgets within a notebook tab
#FIXME: it should be managed by settings
screen = Gdk.Screen.get_default()
css_provider = Gtk.CssProvider()
css_provider.load_from_path(FILE['CSS'])
context = Gtk.StyleContext()
context.add_provider_for_screen(screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER)
# ~ screen = Gdk.Screen.get_default()
# ~ css_provider = Gtk.CssProvider()
# ~ css_provider.load_from_path(FILE['CSS'])
# ~ context = Gtk.StyleContext()
# ~ context.add_provider_for_screen(screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER)
 
self.maximize ()
# ~ self.maximize ()
self.setup_headerbar()
self.show_all()
 
/branches/BR-0.4/basico/widgets/wdg_annot.py
360,6 → 360,7
self.srvuif.set_widget_visibility('gtk_combobox_annotation_type', True)
self.srvuif.set_widget_visibility('gtk_combobox_annotation_priority', True)
self.srvuif.set_widget_visibility('gtk_button_annotation_toolbar_attachment', True)
self.log.debug("Set visible stack: %s", stack_name)
 
 
def annotation_preview(self):
400,7 → 401,7
 
# Text
scroller = Gtk.ScrolledWindow()
scroller.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
scroller.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS)
scroller.set_shadow_type(Gtk.ShadowType.IN)
scroller.set_hexpand(True)
scroller.set_vexpand(True)
588,15 → 589,14
 
def stack_changed(self, stack, gparam):
visible_stack_name = stack.get_visible_child_name()
if visible_stack_name == 'preview':
try:
self.preview()
except:
pass
self.set_visible_stack(visible_stack_name)
 
 
def preview(self):
aid = self.get_aid_from_widget()
if len(aid) == 0:
return
 
atype = self.srvant.get_metadata_value(aid, 'Type')
browser = self.srvgui.get_widget('annotation_browser')
# ~ self.log.debug("Execute asciidoc for current annotation: %s", self.sid)
/branches/BR-0.4/basico/widgets/wdg_visor_annotations.py
484,7 → 484,7
if is_valid:
widget_annotation = self.srvgui.get_widget('widget_annotation')
widget_annotation.set_metadata_to_widget(aid)
# ~ self.srvclb.action_annotation_edit(aid)
widget_annotation.preview()
else:
aid = None
self.srvuif.set_widget_visibility('gtk_vbox_container_annotations', False)
/branches/BR-0.4/basico/widgets/wdg_visor_sapnotes.py
419,7 → 419,7
 
has_annotations = self.srvant.get_by_sid(sid)
has_attachments = self.srvatc.get_by_sid(sid)
self.log.debug("Annotations: %d, Attachments: %d", len(has_annotations), len(has_attachments))
# ~ self.log.debug("Annotations: %d, Attachments: %d", len(has_annotations), len(has_attachments))
if bookmark:
icon = icon_bookmark
title = "<b>%s</b>" % title