Merge branch 'master' of git://git.assembla.com/free_poker_tools

This commit is contained in:
Worros 2008-10-22 22:18:48 +08:00
commit 9a685b63c5
5 changed files with 19 additions and 11 deletions

View File

@ -123,9 +123,10 @@ class GuiAutoImport (threading.Thread):
return self.mainVBox
#end def get_vbox
def __init__(self, settings, debug=True):
def __init__(self, settings, config, debug=True):
"""Constructor for GuiAutoImport"""
self.settings=settings
self.config=config
self.importer = fpdb_import.Importer(self,self.settings)
self.importer.setCallHud(True)
self.importer.setMinPrint(30)
@ -164,7 +165,8 @@ class GuiAutoImport (threading.Thread):
self.pathStarsLabel.show()
self.starsDirPath=gtk.Entry()
self.starsDirPath.set_text(self.settings['hud-defaultPath'])
paths = self.config.get_default_paths("PokerStars")
self.starsDirPath.set_text(paths['hud-defaultPath'])
self.pathHBox.pack_start(self.starsDirPath, False, True, 0)
self.starsDirPath.show()
@ -178,7 +180,8 @@ class GuiAutoImport (threading.Thread):
self.pathTiltLabel.show()
self.tiltDirPath=gtk.Entry()
self.tiltDirPath.set_text(self.settings['hud-defaultPath'])
paths = self.config.get_default_paths("FullTilt")
self.tiltDirPath.set_text(paths['hud-defaultPath'])
self.pathHBox.pack_start(self.tiltDirPath, False, True, 0)
self.tiltDirPath.show()

View File

@ -76,9 +76,10 @@ class GuiBulkImport (threading.Thread):
print "todo: implement bulk import thread"
#end def run
def __init__(self, db, settings):
def __init__(self, db, settings, config):
self.db=db
self.settings=settings
self.config=config
self.importer = fpdb_import.Importer(self,self.settings)
self.vbox=gtk.VBox(False,1)

View File

@ -134,8 +134,10 @@ if __name__== "__main__":
main_window = gtk.Window()
main_window.connect("destroy", destroy)
eb = gtk.EventBox()
label = gtk.Label('Closing this window will exit from the HUD.')
main_window.add(label)
eb.add(label)
main_window.add(eb)
main_window.set_title("HUD Main Window")
main_window.show_all()

View File

@ -52,7 +52,7 @@ class Hud:
self.max = max
self.db_name = db_name
self.deleted = False
self.stacked = False
self.stacked = True
self.stat_windows = {}
self.popup_windows = {}
@ -70,7 +70,8 @@ class Hud:
self.main_window.connect("window-state-event", self.on_window_event)
self.ebox = gtk.EventBox()
self.label = gtk.Label("Close this window to\nkill the HUD for\n %s" % (table.name))
self.label = gtk.Label("Close this window to\nkill the HUD for\n %s\nMinimizing it hides stats." %
(table.name))
self.main_window.add(self.ebox)
self.ebox.add(self.label)
self.main_window.move(self.table.x, self.table.y)

View File

@ -255,7 +255,7 @@ class fpdb:
self.diaSetupWizard(path=defaultpath)
#end def load_default_profile
def load_profile(self, filename):
def load_profile(self):
"""Loads profile from the provided path name. also see load_default_profile"""
self.settings = {}
if (os.sep=="/"):
@ -321,7 +321,7 @@ class fpdb:
def tab_auto_import(self, widget, data):
"""opens the auto import tab"""
new_aimp_thread=GuiAutoImport.GuiAutoImport(self.settings)
new_aimp_thread=GuiAutoImport.GuiAutoImport(self.settings, self.config)
self.threads.append(new_aimp_thread)
aimp_tab=new_aimp_thread.get_vbox()
self.add_and_display_tab(aimp_tab, "Auto Import")
@ -330,7 +330,7 @@ class fpdb:
def tab_bulk_import(self, widget, data):
"""opens a tab for bulk importing"""
#print "start of tab_bulk_import"
new_import_thread=GuiBulkImport.GuiBulkImport(self.db, self.settings)
new_import_thread=GuiBulkImport.GuiBulkImport(self.db, self.settings, self.config)
self.threads.append(new_import_thread)
bulk_tab=new_import_thread.get_vbox()
self.add_and_display_tab(bulk_tab, "Bulk Import")
@ -367,7 +367,8 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
self.threads=[]
self.db=None
self.config = Configuration.Config()
self.load_default_profile()
self.load_profile()
# self.load_default_profile()
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self.delete_event)