Autocompletion is now optional

svn: r612
This commit is contained in:
Don Allingham 2001-12-12 03:53:15 +00:00
parent 13bb5dd1e0
commit 9209147854
3 changed files with 647 additions and 602 deletions

View File

@ -95,6 +95,7 @@ pprefix = "P"
fprefix = "F" fprefix = "F"
autoload = 0 autoload = 0
usetabs = 0 usetabs = 0
autocomp = 1
usevc = 0 usevc = 0
vc_comment = 0 vc_comment = 0
uncompress = 0 uncompress = 0
@ -162,6 +163,7 @@ def loadConfig(call):
global autoload global autoload
global owner global owner
global usetabs global usetabs
global autocomp
global calendar global calendar
global usevc global usevc
global iprefix, fprefix, pprefix, oprefix, sprefix global iprefix, fprefix, pprefix, oprefix, sprefix
@ -193,6 +195,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")
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")
localprop = get_bool("/gramps/config/DisplayLocal") localprop = get_bool("/gramps/config/DisplayLocal")
@ -300,6 +303,11 @@ def loadConfig(call):
localprop =1 localprop =1
if usetabs == None: if usetabs == None:
usetabs = 0 usetabs = 0
if ac == None:
autocomp = 1
else:
autocomp = not ac
if calendar == None: if calendar == None:
calendar = 0 calendar = 0
if usevc == None: if usevc == None:
@ -415,6 +423,7 @@ def on_propertybox_apply(obj,page):
global nameof global nameof
global owner global owner
global usetabs global usetabs
global autocomp
global mediaref global mediaref
global globalprop global globalprop
global localprop global localprop
@ -450,6 +459,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()
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()
globalprop = prefsTop.get_widget("globalprop").get_active() globalprop = prefsTop.get_widget("globalprop").get_active()
@ -510,6 +520,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/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)
set_bool("/gramps/config/DisplayLocal",localprop) set_bool("/gramps/config/DisplayLocal",localprop)
@ -677,6 +688,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")
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")
dg = prefsTop.get_widget("globalprop") dg = prefsTop.get_widget("globalprop")
@ -691,6 +703,7 @@ def display_preferences_box(db):
auto.set_active(autoload) auto.set_active(autoload)
detail.set_active(show_detail) detail.set_active(show_detail)
tabs.set_active(usetabs) tabs.set_active(usetabs)
ac.set_active(autocomp)
if mediaref: if mediaref:
mr.set_active(1) mr.set_active(1)
else: else:

View File

@ -24,6 +24,7 @@
__author__ = 'Don Allingham' __author__ = 'Don Allingham'
import libglade import libglade
import Config
import const import const
import utils import utils
import string import string
@ -45,12 +46,14 @@ class Find:
self.xml.signal_autoconnect({ self.xml.signal_autoconnect({
"destroy_passed_object" : utils.destroy_passed_object, "destroy_passed_object" : utils.destroy_passed_object,
"on_next_clicked" : self.on_next_clicked, "on_next_clicked" : self.on_next_clicked,
"on_combo_insert_text" : utils.combo_insert_text,
"on_prev_clicked" : self.on_prev_clicked, "on_prev_clicked" : self.on_prev_clicked,
}) })
self.top = self.xml.get_widget("find") self.top = self.xml.get_widget("find")
self.entry = self.xml.get_widget("entry1") self.entry = self.xml.get_widget("entry1")
self.combo = self.xml.get_widget("combo") self.combo = self.xml.get_widget("combo")
if Config.autocomp:
self.entry.connect_object("insert-text",utils.combo_insert_text,self.combo)
self.combo.disable_activate() self.combo.disable_activate()
self.next = self.xml.get_widget("next") self.next = self.xml.get_widget("next")
nlist = [""] nlist = [""]

File diff suppressed because it is too large Load Diff