Extend history functionality (back/forward) and active-changed signals to all primary objects
svn: r14023
This commit is contained in:
@@ -56,12 +56,14 @@ class DesBrowse(Tool.ActivePersonTool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.ActivePersonTool.__init__(self, dbstate, options_class, name)
|
||||
Tool.ActivePersonTool.__init__(self, dbstate, uistate, options_class,
|
||||
name)
|
||||
if self.fail:
|
||||
return
|
||||
|
||||
self.dbstate = dbstate
|
||||
self.active = dbstate.get_active_person()
|
||||
active_handle = uistate.get_active('Person')
|
||||
self.active = dbstate.db.get_person_from_handle(active_handle)
|
||||
self.callback = callback
|
||||
self.active_name = _("Descendant Browser: %s") \
|
||||
% name_displayer.display(self.active)
|
||||
|
||||
@@ -63,12 +63,14 @@ WIKI_HELP_SEC = _('manual|Not_Related...')
|
||||
class NotRelated(Tool.ActivePersonTool, ManagedWindow.ManagedWindow) :
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
Tool.ActivePersonTool.__init__(self, dbstate, options_class, name)
|
||||
Tool.ActivePersonTool.__init__(self, dbstate, uistate, options_class,
|
||||
name)
|
||||
|
||||
if self.fail: # bug #2709 -- fail if we have no active person
|
||||
return
|
||||
|
||||
person = dbstate.get_active_person()
|
||||
person_handle = uistate.get_active('Person')
|
||||
person = dbstate.db.get_person_from_handle(person_handle)
|
||||
self.name = person.get_primary_name().get_regular_name()
|
||||
self.title = _('Not related to "%s"') % self.name
|
||||
ManagedWindow.ManagedWindow.__init__(self, uistate, [], self.__class__)
|
||||
|
||||
Reference in New Issue
Block a user