Merge branch 'master' of git://repo.or.cz/fpbd-bostik

This commit is contained in:
Worros 2009-10-26 23:00:08 +08:00
commit 6b7b46754c
5 changed files with 24 additions and 8 deletions

View File

@ -1,8 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
<<<<<<< HEAD:pyfpdb/HandHistoryConverter.py
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
=======
>>>>>>> 1efdd7fc68d3c9ce013f4d42730bece8075e2272:pyfpdb/HandHistoryConverter.py
#Copyright 2008 Carl Gherardi #Copyright 2008 Carl Gherardi
#This program is free software: you can redistribute it and/or modify #This program is free software: you can redistribute it and/or modify

View File

@ -63,7 +63,12 @@ class Aux_Window(object):
card_images = 53 * [0] card_images = 53 * [0]
suits = ('s', 'h', 'd', 'c') suits = ('s', 'h', 'd', 'c')
ranks = (14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2) ranks = (14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2)
pb = gtk.gdk.pixbuf_new_from_file(self.config.execution_path(self.params['deck'])) deckimg = self.params['deck']
try:
pb = gtk.gdk.pixbuf_new_from_file(self.config.execution_path(deckimg))
except:
stockpath = '/usr/share/python-fpdb/' + deckimg
pb = gtk.gdk.pixbuf_new_from_file(stockpath)
for j in range(0, 13): for j in range(0, 13):
for i in range(0, 4): for i in range(0, 4):

View File

@ -2498,7 +2498,7 @@ class Sql:
INNER JOIN Sites s on (s.Id = gt.siteId) INNER JOIN Sites s on (s.Id = gt.siteId)
INNER JOIN Players p on (p.Id = hp.playerId) INNER JOIN Players p on (p.Id = hp.playerId)
WHERE hp.playerId in <player_test> WHERE hp.playerId in <player_test>
AND date_format(h.handStart, '%Y-%m-%d') <datestest> AND h.handStart <datestest>
ORDER by time""" ORDER by time"""
elif db_server == 'sqlite': elif db_server == 'sqlite':
self.query['sessionStats'] = """ """ self.query['sessionStats'] = """ """

View File

@ -42,6 +42,10 @@ else:
pass pass
#print "debug - not changing path" #print "debug - not changing path"
if os.name == 'nt':
import win32api
import win32con
print "Python " + sys.version[0:3] + '...\n' print "Python " + sys.version[0:3] + '...\n'
import traceback import traceback
@ -639,14 +643,21 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
def window_state_event_cb(self, window, event): def window_state_event_cb(self, window, event):
print "window_state_event", event print "window_state_event", event
if event.changed_mask & gtk.gdk.WINDOW_STATE_ICONIFIED: if event.changed_mask & gtk.gdk.WINDOW_STATE_ICONIFIED:
# -20 = GWL_EXSTYLE can't find it in the pywin32 libs
#bits = win32api.GetWindowLong(self.window.window.handle, -20)
#bits = bits ^ (win32con.WS_EX_TOOLWINDOW | win32con.WS_EX_APPWINDOW)
#win32api.SetWindowLong(self.window.window.handle, -20, bits)
if event.new_window_state & gtk.gdk.WINDOW_STATE_ICONIFIED: if event.new_window_state & gtk.gdk.WINDOW_STATE_ICONIFIED:
print "FPDB minimized" self.window.hide()
self.window.set_skip_taskbar_hint(True) self.window.set_skip_taskbar_hint(True)
self.window.set_skip_pager_hint(True) self.window.set_skip_pager_hint(True)
else: else:
print "FPDB unminimized"
self.window.set_skip_taskbar_hint(False) self.window.set_skip_taskbar_hint(False)
self.window.set_skip_pager_hint(False) self.window.set_skip_pager_hint(False)
# Tell GTK not to propagate this signal any further
return True
def statusicon_menu(self, widget, button, time, data = None): def statusicon_menu(self, widget, button, time, data = None):
# we don't need to pass data here, since we do keep track of most all # we don't need to pass data here, since we do keep track of most all
@ -660,6 +671,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
pass pass
def statusicon_activate(self, widget, data = None): def statusicon_activate(self, widget, data = None):
self.window.show()
self.window.present() self.window.present()
def warning_box(self, str, diatitle="FPDB WARNING"): def warning_box(self, str, diatitle="FPDB WARNING"):

View File

@ -19,6 +19,8 @@ setup(name = 'fpdb',
('/usr/share/applications', ('/usr/share/applications',
['files/fpdb.desktop']), ['files/fpdb.desktop']),
('/usr/share/python-fpdb', ('/usr/share/python-fpdb',
['pyfpdb/logging.conf']) ['pyfpdb/logging.conf', 'pyfpdb/Cards01.png',
'pyfpdb/HUD_config.xml.example'
])
] ]
) )