diff --git a/gramps/src/StartupDialog.py b/gramps/src/StartupDialog.py index 1c56b1fe6..4bd927feb 100644 --- a/gramps/src/StartupDialog.py +++ b/gramps/src/StartupDialog.py @@ -23,6 +23,14 @@ import libglade import gnome.config import utils +def need_to_run(): + if gnome.config.get_string("/gramps/config/startup") == None: + return 1 + if gnome.config.get_int("/gramps/config/startup") < const.startup: + return 1 + return 0 + + class StartupDialog: def __init__(self,task,arg): @@ -65,9 +73,10 @@ class StartupDialog: lds = self.druid.get_widget("enable_lds").get_active() gnome.config.set_int("/gramps/config/UseLDS",lds) - + gnome.config.sync() utils.destroy_passed_object(obj) - self.task(self.arg) def on_cancel_clicked(self,obj): + gnome.config.set_int("/gramps/config/startup",const.startup) + gnome.config.sync() utils.destroy_passed_object(obj) diff --git a/gramps/src/const.py b/gramps/src/const.py index fed557c6b..f86abed12 100644 --- a/gramps/src/const.py +++ b/gramps/src/const.py @@ -79,6 +79,8 @@ filtersDir = "%s/filters" % rootDir dataDir = "%s/data" % rootDir gtkrcFile = "%s/gtkrc" % rootDir +startup = 1 + #------------------------------------------------------------------------- # # About box information diff --git a/gramps/src/gramps.py b/gramps/src/gramps.py index 454814b32..7446bc758 100755 --- a/gramps/src/gramps.py +++ b/gramps/src/gramps.py @@ -28,9 +28,10 @@ else: arg = None try: - if gnome.config.get_string("/gramps/researcher/name") == None: - from StartupDialog import StartupDialog - StartupDialog(gramps_main.main,arg) + import StartupDialog + + if StartupDialog.need_to_run(): + StartupDialog.StartupDialog(gramps_main.main,arg) else: gramps_main.main(arg) except: