Merge branch 'master' of git://git.assembla.com/free_poker_tools
This commit is contained in:
commit
b32745c28a
|
@ -59,6 +59,10 @@ class Database:
|
|||
user = c.supported_databases[db_name].db_user,
|
||||
passwd = c.supported_databases[db_name].db_pass,
|
||||
db = c.supported_databases[db_name].db_name)
|
||||
cur_iso = self.connection.cursor()
|
||||
cur_iso.execute('SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED')
|
||||
cur_iso.close()
|
||||
|
||||
except:
|
||||
print "Error opening database connection %s. See error log file." % (file)
|
||||
traceback.print_exc(file=sys.stderr)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<FreePokerToolsConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FreePokerToolsConfig.xsd">
|
||||
<supported_sites>
|
||||
<site enabled="True" site_name="PokerStars" table_finder="PokerStars" screen_name="DO NOT NEED THIS YET" site_path="~/.wine/drive_c/Program Files/PokerStars/" HH_path="~/.wine/drive_c/Program Files/PokerStars/HandHistory/abc/" decoder="pokerstars_decode_table" converter="passthrough" supported_games="holdem,razz,omahahi,omahahilo,studhi,studhilo">
|
||||
<site enabled="True" site_name="PokerStars" table_finder="PokerStars.exe" screen_name="DO NOT NEED THIS YET" site_path="~/.wine/drive_c/Program Files/PokerStars/" HH_path="~/.wine/drive_c/Program Files/PokerStars/HandHistory/abc/" decoder="pokerstars_decode_table" converter="passthrough" supported_games="holdem,razz,omahahi,omahahilo,studhi,studhilo">
|
||||
<layout max="8" width="792" height="546" fav_seat="0">
|
||||
<location seat="1" x="684" y="61"> </location>
|
||||
<location seat="2" x="689" y="239"> </location>
|
||||
|
@ -84,40 +84,31 @@
|
|||
<location seat="9" x="70" y="53"> </location>
|
||||
</layout>
|
||||
</site>
|
||||
<site enabled="False" site_name="Everleaf" table_finder="Everleaf.exe" screen_name="DO NOT NEED THIS YET" site_path="" HH_path="" decoder="everleaf_decode_table" converter="EverleafToFpdb" supported_games="holdem">
|
||||
<layout fav_seat="0" height="547" max="8" width="794">
|
||||
<location seat="1" x="640" y="64"> </location>
|
||||
<location seat="2" x="650" y="230"> </location>
|
||||
<location seat="3" x="650" y="385"> </location>
|
||||
<location seat="4" x="588" y="425"> </location>
|
||||
<location seat="5" x="92" y="425"> </location>
|
||||
<location seat="6" x="0" y="373"> </location>
|
||||
<location seat="7" x="0" y="223"> </location>
|
||||
<location seat="8" x="25" y="50"> </location>
|
||||
<site enabled="False" site_name="Everleaf" table_finder="Poker.exe" screen_name="DO NOT NEED THIS YET" site_path="" HH_path="" decoder="Unknown" converter="EverleafToFpdb" supported_games="holdem,razz,omahahi,omahahilo,studhi" fgcolor="#48D1CC" bgcolor="#000000">
|
||||
<layout fav_seat="0" height="546" max="6" width="792">
|
||||
<location seat="1" x="581" y="109"> </location>
|
||||
<location seat="2" x="605" y="287"> </location>
|
||||
<location seat="3" x="544" y="423"> </location>
|
||||
<location seat="4" x="80" y="393"> </location>
|
||||
<location seat="5" x="5" y="284"> </location>
|
||||
<location seat="6" x="38" y="108"> </location>
|
||||
</layout>
|
||||
<layout fav_seat="0" height="547" max="6" width="794">
|
||||
<location seat="1" x="640" y="58"> </location>
|
||||
<location seat="2" x="654" y="288"> </location>
|
||||
<location seat="3" x="615" y="424"> </location>
|
||||
<location seat="4" x="70" y="421"> </location>
|
||||
<location seat="5" x="0" y="280"> </location>
|
||||
<location seat="6" x="70" y="58"> </location>
|
||||
<layout fav_seat="0" height="546" max="10" width="792">
|
||||
<location seat="1" x="473" y="78"> </location>
|
||||
<location seat="2" x="650" y="93"> </location>
|
||||
<location seat="3" x="670" y="219"> </location>
|
||||
<location seat="4" x="633" y="358"> </location>
|
||||
<location seat="5" x="437" y="393"> </location>
|
||||
<location seat="6" x="249" y="396"> </location>
|
||||
<location seat="7" x="42" y="357"> </location>
|
||||
<location seat="8" x="8" y="218"> </location>
|
||||
<location seat="9" x="35" y="89"> </location>
|
||||
<location seat="10" x="217" y="78"> </location>
|
||||
</layout>
|
||||
<layout fav_seat="0" height="547" max="2" width="794">
|
||||
<layout fav_seat="0" height="546" max="2" width="792">
|
||||
<location seat="1" x="651" y="288"> </location>
|
||||
<location seat="2" x="10" y="288"> </location>
|
||||
</layout>
|
||||
<layout fav_seat="0" height="547" max="9" width="794">
|
||||
<location seat="1" x="634" y="38"> </location>
|
||||
<location seat="2" x="667" y="184"> </location>
|
||||
<location seat="3" x="667" y="321"> </location>
|
||||
<location seat="4" x="667" y="445"> </location>
|
||||
<location seat="5" x="337" y="459"> </location>
|
||||
<location seat="6" x="0" y="400"> </location>
|
||||
<location seat="7" x="0" y="322"> </location>
|
||||
<location seat="8" x="0" y="181"> </location>
|
||||
<location seat="9" x="70" y="53"> </location>
|
||||
</layout>
|
||||
</site>
|
||||
</supported_sites>
|
||||
<supported_games>
|
||||
|
|
|
@ -89,6 +89,7 @@ def update_HUD(new_hand_id, table_name, config, stat_dict):
|
|||
def read_stdin(): # This is the thread function
|
||||
global hud_dict
|
||||
|
||||
db_connection = Database.Database(config, db_name, 'temp')
|
||||
while True: # wait for a new hand number on stdin
|
||||
new_hand_id = sys.stdin.readline()
|
||||
new_hand_id = string.rstrip(new_hand_id)
|
||||
|
@ -101,10 +102,8 @@ def read_stdin(): # This is the thread function
|
|||
del(hud_dict[h])
|
||||
|
||||
# connect to the db and get basic info about the new hand
|
||||
db_connection = Database.Database(config, db_name, 'temp')
|
||||
(table_name, max, poker_game) = db_connection.get_table_name(new_hand_id)
|
||||
stat_dict = db_connection.get_stats_from_hand(new_hand_id)
|
||||
db_connection.close_connection()
|
||||
|
||||
# if a hud for this table exists, just update it
|
||||
if hud_dict.has_key(table_name):
|
||||
|
|
|
@ -399,6 +399,14 @@ class Popup_window:
|
|||
# need an event box so we can respond to clicks
|
||||
self.window.add(self.ebox)
|
||||
self.ebox.add(self.lab)
|
||||
|
||||
self.ebox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(stat_window.parent.colors['hudbgcolor']))
|
||||
self.ebox.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse(stat_window.parent.colors['hudfgcolor']))
|
||||
self.window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(stat_window.parent.colors['hudbgcolor']))
|
||||
self.window.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse(stat_window.parent.colors['hudfgcolor']))
|
||||
self.lab.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(stat_window.parent.colors['hudbgcolor']))
|
||||
self.lab.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse(stat_window.parent.colors['hudfgcolor']))
|
||||
|
||||
self.window.realize
|
||||
|
||||
# figure out the row, col address of the click that activated the popup
|
||||
|
@ -440,6 +448,9 @@ class Popup_window:
|
|||
|
||||
self.lab.set_text(pu_text)
|
||||
self.window.show_all()
|
||||
|
||||
self.window.set_transient_for(stat_window.main_window)
|
||||
|
||||
# set_keep_above(1) for windows
|
||||
if os.name == 'nt': self.topify_window(self.window)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user