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
|
||||
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.
|
||||
|
@ -102,7 +102,7 @@ class Filters(threading.Thread):
|
|||
vbox = gtk.VBox(False, 0)
|
||||
self.sbSeats = {}
|
||||
|
||||
self.fillSeatsFrame(vbox)
|
||||
self.fillSeatsFrame(vbox, display)
|
||||
seatsFrame.add(vbox)
|
||||
|
||||
dateFrame = gtk.Frame("Date:")
|
||||
|
@ -170,8 +170,10 @@ class Filters(threading.Thread):
|
|||
return ltuple
|
||||
|
||||
def getSeats(self):
|
||||
self.seats['from'] = self.sbSeats['from'].get_value_as_int()
|
||||
self.seats['to'] = self.sbSeats['to'].get_value_as_int()
|
||||
if 'from' in self.sbSeats:
|
||||
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()
|
||||
return self.seats
|
||||
|
||||
def getDates(self):
|
||||
|
@ -307,7 +309,7 @@ class Filters(threading.Thread):
|
|||
hbox.pack_start(vbox2, False, False, 0)
|
||||
for i, line in enumerate(result):
|
||||
hbox = gtk.HBox(False, 0)
|
||||
if i < len(result)/2:
|
||||
if i <= len(result)/2:
|
||||
vbox1.pack_start(hbox, False, False, 0)
|
||||
else:
|
||||
vbox2.pack_start(hbox, False, False, 0)
|
||||
|
@ -325,7 +327,7 @@ class Filters(threading.Thread):
|
|||
else:
|
||||
print "INFO: No games returned from database"
|
||||
|
||||
def fillSeatsFrame(self, vbox):
|
||||
def fillSeatsFrame(self, vbox, display):
|
||||
hbox = gtk.HBox(False, 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)
|
||||
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)
|
||||
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(sb1, False, False, 0)
|
||||
hbox.pack_start(lbl_to, expand=False, padding=3)
|
||||
hbox.pack_start(sb2, False, False, 0)
|
||||
|
||||
hbox = gtk.HBox(False, 0)
|
||||
vbox.pack_start(hbox, False, True, 0)
|
||||
hbox.pack_start(cb, False, False, 0)
|
||||
if "SeatSep" in display and display["SeatSep"] == True:
|
||||
hbox = gtk.HBox(False, 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)
|
||||
self.sbSeats['show'] = cb
|
||||
self.seats['show'] = False
|
||||
|
||||
|
||||
self.sbSeats['from'] = sb1
|
||||
self.sbSeats['to'] = sb2
|
||||
self.sbSeats['show'] = cb
|
||||
self.seats['show'] = False
|
||||
|
||||
|
||||
|
||||
def fillCardsFrame(self, vbox):
|
||||
hbox1 = gtk.HBox(True,0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user