don't display headings for bottom table when it can't be calculated
This commit is contained in:
parent
2e83e91ba5
commit
04acf25416
|
@ -208,6 +208,7 @@ class GuiPlayerStats (threading.Thread):
|
||||||
|
|
||||||
def createStatsTable(self, vbox, playerids, sitenos, limits, type, seats, groups, dates, games):
|
def createStatsTable(self, vbox, playerids, sitenos, limits, type, seats, groups, dates, games):
|
||||||
starttime = time()
|
starttime = time()
|
||||||
|
show_detail = True
|
||||||
|
|
||||||
# Scrolled window for summary table
|
# Scrolled window for summary table
|
||||||
swin = gtk.ScrolledWindow(hadjustment=None, vadjustment=None)
|
swin = gtk.ScrolledWindow(hadjustment=None, vadjustment=None)
|
||||||
|
@ -224,25 +225,30 @@ class GuiPlayerStats (threading.Thread):
|
||||||
self.addGrid(swin, 'playerDetailedStats', flags, playerids
|
self.addGrid(swin, 'playerDetailedStats', flags, playerids
|
||||||
,sitenos, limits, type, seats, groups, dates, games)
|
,sitenos, limits, type, seats, groups, dates, games)
|
||||||
|
|
||||||
# Separator
|
if 'allplayers' in groups and groups['allplayers']:
|
||||||
vbox2 = gtk.VBox(False, 0)
|
# can't currently do this combination so skip detailed table
|
||||||
heading = gtk.Label(self.filterText['handhead'])
|
show_detail = False
|
||||||
heading.show()
|
|
||||||
vbox2.pack_start(heading, expand=False, padding=3)
|
|
||||||
|
|
||||||
# Scrolled window for detailed table (display by hand)
|
if show_detail:
|
||||||
swin = gtk.ScrolledWindow(hadjustment=None, vadjustment=None)
|
# Separator
|
||||||
swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
|
vbox2 = gtk.VBox(False, 0)
|
||||||
swin.show()
|
heading = gtk.Label(self.filterText['handhead'])
|
||||||
vbox2.pack_start(swin, expand=True, padding=3)
|
heading.show()
|
||||||
vbox.pack2(vbox2)
|
vbox2.pack_start(heading, expand=False, padding=3)
|
||||||
vbox2.show()
|
|
||||||
|
|
||||||
# Detailed table
|
# Scrolled window for detailed table (display by hand)
|
||||||
flags[0] = True
|
swin = gtk.ScrolledWindow(hadjustment=None, vadjustment=None)
|
||||||
flags[2] = 1
|
swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
|
||||||
self.addGrid(swin, 'playerDetailedStats', flags, playerids
|
swin.show()
|
||||||
,sitenos, limits, type, seats, groups, dates, games)
|
vbox2.pack_start(swin, expand=True, padding=3)
|
||||||
|
vbox.pack2(vbox2)
|
||||||
|
vbox2.show()
|
||||||
|
|
||||||
|
# Detailed table
|
||||||
|
flags[0] = True
|
||||||
|
flags[2] = 1
|
||||||
|
self.addGrid(swin, 'playerDetailedStats', flags, playerids
|
||||||
|
,sitenos, limits, type, seats, groups, dates, games)
|
||||||
|
|
||||||
self.db.rollback()
|
self.db.rollback()
|
||||||
print "Stats page displayed in %4.2f seconds" % (time() - starttime)
|
print "Stats page displayed in %4.2f seconds" % (time() - starttime)
|
||||||
|
@ -421,6 +427,7 @@ class GuiPlayerStats (threading.Thread):
|
||||||
else:
|
else:
|
||||||
treerow.append(' ')
|
treerow.append(' ')
|
||||||
iter = self.liststore[grid].append(treerow)
|
iter = self.liststore[grid].append(treerow)
|
||||||
|
#print treerow
|
||||||
sqlrow += 1
|
sqlrow += 1
|
||||||
row += 1
|
row += 1
|
||||||
vbox.show_all()
|
vbox.show_all()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user