Detection of need to rerun startup
svn: r739
This commit is contained in:
parent
8cbf32b523
commit
584dc2dbd7
@ -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)
|
||||
|
@ -79,6 +79,8 @@ filtersDir = "%s/filters" % rootDir
|
||||
dataDir = "%s/data" % rootDir
|
||||
gtkrcFile = "%s/gtkrc" % rootDir
|
||||
|
||||
startup = 1
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# About box information
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user