From 22595c0129c3b7a00949a0d17cce90658dc092c0 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Mon, 19 Jun 2006 08:22:49 +0000 Subject: [PATCH] * src/DataViews/_PedigreeView.py: Bootstrap resize handling using "show" event because the "expose" event was not emitted in all cases (closes #202); Redraw on family-* signals too to show for example newly added parents. svn: r6914 --- gramps2/ChangeLog | 6 ++++++ gramps2/src/DataViews/_PedigreeView.py | 21 +++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 3182c6130..1ea3bec73 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,9 @@ +2006-06-19 Martin Hawlisch + * src/DataViews/_PedigreeView.py: Bootstrap resize handling using + "show" event because the "expose" event was not emitted in all + cases (closes #202); Redraw on family-* signals too to show for + example newly added parents. + 2006-06-18 Don Allingham * help/C/gramps-manual.xml: integrate into a single doc * help/C/figures/*.png: updated images diff --git a/gramps2/src/DataViews/_PedigreeView.py b/gramps2/src/DataViews/_PedigreeView.py index c6352d354..faf829422 100644 --- a/gramps2/src/DataViews/_PedigreeView.py +++ b/gramps2/src/DataViews/_PedigreeView.py @@ -457,7 +457,7 @@ class PedigreeView(PageView.PersonNavView): self.notebook = gtk.Notebook() self.notebook.connect("button-press-event", self.bg_button_press_cb) - self.bootstrap_handler = self.notebook.connect("expose-event", self.init_parent_signals_cb) + self.bootstrap_handler = self.notebook.connect("size-request", self.init_parent_signals_cb) self.notebook.set_show_border(False) self.notebook.set_show_tabs(False) @@ -547,10 +547,14 @@ class PedigreeView(PageView.PersonNavView): is no need to store the database, since we will get the value from self.state.db """ - db.connect('person-add', self.person_updated_cb) - db.connect('person-update', self.person_updated_cb) - db.connect('person-delete', self.person_updated_cb) + db.connect('person-add', self.person_rebuild) + db.connect('person-update', self.person_rebuild) + db.connect('person-delete', self.person_rebuild) db.connect('person-rebuild', self.person_rebuild) + db.connect('family-update', self.person_rebuild) + db.connect('family-add', self.person_rebuild) + db.connect('family-delete', self.person_rebuild) + db.connect('family-rebuild', self.person_rebuild) self.bookmarks.update_bookmarks(self.dbstate.db.get_bookmarks()) if self.dbstate.active: self.bookmarks.redraw() @@ -564,14 +568,7 @@ class PedigreeView(PageView.PersonNavView): else: self.rebuild_trees(None) - def person_updated_cb(self,handle_list): - self.dirty = True - if self.dbstate.active: - self.rebuild_trees(self.dbstate.active.handle) - else: - self.rebuild_trees(None) - - def person_rebuild(self): + def person_rebuild(self,dummy=None): self.dirty = True if self.dbstate.active: self.rebuild_trees(self.dbstate.active.handle)