From 83d69a31e7c535d67b1ec4cb6f3af49a63c54b87 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sun, 30 Dec 2001 00:19:16 +0000 Subject: [PATCH] Add preference to enable LDS tab. svn: r671 --- gramps/src/Config.py | 10 ++++++++++ gramps/src/EditPerson.glade | 6 ++++-- gramps/src/EditPerson.py | 4 ++++ gramps/src/config.glade | 30 ++++++++++++++++++++++++++---- 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/gramps/src/Config.py b/gramps/src/Config.py index 3ffe9ee22..bcae1b511 100644 --- a/gramps/src/Config.py +++ b/gramps/src/Config.py @@ -97,6 +97,7 @@ autoload = 0 autosave = 0 autosave_int = 5 usetabs = 0 +uselds = 0 autocomp = 1 usevc = 0 vc_comment = 0 @@ -167,6 +168,7 @@ def loadConfig(call): global autosave_int global owner global usetabs + global uselds global autocomp global calendar global usevc @@ -199,6 +201,7 @@ def loadConfig(call): _callback = call lastfile = get_string("/gramps/data/LastFile") usetabs = get_bool("/gramps/config/UseTabs") + uselds = get_bool("/gramps/config/UseLDS") ac = get_bool("/gramps/config/DisableAutoComplete") mediaref = get_bool("/gramps/config/MakeReference") globalprop = get_bool("/gramps/config/DisplayGlobal") @@ -313,6 +316,8 @@ def loadConfig(call): localprop =1 if usetabs == None: usetabs = 0 + if uselds == None: + uselds = 0 if ac == None: autocomp = 1 else: @@ -433,6 +438,7 @@ def on_propertybox_apply(obj,page): global nameof global owner global usetabs + global uselds global autocomp global mediaref global globalprop @@ -471,6 +477,7 @@ def on_propertybox_apply(obj,page): display_attr = prefsTop.get_widget("attr_display").get_active() attr_name = string.strip(prefsTop.get_widget("attr_name").get_text()) usetabs = prefsTop.get_widget("usetabs").get_active() + uselds = prefsTop.get_widget("uselds").get_active() autocomp = prefsTop.get_widget("autocomp").get_active() mediaref = prefsTop.get_widget("mediaref").get_active() localprop = prefsTop.get_widget("localprop").get_active() @@ -532,6 +539,7 @@ def on_propertybox_apply(obj,page): output_preference = output_obj.get_data(DATA) set_bool("/gramps/config/UseTabs",usetabs) + set_bool("/gramps/config/UseLDS",uselds) set_bool("/gramps/config/DisableAutoComplete",not autocomp) set_bool("/gramps/config/MakeReference",mediaref) set_bool("/gramps/config/DisplayGlobal",globalprop) @@ -709,6 +717,7 @@ def display_preferences_box(db): idedit = prefsTop.get_widget("gid_edit") index_vis = prefsTop.get_widget("show_child_id") tabs = prefsTop.get_widget("usetabs") + lds = prefsTop.get_widget("uselds") ac = prefsTop.get_widget("autocomp") mr = prefsTop.get_widget("mediaref") mc = prefsTop.get_widget("mediacopy") @@ -726,6 +735,7 @@ def display_preferences_box(db): asave_int.set_value(autosave_int) detail.set_active(show_detail) tabs.set_active(usetabs) + lds.set_active(uselds) ac.set_active(autocomp) if mediaref: mr.set_active(1) diff --git a/gramps/src/EditPerson.glade b/gramps/src/EditPerson.glade index bc4ac745c..3c7ae2eb6 100644 --- a/gramps/src/EditPerson.glade +++ b/gramps/src/EditPerson.glade @@ -4341,7 +4341,8 @@ GtkVBox - vbox38 + lds_page + False False 0 @@ -5268,7 +5269,8 @@ GtkLabel Notebook:tab - label248 + lds_tab + False GTK_JUSTIFY_CENTER False diff --git a/gramps/src/EditPerson.py b/gramps/src/EditPerson.py index aa356b67b..34f390d85 100644 --- a/gramps/src/EditPerson.py +++ b/gramps/src/EditPerson.py @@ -256,6 +256,10 @@ class EditPerson: self.get_widget("user_colon").hide() self.get_widget("user_data").hide() + if Config.uselds: + self.get_widget("lds_tab").show() + self.get_widget("lds_page").show() + # initial values self.get_widget("activepersonTitle").set_text(Config.nameof(person)) self.suffix.set_text(self.pname.getSuffix()) diff --git a/gramps/src/config.glade b/gramps/src/config.glade index edc0072d2..f5a43371c 100644 --- a/gramps/src/config.glade +++ b/gramps/src/config.glade @@ -1126,7 +1126,28 @@ False True - 5 + 0 + False + False + + + + + GtkCheckButton + uselds + 3 + True + + toggled + on_object_toggled + propertybox + Sun, 30 Dec 2001 00:13:47 GMT + + + False + True + + 0 False False @@ -1135,12 +1156,13 @@ GtkHBox hbox1 + 3 False 0 0 - True - True + False + False @@ -1157,7 +1179,7 @@ False True - 3 + 0 False False