Add callback for test entry so player name is changable. Still buggy but partially functional

This commit is contained in:
Worros 2008-11-14 22:41:37 +10:00
parent ba52cb93d1
commit 0059d20f8e

View File

@ -53,7 +53,7 @@ class GuiGraphViewer (threading.Thread):
# What hero names for the selected site? # What hero names for the selected site?
# TODO: # TODO:
name = "s0rrow" name = self.heroes[self.sites]
if self.sites == "PokerStars": if self.sites == "PokerStars":
site=2 site=2
@ -125,11 +125,15 @@ class GuiGraphViewer (threading.Thread):
pname.set_width_chars(20) pname.set_width_chars(20)
hbox.pack_start(pname, False, True, 0) hbox.pack_start(pname, False, True, 0)
#TODO: Need to connect a callback here #TODO: Need to connect a callback here
# pname.connect("somthing", __set_hero_name, site) pname.connect("changed", self.__set_hero_name, site)
#TODO: Look at GtkCompletion - to fill out usernames
pname.show() pname.show()
self.__set_hero_name(pname, site)
def __set_hero_name(self, w, site): def __set_hero_name(self, w, site):
self.heroes[site] = w.get_text() self.heroes[site] = w.get_text()
print "DEBUG: settings heroes[%s]: %s"%(site, self.heroes[site])
def createSiteLine(self, hbox, site): def createSiteLine(self, hbox, site):
cb = gtk.CheckButton(site) cb = gtk.CheckButton(site)
@ -245,6 +249,7 @@ class GuiGraphViewer (threading.Thread):
self.conf = config self.conf = config
self.sites = "PokerStars" self.sites = "PokerStars"
self.heroes = {}
# For use in date ranges. # For use in date ranges.
self.start_date = gtk.Entry(max=12) self.start_date = gtk.Entry(max=12)