本文整理汇总了Python中gramps.gui.views.listview.ListView.define_actions方法的典型用法代码示例。如果您正苦于以下问题:Python ListView.define_actions方法的具体用法?Python ListView.define_actions怎么用?Python ListView.define_actions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gramps.gui.views.listview.ListView
的用法示例。
在下文中一共展示了ListView.define_actions方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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)
示例2: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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)
示例3: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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)
示例4: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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)
示例5: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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),
])
示例6: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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)
示例7: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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)
示例8: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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)
示例9: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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), ])
示例10: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
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)
示例11: define_actions
# 需要导入模块: from gramps.gui.views.listview import ListView [as 别名]
# 或者: from gramps.gui.views.listview.ListView import define_actions [as 别名]
def define_actions(self):
ListView.define_actions(self)
self._add_action('GotoMap', self.gotomap)