From 23d75ca98751e3873305c992900af24b0b7168a0 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 28 Jan 2007 04:38:56 +0000 Subject: [PATCH] In .: * src/DataViews/_PersonView.py: add enter to collapse row as well 2007-01-27 Benny Malengier * src/DataViews/_PersonView.py: add enter to expand a tree row 2007-01-27 Don Allingham * src/PageView.py: add key accelerators * src/ViewManager.py: block interface on autobackup (#856), add key accelerators In help: 2007-01-27 Don Allingham * C/gramps.xml: add more keybindings svn: r7999 --- gramps2/ChangeLog | 10 +++++++++- gramps2/help/C/gramps.xml | 30 +++++++++++++++++++++++----- gramps2/help/ChangeLog | 4 +++- gramps2/src/DataViews/_PersonView.py | 18 ++++++++++++++++- gramps2/src/PageView.py | 7 +++++-- gramps2/src/ViewManager.py | 4 ++-- 6 files changed, 61 insertions(+), 12 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index e2b6fb246..14b2533c0 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,5 +1,13 @@ 2007-01-27 Don Allingham - * src/ViewManager.py: block interface on autobackup (#856) + * src/DataViews/_PersonView.py: add enter to collapse row as well + +2007-01-27 Benny Malengier + * src/DataViews/_PersonView.py: add enter to expand a tree row + +2007-01-27 Don Allingham + * src/PageView.py: add key accelerators + * src/ViewManager.py: block interface on autobackup (#856), add key + accelerators * src/DisplayState.py: block interface on autobackup * src/Utils.py: handle missing/invalid encoding * src/DisplayModels/_BaseModel.py: handle None vs. 0 diff --git a/gramps2/help/C/gramps.xml b/gramps2/help/C/gramps.xml index a57d3f2f6..41aa0dd19 100644 --- a/gramps2/help/C/gramps.xml +++ b/gramps2/help/C/gramps.xml @@ -6876,6 +6876,22 @@ <Alt>P Changes the view to the previous view + + <Ctrl>D + Add the selected item as a bookmark + + + <Ctrl>B + Edit the bookmarks + + + <Alt>S + Open the Scratch Pad + + + <Alt>H + Open the Undo History dialog + @@ -6896,12 +6912,16 @@ - F2 - Set the active person to the default person - + <Ctrl>Enter + Edits the selected person + - F3 - Edit the active person + <Ctrl>Insert + Adds a new person to the database + + + <Ctrl>Delete + Deletes the selected person diff --git a/gramps2/help/ChangeLog b/gramps2/help/ChangeLog index 4173b66ec..5b3daa9d9 100644 --- a/gramps2/help/ChangeLog +++ b/gramps2/help/ChangeLog @@ -1,8 +1,10 @@ +2007-01-27 Don Allingham + * C/gramps.xml: add more keybindings + 2007-01-09 Martin Hawlisch * C/gramps.xml: Correct Pedigree behaviour. 2006-12-30 Don Allingham - * C/gramps.xml: start the rework of the key binding sections 2006-12-21 Lubo Vasko diff --git a/gramps2/src/DataViews/_PersonView.py b/gramps2/src/DataViews/_PersonView.py index 4a1cf7b10..62f1570c2 100644 --- a/gramps2/src/DataViews/_PersonView.py +++ b/gramps2/src/DataViews/_PersonView.py @@ -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"), "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, diff --git a/gramps2/src/PageView.py b/gramps2/src/PageView.py index df66a9ad7..7d6ccd004 100644 --- a/gramps2/src/PageView.py +++ b/gramps2/src/PageView.py @@ -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="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="Return", + tip=self.EDIT_MSG, callback=self.edit) self.add_toggle_action('Filter', None, _('_Filter'), diff --git a/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index 146a56991..59d8f171e 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/src/ViewManager.py @@ -379,7 +379,7 @@ class ViewManager: ] self._action_action_list = [ - ('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "", + ('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "s", _("Open the ScratchPad dialog"), self.scratchpad), ('Import', gtk.STOCK_CONVERT, _('_Import'), "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'), "H", None, self.undo_history), ] self._navigation_type = {