Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 383 → Rev 384

/branches/BR-0.4/basico/widgets/wdg_visor_sapnotes.py
113,11 → 113,11
# Icon
self.renderer_icon = Gtk.CellRendererPixbuf()
self.renderer_icon.set_alignment(0.0, 0.5)
self.column_icon = Gtk.TreeViewColumn('Bookmark', self.renderer_icon, pixbuf=1)
widget = get_column_header_widget('', 'basico-bookmarks')
self.column_icon.set_widget(widget)
self.column_icon = Gtk.TreeViewColumn('', self.renderer_icon, pixbuf=1)
# ~ widget = get_column_header_widget('', 'basico-bookmarks')
# ~ self.column_icon.set_widget(widget)
self.column_icon.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE)
self.column_icon.set_visible(True)
self.column_icon.set_visible(False)
self.column_icon.set_expand(False)
self.column_icon.set_clickable(False)
self.column_icon.set_sort_indicator(False)
141,7 → 141,7
self.renderer_sid.set_property('height', 36)
self.renderer_sid.set_property('background', '#F0E3E3')
self.column_sid = Gtk.TreeViewColumn('SAP Note', self.renderer_sid, markup=3)
widget = get_column_header_widget('SAP Note', 'basico-sid')
widget = get_column_header_widget('SAP Note', '')
self.column_sid.set_widget(widget)
self.column_sid.set_visible(True)
self.column_sid.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE)
254,7 → 254,7
self.treeview.set_headers_visible(True)
self.treeview.set_enable_search(True)
self.treeview.set_hover_selection(False)
self.treeview.set_grid_lines(Gtk.TreeViewGridLines.NONE)
self.treeview.set_grid_lines(Gtk.TreeViewGridLines.HORIZONTAL)
self.treeview.set_enable_tree_lines(True)
self.treeview.set_level_indentation(10)
# ~ self.treeview.modify_font(Pango.FontDescription('Monospace 10'))
412,15 → 412,27
for sid in self.bag:
metadata = self.srvdtb.get_sapnote_metadata(sid)
if metadata is not None:
# ~ self.log.debug("%s:\n%s", sid, metadata)
bookmark = metadata['bookmark']
title = escape(metadata['title'])
sid = str(int(metadata['id']))
 
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))
if bookmark:
icon = icon_bookmark
title = "<b>%s</b>" % title
sid = "<b>%s</b>" % sid
else:
icon = icon_sapnote
if len(has_annotations) > 0 and len(has_attachments) > 0:
icon = self.srvicm.get_pixbuf_icon('basico-annotation-attachment', 32, 32)
elif len(has_annotations) > 0 and len(has_attachments) == 0:
icon = self.srvicm.get_pixbuf_icon('basico-annotation', 32, 32)
elif len(has_annotations) == 0 and len(has_attachments) > 0:
icon = self.srvicm.get_pixbuf_icon('basico-attachment', 32, 32)
else:
icon = icon_sapnote
 
timestamp = metadata['releasedon']
timestamp = timestamp.replace('-', '')