* src/FamilyView.py (set_widgets): Do not connect buttons if this

view is already initialized.
* src/GrampsCfg.py: Set GNOME toolbar prefs as the default.
Correct existing gconf key detection.


svn: r2264
This commit is contained in:
Alex Roitman 2003-10-17 04:24:36 +00:00
parent d3fd8b06b9
commit 56c2b3a66d
3 changed files with 37 additions and 30 deletions

View File

@ -10,6 +10,10 @@
* src/gramps_main.py (pref_callback): Update statusbar from prefs
(needed for Family View).
* NEWS: Instant prefs.
* src/FamilyView.py (set_widgets): Do not connect buttons if this
view is already initialized.
* src/GrampsCfg.py: Set GNOME toolbar prefs as the default.
Correct existing gconf key detection.
2003-10-15 Alex Roitman <shura@alex.neuro.umn.edu>
* src/gramps.glade: Correct tooltips.

View File

@ -70,6 +70,7 @@ class FamilyView:
self.init_interface()
def set_widgets(self,val):
already_init = self.cadded[val]
if (val):
self.ap_data = self.top.get_widget('ap_data2')
self.swap_btn = self.top.get_widget('swap_btn2')
@ -80,6 +81,7 @@ class FamilyView:
self.select_spouse_btn = self.top.get_widget('select_spouse2')
self.remove_spouse_btn = self.top.get_widget('remove_spouse2')
self.child_list = self.top.get_widget('chlist2')
if not already_init:
self.top.get_widget('add_parents2').connect('clicked',self.add_parents_clicked)
self.top.get_widget('del_parents2').connect('clicked',self.del_parents_clicked)
self.top.get_widget('add_spparents2').connect('clicked',self.add_sp_parents)
@ -104,6 +106,7 @@ class FamilyView:
self.select_spouse_btn = self.top.get_widget('select_spouse')
self.remove_spouse_btn = self.top.get_widget('remove_spouse')
self.child_list = self.top.get_widget('chlist')
if not already_init:
self.top.get_widget('add_parents').connect('clicked',self.add_parents_clicked)
self.top.get_widget('del_parents').connect('clicked',self.del_parents_clicked)
self.top.get_widget('add_spparents').connect('clicked',self.add_sp_parents)

View File

@ -242,7 +242,7 @@ def loadConfig(call):
status_bar = get_int("/apps/gramps/statusbar")
gnome_toolbar_str = get_string("/desktop/gnome/interface/toolbar_style")
gnome_toolbar = eval("gtk.TOOLBAR_%s" % string.upper(gnome_toolbar_str))
save_toolbar = get_int("/apps/gramps/toolbar",gtk.TOOLBAR_BOTH)
save_toolbar = get_int("/apps/gramps/toolbar",5)
if save_toolbar == 5:
toolbar = gnome_toolbar
else:
@ -326,24 +326,24 @@ def loadConfig(call):
def get_string(value,defval=""):
v = client.get_string(value)
if v == None:
return defval
else:
if client.get(key):
return v
else:
return defval
def get_bool(key,defval=0):
v = client.get_bool(key)
if v == None:
return defval
else:
if client.get(key):
return v
else:
return defval
def get_int(key,defval=0):
v = client.get_int(key)
if v == None:
return defval
else:
if client.get(key):
return v
else:
return defval
def set_int(key,value):
client.set_int(key,value)