Add new seatsep display flag
This commit is contained in:
parent
aba5b94847
commit
6495346874
|
@ -48,7 +48,7 @@ class Filters(threading.Thread):
|
||||||
|
|
||||||
# text used on screen stored here so that it can be configured
|
# text used on screen stored here so that it can be configured
|
||||||
self.filterText = {'limitsall':'All', 'limitsnone':'None', 'limitsshow':'Show Limits'
|
self.filterText = {'limitsall':'All', 'limitsnone':'None', 'limitsshow':'Show Limits'
|
||||||
,'seatsbetween':'Between:', 'seatsand':'And:', 'seatsand':'Show Seats'
|
,'seatsbetween':'Between:', 'seatsand':'And:', 'seatsshow':'Show Seats'
|
||||||
}
|
}
|
||||||
|
|
||||||
# For use in date ranges.
|
# For use in date ranges.
|
||||||
|
@ -102,7 +102,7 @@ class Filters(threading.Thread):
|
||||||
vbox = gtk.VBox(False, 0)
|
vbox = gtk.VBox(False, 0)
|
||||||
self.sbSeats = {}
|
self.sbSeats = {}
|
||||||
|
|
||||||
self.fillSeatsFrame(vbox)
|
self.fillSeatsFrame(vbox, display)
|
||||||
seatsFrame.add(vbox)
|
seatsFrame.add(vbox)
|
||||||
|
|
||||||
dateFrame = gtk.Frame("Date:")
|
dateFrame = gtk.Frame("Date:")
|
||||||
|
@ -170,7 +170,9 @@ class Filters(threading.Thread):
|
||||||
return ltuple
|
return ltuple
|
||||||
|
|
||||||
def getSeats(self):
|
def getSeats(self):
|
||||||
|
if 'from' in self.sbSeats:
|
||||||
self.seats['from'] = self.sbSeats['from'].get_value_as_int()
|
self.seats['from'] = self.sbSeats['from'].get_value_as_int()
|
||||||
|
if 'to' in self.sbSeats:
|
||||||
self.seats['to'] = self.sbSeats['to'].get_value_as_int()
|
self.seats['to'] = self.sbSeats['to'].get_value_as_int()
|
||||||
return self.seats
|
return self.seats
|
||||||
|
|
||||||
|
@ -307,7 +309,7 @@ class Filters(threading.Thread):
|
||||||
hbox.pack_start(vbox2, False, False, 0)
|
hbox.pack_start(vbox2, False, False, 0)
|
||||||
for i, line in enumerate(result):
|
for i, line in enumerate(result):
|
||||||
hbox = gtk.HBox(False, 0)
|
hbox = gtk.HBox(False, 0)
|
||||||
if i < len(result)/2:
|
if i <= len(result)/2:
|
||||||
vbox1.pack_start(hbox, False, False, 0)
|
vbox1.pack_start(hbox, False, False, 0)
|
||||||
else:
|
else:
|
||||||
vbox2.pack_start(hbox, False, False, 0)
|
vbox2.pack_start(hbox, False, False, 0)
|
||||||
|
@ -325,7 +327,7 @@ class Filters(threading.Thread):
|
||||||
else:
|
else:
|
||||||
print "INFO: No games returned from database"
|
print "INFO: No games returned from database"
|
||||||
|
|
||||||
def fillSeatsFrame(self, vbox):
|
def fillSeatsFrame(self, vbox, display):
|
||||||
hbox = gtk.HBox(False, 0)
|
hbox = gtk.HBox(False, 0)
|
||||||
vbox.pack_start(hbox, False, True, 0)
|
vbox.pack_start(hbox, False, True, 0)
|
||||||
|
|
||||||
|
@ -335,22 +337,28 @@ class Filters(threading.Thread):
|
||||||
sb1 = gtk.SpinButton(adjustment=adj1, climb_rate=0.0, digits=0)
|
sb1 = gtk.SpinButton(adjustment=adj1, climb_rate=0.0, digits=0)
|
||||||
adj2 = gtk.Adjustment(value=10, lower=2, upper=10, step_incr=1, page_incr=1, page_size=0)
|
adj2 = gtk.Adjustment(value=10, lower=2, upper=10, step_incr=1, page_incr=1, page_size=0)
|
||||||
sb2 = gtk.SpinButton(adjustment=adj2, climb_rate=0.0, digits=0)
|
sb2 = gtk.SpinButton(adjustment=adj2, climb_rate=0.0, digits=0)
|
||||||
cb = gtk.CheckButton(self.filterText['seatsand'])
|
|
||||||
cb.connect('clicked', self.__set_seat_select, 'show')
|
|
||||||
|
|
||||||
hbox.pack_start(lbl_from, expand=False, padding=3)
|
hbox.pack_start(lbl_from, expand=False, padding=3)
|
||||||
hbox.pack_start(sb1, False, False, 0)
|
hbox.pack_start(sb1, False, False, 0)
|
||||||
hbox.pack_start(lbl_to, expand=False, padding=3)
|
hbox.pack_start(lbl_to, expand=False, padding=3)
|
||||||
hbox.pack_start(sb2, False, False, 0)
|
hbox.pack_start(sb2, False, False, 0)
|
||||||
|
|
||||||
|
if "SeatSep" in display and display["SeatSep"] == True:
|
||||||
hbox = gtk.HBox(False, 0)
|
hbox = gtk.HBox(False, 0)
|
||||||
vbox.pack_start(hbox, False, True, 0)
|
vbox.pack_start(hbox, False, True, 0)
|
||||||
|
cb = gtk.CheckButton(self.filterText['seatsshow'])
|
||||||
|
cb.connect('clicked', self.__set_seat_select, 'show')
|
||||||
hbox.pack_start(cb, False, False, 0)
|
hbox.pack_start(cb, False, False, 0)
|
||||||
|
self.sbSeats['show'] = cb
|
||||||
|
self.seats['show'] = False
|
||||||
|
|
||||||
|
|
||||||
self.sbSeats['from'] = sb1
|
self.sbSeats['from'] = sb1
|
||||||
self.sbSeats['to'] = sb2
|
self.sbSeats['to'] = sb2
|
||||||
self.sbSeats['show'] = cb
|
|
||||||
self.seats['show'] = False
|
|
||||||
|
|
||||||
def fillCardsFrame(self, vbox):
|
def fillCardsFrame(self, vbox):
|
||||||
hbox1 = gtk.HBox(True,0)
|
hbox1 = gtk.HBox(True,0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user