add "rebuy" button to TT
This commit is contained in:
parent
832b7fe4db
commit
d5d0c9aee3
|
@ -172,7 +172,7 @@ class EverleafSummary:
|
||||||
if __name__ != "__main__":
|
if __name__ != "__main__":
|
||||||
self.main()
|
self.main()
|
||||||
|
|
||||||
def main(self, id="785119"):
|
def main(self, id="785646"):
|
||||||
file = urllib.urlopen("http://www.poker4ever.com/en.tournaments.tournament-statistics?tid="+id)
|
file = urllib.urlopen("http://www.poker4ever.com/en.tournaments.tournament-statistics?tid="+id)
|
||||||
self.parser = SummaryParser(formatter.NullFormatter())
|
self.parser = SummaryParser(formatter.NullFormatter())
|
||||||
self.parser.feed(file.read())
|
self.parser.feed(file.read())
|
||||||
|
|
|
@ -107,6 +107,11 @@ class Tournament:
|
||||||
self.main_vbox.set_border_width(1)
|
self.main_vbox.set_border_width(1)
|
||||||
self.window.add(self.main_vbox)
|
self.window.add(self.main_vbox)
|
||||||
self.window.show()
|
self.window.show()
|
||||||
|
|
||||||
|
def addrebuy(self, widget=None):
|
||||||
|
t = self
|
||||||
|
t.numrebuys += 1
|
||||||
|
t.mylabel.set_label("%s - %s - %s - %s - %s %s - %s - %s - %s - %s - %s" % (t.site, t.id, t.starttime, t.endtime, t.structure, t.game, t.buyin, t.fee, t.numrebuys, t.numplayers, t.prizepool))
|
||||||
|
|
||||||
def delete_event(self, widget, event, data=None):
|
def delete_event(self, widget, event, data=None):
|
||||||
return False
|
return False
|
||||||
|
@ -154,15 +159,20 @@ class ttracker_main(object):
|
||||||
editbutton = gtk.Button(label="Edit")
|
editbutton = gtk.Button(label="Edit")
|
||||||
print "new button=", editbutton
|
print "new button=", editbutton
|
||||||
editbutton.connect("clicked", t.openwindow)
|
editbutton.connect("clicked", t.openwindow)
|
||||||
|
rebuybutton = gtk.Button(label="Rebuy")
|
||||||
|
rebuybutton.connect("clicked", t.addrebuy)
|
||||||
|
self.vb.add(rebuybutton)
|
||||||
self.vb.add(editbutton) # These should probably be put in.. a.. h-box? i don't know..
|
self.vb.add(editbutton) # These should probably be put in.. a.. h-box? i don't know..
|
||||||
self.vb.add(mylabel)
|
self.vb.add(mylabel)
|
||||||
self.vb.show()
|
|
||||||
self.main_window.resize_children()
|
self.main_window.resize_children()
|
||||||
self.main_window.show()
|
self.main_window.show()
|
||||||
mylabel.show()
|
mylabel.show()
|
||||||
editbutton.show()
|
editbutton.show()
|
||||||
|
rebuybutton.show()
|
||||||
t.mylabel = mylabel
|
t.mylabel = mylabel
|
||||||
t.editbutton = editbutton
|
t.editbutton = editbutton
|
||||||
|
t.rebuybutton = rebuybutton
|
||||||
|
self.vb.show()
|
||||||
print self.tourney_list
|
print self.tourney_list
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user