From 912a73371f139b88e7763dd166112eef217efda8 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sun, 27 Aug 2006 21:04:49 +0000 Subject: [PATCH] * src/GrampsDb/_WriteGedcom.py (GedcomWriter.gui_setup): Add a dialog about the researcher information. * src/gramps.py (run): Remove startup dialog. svn: r7278 --- ChangeLog | 3 +++ src/GrampsDb/_WriteGedcom.py | 18 +++++++++++++++++- src/gramps.py | 11 ++++------- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b6fc7cf2..8e43976cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ 2006-08-27 Alex Roitman + * src/GrampsDb/_WriteGedcom.py (GedcomWriter.gui_setup): Add a + dialog about the researcher information. + * src/gramps.py (run): Remove startup dialog. * src/plugins/RelCalc.py: Use name display preferences throughout; collapse unique entries in the common ancestors list. * src/plugins/TestcaseGenerator.py: Bring somewhat up to date. diff --git a/src/GrampsDb/_WriteGedcom.py b/src/GrampsDb/_WriteGedcom.py index 1d261eb6f..982695e5a 100644 --- a/src/GrampsDb/_WriteGedcom.py +++ b/src/GrampsDb/_WriteGedcom.py @@ -55,11 +55,12 @@ import RelLib from Filters import GenericFilter, Rules, build_filter_menu import const import _GedcomInfo as GedcomInfo +import Config import Errors import ansel_utf8 import Utils import NameDisplay -from QuestionDialog import ErrorDialog, WarningDialog +from QuestionDialog import ErrorDialog, WarningDialog, MessageHideDialog from BasicUtils import UpdateCallback #------------------------------------------------------------------------ @@ -73,6 +74,12 @@ def keep_utf8(s): def iso8859(s): return s.encode('iso-8859-1','replace') +def researcher_info_missing(): + val = Config.get(Config.STARTUP) + if val < const.startup: + return True + return False + #------------------------------------------------------------------------- # # GEDCOM tags representing attributes that may take a parameter, value or @@ -454,6 +461,15 @@ 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.'),Config.STARTUP) + if self.option_box.cfilter == None: self.plist = set(self.db.get_person_handles(sort_handles=False)) else: diff --git a/src/gramps.py b/src/gramps.py index 27957f064..d6932b5f3 100644 --- a/src/gramps.py +++ b/src/gramps.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2003 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + #------------------------------------------------------------------------- # # Python modules @@ -168,12 +170,7 @@ def run(): pass try: - import StartupDialog - - if StartupDialog.need_to_run(): - StartupDialog.StartupDialog(gramps_main.Gramps,args) - else: - gramps_main.Gramps(args) + gramps_main.Gramps(args) except: log.error("Gramps failed to start.", exc_info=True)