* 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:
parent
d3fd8b06b9
commit
56c2b3a66d
@ -10,6 +10,10 @@
|
|||||||
* src/gramps_main.py (pref_callback): Update statusbar from prefs
|
* src/gramps_main.py (pref_callback): Update statusbar from prefs
|
||||||
(needed for Family View).
|
(needed for Family View).
|
||||||
* NEWS: Instant prefs.
|
* 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>
|
2003-10-15 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/gramps.glade: Correct tooltips.
|
* src/gramps.glade: Correct tooltips.
|
||||||
|
@ -70,6 +70,7 @@ class FamilyView:
|
|||||||
self.init_interface()
|
self.init_interface()
|
||||||
|
|
||||||
def set_widgets(self,val):
|
def set_widgets(self,val):
|
||||||
|
already_init = self.cadded[val]
|
||||||
if (val):
|
if (val):
|
||||||
self.ap_data = self.top.get_widget('ap_data2')
|
self.ap_data = self.top.get_widget('ap_data2')
|
||||||
self.swap_btn = self.top.get_widget('swap_btn2')
|
self.swap_btn = self.top.get_widget('swap_btn2')
|
||||||
@ -80,16 +81,17 @@ class FamilyView:
|
|||||||
self.select_spouse_btn = self.top.get_widget('select_spouse2')
|
self.select_spouse_btn = self.top.get_widget('select_spouse2')
|
||||||
self.remove_spouse_btn = self.top.get_widget('remove_spouse2')
|
self.remove_spouse_btn = self.top.get_widget('remove_spouse2')
|
||||||
self.child_list = self.top.get_widget('chlist2')
|
self.child_list = self.top.get_widget('chlist2')
|
||||||
self.top.get_widget('add_parents2').connect('clicked',self.add_parents_clicked)
|
if not already_init:
|
||||||
self.top.get_widget('del_parents2').connect('clicked',self.del_parents_clicked)
|
self.top.get_widget('add_parents2').connect('clicked',self.add_parents_clicked)
|
||||||
self.top.get_widget('add_spparents2').connect('clicked',self.add_sp_parents)
|
self.top.get_widget('del_parents2').connect('clicked',self.del_parents_clicked)
|
||||||
self.top.get_widget('del_spparents2').connect('clicked',self.del_sp_parents)
|
self.top.get_widget('add_spparents2').connect('clicked',self.add_sp_parents)
|
||||||
self.top.get_widget('fam_back2').connect('clicked',self.child_back)
|
self.top.get_widget('del_spparents2').connect('clicked',self.del_sp_parents)
|
||||||
self.top.get_widget('del_child_btn2').connect('clicked',self.remove_child_clicked)
|
self.top.get_widget('fam_back2').connect('clicked',self.child_back)
|
||||||
self.top.get_widget('add_child_btn2').connect('clicked',self.add_child_clicked)
|
self.top.get_widget('del_child_btn2').connect('clicked',self.remove_child_clicked)
|
||||||
self.top.get_widget('select_child2').connect('clicked',self.select_child_clicked)
|
self.top.get_widget('add_child_btn2').connect('clicked',self.add_child_clicked)
|
||||||
self.top.get_widget('ap_parents_btn2').connect('clicked',self.ap_parents_clicked)
|
self.top.get_widget('select_child2').connect('clicked',self.select_child_clicked)
|
||||||
self.top.get_widget('sp_parents_btn2').connect('clicked',self.sp_parents_clicked)
|
self.top.get_widget('ap_parents_btn2').connect('clicked',self.ap_parents_clicked)
|
||||||
|
self.top.get_widget('sp_parents_btn2').connect('clicked',self.sp_parents_clicked)
|
||||||
self.parent.views.get_nth_page(2).show_all()
|
self.parent.views.get_nth_page(2).show_all()
|
||||||
if self.parent.views.get_current_page() == 1:
|
if self.parent.views.get_current_page() == 1:
|
||||||
self.parent.views.set_current_page(2)
|
self.parent.views.set_current_page(2)
|
||||||
@ -104,16 +106,17 @@ class FamilyView:
|
|||||||
self.select_spouse_btn = self.top.get_widget('select_spouse')
|
self.select_spouse_btn = self.top.get_widget('select_spouse')
|
||||||
self.remove_spouse_btn = self.top.get_widget('remove_spouse')
|
self.remove_spouse_btn = self.top.get_widget('remove_spouse')
|
||||||
self.child_list = self.top.get_widget('chlist')
|
self.child_list = self.top.get_widget('chlist')
|
||||||
self.top.get_widget('add_parents').connect('clicked',self.add_parents_clicked)
|
if not already_init:
|
||||||
self.top.get_widget('del_parents').connect('clicked',self.del_parents_clicked)
|
self.top.get_widget('add_parents').connect('clicked',self.add_parents_clicked)
|
||||||
self.top.get_widget('add_spparents').connect('clicked',self.add_sp_parents)
|
self.top.get_widget('del_parents').connect('clicked',self.del_parents_clicked)
|
||||||
self.top.get_widget('del_spparents').connect('clicked',self.del_sp_parents)
|
self.top.get_widget('add_spparents').connect('clicked',self.add_sp_parents)
|
||||||
self.top.get_widget('fam_back').connect('clicked',self.child_back)
|
self.top.get_widget('del_spparents').connect('clicked',self.del_sp_parents)
|
||||||
self.top.get_widget('del_child_btn').connect('clicked',self.remove_child_clicked)
|
self.top.get_widget('fam_back').connect('clicked',self.child_back)
|
||||||
self.top.get_widget('add_child_btn').connect('clicked',self.add_child_clicked)
|
self.top.get_widget('del_child_btn').connect('clicked',self.remove_child_clicked)
|
||||||
self.top.get_widget('select_child').connect('clicked',self.select_child_clicked)
|
self.top.get_widget('add_child_btn').connect('clicked',self.add_child_clicked)
|
||||||
self.top.get_widget('ap_parents_btn').connect('clicked',self.ap_parents_clicked)
|
self.top.get_widget('select_child').connect('clicked',self.select_child_clicked)
|
||||||
self.top.get_widget('sp_parents_btn').connect('clicked',self.sp_parents_clicked)
|
self.top.get_widget('ap_parents_btn').connect('clicked',self.ap_parents_clicked)
|
||||||
|
self.top.get_widget('sp_parents_btn').connect('clicked',self.sp_parents_clicked)
|
||||||
self.parent.views.get_nth_page(1).show_all()
|
self.parent.views.get_nth_page(1).show_all()
|
||||||
if self.parent.views.get_current_page() == 2:
|
if self.parent.views.get_current_page() == 2:
|
||||||
self.parent.views.set_current_page(1)
|
self.parent.views.set_current_page(1)
|
||||||
|
@ -242,7 +242,7 @@ def loadConfig(call):
|
|||||||
status_bar = get_int("/apps/gramps/statusbar")
|
status_bar = get_int("/apps/gramps/statusbar")
|
||||||
gnome_toolbar_str = get_string("/desktop/gnome/interface/toolbar_style")
|
gnome_toolbar_str = get_string("/desktop/gnome/interface/toolbar_style")
|
||||||
gnome_toolbar = eval("gtk.TOOLBAR_%s" % string.upper(gnome_toolbar_str))
|
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:
|
if save_toolbar == 5:
|
||||||
toolbar = gnome_toolbar
|
toolbar = gnome_toolbar
|
||||||
else:
|
else:
|
||||||
@ -326,24 +326,24 @@ def loadConfig(call):
|
|||||||
|
|
||||||
def get_string(value,defval=""):
|
def get_string(value,defval=""):
|
||||||
v = client.get_string(value)
|
v = client.get_string(value)
|
||||||
if v == None:
|
if client.get(key):
|
||||||
return defval
|
|
||||||
else:
|
|
||||||
return v
|
return v
|
||||||
|
else:
|
||||||
|
return defval
|
||||||
|
|
||||||
def get_bool(key,defval=0):
|
def get_bool(key,defval=0):
|
||||||
v = client.get_bool(key)
|
v = client.get_bool(key)
|
||||||
if v == None:
|
if client.get(key):
|
||||||
return defval
|
|
||||||
else:
|
|
||||||
return v
|
return v
|
||||||
|
else:
|
||||||
|
return defval
|
||||||
|
|
||||||
def get_int(key,defval=0):
|
def get_int(key,defval=0):
|
||||||
v = client.get_int(key)
|
v = client.get_int(key)
|
||||||
if v == None:
|
if client.get(key):
|
||||||
return defval
|
|
||||||
else:
|
|
||||||
return v
|
return v
|
||||||
|
else:
|
||||||
|
return defval
|
||||||
|
|
||||||
def set_int(key,value):
|
def set_int(key,value):
|
||||||
client.set_int(key,value)
|
client.set_int(key,value)
|
||||||
|
Loading…
Reference in New Issue
Block a user