From f8cef8d975db05d444795e24f896e7b9ca357069 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 31 Dec 2007 02:05:07 +0000 Subject: [PATCH] 2007-12-30 Douglas S. Blank * src/Config/_GrampsConfigKeys.py: added MyGrampsView * src/Config/_GrampsGconfKeys.py: added try/excepts on get_types svn: r9647 --- ChangeLog | 4 ++++ src/Config/_GrampsConfigKeys.py | 6 +++--- src/Config/_GrampsGconfKeys.py | 15 ++++++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a6711153..c0d5fddc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-12-30 Douglas S. Blank + * src/Config/_GrampsConfigKeys.py: added MyGrampsView + * src/Config/_GrampsGconfKeys.py: added try/excepts on get_types + 2007-12-30 Brian Matherly * src/plugins/GVFamilyLines.py: * src\PluginUtils\__init__.py: diff --git a/src/Config/_GrampsConfigKeys.py b/src/Config/_GrampsConfigKeys.py index a248aa9c2..1047c1054 100644 --- a/src/Config/_GrampsConfigKeys.py +++ b/src/Config/_GrampsConfigKeys.py @@ -280,7 +280,7 @@ default_value = { MIN_GENERATION_YEARS : 13, AVG_GENERATION_GAP : 20, GENERATION_DEPTH : 15, - DATA_VIEWS: ('PersonView,RelationshipView,FamilyListView,PedigreeView,' - 'EventView,SourceView,PlaceView,MediaView,RepositoryView,' - 'NoteView'), + DATA_VIEWS: ('MyGrampsView,PersonView,RelationshipView,FamilyListView,' + 'PedigreeView,EventView,SourceView,PlaceView,MediaView,' + 'RepositoryView,NoteView'), } diff --git a/src/Config/_GrampsGconfKeys.py b/src/Config/_GrampsGconfKeys.py index 978e8db47..cc8de2750 100644 --- a/src/Config/_GrampsGconfKeys.py +++ b/src/Config/_GrampsGconfKeys.py @@ -88,11 +88,20 @@ def set(key, value): def get(key): token = "/apps/gramps/%s/%s" % (key[0], key[1]) if key[2] == 0: - val = get_bool(token) + try: + val = get_bool(token) + except: + val = default_value[key] elif key[2] == 1: - val = get_int(token) + try: + val = get_int(token) + except: + val = default_value[key] else: - val = get_string(token) + try: + val = get_string(token) + except: + val = default_value[key] if val == None: val = default_value[key] return val