3272: Proposal for updating config settings

svn: r13346
This commit is contained in:
Doug Blank
2009-10-08 01:12:51 +00:00
parent 3959b59d40
commit 99282aa715
94 changed files with 1220 additions and 1230 deletions

View File

@ -41,7 +41,7 @@ from gen.plug import PluginManager
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
FilterOption, PersonOption
import gen.lib
import Config
import config
from BasicUtils import name_displayer
import Errors
from ReportBase import ReportUtils
@ -98,25 +98,25 @@ class CalcEstDateOptions(MenuToolOptions):
# -----------------------------------------------------
category_name = _("Config")
num = NumberOption(_("Maximum age"),
Config.get(Config.MAX_AGE_PROB_ALIVE),
config.get('behavior.max-age-prob-alive'),
0, 200)
num.set_help(_("Maximum age that one can live to"))
menu.add_option(category_name, "MAX_AGE_PROB_ALIVE", num)
num = NumberOption(_("Maximum sibling age difference"),
Config.get(Config.MAX_SIB_AGE_DIFF),
config.get('behavior.max-sib-age-diff'),
0, 200)
num.set_help(_("Maximum age difference between siblings"))
menu.add_option(category_name, "MAX_SIB_AGE_DIFF", num)
num = NumberOption(_("Minimum years between generations"),
Config.get(Config.MIN_GENERATION_YEARS),
config.get('behavior.min-generation-years'),
0, 200)
num.set_help(_("Minimum years between two generations"))
menu.add_option(category_name, "MIN_GENERATION_YEARS", num)
num = NumberOption(_("Average years between generations"),
Config.get(Config.AVG_GENERATION_GAP),
config.get('behavior.avg-generation-gap'),
0, 200)
num.set_help(_("Average years between two generations"))
menu.add_option(category_name, "AVG_GENERATION_GAP", num)

View File

@ -36,7 +36,7 @@ import gtk
#
#-------------------------------------------------------------------------
import const
import Config
import config
from Utils import get_researcher
import GrampsDisplay
from widgets import MonitoredEntry
@ -60,14 +60,14 @@ WIKI_HELP_SEC = _('manual|Edit_Database_Owner_Information...')
#
#-------------------------------------------------------------------------
config_keys = (
Config.RESEARCHER_NAME,
Config.RESEARCHER_ADDR,
Config.RESEARCHER_CITY,
Config.RESEARCHER_STATE,
Config.RESEARCHER_COUNTRY,
Config.RESEARCHER_POSTAL,
Config.RESEARCHER_PHONE,
Config.RESEARCHER_EMAIL,
'researcher.researcher-name',
'researcher.researcher-addr',
'researcher.researcher-city',
'researcher.researcher-state',
'researcher.researcher-country',
'researcher.researcher-postal',
'researcher.researcher-phone',
'researcher.researcher-email',
)
#-------------------------------------------------------------------------
@ -165,7 +165,7 @@ class OwnerEditor(Tool.Tool, ManagedWindow.ManagedWindow):
elif menuitem.name == 'copy_from_db_to_preferences':
for i in range(len(config_keys)):
Config.set(config_keys[i], self.owner.get()[i])
config.set(config_keys[i], self.owner.get()[i])
#-------------------------------------------------------------------------
#