* src/gramps_main.py: remove beta warning, handle OSError

on config open


svn: r4481
This commit is contained in:
Don Allingham 2005-05-04 03:50:44 +00:00
parent 7393664291
commit 2010054577
2 changed files with 23 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2005-05-03 Don Allingham <don@gramps-project.org>
* src/gramps_main.py: remove beta warning, handle OSError
on config open
2005-05-03 Tino Meinen <a.t.meinen@chello.nl> 2005-05-03 Tino Meinen <a.t.meinen@chello.nl>
* src/po/nl.po: Updated Dutch translation * src/po/nl.po: Updated Dutch translation

View File

@ -146,28 +146,25 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
try: try:
GrampsCfg.loadConfig() GrampsCfg.loadConfig()
self.beta_warn()
if GrampsKeys.get_betawarn() == 0:
WarningDialog(_("Use at your own risk"),
_("This is an unstable development version of GRAMPS. "
"It is intended as a technology preview. Do not trust your "
"family database to this development version. This version may "
"contain bugs which could corrupt your database."))
GrampsKeys.save_betawarn(1)
GrampsKeys.sync()
self.RelClass = PluginMgr.relationship_class self.RelClass = PluginMgr.relationship_class
self.relationship = self.RelClass(self.db) self.relationship = self.RelClass(self.db)
self.gtop = gtk.glade.XML(const.gladeFile, "gramps", "gramps") self.gtop = gtk.glade.XML(const.gladeFile, "gramps", "gramps")
self.init_interface() self.init_interface()
except OSError,msg:
ErrorDialog(_("Configuration error"),str(msg))
return
except Errors.GConfSchemaError, val: except Errors.GConfSchemaError, val:
ErrorDialog(_("Configuration error"), ErrorDialog(_("Configuration error"),
str(val) + _("\n\nPossibly the installation of GRAMPS was incomplete." str(val) + _("\n\nPossibly the installation of GRAMPS was incomplete."
" Make sure the GConf schema of GRAMPS is properly installed.")) " Make sure the GConf schema of GRAMPS is properly installed."))
gtk.main_quit() gtk.main_quit()
return return
except:
DisplayTrace.DisplayTrace()
return
if not mime_type_is_defined(const.app_gramps): if not mime_type_is_defined(const.app_gramps):
ErrorDialog(_("Configuration error"), ErrorDialog(_("Configuration error"),
@ -207,6 +204,18 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
self.db.set_researcher(GrampsCfg.get_researcher()) self.db.set_researcher(GrampsCfg.get_researcher())
def beta_warn(self):
return
if not GrampsKeys.get_betawarn():
return
WarningDialog("Use at your own risk",
"This is an unstable development version of GRAMPS. "
"It is intended as a technology preview. Do not trust your "
"family database to this development version. This version may "
"contain bugs which could corrupt your database.")
GrampsKeys.save_betawarn(1)
GrampsKeys.sync()
def date_format_key_update(self,client,cnxn_id,entry,data): def date_format_key_update(self,client,cnxn_id,entry,data):
GrampsCfg.set_calendar_date_format() GrampsCfg.set_calendar_date_format()
self.familyview_key_update(client,cnxn_id,entry,data) self.familyview_key_update(client,cnxn_id,entry,data)