7229: change active person upon a bookmark select
Port the more general fix [c7c0b2]^..[6caf08] from gramps34.
This commit is contained in:
parent
db79b0bd32
commit
2b83de38fd
@ -315,21 +315,21 @@ class Bookmarks :
|
|||||||
|
|
||||||
class ListBookmarks(Bookmarks):
|
class ListBookmarks(Bookmarks):
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
self.goto_handle = goto_handle
|
self.change_active = change_active
|
||||||
Bookmarks.__init__(self, dbstate, uistate)
|
Bookmarks.__init__(self, dbstate, uistate)
|
||||||
|
|
||||||
def callback(self, handle):
|
def callback(self, handle):
|
||||||
return make_callback(handle, self.do_callback)
|
return make_callback(handle, self.do_callback)
|
||||||
|
|
||||||
def do_callback(self, handle):
|
def do_callback(self, handle):
|
||||||
self.goto_handle(handle)
|
self.change_active(handle)
|
||||||
|
|
||||||
class PersonBookmarks(ListBookmarks) :
|
class PersonBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Person', handle)
|
return navigation_label(self.dbstate.db, 'Person', handle)
|
||||||
@ -343,8 +343,8 @@ class PersonBookmarks(ListBookmarks) :
|
|||||||
class FamilyBookmarks(ListBookmarks) :
|
class FamilyBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Family', handle)
|
return navigation_label(self.dbstate.db, 'Family', handle)
|
||||||
@ -358,8 +358,8 @@ class FamilyBookmarks(ListBookmarks) :
|
|||||||
class EventBookmarks(ListBookmarks) :
|
class EventBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Event', handle)
|
return navigation_label(self.dbstate.db, 'Event', handle)
|
||||||
@ -373,8 +373,8 @@ class EventBookmarks(ListBookmarks) :
|
|||||||
class SourceBookmarks(ListBookmarks) :
|
class SourceBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Source', handle)
|
return navigation_label(self.dbstate.db, 'Source', handle)
|
||||||
@ -388,8 +388,8 @@ class SourceBookmarks(ListBookmarks) :
|
|||||||
class CitationBookmarks(ListBookmarks) :
|
class CitationBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Citation', handle)
|
return navigation_label(self.dbstate.db, 'Citation', handle)
|
||||||
@ -426,8 +426,8 @@ class CitationBookmarks(ListBookmarks) :
|
|||||||
class MediaBookmarks(ListBookmarks) :
|
class MediaBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Media', handle)
|
return navigation_label(self.dbstate.db, 'Media', handle)
|
||||||
@ -441,8 +441,8 @@ class MediaBookmarks(ListBookmarks) :
|
|||||||
class RepoBookmarks(ListBookmarks) :
|
class RepoBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Repository', handle)
|
return navigation_label(self.dbstate.db, 'Repository', handle)
|
||||||
@ -456,8 +456,8 @@ class RepoBookmarks(ListBookmarks) :
|
|||||||
class PlaceBookmarks(ListBookmarks) :
|
class PlaceBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Place', handle)
|
return navigation_label(self.dbstate.db, 'Place', handle)
|
||||||
@ -471,8 +471,8 @@ class PlaceBookmarks(ListBookmarks) :
|
|||||||
class NoteBookmarks(ListBookmarks) :
|
class NoteBookmarks(ListBookmarks) :
|
||||||
"Handle the bookmarks interface for Gramps."
|
"Handle the bookmarks interface for Gramps."
|
||||||
|
|
||||||
def __init__(self, dbstate, uistate, goto_handle):
|
def __init__(self, dbstate, uistate, change_active):
|
||||||
ListBookmarks.__init__(self, dbstate, uistate, goto_handle)
|
ListBookmarks.__init__(self, dbstate, uistate, change_active)
|
||||||
|
|
||||||
def make_label(self, handle):
|
def make_label(self, handle):
|
||||||
return navigation_label(self.dbstate.db, 'Note', handle)
|
return navigation_label(self.dbstate.db, 'Note', handle)
|
||||||
|
@ -83,7 +83,7 @@ class NavigationView(PageView):
|
|||||||
|
|
||||||
def __init__(self, title, pdata, state, uistate, bm_type, nav_group):
|
def __init__(self, title, pdata, state, uistate, bm_type, nav_group):
|
||||||
PageView.__init__(self, title, pdata, state, uistate)
|
PageView.__init__(self, title, pdata, state, uistate)
|
||||||
self.bookmarks = bm_type(self.dbstate, self.uistate, self.goto_handle)
|
self.bookmarks = bm_type(self.dbstate, self.uistate, self.change_active)
|
||||||
|
|
||||||
self.fwd_action = None
|
self.fwd_action = None
|
||||||
self.back_action = None
|
self.back_action = None
|
||||||
@ -368,7 +368,6 @@ class NavigationView(PageView):
|
|||||||
handle = self.get_handle_from_gramps_id(gid)
|
handle = self.get_handle_from_gramps_id(gid)
|
||||||
if handle is not None:
|
if handle is not None:
|
||||||
self.change_active(handle)
|
self.change_active(handle)
|
||||||
self.goto_handle(handle)
|
|
||||||
else:
|
else:
|
||||||
self.uistate.push_message(
|
self.uistate.push_message(
|
||||||
self.dbstate,
|
self.dbstate,
|
||||||
|
@ -748,7 +748,6 @@ class PedigreeView(NavigationView):
|
|||||||
if handle:
|
if handle:
|
||||||
person = self.dbstate.db.get_person_from_handle(handle)
|
person = self.dbstate.db.get_person_from_handle(handle)
|
||||||
if person:
|
if person:
|
||||||
self.change_active(handle)
|
|
||||||
self.rebuild_trees(handle)
|
self.rebuild_trees(handle)
|
||||||
else:
|
else:
|
||||||
self.rebuild_trees(None)
|
self.rebuild_trees(None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user