2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>

* src/DataViews/_PedigreeView.py: correctly load bookmarks, issue 1271
	* src/DataViews/_RelationView.py: correctly load bookmarks, issue 1271
	* src/PageView.py: correct bug not going to bookmark if no active person
	* src/DataViews/_MediaView.py:
	* src/DataViews/_NoteView.py:
	* src/DataViews/_RepositoryView.py:
	* src/DataViews/_SourceView.py:
	* src/DataViews/_EventView.py:
	* src/DataViews/_FamilyList.py:
	* src/DataViews/_PedigreeView.py:
	* src/DataViews/_PlaceView.py:
	* src/DataViews/_PersonView.py:
	* src/DataViews/_RelationView.py:
	after import, redraw bookmark menu


svn: r9065
This commit is contained in:
Benny Malengier 2007-10-03 16:34:51 +00:00
parent d9d93d2ad7
commit ca5a7367e2
12 changed files with 55 additions and 17 deletions

View File

@ -1,3 +1,19 @@
2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
* src/DataViews/_PedigreeView.py: correctly load bookmarks, issue 1271
* src/DataViews/_RelationView.py: correctly load bookmarks, issue 1271
* src/PageView.py: correct bug not going to bookmark if no active person
* src/DataViews/_MediaView.py:
* src/DataViews/_NoteView.py:
* src/DataViews/_RepositoryView.py:
* src/DataViews/_SourceView.py:
* src/DataViews/_EventView.py:
* src/DataViews/_FamilyList.py:
* src/DataViews/_PedigreeView.py:
* src/DataViews/_PlaceView.py:
* src/DataViews/_PersonView.py:
* src/DataViews/_RelationView.py:
after import, redraw bookmark menu
2007-10-02 Benny Malengier <benny.malengier@gramps-project.org>
* src/DateEdit.py: resolve issue #1270, date edit not closing

View File

@ -83,7 +83,7 @@ class EventView(PageView.ListView):
'event-add' : self.row_add,
'event-update' : self.row_update,
'event-delete' : self.row_delete,
'event-rebuild' : self.build_tree,
'event-rebuild' : self.object_build,
}
self.func_list = {

View File

@ -76,7 +76,7 @@ class FamilyListView(PageView.ListView):
'family-add' : self.row_add,
'family-update' : self.row_update,
'family-delete' : self.row_delete,
'family-rebuild' : self.build_tree,
'family-rebuild' : self.object_build,
}
self.func_list = {

View File

@ -101,7 +101,7 @@ class MediaView(PageView.ListView):
'media-add' : self.row_add,
'media-update' : self.row_update,
'media-delete' : self.row_delete,
'media-rebuild' : self.build_tree,
'media-rebuild' : self.object_build,
}
PageView.ListView.__init__(

View File

@ -84,7 +84,7 @@ class NoteView(PageView.ListView):
'note-add' : self.row_add,
'note-update' : self.row_update,
'note-delete' : self.row_delete,
'note-rebuild' : self.build_tree,
'note-rebuild' : self.object_build,
}
self.func_list = {

View File

@ -622,16 +622,16 @@ class PedigreeView(PageView.PersonNavView):
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('person-rebuild', self.person_rebuild_bm)
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:
if self.active:
self.bookmarks.redraw()
self.build_tree()
def goto_active_person(self,handle=None):
self.dirty = True
if handle:
@ -640,7 +640,13 @@ class PedigreeView(PageView.PersonNavView):
else:
self.rebuild_trees(None)
self.uistate.modify_statusbar(self.dbstate)
def person_rebuild_bm(self,dummy=None):
"""Large change to person database"""
self.person_rebuild(dummy)
if self.active:
self.bookmarks.redraw()
def person_rebuild(self,dummy=None):
self.format_helper.clear_cache()
self.dirty = True

View File

@ -431,7 +431,7 @@ class PersonView(PageView.PersonNavView):
db.connect('person-add', self.person_added)
db.connect('person-update', self.person_updated)
db.connect('person-delete', self.person_removed)
db.connect('person-rebuild', self.build_tree)
db.connect('person-rebuild', self.person_rebuild)
if self.active:
self.build_tree()
@ -743,6 +743,12 @@ class PersonView(PageView.PersonNavView):
def func(self, tree, path, ex_list):
ex_list.append(self.model.mapper.top_path2iter[path[0]])
def person_rebuild(self):
"""Large change to person database"""
if self.active:
self.bookmarks.redraw()
self.build_tree()
def person_removed(self, handle_list):
if not self.model:
return

View File

@ -91,7 +91,7 @@ class PlaceView(PageView.ListView):
'place-add' : self.row_add,
'place-update' : self.row_update,
'place-delete' : self.row_delete,
'place-rebuild' : self.build_tree,
'place-rebuild' : self.object_build,
}
self.func_list = {

View File

@ -176,6 +176,9 @@ class RelationshipView(PageView.PersonNavView):
self.change_person(None)
def person_rebuild(self):
"""Large change to person database"""
if self.active:
self.bookmarks.redraw()
if self.dbstate.active:
while not self.change_person(self.dbstate.active.handle):
pass
@ -368,7 +371,8 @@ class RelationshipView(PageView.PersonNavView):
self.dbstate.db.connect('person-add', self.redraw)
self.dbstate.db.connect('person-delete', self.redraw)
self.bookmarks.update_bookmarks(db.get_bookmarks())
self.bookmarks.redraw()
if self.active:
self.bookmarks.redraw()
self.redraw()
def get_name(self, handle, use_gender=False):

View File

@ -92,7 +92,7 @@ class RepositoryView(PageView.ListView):
'repository-add' : self.row_add,
'repository-update' : self.row_update,
'repository-delete' : self.row_delete,
'repository-rebuild' : self.build_tree,
'repository-rebuild' : self.object_build,
}
self.func_list = {

View File

@ -85,7 +85,7 @@ class SourceView(PageView.ListView):
'source-add' : self.row_add,
'source-update' : self.row_update,
'source-delete' : self.row_delete,
'source-rebuild' : self.build_tree,
'source-rebuild' : self.object_build,
}
self.func_list = {

View File

@ -745,14 +745,13 @@ class ListView(BookMarkView):
self.search_bar.setup_filter(cols)
def goto_handle(self, handle):
if not self.dbstate.active or self.inactive:
if not handle or self.inactive:
return
# mark inactive to prevent recusion
# mark inactive to prevent recursion
self.inactive = True
# select the active person in the person view
# select the handle in the view
try:
path = self.model.on_get_path(handle)
self.selection.unselect_all()
@ -848,6 +847,13 @@ class ListView(BookMarkView):
self.model.total)
else:
self.dirty = True
def object_build(self):
"""callback, for if tree must be rebuild and bookmarks redrawn
"""
if self.active:
self.bookmarks.redraw()
self.build_tree()
def filter_toggle_action(self, obj):
if obj.get_active():