In .:
* src/DataViews/_PersonView.py: add enter to collapse row as well 2007-01-27 Benny Malengier <benny.malengier@ugent.be> * src/DataViews/_PersonView.py: add enter to expand a tree row 2007-01-27 Don Allingham <don@gramps-project.org> * src/PageView.py: add key accelerators * src/ViewManager.py: block interface on autobackup (#856), add key accelerators In help: 2007-01-27 Don Allingham <don@gramps-project.org> * C/gramps.xml: add more keybindings svn: r7999
This commit is contained in:
@@ -149,7 +149,7 @@ class PersonView(PageView.PersonNavView):
|
||||
self.all_action.add_actions([
|
||||
('OpenAllNodes', None, _("Expand all nodes"), None, None,
|
||||
self.open_all_nodes),
|
||||
('Edit', gtk.STOCK_EDIT, _("_Edit"), None,
|
||||
('Edit', gtk.STOCK_EDIT, _("_Edit"), "<control>Return",
|
||||
_("Edit the selected person"), self.edit),
|
||||
('CloseAllNodes', None, _("Collapse all nodes"), None, None,
|
||||
self.close_all_nodes),
|
||||
@@ -854,6 +854,22 @@ class PersonView(PageView.PersonNavView):
|
||||
return True
|
||||
return False
|
||||
|
||||
def key_press(self,obj,event):
|
||||
if not event.state:
|
||||
if event.keyval in (gtk.keysyms.Return, gtk.keysyms.KP_Enter):
|
||||
if self.dbstate.active:
|
||||
self.edit(obj)
|
||||
return True
|
||||
else:
|
||||
store, paths = self.selection.get_selected_rows()
|
||||
if paths and len(paths[0]) == 1 :
|
||||
if self.tree.row_expanded(paths[0]):
|
||||
self.tree.collapse_row(paths[0])
|
||||
else:
|
||||
self.tree.expand_row(paths[0], 0)
|
||||
return True
|
||||
return False
|
||||
|
||||
def key_goto_home_person(self):
|
||||
self.home(None)
|
||||
self.uistate.push_message(self.dbstate,
|
||||
|
@@ -291,7 +291,8 @@ class PersonNavView(BookMarkView):
|
||||
self.back_clicked)
|
||||
])
|
||||
|
||||
self.add_action('HomePerson', gtk.STOCK_HOME, _("_Home"),
|
||||
self.add_action('HomePerson', gtk.STOCK_HOME, _("_Home"),
|
||||
accel="<Alt>Home",
|
||||
tip=_("Go to the default person"), callback=self.home)
|
||||
self.add_action('FilterEdit', None, _('Person Filter Editor'),
|
||||
callback=self.filter_editor)
|
||||
@@ -813,7 +814,9 @@ class ListView(BookMarkView):
|
||||
|
||||
self.add_action_group(self.edit_action)
|
||||
|
||||
self.add_action('Edit', gtk.STOCK_EDIT,_("_Edit"), tip=self.EDIT_MSG,
|
||||
self.add_action('Edit', gtk.STOCK_EDIT, _("_Edit"),
|
||||
accel="<control>Return",
|
||||
tip=self.EDIT_MSG,
|
||||
callback=self.edit)
|
||||
|
||||
self.add_toggle_action('Filter', None, _('_Filter'),
|
||||
|
@@ -379,7 +379,7 @@ class ViewManager:
|
||||
]
|
||||
|
||||
self._action_action_list = [
|
||||
('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "",
|
||||
('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "<alt>s",
|
||||
_("Open the ScratchPad dialog"), self.scratchpad),
|
||||
('Import', gtk.STOCK_CONVERT, _('_Import'), "<control>i", None,
|
||||
self.import_data),
|
||||
@@ -411,7 +411,7 @@ class ViewManager:
|
||||
|
||||
self._undo_history_action_list = [
|
||||
('UndoHistory', 'gramps-undo-history',
|
||||
_('Undo History'), None, None, self.undo_history),
|
||||
_('Undo History'), "<Alt>H", None, self.undo_history),
|
||||
]
|
||||
|
||||
self._navigation_type = {
|
||||
|
Reference in New Issue
Block a user