2007-02-04 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
* src/GrampsLocale: set svn:ignore propery * src/BasicUtils: set svn:ignore propery * src/GrampsDbUtils: set svn:ignore propery * src/RelLib/_Researcher.py: add missing get/set methods * src/GrampsDbUtils/_WriteGedcom.py: db owner handling, warn for missing * src/GrampsCfg.py: db owner handling, new warning pref * src/Config/_GrampsConfigKeys.py: db owner handling, new warning pref * data/gramps.schemas.in: db owner handling, new warning pref * src/plugins/OwnerEditor.py: db owner handling, plugin tool * src/plugins/ownereditor.glade: db owner handling, plugin tool svn: r8051
This commit is contained in:
@@ -60,12 +60,10 @@ from BasicUtils import UpdateCallback
|
||||
|
||||
try:
|
||||
import Config
|
||||
STARTUP = Config.STARTUP
|
||||
STARTUP_VAL = Config.get(Config.STARTUP)
|
||||
HAVE_CONFIG = True
|
||||
except:
|
||||
log.warn("No Config module available using defaults.")
|
||||
STARTUP = ('behavior','startup', 1)
|
||||
STARTUP_VAL = 0
|
||||
HAVE_CONFIG = False
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@@ -78,12 +76,6 @@ def keep_utf8(s):
|
||||
def iso8859(s):
|
||||
return s.encode('iso-8859-1','replace')
|
||||
|
||||
def researcher_info_missing():
|
||||
val = STARTUP_VAL
|
||||
if val < const.startup:
|
||||
return True
|
||||
return False
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GEDCOM tags representing attributes that may take a parameter, value or
|
||||
@@ -471,14 +463,18 @@ class GedcomWriter(UpdateCallback):
|
||||
self.cnvtxt = self.option_box.cnvtxt
|
||||
self.nl = self.option_box.nl
|
||||
|
||||
if researcher_info_missing():
|
||||
MessageHideDialog(
|
||||
_('Researcher information'),
|
||||
_('A valid GEDCOM file is required to contain researcher '
|
||||
'information. You need to fill these data in the '
|
||||
'Preferences dialog.\n\n'
|
||||
'However, most programs do not require it. '
|
||||
'You may leave this empty if you want.'),STARTUP)
|
||||
if HAVE_CONFIG:
|
||||
show_owner_missing_warning = not Config.get(Config.OWNER_WARN)
|
||||
owner_name_empty = self.db.get_researcher().get_name() == ''
|
||||
|
||||
if show_owner_missing_warning and owner_name_empty:
|
||||
MessageHideDialog(
|
||||
_('Researcher information'),
|
||||
_('A valid GEDCOM file is required to contain researcher '
|
||||
'information. You need to fill these data in the '
|
||||
'Preferences dialog.\n\n'
|
||||
'However, most programs do not require it. You may '
|
||||
'leave this empty if you want.'),Config.OWNER_WARN)
|
||||
|
||||
if self.option_box.cfilter == None:
|
||||
self.plist = set(self.db.get_person_handles(sort_handles=False))
|
||||
|
Reference in New Issue
Block a user