Merge branch 'master' of git://git.assembla.com/free_poker_tools
This commit is contained in:
commit
7deb0bcc3e
|
@ -227,9 +227,9 @@ class Hud:
|
||||||
game_params = config.get_game_parameters(self.poker_game)
|
game_params = config.get_game_parameters(self.poker_game)
|
||||||
if not game_params['aux'] == "":
|
if not game_params['aux'] == "":
|
||||||
aux_params = config.get_aux_parameters(game_params['aux'])
|
aux_params = config.get_aux_parameters(game_params['aux'])
|
||||||
self.aux_windows.append(eval("%s.%s(gtk.Window(), config, 'fpdb')" % (aux_params['module'], aux_params['class'])))
|
self.aux_windows.append(eval("%s.%s(gtk.Window(), self, config, 'fpdb')" % (aux_params['module'], aux_params['class'])))
|
||||||
|
|
||||||
gobject.timeout_add(500, self.update_table_position)
|
# gobject.timeout_add(500, self.update_table_position)
|
||||||
|
|
||||||
def update(self, hand, config, stat_dict):
|
def update(self, hand, config, stat_dict):
|
||||||
self.hand = hand # this is the last hand, so it is available later
|
self.hand = hand # this is the last hand, so it is available later
|
||||||
|
|
|
@ -266,7 +266,7 @@ class Stud_cards:
|
||||||
card_images = {}
|
card_images = {}
|
||||||
suits = ('S', 'H', 'D', 'C')
|
suits = ('S', 'H', 'D', 'C')
|
||||||
ranks = ('A', 'K', 'Q', 'J', 'T', '9', '8', '7', '6', '5', '4', '3', '2', 'B')
|
ranks = ('A', 'K', 'Q', 'J', 'T', '9', '8', '7', '6', '5', '4', '3', '2', 'B')
|
||||||
pb = gtk.gdk.pixbuf_new_from_file("Cards01.png")
|
pb = gtk.gdk.pixbuf_new_from_file("54PFozzycards0.png")
|
||||||
|
|
||||||
for j in range(0, 14):
|
for j in range(0, 14):
|
||||||
for i in range(0, 4):
|
for i in range(0, 4):
|
||||||
|
|
|
@ -361,8 +361,7 @@ class Sql:
|
||||||
self.query['get_action_from_hand'] = """
|
self.query['get_action_from_hand'] = """
|
||||||
SELECT street, Players.name, HandsActions.action, HandsActions.amount, actionno
|
SELECT street, Players.name, HandsActions.action, HandsActions.amount, actionno
|
||||||
FROM Players, HandsActions, HandsPlayers
|
FROM Players, HandsActions, HandsPlayers
|
||||||
WHERE HandsActions.action != 'blind'
|
WHERE HandsPlayers.handid = %s
|
||||||
AND HandsPlayers.handid = %s
|
|
||||||
AND HandsPlayers.playerid = Players.id
|
AND HandsPlayers.playerid = Players.id
|
||||||
AND HandsActions.handPlayerId = HandsPlayers.id
|
AND HandsActions.handPlayerId = HandsPlayers.id
|
||||||
ORDER BY street, actionno
|
ORDER BY street, actionno
|
||||||
|
|
|
@ -363,64 +363,12 @@ def discover_mac_by_name(c, tablename):
|
||||||
# again, i have no mac to test this on, sorry -eric
|
# again, i have no mac to test this on, sorry -eric
|
||||||
return None
|
return None
|
||||||
|
|
||||||
#def discover_nt_by_name(c, tablename):
|
###########################################################################
|
||||||
# # this is pretty much identical to the 'search all windows for all poker sites' code, but made to dig just for a specific table name
|
# Main function used for testing
|
||||||
# # it could be implemented a bunch better - and we need to not assume the width/height thing that (steffen?) assumed above, we should
|
|
||||||
# # be able to dig up the window's titlebar handle and get it's information, and such .. but.. for now, i guess this will work.
|
|
||||||
# # - eric
|
|
||||||
# b_width = 3
|
|
||||||
# tb_height = 29
|
|
||||||
# titles = {}
|
|
||||||
## tables = discover_nt(c)
|
|
||||||
# win32gui.EnumWindows(win_enum_handler, titles)
|
|
||||||
# for s in c.supported_sites.keys():
|
|
||||||
# for hwnd in titles.keys():
|
|
||||||
# processid = win32process.GetWindowThreadProcessId(hwnd)
|
|
||||||
# pshandle = win32api.OpenProcess(win32con.PROCESS_QUERY_INFORMATION | win32con.PROCESS_VM_READ, False, processid[1])
|
|
||||||
# exe = win32process.GetModuleFileNameEx(pshandle, 0)
|
|
||||||
# if exe.find(c.supported_sites[s].table_finder) == -1:
|
|
||||||
# continue
|
|
||||||
# if titles[hwnd].find(tablename) > -1:
|
|
||||||
# if titles[hwnd].find("History for table:") > -1 or titles[hwnd].find("FPDBHUD") > -1:
|
|
||||||
# continue
|
|
||||||
# tw = Table_Window()
|
|
||||||
# tw.number = hwnd
|
|
||||||
# (x, y, width, height) = win32gui.GetWindowRect(hwnd)
|
|
||||||
# tw.title = titles[hwnd]
|
|
||||||
# tw.width = int(width) - 2 * b_width
|
|
||||||
# tw.height = int(height) - b_width - tb_height
|
|
||||||
# tw.x = int(x) + b_width
|
|
||||||
# tw.y = int(y) + tb_height
|
|
||||||
# tw.site = c.supported_sites[s].site_name
|
|
||||||
# if not tw.site == "Unknown" and not c.supported_sites[tw.site].decoder == "Unknown":
|
|
||||||
# eval("%s(tw)" % c.supported_sites[tw.site].decoder)
|
|
||||||
# else:
|
|
||||||
# tw.name = tablename
|
|
||||||
# return tw
|
|
||||||
#
|
|
||||||
# # if we don't find anything by process name, let's search one more time, and call it Unknown ?
|
|
||||||
# for hwnd in titles.keys():
|
|
||||||
# if titles[hwnd].find(tablename) > -1:
|
|
||||||
# if titles[hwnd].find("History for table:") > -1 or titles[hwnd].find("FPDBHUD") > -1:
|
|
||||||
# continue
|
|
||||||
# tw = Table_Window()
|
|
||||||
# tw.number = hwnd
|
|
||||||
# (x, y, width, height) = win32gui.GetWindowRect(hwnd)
|
|
||||||
# tw.title = titles[hwnd]
|
|
||||||
# tw.width = int(width) - 2 * b_width
|
|
||||||
# tw.height = int(height) - b_width - tb_height
|
|
||||||
# tw.x = int(x) + b_width
|
|
||||||
# tw.y = int(y) + tb_height
|
|
||||||
# tw.site = "Unknown"
|
|
||||||
# tw.name = tablename
|
|
||||||
# return tw
|
|
||||||
#
|
|
||||||
# return None
|
|
||||||
|
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
c = Configuration.Config()
|
c = Configuration.Config()
|
||||||
|
|
||||||
print discover_table_by_name(c, "Daddy Nasty")
|
print discover_table_by_name(c, "Louie")
|
||||||
# print discover_tournament_table(c, "118942908", "3")
|
# print discover_tournament_table(c, "118942908", "3")
|
||||||
|
|
||||||
tables = discover(c)
|
tables = discover(c)
|
||||||
|
|
|
@ -771,7 +771,7 @@ def parseCardLine(site, category, street, line, names, cardValues, cardSuits, bo
|
||||||
print "line:",line,"cardValues[playerNo]:",cardValues[playerNo]
|
print "line:",line,"cardValues[playerNo]:",cardValues[playerNo]
|
||||||
raise FpdbError("read too many/too few holecards in parseCardLine")
|
raise FpdbError("read too many/too few holecards in parseCardLine")
|
||||||
elif (category=="razz" or category=="studhi" or category=="studhilo"):
|
elif (category=="razz" or category=="studhi" or category=="studhilo"):
|
||||||
if (line.find("shows")==-1):
|
if (line.find("shows")==-1 and line.find("mucked")==-1):
|
||||||
#print "parseCardLine(in stud if), street:", street
|
#print "parseCardLine(in stud if), street:", street
|
||||||
if line[pos+2]=="]": #-> not (hero and 3rd street)
|
if line[pos+2]=="]": #-> not (hero and 3rd street)
|
||||||
cardValues[playerNo][street+2]=line[pos:pos+1]
|
cardValues[playerNo][street+2]=line[pos:pos+1]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user