Merge branch 'master' of git://git.assembla.com/free_poker_tools
This commit is contained in:
commit
98df6f74a9
|
@ -151,7 +151,9 @@ class HUD_main(object):
|
|||
try:
|
||||
(table_name, max, poker_game) = self.db_connection.get_table_name(new_hand_id)
|
||||
stat_dict = self.db_connection.get_stats_from_hand(new_hand_id)
|
||||
cards = self.db_connection.get_cards(new_hand_id)
|
||||
cards = self.db_connection.get_cards(new_hand_id)
|
||||
comm_cards = self.db_connection.get_common_cards(new_hand_id)
|
||||
cards['common'] = comm_cards['common']
|
||||
except Exception, err:
|
||||
print "db error: skipping ", new_hand_id, err
|
||||
sys.stderr.write("Database error %s in hand %d. Skipping.\n" % (err, int(new_hand_id)))
|
||||
|
|
|
@ -99,3 +99,15 @@ class Hello_plus(Aux_Window):
|
|||
# hands played that was updated in the "update_data()" function.
|
||||
self.label.set_text("Hello %s\nYou have played %d hands\n on %s." % (self.hero, self.hands_played, self.site))
|
||||
|
||||
class Hello_Menu(Aux_Window):
|
||||
"""A 'Hello World' Aux_Window demo."""
|
||||
def create(self):
|
||||
# This demo puts a menu item on the HUD mainwindow.
|
||||
self.item = gtk.MenuItem('Print cards')
|
||||
self.hud.menu.append(self.item)
|
||||
self.item.connect("activate", self.print_cards)
|
||||
self.item.show()
|
||||
|
||||
def print_cards(self, *args):
|
||||
# callback for the menu item
|
||||
print "cards =", self.hud.cards
|
||||
|
|
|
@ -349,10 +349,6 @@ class Flop_Mucked(Aux_Window):
|
|||
self.m_windows[i].show_all()
|
||||
self.m_windows[i].hide()
|
||||
|
||||
def update_data(self, new_hand_id, db_connection):
|
||||
cards = db_connection.get_common_cards(new_hand_id)
|
||||
self.hud.cards['common'] = cards['common']
|
||||
|
||||
def update_gui(self, new_hand_id):
|
||||
"""Prepare and show the mucked cards."""
|
||||
if self.displayed_cards:
|
||||
|
|
Loading…
Reference in New Issue
Block a user