git25 - default path of importer and table viewer are now plattform dependent defaults that'll work on default setups but can also be changed using the profile file
This commit is contained in:
parent
9b737612d0
commit
47bf90d71c
|
@ -4,3 +4,5 @@ db-databaseName=fpdb
|
||||||
db-user=fpdb
|
db-user=fpdb
|
||||||
db-password=enterYourPwHere
|
db-password=enterYourPwHere
|
||||||
tv-combinedPostflop=True
|
tv-combinedPostflop=True
|
||||||
|
bulkImport-defaultPath=default
|
||||||
|
tv-defaultPath=default
|
||||||
|
|
|
@ -6,6 +6,7 @@ fix default pathes up to sensible ones
|
||||||
update regression testing to take into account everything new, make sure it passes all tests
|
update regression testing to take into account everything new, make sure it passes all tests
|
||||||
3B/4B might not be recognised nor counted as chance if someone raised after player called.
|
3B/4B might not be recognised nor counted as chance if someone raised after player called.
|
||||||
add to install the sql commands to create DB etc.
|
add to install the sql commands to create DB etc.
|
||||||
|
test everything actually works in windows too
|
||||||
|
|
||||||
next
|
next
|
||||||
====
|
====
|
||||||
|
|
|
@ -240,12 +240,19 @@ class fpdb:
|
||||||
print "Opened and read profile file", filename
|
print "Opened and read profile file", filename
|
||||||
self.profile=filename
|
self.profile=filename
|
||||||
|
|
||||||
self.bulk_import_default_path="/work/poker-histories/wine-ps/" #/todo: move this to .conf
|
|
||||||
self.settings={'db-host':"localhost", 'db-backend':2, 'db-databaseName':"fpdb", 'db-user':"fpdb"}
|
self.settings={'db-host':"localhost", 'db-backend':2, 'db-databaseName':"fpdb", 'db-user':"fpdb"}
|
||||||
if (os.sep=="/"):
|
if (os.sep=="/"):
|
||||||
self.settings['os']="linuxmac"
|
self.settings['os']="linuxmac"
|
||||||
else:
|
else:
|
||||||
self.settings['os']="windows"
|
self.settings['os']="windows"
|
||||||
|
|
||||||
|
if self.settings['os']=="windows":
|
||||||
|
self.settings['bulkImport-defaultPath']="C:\\Program Files\\PokerStars\\HandHistory\\filename.txt"
|
||||||
|
self.settings['tv-defaultPath']="C:\\Program Files\\PokerStars\\HandHistory\\filename.txt"
|
||||||
|
else:
|
||||||
|
self.settings['bulkImport-defaultPath'] = os.path.expanduser("~") + "/.wine/drive_c/Program Files/PokerStars/HandHistory/filename.txt"
|
||||||
|
self.settings['tv-defaultPath'] = os.path.expanduser("~")+"/.wine/drive_c/Program Files/PokerStars/HandHistory/filename.txt"
|
||||||
|
|
||||||
for i in range(len(lines)):
|
for i in range(len(lines)):
|
||||||
if lines[i].startswith("db-backend="):
|
if lines[i].startswith("db-backend="):
|
||||||
self.settings['db-backend']=int(lines[i][11:-1])
|
self.settings['db-backend']=int(lines[i][11:-1])
|
||||||
|
@ -262,6 +269,12 @@ class fpdb:
|
||||||
self.settings['tv-combinedPostflop']=True
|
self.settings['tv-combinedPostflop']=True
|
||||||
else:
|
else:
|
||||||
self.settings['tv-combinedPostflop']=False
|
self.settings['tv-combinedPostflop']=False
|
||||||
|
elif lines[i].startswith("bulkImport-defaultPath="):
|
||||||
|
if lines[i][23:-1]!="default":
|
||||||
|
self.settings['bulkImport-defaultPath']=lines[i][23:-1]
|
||||||
|
elif lines[i].startswith("tv-defaultPath="):
|
||||||
|
if lines[i][15:-1]!="default":
|
||||||
|
self.settings['tv-defaultPath']=lines[i][15:-1]
|
||||||
|
|
||||||
if self.db!=None:
|
if self.db!=None:
|
||||||
self.db.disconnect()
|
self.db.disconnect()
|
||||||
|
@ -300,7 +313,7 @@ class fpdb:
|
||||||
def tab_bulk_import(self, widget, data):
|
def tab_bulk_import(self, widget, data):
|
||||||
"""opens a tab for bulk importing"""
|
"""opens a tab for bulk importing"""
|
||||||
#print "start of tab_bulk_import"
|
#print "start of tab_bulk_import"
|
||||||
new_import_thread=import_threaded.import_threaded(self.db, self.bulk_import_default_path)
|
new_import_thread=import_threaded.import_threaded(self.db, self.settings['bulkImport-defaultPath'])
|
||||||
self.threads.append(new_import_thread)
|
self.threads.append(new_import_thread)
|
||||||
bulk_tab=new_import_thread.get_vbox()
|
bulk_tab=new_import_thread.get_vbox()
|
||||||
self.add_and_display_tab(bulk_tab, "bulk import")
|
self.add_and_display_tab(bulk_tab, "bulk import")
|
||||||
|
@ -333,7 +346,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
|
||||||
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
||||||
self.window.connect("delete_event", self.delete_event)
|
self.window.connect("delete_event", self.delete_event)
|
||||||
self.window.connect("destroy", self.destroy)
|
self.window.connect("destroy", self.destroy)
|
||||||
self.window.set_title("Free Poker DB - version: pre-alpha, git23")
|
self.window.set_title("Free Poker DB - version: pre-alpha, git25")
|
||||||
self.window.set_border_width(1)
|
self.window.set_border_width(1)
|
||||||
self.window.set_size_request(950,400)
|
self.window.set_size_request(950,400)
|
||||||
self.window.set_resizable(True)
|
self.window.set_resizable(True)
|
||||||
|
|
|
@ -241,7 +241,7 @@ class table_viewer (threading.Thread):
|
||||||
self.filename_label.show()
|
self.filename_label.show()
|
||||||
|
|
||||||
self.filename_tbuffer=gtk.TextBuffer()
|
self.filename_tbuffer=gtk.TextBuffer()
|
||||||
self.filename_tbuffer.set_text("/home/sycamore/ps-history/HH20080726 Meliboea - $0.10-$0.20 - Limit Hold'em.txt")
|
self.filename_tbuffer.set_text(self.settings['tv-defaultPath'])
|
||||||
self.filename_tview=gtk.TextView(self.filename_tbuffer)
|
self.filename_tview=gtk.TextView(self.filename_tbuffer)
|
||||||
self.settings_hbox.pack_start(self.filename_tview, True, True, padding=5)
|
self.settings_hbox.pack_start(self.filename_tview, True, True, padding=5)
|
||||||
self.filename_tview.show()
|
self.filename_tview.show()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user