* src/PageView.py: correct bug not going to bookmark if no active person
* src/DataViews/_MediaView.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-03 Benny Malengier <benny.malengier@gramps-project.org> svn: r9064
This commit is contained in:
parent
0de13fe656
commit
dac7bd1eeb
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
|
* src/PageView.py: correct bug not going to bookmark if no active person
|
||||||
|
* src/DataViews/_MediaView.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-03 Benny Malengier <benny.malengier@gramps-project.org>
|
2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
* src/DataViews/_PedigreeView.py: correctly load bookmarks, issue 1271
|
* src/DataViews/_PedigreeView.py: correctly load bookmarks, issue 1271
|
||||||
* src/DataViews/_RelationView.py: correctly load bookmarks, issue 1271
|
* src/DataViews/_RelationView.py: correctly load bookmarks, issue 1271
|
||||||
|
@ -83,7 +83,7 @@ class EventView(PageView.ListView):
|
|||||||
'event-add' : self.row_add,
|
'event-add' : self.row_add,
|
||||||
'event-update' : self.row_update,
|
'event-update' : self.row_update,
|
||||||
'event-delete' : self.row_delete,
|
'event-delete' : self.row_delete,
|
||||||
'event-rebuild' : self.build_tree,
|
'event-rebuild' : self.object_build,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.func_list = {
|
self.func_list = {
|
||||||
|
@ -73,7 +73,7 @@ class FamilyListView(PageView.ListView):
|
|||||||
'family-add' : self.row_add,
|
'family-add' : self.row_add,
|
||||||
'family-update' : self.row_update,
|
'family-update' : self.row_update,
|
||||||
'family-delete' : self.row_delete,
|
'family-delete' : self.row_delete,
|
||||||
'family-rebuild' : self.build_tree,
|
'family-rebuild' : self.object_build,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.func_list = {
|
self.func_list = {
|
||||||
|
@ -93,7 +93,7 @@ class MediaView(PageView.ListView):
|
|||||||
'media-add' : self.row_add,
|
'media-add' : self.row_add,
|
||||||
'media-update' : self.row_update,
|
'media-update' : self.row_update,
|
||||||
'media-delete' : self.row_delete,
|
'media-delete' : self.row_delete,
|
||||||
'media-rebuild' : self.build_tree,
|
'media-rebuild' : self.object_build,
|
||||||
}
|
}
|
||||||
|
|
||||||
PageView.ListView.__init__(
|
PageView.ListView.__init__(
|
||||||
|
@ -631,7 +631,7 @@ class PedigreeView(PageView.PersonNavView):
|
|||||||
db.connect('person-add', self.person_rebuild)
|
db.connect('person-add', self.person_rebuild)
|
||||||
db.connect('person-update', self.person_rebuild)
|
db.connect('person-update', self.person_rebuild)
|
||||||
db.connect('person-delete', 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-update', self.person_rebuild)
|
||||||
db.connect('family-add', self.person_rebuild)
|
db.connect('family-add', self.person_rebuild)
|
||||||
db.connect('family-delete', self.person_rebuild)
|
db.connect('family-delete', self.person_rebuild)
|
||||||
@ -650,6 +650,12 @@ class PedigreeView(PageView.PersonNavView):
|
|||||||
self.rebuild_trees(None)
|
self.rebuild_trees(None)
|
||||||
self.uistate.modify_statusbar(self.dbstate)
|
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):
|
def person_rebuild(self,dummy=None):
|
||||||
self.format_helper.clear_cache()
|
self.format_helper.clear_cache()
|
||||||
self.dirty = True
|
self.dirty = True
|
||||||
|
@ -416,7 +416,7 @@ class PersonView(PageView.PersonNavView):
|
|||||||
db.connect('person-add', self.person_added)
|
db.connect('person-add', self.person_added)
|
||||||
db.connect('person-update', self.person_updated)
|
db.connect('person-update', self.person_updated)
|
||||||
db.connect('person-delete', self.person_removed)
|
db.connect('person-delete', self.person_removed)
|
||||||
db.connect('person-rebuild', self.build_tree)
|
db.connect('person-rebuild', self.person_rebuild)
|
||||||
|
|
||||||
if self.active:
|
if self.active:
|
||||||
self.build_tree()
|
self.build_tree()
|
||||||
@ -725,6 +725,12 @@ class PersonView(PageView.PersonNavView):
|
|||||||
def func(self, tree, path, ex_list):
|
def func(self, tree, path, ex_list):
|
||||||
ex_list.append(self.model.mapper.top_path2iter[path[0]])
|
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):
|
def person_removed(self, handle_list):
|
||||||
if not self.model:
|
if not self.model:
|
||||||
return
|
return
|
||||||
|
@ -90,7 +90,7 @@ class PlaceView(PageView.ListView):
|
|||||||
'place-add' : self.row_add,
|
'place-add' : self.row_add,
|
||||||
'place-update' : self.row_update,
|
'place-update' : self.row_update,
|
||||||
'place-delete' : self.row_delete,
|
'place-delete' : self.row_delete,
|
||||||
'place-rebuild' : self.build_tree,
|
'place-rebuild' : self.object_build,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.func_list = {
|
self.func_list = {
|
||||||
|
@ -171,6 +171,9 @@ class RelationshipView(PageView.PersonNavView):
|
|||||||
self.change_person(None)
|
self.change_person(None)
|
||||||
|
|
||||||
def person_rebuild(self):
|
def person_rebuild(self):
|
||||||
|
"""Large change to person database"""
|
||||||
|
if self.active:
|
||||||
|
self.bookmarks.redraw()
|
||||||
if self.dbstate.active:
|
if self.dbstate.active:
|
||||||
while not self.change_person(self.dbstate.active.handle):
|
while not self.change_person(self.dbstate.active.handle):
|
||||||
pass
|
pass
|
||||||
|
@ -91,7 +91,7 @@ class RepositoryView(PageView.ListView):
|
|||||||
'repository-add' : self.row_add,
|
'repository-add' : self.row_add,
|
||||||
'repository-update' : self.row_update,
|
'repository-update' : self.row_update,
|
||||||
'repository-delete' : self.row_delete,
|
'repository-delete' : self.row_delete,
|
||||||
'repository-rebuild' : self.build_tree,
|
'repository-rebuild' : self.object_build,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.func_list = {
|
self.func_list = {
|
||||||
|
@ -84,7 +84,7 @@ class SourceView(PageView.ListView):
|
|||||||
'source-add' : self.row_add,
|
'source-add' : self.row_add,
|
||||||
'source-update' : self.row_update,
|
'source-update' : self.row_update,
|
||||||
'source-delete' : self.row_delete,
|
'source-delete' : self.row_delete,
|
||||||
'source-rebuild' : self.build_tree,
|
'source-rebuild' : self.object_build,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.func_list = {
|
self.func_list = {
|
||||||
|
@ -638,14 +638,13 @@ class ListView(BookMarkView):
|
|||||||
self.search_bar.setup_filter(cols)
|
self.search_bar.setup_filter(cols)
|
||||||
|
|
||||||
def goto_handle(self, handle):
|
def goto_handle(self, handle):
|
||||||
if not self.dbstate.active or self.inactive:
|
if not handle or self.inactive:
|
||||||
return
|
return
|
||||||
|
|
||||||
# mark inactive to prevent recusion
|
# mark inactive to prevent recursion
|
||||||
self.inactive = True
|
self.inactive = True
|
||||||
|
|
||||||
# select the active person in the person view
|
# select the handle in the view
|
||||||
|
|
||||||
try:
|
try:
|
||||||
path = self.model.on_get_path(handle)
|
path = self.model.on_get_path(handle)
|
||||||
self.selection.unselect_all()
|
self.selection.unselect_all()
|
||||||
@ -729,7 +728,14 @@ class ListView(BookMarkView):
|
|||||||
self.dirty = False
|
self.dirty = False
|
||||||
else:
|
else:
|
||||||
self.dirty = True
|
self.dirty = True
|
||||||
|
|
||||||
|
def object_build(self):
|
||||||
|
"""callback, for if tree must be rebuild and bookmarks redrawn
|
||||||
|
"""
|
||||||
|
self.build_tree()
|
||||||
|
if self.active:
|
||||||
|
self.bookmarks.redraw()
|
||||||
|
|
||||||
def filter_toggle_action(self,obj):
|
def filter_toggle_action(self,obj):
|
||||||
if obj.get_active():
|
if obj.get_active():
|
||||||
self.search_bar.hide()
|
self.search_bar.hide()
|
||||||
|
Loading…
Reference in New Issue
Block a user