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

This commit is contained in:
Worros 2010-08-23 13:25:01 +08:00
commit 6da5522965
13 changed files with 361 additions and 290 deletions

View File

@ -450,7 +450,6 @@ def sss():
self.settings['os']="windows"
self.settings.update(self.config.get_db_parameters())
self.settings.update(self.config.get_tv_parameters())
self.settings.update(self.config.get_import_parameters())
self.settings.update(self.config.get_default_paths())

View File

@ -519,6 +519,20 @@ class General(dict):
for (name, value) in node.attributes.items():
log.debug(_("config.general: adding %s = %s") % (name,value))
self[name] = value
try:
self["version"]=int(self["version"])
except KeyError:
self["version"]=0
self["ui_language"]="system"
self["config_difficuly"]="expert"
def get_defaults(self):
self["version"]=0
self["ui_language"]="system"
self["config_difficuly"]="expert"
self["config_wrap_len"]="-1"
self["day_start"]="5"
def __str__(self):
s = ""
@ -703,6 +717,8 @@ class Config:
self.emails = {}
self.gui_cash_stats = GUICashStats()
if doc.getElementsByTagName("general") == []:
self.general.get_defaults()
for gen_node in doc.getElementsByTagName("general"):
self.general.add_elements(node=gen_node) # add/overwrite elements in self.general

View File

@ -334,7 +334,6 @@ if __name__== "__main__":
else: settings['os'] = 'linuxmac'
settings.update(config.get_db_parameters('fpdb'))
settings.update(config.get_tv_parameters())
settings.update(config.get_import_parameters())
settings.update(config.get_default_paths())

View File

@ -53,7 +53,6 @@ class GuiPositionalStats (threading.Thread):
settings = {}
settings.update(self.conf.get_db_parameters())
settings.update(self.conf.get_tv_parameters())
settings.update(self.conf.get_import_parameters())
settings.update(self.conf.get_default_paths())

View File

@ -82,7 +82,6 @@ class GuiSessionViewer (threading.Thread):
settings = {}
settings.update(self.conf.get_db_parameters())
settings.update(self.conf.get_tv_parameters())
settings.update(self.conf.get_import_parameters())
settings.update(self.conf.get_default_paths())

View File

@ -5,8 +5,11 @@
<!-- config_wrap_len is preferred max line length in this file, -1 means no max
day_start is time that logical day starts, e.g. 5 means that any play
between 00:00 and 04:59:59 counts as being on the previous day -->
<general config_wrap_len="-1"
day_start="5"
<general version="1"
config_wrap_len="-1"
day_start="5"
ui_language="system"
config_difficuly="expert"
/>
<import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="True"></import>

View File

@ -320,10 +320,8 @@ If a player has None chips he won't be added."""
def checkPlayerExists(self,player):
if player not in [p[1] for p in self.players]:
print _("DEBUG: checkPlayerExists %s fail") % player
raise FpdbParseError(_("checkPlayerExists: '%s' failed.") % player)
print (_("DEBUG: checkPlayerExists %s fail on hand number %s") % (player, self.handid))
raise FpdbParseError(_("checkPlayerExists: '%s fail on hand number %s") % (player, self.handid))
def setCommunityCards(self, street, cards):
log.debug("setCommunityCards %s %s" %(street, cards))

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import sys
import os
import codecs
@ -76,7 +77,6 @@ def main(argv=None):
sql = SQL.Sql(db_server = 'sqlite')
settings = {}
settings.update(config.get_db_parameters())
settings.update(config.get_tv_parameters())
settings.update(config.get_import_parameters())
settings.update(config.get_default_paths())
db.recreate_tables()

View File

@ -1 +1,3 @@
cd ..
python /usr/share/doc/python-2.7/examples/Tools/i18n/msgfmt.py --output-file=locale/hu/LC_MESSAGES/fpdb.mo locale/fpdb-hu_HU.po

View File

@ -1,2 +1,3 @@
cd ..
python /usr/share/doc/python-2.7/examples/Tools/i18n/pygettext.py --output-dir=locale --default-domain=fpdb --output=fpdb-en_GB.po *.py*

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,6 @@ sql = SQL.Sql(db_server = 'sqlite')
settings = {}
settings.update(config.get_db_parameters())
settings.update(config.get_tv_parameters())
settings.update(config.get_import_parameters())
settings.update(config.get_default_paths())

View File

@ -30,7 +30,6 @@ sql = SQL.Sql(db_server = 'sqlite')
settings = {}
settings.update(config.get_db_parameters())
settings.update(config.get_tv_parameters())
settings.update(config.get_import_parameters())
settings.update(config.get_default_paths())