def define_actions(self):
     """
     Define menu actions.
     """
     PageView.define_actions(self)
     self.bookmark_actions()
     self.navigation_actions()
Example #2
0
 def __init__(self, pdata, dbstate, uistate):
     """
     Create a DashboardView, with the current dbstate and uistate
     """
     PageView.__init__(self, _('Dashboard'), pdata, dbstate, uistate)
     self.ui_def = [
     ]  # No special menu for Dashboard, Popup in GrampletPane
    def disable_action_group(self):
        """
        Normally, this would not be overridden from the base class. However,
        in this case, we have additional action groups that need to be
        handled correctly.
        """
        PageView.disable_action_group(self)

        self.uimanager.set_actions_visible(self.fwd_action, False)
        self.uimanager.set_actions_visible(self.back_action, False)
 def set_inactive(self):
     """
     Called when the page becomes inactive (not displayed).
     """
     if self.active:
         PageView.set_inactive(self)
         self.bookmarks.undisplay()
         hobj = self.get_history()
         hobj.disconnect(self.active_signal)
         hobj.disconnect(self.mru_signal)
         self.mru_disable()
    def set_active(self):
        """
        Called when the page becomes active (displayed).
        """
        PageView.set_active(self)
        self.bookmarks.display()

        hobj = self.get_history()
        self.active_signal = hobj.connect('active-changed', self.goto_active)
        self.mru_signal = hobj.connect('mru-changed', self.update_mru_menu)
        self.update_mru_menu(hobj.mru, update_menu=False)

        self.goto_active(None)
    def enable_action_group(self, obj):
        """
        Normally, this would not be overridden from the base class. However,
        in this case, we have additional action groups that need to be
        handled correctly.
        """
        PageView.enable_action_group(self, obj)

        self.uimanager.set_actions_visible(self.fwd_action, True)
        self.uimanager.set_actions_visible(self.back_action, True)
        hobj = self.get_history()
        self.uimanager.set_actions_sensitive(self.fwd_action,
                                             not hobj.at_end())
        self.uimanager.set_actions_sensitive(self.back_action,
                                             not hobj.at_front())
    def __init__(self, title, pdata, state, uistate, bm_type, nav_group):
        PageView.__init__(self, title, pdata, state, uistate)
        self.bookmarks = bm_type(self.dbstate, self.uistate, self.bm_change)

        self.fwd_action = None
        self.back_action = None
        self.book_action = None
        self.other_action = None
        self.active_signal = None
        self.mru_signal = None
        self.nav_group = nav_group
        self.mru_active = DISABLED
        self.uimanager = uistate.uimanager

        self.history = History(self.dbstate)

        self.hist = {}
        for hist_type in ('Person', 'Event'):
            self.hist[hist_type] = self.uistate.get_history(hist_type)
            self.hist[hist_type].connect('active-changed',
                                         self.sync(hist_type))
Example #8
0
 def __init__(self, pdata, dbstate, uistate):
     """
     Create a DashboardView, with the current dbstate and uistate
     """
     PageView.__init__(self, _("Dashboard"), pdata, dbstate, uistate)
     self.ui_def = """<ui>
Example #9
0
 def __init__(self, pdata, dbstate, uistate):
     """
     Create a DashboardView, with the current dbstate and uistate
     """
     PageView.__init__(self, _('Dashboard'), pdata, dbstate, uistate)
     self.ui_def = []  # No special menu for Dashboard, Popup in GrampletPane
Example #10
0
 def __init__(self, pdata, dbstate, uistate):
     """
     Create a DashboardView, with the current dbstate and uistate
     """
     PageView.__init__(self, _('Dashboard'), pdata, dbstate, uistate)
     self.ui_def = '''<ui>