Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 178 → Rev 179

/branches/BR-0.3/basico/sapnoteviewvisor.py
197,7 → 197,7
 
 
def populate(self, bag, cid=None):
self.rowcount = 0
# ~ self.rowcount = 0
self.bag = bag
# ~ mnubtnactions = self.gui.get_widget('mnuBtnActions')
# ~ mnubtnactions.set_no_show_all(False)
204,37 → 204,6
# ~ mnubtnactions.show_all()
 
flowbox = self.gui.add_widget('flowbox', Gtk.FlowBox())
if cid is None:
# ~ flowbox = Gtk.FlowBox()
lbag = []
for sid in bag:
lbag.append(sid)
lbag.sort()
t1 = datetime.now()
 
for sid in lbag:
try:
row = SAPNoteViewRow(self.app, sid)
flowbox.add(row)
self.rowcount += 1
except:
raise
t2 = datetime.now()
else:
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)
self.rowcount += 1
t2 = datetime.now()
# ~ self.debug("%s rows loaded in %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)
241,19 → 210,33
flowbox.set_filter_func(self.filter_func, None, False)
self.gui.swap_widget(self, flowbox)
 
self.update_sapnotes_count(self.rowcount)
lbag = []
for sid in bag:
lbag.append(sid)
lbag.sort()
 
for sid in lbag:
row = SAPNoteViewRow(self.app, sid)
flowbox.add(row)
self.rowcount += 1
 
self.update_sapnotes_count(len(bag))
 
visor_entry_filter = self.gui.get_widget('visor_entry_filter')
visor_entry_filter.activate()
 
# Make sure that Visor toolbar is visible
visortoolbar = self.gui.get_widget('visortoolbar')
visortoolbar.set_visible(True)
visortoolbar.set_no_show_all(False)
visortoolbar.show_all()
 
self.show_all()
 
 
def update_sapnotes_count(self, count):
label = self.gui.get_widget('lbltotsapnotes')
label.set_markup('<b>%4d SAP Notes</b>' % count)
label.set_markup('<b>%4d / <big>%d</big></b>' % (count, self.db.get_total()))
 
 
def filter_func(self, row, data, notify_destroy):
/branches/BR-0.3/basico/window.py
312,14 → 312,13
box.set_property('margin-left', 6)
box.set_property('margin-right', 6)
box.set_property('margin-bottom', 0)
box.set_hexpand(True)
# ~ box.set_hexpand(True)
 
### Toolbar
toolbar = Gtk.Toolbar()
toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
# ~ toolbar.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse("Gray"))
toolbar.set_property('margin-bottom', 3)
toolbar.set_hexpand(True)
# ~ toolbar.set_hexpand(True)
# ~ toolbar.set_property('margin-bottom', 6)
 
#### Filter entry tool
/branches/BR-0.3/basico/workplace.py
48,7 → 48,6
 
def setup_widgets(self):
# Toolbar
 
tgbshowmenu = self.gui.get_widget('tgbShowMenuView')
tgbshowmenu.connect('toggled', self.show_menu_view)
tgbshowmenu.set_active(False)