Пример #1
0
    def define_actions(self):
        """
        Defines the UIManager actions specific to Media View. We need to make
        sure that the common List View actions are defined as well, so we
        call the parent function.
        """
        ListView.define_actions(self)

        self._add_action('FilterEdit',
                         None,
                         _('Media Filter Editor'),
                         callback=self.filter_editor)
        self._add_action('OpenMedia',
                         'gramps-viewmedia',
                         _('View'),
                         tip=_("View in the default viewer"),
                         callback=self.view_media)
        self._add_action('OpenContainingFolder',
                         None,
                         _('Open Containing _Folder'),
                         tip=_("Open the folder containing the media file"),
                         callback=self.open_containing_folder)

        self._add_action('QuickReport', None, _("Quick View"), None, None,
                         None)
        self._add_action('Dummy', None, '  ', None, None, self.dummy_report)
Пример #2
0
    def define_actions(self):
        """
        This defines the possible actions for the citation views.
        Possible actions are:
        add:        Add a new citation and a new source (this can also be done 
                      by source view add a source, then citation view add a new 
                      citation to an existing source)
        edit:       Edit a citation.
        merge:      Merge the selected citations.
        remove:     Delete the selected citations.
        
        
        """
        ListView.define_actions(self)

        self.all_action = gtk.ActionGroup(self.title + "/CitationAll")
        self.edit_action = gtk.ActionGroup(self.title + "/CitationEdit")

        self._add_action(
            'FilterEdit',
            None,
            _('Citation Filter Editor'),
            callback=self.filter_editor,
        )
        self._add_action('QuickReport', None, _("Quick View"), None, None,
                         None)
        self._add_action('Dummy', None, '  ', None, None, self.dummy_report)

        self._add_action_group(self.edit_action)
        self._add_action_group(self.all_action)
Пример #3
0
 def define_actions(self):
     ListView.define_actions(self)
     self._add_action(
         'FilterEdit',
         None,
         _('Source Filter Editor'),
         callback=self.filter_editor,
     )
     self._add_action('QuickReport', None, _("Quick View"), None, None,
                      None)
     self._add_action('Dummy', None, '  ', None, None, self.dummy_report)
Пример #4
0
    def define_actions(self):
        """
        This defines the possible actions for the citation views.
        Possible actions are:
        add_source: Add a new source (this is also available from the
                      source view)
        add:        Add a new citation and a new source (this can also be done 
                      by source view add a source, then citation view add a new 
                      citation to an existing source)
        share:      Add a new citation to an existing source (when a source is
                      selected)
        edit:       Edit a source or a citation.
        merge:      Merge the selected sources or citations.
        remove:     Delete the selected sources or citations.
        
        
        """
        ListView.define_actions(self)

        self._add_action('Add source', 'gramps-source', _("Add source..."), 
                         accel=None, 
                         tip=self.ADD_SOURCE_MSG, 
                         callback=self.add_source)
        self._add_action('Add citation', 'gramps-citation', 
                         _("Add citation..."), 
                         accel=None, 
                         tip=self.ADD_CITATION_MSG, 
                         callback=self.share)
        
        self.all_action = gtk.ActionGroup(self.title + "/CitationAll")
        self.edit_action = gtk.ActionGroup(self.title + "/CitationEdit")

        self._add_action('FilterEdit', None, _('Citation Filter Editor'),
                         callback=self.filter_editor,)
        self._add_action('QuickReport', None, _("Quick View"), None, None, None)
        self._add_action('Dummy', None, '  ', None, None, self.dummy_report)

        self._add_action_group(self.edit_action)
        self._add_action_group(self.all_action)

        self.all_action.add_actions([
                ('OpenAllNodes', None, _("Expand all Nodes"), None, None, 
                 self.open_all_nodes),  
                ('CloseAllNodes', None, _("Collapse all Nodes"), None, None, 
                 self.close_all_nodes), 
                ])
Пример #5
0
    def define_actions(self):
        """Add the Forward action group to handle the Forward button."""

        ListView.define_actions(self)

        self._add_action('FilterEdit', None, _('Family Filter Editor'),
                        callback=self.filter_editor,)
                        
        self.all_action = gtk.ActionGroup(self.title + "/FamilyAll")
        self.all_action.add_actions([
                ('MakeFatherActive', gtk.STOCK_APPLY, _("Make Father Active Person"), 
                 None, None, self._make_father_active),
                ('MakeMotherActive', gtk.STOCK_APPLY, _("Make Mother Active Person"), 
                 None, None, self._make_mother_active),
                ('QuickReport', None, _("Quick View"), None, None, None),
                ('Dummy', None, '  ', None, None, self.dummy_report),
                ])
        self._add_action_group(self.all_action)
Пример #6
0
    def define_actions(self):
        """
        Required define_actions function for PageView. Builds the action
        group information required. We extend beyond the normal here, 
        since we want to have more than one action group for the PersonView.
        Most PageViews really won't care about this.

        Special action groups for Forward and Back are created to allow the
        handling of navigation buttons. Forward and Back allow the user to
        advance or retreat throughout the history, and we want to have these
        be able to toggle these when you are at the end of the history or
        at the beginning of the history.
        """

        ListView.define_actions(self)

        self.all_action = gtk.ActionGroup(self.title + "/PersonAll")
        self.edit_action = gtk.ActionGroup(self.title + "/PersonEdit")

        self.all_action.add_actions([
                ('FilterEdit', None, _('Person Filter Editor'), None, None,
                self.filter_editor),
                ('Edit', gtk.STOCK_EDIT, _("action|_Edit..."),
                "<control>Return", self.EDIT_MSG, self.edit), 
                ('QuickReport', None, _("Quick View"), None, None, None), 
                ('WebConnect', None, _("Web Connection"), None, None, None), 
                ('Dummy', None, '  ', None, None, self.dummy_report), 
                ])


        self.edit_action.add_actions(
            [
                ('Add', gtk.STOCK_ADD, _("_Add..."), "<control>Insert", 
                 self.ADD_MSG, self.add), 
                ('Remove', gtk.STOCK_REMOVE, _("_Remove"), "<control>Delete", 
                 self.DEL_MSG, self.remove),
                ('Merge', 'gramps-merge', _('_Merge...'), None,
                 self.MERGE_MSG, self.merge),
                ('ExportTab', None, _('Export View...'), None, None,
                 self.export), 
                ])

        self._add_action_group(self.edit_action)
        self._add_action_group(self.all_action)
Пример #7
0
 def define_actions(self):
     ListView.define_actions(self)
     self._add_toolmenu_action(
         'MapsList', _('Loading...'),
         _("Attempt to see selected locations with a Map "
           "Service (OpenstreetMap, Google Maps, ...)"), self.gotomap,
         _('Select a Map Service'))
     self._add_action('GotoMap',
                      gtk.STOCK_JUMP_TO,
                      _('_Look up with Map Service'),
                      callback=self.gotomap,
                      tip=_("Attempt to see this location with a Map "
                            "Service (OpenstreetMap, Google Maps, ...)"))
     self._add_action('FilterEdit',
                      None,
                      _('Place Filter Editor'),
                      callback=self.filter_editor)
     self._add_action('QuickReport', None, _("Quick View"), None, None,
                      None)
     self._add_action('Dummy', None, '  ', None, None, self.dummy_report)