Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 360 → Rev 361

/branches/BR-0.4/basico/widgets/wdg_visor_sapnotes.py
53,6 → 53,7
self.srvuif = self.get_service("UIF")
self.srvutl = self.get_service("Utils")
self.srvant = self.get_service('Annotation')
self.srvatc = self.get_service('Attachment')
 
 
def get_treeview(self):
465,6 → 466,28
annotation['Timestamp']
)
self.model.append(pid, node)
 
# Load attachments
files = self.srvatc.get_by_sid(metadata['id'])
for fname in files:
with open(fname, 'r') as ft:
attachment = json.load(ft)
icon = self.srvicm.get_pixbuf_icon('basico-attachment')
node = self.get_node( 0,
icon,
False,
'',
attachment['Title'],
'Attachment',
'',
attachment['Description'],
'',
self.srvutl.fuzzy_date_from_timestamp(attachment['Created']),
attachment['TID'],
attachment['Created']
)
self.model.append(pid, node)
self.treeview.set_model(self.sorted_model)
self.update_total_sapnotes_count()
self.show_widgets()
488,6 → 511,8
treeiter = model.get_iter(path)
component = model[treeiter][5]
sid = model[treeiter][0]
if sid == 0:
return
sid = "0"*(10 - len(str(sid))) + str(sid)
toolbar = self.srvgui.get_widget('visortoolbar')
popover = self.srvgui.add_widget('gtk_popover_visor_row', Gtk.Popover.new(treeview))