3272: Proposal for updating config settings
svn: r13346
This commit is contained in:
@ -50,7 +50,7 @@ LOG = logging.getLogger(".clidbman")
|
||||
#-------------------------------------------------------------------------
|
||||
import gen.db
|
||||
from gen.plug import PluginManager
|
||||
import Config
|
||||
import config
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -164,7 +164,7 @@ class CLIDbManager(object):
|
||||
""" Get the list of current names in the database dir
|
||||
"""
|
||||
# make the default directory if it does not exist
|
||||
dbdir = os.path.expanduser(Config.get(Config.DATABASE_PATH))
|
||||
dbdir = os.path.expanduser(config.get('behavior.database-path'))
|
||||
make_dbdir(dbdir)
|
||||
|
||||
self.current_names = []
|
||||
@ -350,7 +350,7 @@ def find_next_db_dir():
|
||||
"""
|
||||
while True:
|
||||
base = "%x" % int(time.time())
|
||||
dbdir = os.path.expanduser(Config.get(Config.DATABASE_PATH))
|
||||
dbdir = os.path.expanduser(config.get('behavior.database-path'))
|
||||
new_path = os.path.join(dbdir, base)
|
||||
if not os.path.isdir(new_path):
|
||||
break
|
||||
|
@ -46,7 +46,7 @@ LOG = logging.getLogger(".grampscli")
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from BasicUtils import name_displayer
|
||||
import Config
|
||||
import config
|
||||
import const
|
||||
import Errors
|
||||
import DbState
|
||||
@ -256,14 +256,14 @@ class CLIManager(object):
|
||||
self.dbstate.db.set_researcher(owner)
|
||||
|
||||
name_displayer.set_name_format(self.dbstate.db.name_formats)
|
||||
fmt_default = Config.get(Config.NAME_FORMAT)
|
||||
fmt_default = config.get('preferences.name-format')
|
||||
if fmt_default < 0:
|
||||
name_displayer.set_default_format(fmt_default)
|
||||
|
||||
self.dbstate.db.enable_signals()
|
||||
self.dbstate.signal_change()
|
||||
|
||||
Config.set(Config.RECENT_FILE, filename)
|
||||
config.set('paths.recent-file', filename)
|
||||
|
||||
try:
|
||||
self.dbstate.change_active_person(
|
||||
|
Reference in New Issue
Block a user