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.action_list.extend([
            ('AddSource', self.add_source),
            ('AddCitation', self.share),
            ('OpenAllNodes', self.open_all_nodes),
            ('CloseAllNodes', self.close_all_nodes),
        ])
Beispiel #2
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)
Beispiel #3
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(name=self.title + "/CitationAll")
        self.edit_action = Gtk.ActionGroup(name=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_group(self.edit_action)
        self._add_action_group(self.all_action)
Beispiel #4
0
 def define_actions(self):
     ListView.define_actions(self)
     self._add_action('FilterEdit',
                      None,
                      _('Event Filter Editor'),
                      callback=self.filter_editor)
     self._add_action('QuickReport', None, _("Quick View"), None, None,
                      None)
Beispiel #5
0
    def define_actions(self):
        """Add the Forward action group to handle the Forward button."""

        ListView.define_actions(self)

        self.action_list.extend([
            ('MakeFatherActive', self._make_father_active),
            ('MakeMotherActive', self._make_mother_active),
        ])
Beispiel #6
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('OpenMedia', self.view_media)
        self._add_action('OpenContainingFolder', self.open_containing_folder)
Beispiel #7
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('OpenMedia', self.view_media)
        self._add_action('OpenContainingFolder', self.open_containing_folder)
Beispiel #8
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(name=self.title + "/CitationAll")
        self.edit_action = Gtk.ActionGroup(name=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_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),
        ])
Beispiel #9
0
 def define_actions(self):
     ListView.define_actions(self)
     self.edit_action.add_actions([
         ('Clone', 'gramps-clone', _('Clone...'), None, self.CLONE_MSG,
          self.clone),
     ])
     self._add_action(
         'FilterEdit',
         None,
         _('Event Filter Editor'),
         callback=self.filter_editor,
     )
     self._add_action('QuickReport', None, _("Quick View"), None, None,
                      None)
Beispiel #10
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)
Beispiel #11
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)
Beispiel #12
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', 'go-jump',
                     _('_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)
Beispiel #13
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(name=self.title + "/FamilyAll")
        self.all_action.add_actions([
                ('MakeFatherActive', None, _("Make Father Active Person"),
                 None, None, self._make_father_active),
                ('MakeMotherActive', None, _("Make Mother Active Person"),
                 None, None, self._make_mother_active),
                ('QuickReport', None, _("Quick View"), None, None, None),
                ])
        self._add_action_group(self.all_action)
Beispiel #14
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(name=self.title + "/CitationAll")
        self.edit_action = Gtk.ActionGroup(name=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_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),
                ])
Beispiel #15
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 = ActionGroup(name=self.title + "/PersonAll")
        self.edit_action = ActionGroup(name=self.title + "/PersonEdit")

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


        self.edit_action.add_actions(
            [
                ('Add', 'list-add', _("_Add..."), "<PRIMARY>Insert",
                 self.ADD_MSG, self.add),
                ('Remove', 'list-remove', _("_Delete"), "<PRIMARY>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)
Beispiel #16
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(name=self.title + "/PersonAll")
        self.edit_action = Gtk.ActionGroup(name=self.title + "/PersonEdit")

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


        self.edit_action.add_actions(
            [
                ('Add', Gtk.STOCK_ADD, _("_Add..."), "<PRIMARY>Insert", 
                 self.ADD_MSG, self.add), 
                ('Remove', Gtk.STOCK_REMOVE, _("_Remove"), "<PRIMARY>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)
Beispiel #17
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)
Beispiel #18
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.action_list.extend([
            ('AddSource', self.add_source),
            ('AddCitation', self.share),
            ('OpenAllNodes', self.open_all_nodes),
            ('CloseAllNodes', self.close_all_nodes), ])
Beispiel #19
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(name=self.title + "/CitationAll")
        self.edit_action = Gtk.ActionGroup(name=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_group(self.edit_action)
        self._add_action_group(self.all_action)
Beispiel #20
0
 def define_actions(self):
     ListView.define_actions(self)
     self._add_action('GotoMap', self.gotomap)
Beispiel #21
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)
Beispiel #22
0
 def define_actions(self):
     ListView.define_actions(self)
     self._add_action('GotoMap', self.gotomap)