3691: Make all views displaying names respond to nameformat-changed signals

svn: r14737
This commit is contained in:
Nick Hall 2010-03-10 12:36:27 +00:00
parent 72afaa04bb
commit 5f133cd21b
6 changed files with 7 additions and 11 deletions

View File

@ -255,7 +255,6 @@ class ViewManager(CLIManager):
self.button_handlers = []
self.buttons = []
self.merge_ids = []
self._key = None
self.toolactions = None
self.tool_menu_ui_id = None
self.reportactions = None
@ -970,8 +969,6 @@ class ViewManager(CLIManager):
self.active_page.set_active()
self.notebook.set_current_page(current_cat)
self.notebook_cat[current_cat].set_current_page(current_cat_view)
self._key = self.uistate.connect('nameformat-changed',
self.active_page.build_tree)
else:
#not one single view loaded
WarningDialog(
@ -1200,10 +1197,6 @@ class ViewManager(CLIManager):
gtk.main_iteration()
self.active_page.change_page()
if self._key:
self.uistate.disconnect(self._key)
self._key = self.uistate.connect(
'nameformat-changed', self.active_page.build_tree)
else:
#no views loaded
pass

View File

@ -138,6 +138,7 @@ class BasePersonView(ListView):
}
config.connect("interface.filter", self.filter_toggle)
uistate.connect('nameformat-changed', self.build_tree)
def navigation_type(self):
return 'Person'

View File

@ -122,8 +122,8 @@ class EventView(ListView):
'<CONTROL>BackSpace' : self.key_delete,
}
config.connect("interface.filter",
self.filter_toggle)
config.connect("interface.filter", self.filter_toggle)
uistate.connect('nameformat-changed', self.build_tree)
def navigation_type(self):
return 'Event'

View File

@ -114,8 +114,8 @@ class FamilyView(ListView):
'<CONTROL>BackSpace' : self.key_delete,
}
config.connect("interface.filter",
self.filter_toggle)
config.connect("interface.filter", self.filter_toggle)
uistate.connect('nameformat-changed', self.build_tree)
def navigation_type(self):
return 'Family'

View File

@ -659,6 +659,7 @@ class PedigreeView(NavigationView):
self.dbstate = dbstate
self.dbstate.connect('database-changed', self.change_db)
uistate.connect('nameformat-changed', self.person_rebuild)
# Automatic resize
self.force_size = config.get('interface.pedview-tree-size')
# Nice tree

View File

@ -140,6 +140,7 @@ class RelationshipView(NavigationView):
}
dbstate.connect('database-changed', self.change_db)
uistate.connect('nameformat-changed', self.build_tree)
self.redrawing = False
self.color = gtk.TextView().style.white