diff --git a/pyfpdb/HandHistoryConverter.py b/pyfpdb/HandHistoryConverter.py index 7e10e66a..0642d845 100644 --- a/pyfpdb/HandHistoryConverter.py +++ b/pyfpdb/HandHistoryConverter.py @@ -1,8 +1,5 @@ #!/usr/bin/python -<<<<<<< HEAD:pyfpdb/HandHistoryConverter.py # -*- coding: utf-8 -*- -======= ->>>>>>> 1efdd7fc68d3c9ce013f4d42730bece8075e2272:pyfpdb/HandHistoryConverter.py #Copyright 2008 Carl Gherardi #This program is free software: you can redistribute it and/or modify diff --git a/pyfpdb/Mucked.py b/pyfpdb/Mucked.py index c4a6e4f1..6da35f6d 100755 --- a/pyfpdb/Mucked.py +++ b/pyfpdb/Mucked.py @@ -63,7 +63,12 @@ class Aux_Window(object): card_images = 53 * [0] suits = ('s', 'h', 'd', 'c') 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 i in range(0, 4): diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 13f592cd..3c25963f 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -2498,7 +2498,7 @@ class Sql: INNER JOIN Sites s on (s.Id = gt.siteId) INNER JOIN Players p on (p.Id = hp.playerId) WHERE hp.playerId in - AND date_format(h.handStart, '%Y-%m-%d') + AND h.handStart ORDER by time""" elif db_server == 'sqlite': self.query['sessionStats'] = """ """ diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index 68159870..fe2ddd39 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -41,6 +41,10 @@ if os.name == 'nt' and sys.version[0:3] not in ('2.5', '2.6') and '-r' not in sy else: pass #print "debug - not changing path" + +if os.name == 'nt': + import win32api + import win32con print "Python " + sys.version[0:3] + '...\n' @@ -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): print "window_state_event", event 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: - print "FPDB minimized" + self.window.hide() self.window.set_skip_taskbar_hint(True) self.window.set_skip_pager_hint(True) else: - print "FPDB unminimized" self.window.set_skip_taskbar_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): # 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 def statusicon_activate(self, widget, data = None): + self.window.show() self.window.present() def warning_box(self, str, diatitle="FPDB WARNING"): diff --git a/setup.py b/setup.py index 737ad18e..0ba21bf0 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,8 @@ setup(name = 'fpdb', ('/usr/share/applications', ['files/fpdb.desktop']), ('/usr/share/python-fpdb', - ['pyfpdb/logging.conf']) + ['pyfpdb/logging.conf', 'pyfpdb/Cards01.png', + 'pyfpdb/HUD_config.xml.example' + ]) ] )