Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 134 → Rev 135

/branches/BR-0.3/basico/sapnoteviewvisor.py
33,6 → 33,7
self.toggled = 0
self.selected = set()
self.count = 0
self.fbcache = {}
welcome_widget = self.get_welcome_widget()
self.add(welcome_widget)
 
99,30 → 100,52
mnubtnactions.show_all()
visor = self.gui.get_widget('visor')
lblSelectedNotes = self.gui.get_widget('lblSelectedNotes')
flowbox = Gtk.FlowBox()
flowbox.set_valign(Gtk.Align.START)
flowbox.set_max_children_per_line(1)
flowbox.set_selection_mode(Gtk.SelectionMode.NONE)
#~ flowbox.set_filter_func(self.filter_by_bookmark)
self.gui.add_widget('flowbox', flowbox)
 
self.hide()
icon_bookmark = self.im.get_icon('bookmark')
 
sapnotes = self.db.get_notes()
 
lbag = []
for sid in bag:
lbag.append(sid)
lbag.sort()
t1 = datetime.now()
if cid is None:
flowbox = Gtk.FlowBox()
lbag = []
for sid in bag:
lbag.append(sid)
lbag.sort()
t1 = datetime.now()
 
for sid in lbag:
row = SAPNoteViewRow(self.app, sid)
flowbox.add(row)
t2 = datetime.now()
self.log.debug("td: %s" % str(t2 - t1))
for sid in lbag:
row = SAPNoteViewRow(self.app, sid)
flowbox.add(row)
t2 = datetime.now()
self.log.debug("cid: %s, td: %s" % (cid, str(t2 - t1)))
#~ raise
else:
try:
t1 = datetime.now()
flowbox = self.fbcache[cid]
t2 = datetime.now()
self.log.debug("cid: %s, td: %s" % (cid, str(t2 - t1)))
except:
flowbox = Gtk.FlowBox()
lbag = []
for sid in bag:
lbag.append(sid)
lbag.sort()
t1 = datetime.now()
 
for sid in lbag:
row = SAPNoteViewRow(self.app, sid)
flowbox.add(row)
t2 = datetime.now()
self.log.debug("cid: %s, td: %s" % (cid, str(t2 - t1)))
self.fbcache[cid] = flowbox
 
flowbox.set_valign(Gtk.Align.START)
flowbox.set_max_children_per_line(1)
flowbox.set_selection_mode(Gtk.SelectionMode.NONE)
self.gui.add_widget('flowbox', flowbox)
self.gui.swap_widget(self, flowbox)
 
self.show_all()
 
#~ With freeze