* src/gramps_main.py (post_load): Emit "database-changed" signal instead of calling change_db().

* src/PedView.py: Connect to "database-changed" signal and handle person-update signals to redraw the view.
* src/FamilyView.py (__init__) connect to database-changed signal, dont call change_cb because on initialisation there is no real database. (change_db): use database parameter supplied by signal emission.
* src/PeopleView.py (__init__) dont connect the signals, this will be done by change_db, (change_db): Use supplied database.
* src/SourceView.py (__init__): dont call change_cb because on initialisation there is no real database and this will be done by the signal.


svn: r4304
This commit is contained in:
Martin Hawlisch
2005-04-06 09:40:41 +00:00
parent b00f2e8645
commit 5b44756832
6 changed files with 45 additions and 34 deletions

View File

@ -1667,23 +1667,13 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
GrampsKeys.save_last_file(name)
self.gtop.get_widget("filter").set_text("")
if callback:
callback(_('Building Person list...'))
self.people_view.change_db(self.db)
self.family_view.change_db()
if callback:
callback(_('Building Place list...'))
self.place_view.change_db(self.db)
if callback:
callback(_('Building Source list...'))
self.source_view.change_db(self.db)
if callback:
callback(_('Building Media list...'))
self.media_view.change_db(self.db)
self.emit("database-changed", (self.db,))
self.relationship = self.RelClass(self.db)
self.change_active_person(self.find_initial_person())
self.goto_active_person()
self.goto_active_person() # TODO: This should emit a signal so other views can update itself
if callback:
callback(_('Setup complete'))
self.enable_buttons(True)