Merge branch 'master' of git://git.assembla.com/fpdb-eric

Conflicts:

	pyfpdb/fpdb_simple.py
This commit is contained in:
Worros 2008-12-16 12:17:50 +09:00
commit 828cfc405d
2 changed files with 2540 additions and 2530 deletions

View File

@ -123,6 +123,15 @@ class Hud:
self.main_window.set_destroy_with_parent(True)
def update_table_position(self):
# self.main_window.parentgdkhandle = gtk.gdk.window_foreign_new(self.table.number)
# if self.main_window.parentgdkhandle == None:
if os.name == 'nt':
if not win32gui.IsWindow(self.table.number):
self.kill_hud()
return False
else:
return False # kill the timer under Unix, and ignore it until we have a way to check the validity of the window.
(x, y) = self.main_window.parentgdkhandle.get_origin()
if self.table.x != x or self.table.y != y:
self.table.x = x
@ -229,7 +238,7 @@ class Hud:
aux_params = config.get_aux_parameters(game_params['aux'])
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):
self.hand = hand # this is the last hand, so it is available later

5
pyfpdb/fpdb_simple.py Executable file → Normal file
View File

@ -26,7 +26,6 @@ FTP=2
MYSQL_INNODB=2
PGSQL=3
SQLITE=4
# Data Structures for index and foreign key creation
# drop_code is an int with possible values: 0 - don't drop for bulk import
# 1 - drop during bulk import
@ -329,6 +328,8 @@ def analyzeDB(fdb):
fdb.db.set_isolation_level(1) # go back to normal isolation level
#end def analyzeDB
class DuplicateError(Exception):
def __init__(self, value):
self.value = value
@ -391,7 +392,7 @@ def checkPositions(positions):
pass
### RHH modified to allow for "position 9" here (pos==9 is when you're a dead hand before the BB
if (pos!="B" and pos!="S" and pos!=0 and pos!=1 and pos!=2 and pos!=3 and pos!=4 and pos!=5 and pos!=6 and pos!=7 and pos!=9):
if (pos!="B" and pos!="S" and pos!=0 and pos!=1 and pos!=2 and pos!=3 and pos!=4 and pos!=5 and pos!=6 and pos!=7 and pos != 8 and pos!=9):
raise FpdbError("invalid position found in checkPositions. i: "+str(i)+" position: "+str(pos))
#end def fpdb_simple.checkPositions