From 5f133cd21bf4741d5bbb2f4332f19a71201d8352 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Wed, 10 Mar 2010 12:36:27 +0000 Subject: [PATCH] 3691: Make all views displaying names respond to nameformat-changed signals svn: r14737 --- src/gui/viewmanager.py | 7 ------- src/plugins/lib/libpersonview.py | 1 + src/plugins/view/eventview.py | 4 ++-- src/plugins/view/familyview.py | 4 ++-- src/plugins/view/pedigreeview.py | 1 + src/plugins/view/relview.py | 1 + 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index 4adcc0c19..e7d8c1625 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -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 diff --git a/src/plugins/lib/libpersonview.py b/src/plugins/lib/libpersonview.py index 7c9212970..fc826c21e 100644 --- a/src/plugins/lib/libpersonview.py +++ b/src/plugins/lib/libpersonview.py @@ -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' diff --git a/src/plugins/view/eventview.py b/src/plugins/view/eventview.py index 284b68209..549f219a8 100644 --- a/src/plugins/view/eventview.py +++ b/src/plugins/view/eventview.py @@ -122,8 +122,8 @@ class EventView(ListView): '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' diff --git a/src/plugins/view/familyview.py b/src/plugins/view/familyview.py index d548e80f7..df50c0b07 100644 --- a/src/plugins/view/familyview.py +++ b/src/plugins/view/familyview.py @@ -114,8 +114,8 @@ class FamilyView(ListView): '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' diff --git a/src/plugins/view/pedigreeview.py b/src/plugins/view/pedigreeview.py index 8686d26d2..43a47c28e 100644 --- a/src/plugins/view/pedigreeview.py +++ b/src/plugins/view/pedigreeview.py @@ -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 diff --git a/src/plugins/view/relview.py b/src/plugins/view/relview.py index e225d9809..ae06d3438 100644 --- a/src/plugins/view/relview.py +++ b/src/plugins/view/relview.py @@ -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