Merge branch 'master' of git://git.assembla.com/free_poker_tools
This commit is contained in:
commit
ca9ed06351
|
@ -194,16 +194,10 @@ class GuiBulkImport():
|
||||||
self.load_button.show()
|
self.load_button.show()
|
||||||
|
|
||||||
# see how many hands are in the db and adjust accordingly
|
# see how many hands are in the db and adjust accordingly
|
||||||
db_parms = config.get_db_parameters('fpdb')
|
tcursor = db.db.cursor()
|
||||||
db.connect(db_parms['db-backend'],
|
tcursor.execute("Select max(id) from Hands;")
|
||||||
db_parms['db-host'],
|
row = tcursor.fetchone()
|
||||||
db_parms['db-databaseName'],
|
tcursor.close()
|
||||||
db_parms['db-user'],
|
|
||||||
db_parms['db-password'])
|
|
||||||
cursor = db.db.cursor()
|
|
||||||
cursor.execute("Select max(id) from Hands;")
|
|
||||||
row = cursor.fetchone()
|
|
||||||
db.disconnect() # that's all we need this for
|
|
||||||
self.n_hands_in_db = row[0]
|
self.n_hands_in_db = row[0]
|
||||||
if self.n_hands_in_db == 0:
|
if self.n_hands_in_db == 0:
|
||||||
self.cb.set_active(2)
|
self.cb.set_active(2)
|
||||||
|
|
|
@ -142,7 +142,7 @@ class Hud:
|
||||||
def update_table_position(self):
|
def update_table_position(self):
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
if not win32gui.IsWindow(self.table.number):
|
if not win32gui.IsWindow(self.table.number):
|
||||||
self.kill_hud()
|
self.parent.kill_hud(self, self.table.name)
|
||||||
return False
|
return False
|
||||||
# anyone know how to do this in unix, or better yet, trap the X11 error that is triggered when executing the get_origin() for a closed window?
|
# anyone know how to do this in unix, or better yet, trap the X11 error that is triggered when executing the get_origin() for a closed window?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user