Add preference to enable LDS tab.

svn: r671
This commit is contained in:
David Hampton 2001-12-30 00:19:16 +00:00
parent ed65546f12
commit 83d69a31e7
4 changed files with 44 additions and 6 deletions

View File

@ -97,6 +97,7 @@ autoload = 0
autosave = 0 autosave = 0
autosave_int = 5 autosave_int = 5
usetabs = 0 usetabs = 0
uselds = 0
autocomp = 1 autocomp = 1
usevc = 0 usevc = 0
vc_comment = 0 vc_comment = 0
@ -167,6 +168,7 @@ def loadConfig(call):
global autosave_int global autosave_int
global owner global owner
global usetabs global usetabs
global uselds
global autocomp global autocomp
global calendar global calendar
global usevc global usevc
@ -199,6 +201,7 @@ def loadConfig(call):
_callback = call _callback = call
lastfile = get_string("/gramps/data/LastFile") lastfile = get_string("/gramps/data/LastFile")
usetabs = get_bool("/gramps/config/UseTabs") usetabs = get_bool("/gramps/config/UseTabs")
uselds = get_bool("/gramps/config/UseLDS")
ac = get_bool("/gramps/config/DisableAutoComplete") ac = get_bool("/gramps/config/DisableAutoComplete")
mediaref = get_bool("/gramps/config/MakeReference") mediaref = get_bool("/gramps/config/MakeReference")
globalprop = get_bool("/gramps/config/DisplayGlobal") globalprop = get_bool("/gramps/config/DisplayGlobal")
@ -313,6 +316,8 @@ def loadConfig(call):
localprop =1 localprop =1
if usetabs == None: if usetabs == None:
usetabs = 0 usetabs = 0
if uselds == None:
uselds = 0
if ac == None: if ac == None:
autocomp = 1 autocomp = 1
else: else:
@ -433,6 +438,7 @@ def on_propertybox_apply(obj,page):
global nameof global nameof
global owner global owner
global usetabs global usetabs
global uselds
global autocomp global autocomp
global mediaref global mediaref
global globalprop global globalprop
@ -471,6 +477,7 @@ def on_propertybox_apply(obj,page):
display_attr = prefsTop.get_widget("attr_display").get_active() display_attr = prefsTop.get_widget("attr_display").get_active()
attr_name = string.strip(prefsTop.get_widget("attr_name").get_text()) attr_name = string.strip(prefsTop.get_widget("attr_name").get_text())
usetabs = prefsTop.get_widget("usetabs").get_active() usetabs = prefsTop.get_widget("usetabs").get_active()
uselds = prefsTop.get_widget("uselds").get_active()
autocomp = prefsTop.get_widget("autocomp").get_active() autocomp = prefsTop.get_widget("autocomp").get_active()
mediaref = prefsTop.get_widget("mediaref").get_active() mediaref = prefsTop.get_widget("mediaref").get_active()
localprop = prefsTop.get_widget("localprop").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) output_preference = output_obj.get_data(DATA)
set_bool("/gramps/config/UseTabs",usetabs) set_bool("/gramps/config/UseTabs",usetabs)
set_bool("/gramps/config/UseLDS",uselds)
set_bool("/gramps/config/DisableAutoComplete",not autocomp) set_bool("/gramps/config/DisableAutoComplete",not autocomp)
set_bool("/gramps/config/MakeReference",mediaref) set_bool("/gramps/config/MakeReference",mediaref)
set_bool("/gramps/config/DisplayGlobal",globalprop) set_bool("/gramps/config/DisplayGlobal",globalprop)
@ -709,6 +717,7 @@ def display_preferences_box(db):
idedit = prefsTop.get_widget("gid_edit") idedit = prefsTop.get_widget("gid_edit")
index_vis = prefsTop.get_widget("show_child_id") index_vis = prefsTop.get_widget("show_child_id")
tabs = prefsTop.get_widget("usetabs") tabs = prefsTop.get_widget("usetabs")
lds = prefsTop.get_widget("uselds")
ac = prefsTop.get_widget("autocomp") ac = prefsTop.get_widget("autocomp")
mr = prefsTop.get_widget("mediaref") mr = prefsTop.get_widget("mediaref")
mc = prefsTop.get_widget("mediacopy") mc = prefsTop.get_widget("mediacopy")
@ -726,6 +735,7 @@ def display_preferences_box(db):
asave_int.set_value(autosave_int) asave_int.set_value(autosave_int)
detail.set_active(show_detail) detail.set_active(show_detail)
tabs.set_active(usetabs) tabs.set_active(usetabs)
lds.set_active(uselds)
ac.set_active(autocomp) ac.set_active(autocomp)
if mediaref: if mediaref:
mr.set_active(1) mr.set_active(1)

View File

@ -4341,7 +4341,8 @@
<widget> <widget>
<class>GtkVBox</class> <class>GtkVBox</class>
<name>vbox38</name> <name>lds_page</name>
<visible>False</visible>
<homogeneous>False</homogeneous> <homogeneous>False</homogeneous>
<spacing>0</spacing> <spacing>0</spacing>
@ -5268,7 +5269,8 @@
<widget> <widget>
<class>GtkLabel</class> <class>GtkLabel</class>
<child_name>Notebook:tab</child_name> <child_name>Notebook:tab</child_name>
<name>label248</name> <name>lds_tab</name>
<visible>False</visible>
<label>LDS</label> <label>LDS</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>

View File

@ -256,6 +256,10 @@ class EditPerson:
self.get_widget("user_colon").hide() self.get_widget("user_colon").hide()
self.get_widget("user_data").hide() self.get_widget("user_data").hide()
if Config.uselds:
self.get_widget("lds_tab").show()
self.get_widget("lds_page").show()
# initial values # initial values
self.get_widget("activepersonTitle").set_text(Config.nameof(person)) self.get_widget("activepersonTitle").set_text(Config.nameof(person))
self.suffix.set_text(self.pname.getSuffix()) self.suffix.set_text(self.pname.getSuffix())

View File

@ -1126,7 +1126,28 @@
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>
<padding>5</padding> <padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkCheckButton</class>
<name>uselds</name>
<border_width>3</border_width>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>on_object_toggled</handler>
<object>propertybox</object>
<last_modification_time>Sun, 30 Dec 2001 00:13:47 GMT</last_modification_time>
</signal>
<label>Enable LDS tab on Edit Person form</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand> <expand>False</expand>
<fill>False</fill> <fill>False</fill>
</child> </child>
@ -1135,12 +1156,13 @@
<widget> <widget>
<class>GtkHBox</class> <class>GtkHBox</class>
<name>hbox1</name> <name>hbox1</name>
<border_width>3</border_width>
<homogeneous>False</homogeneous> <homogeneous>False</homogeneous>
<spacing>0</spacing> <spacing>0</spacing>
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>True</expand> <expand>False</expand>
<fill>True</fill> <fill>False</fill>
</child> </child>
<widget> <widget>
@ -1157,7 +1179,7 @@
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>
<padding>3</padding> <padding>0</padding>
<expand>False</expand> <expand>False</expand>
<fill>False</fill> <fill>False</fill>
</child> </child>