From 4812f0c8cc2b5710d71d560227ecff76878078ea Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 26 Jan 2007 05:09:25 +0000 Subject: [PATCH] * src/DataViews/_MediaView.py: keybindings * src/DataViews/_RepositoryView.py: keybindings * src/DataViews/_SourceView.py: keybindings * src/DataViews/_EventView.py: keybindings * src/DataViews/_FamilyList.py: keybindings * src/DataViews/_PlaceView.py: keybindings * src/DataViews/_PersonView.py: keybindings * src/ViewManager.py: keybindings * src/PageView.py: keybindings 2007-01-25 Benny Malengier * src/Filters/Rules/Place/Makefile.am: add new files * src/Filters/Rules/Place/_InLatLonNeighborhood.py: added * src/Filters/Rules/Place/_HasNoteMatchingSubstringOf.py: added * src/Filters/Rules/Place/__init__.py: add new filters 2007-01-25 Don Allingham svn: r7985 --- ChangeLog | 17 +++++++++++++++++ src/DataViews/_EventView.py | 3 +++ src/DataViews/_FamilyList.py | 3 +++ src/DataViews/_MediaView.py | 3 +++ src/DataViews/_PersonView.py | 13 +++++++++++++ src/DataViews/_PlaceView.py | 3 +++ src/DataViews/_RepositoryView.py | 3 +++ src/DataViews/_SourceView.py | 3 +++ src/Filters/Rules/Place/Makefile.am | 2 ++ src/Filters/Rules/Place/__init__.py | 4 ++++ src/PageView.py | 9 +++++++-- src/ViewManager.py | 6 ++++++ 12 files changed, 67 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b392b256d..ccb3730aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2007-01-25 Don Allingham + * src/DataViews/_MediaView.py: keybindings + * src/DataViews/_RepositoryView.py: keybindings + * src/DataViews/_SourceView.py: keybindings + * src/DataViews/_EventView.py: keybindings + * src/DataViews/_FamilyList.py: keybindings + * src/DataViews/_PlaceView.py: keybindings + * src/DataViews/_PersonView.py: keybindings + * src/ViewManager.py: keybindings + * src/PageView.py: keybindings + +2007-01-25 Benny Malengier + * src/Filters/Rules/Place/Makefile.am: add new files + * src/Filters/Rules/Place/_InLatLonNeighborhood.py: added + * src/Filters/Rules/Place/_HasNoteMatchingSubstringOf.py: added + * src/Filters/Rules/Place/__init__.py: add new filters + 2007-01-25 Don Allingham * src/DataViews/_MediaView.py: fix goto-gramps-id key press * src/DataViews/_RepositoryView.py: fix goto-gramps-id key press diff --git a/src/DataViews/_EventView.py b/src/DataViews/_EventView.py index 2db148da8..985d93501 100644 --- a/src/DataViews/_EventView.py +++ b/src/DataViews/_EventView.py @@ -88,6 +88,9 @@ class EventView(PageView.ListView): self.func_list = { 'J' : self.jump, + 'Insert' : self.key_insert, + 'Delete' : self.key_delete, + 'BackSpace' : self.key_delete, } PageView.ListView.__init__( diff --git a/src/DataViews/_FamilyList.py b/src/DataViews/_FamilyList.py index 8d64b2e08..8b867b4eb 100644 --- a/src/DataViews/_FamilyList.py +++ b/src/DataViews/_FamilyList.py @@ -78,6 +78,9 @@ class FamilyListView(PageView.ListView): self.func_list = { 'J' : self.jump, + 'Insert' : self.key_insert, + 'Delete' : self.key_delete, + 'BackSpace' : self.key_delete, } PageView.ListView.__init__( diff --git a/src/DataViews/_MediaView.py b/src/DataViews/_MediaView.py index 1649fc582..ecec1c953 100644 --- a/src/DataViews/_MediaView.py +++ b/src/DataViews/_MediaView.py @@ -104,6 +104,9 @@ class MediaView(PageView.ListView): self.func_list = { 'J' : self.jump, + 'Insert' : self.key_insert, + 'Delete' : self.key_delete, + 'BackSpace' : self.key_delete, } Config.client.notify_add("/apps/gramps/interface/filter", diff --git a/src/DataViews/_PersonView.py b/src/DataViews/_PersonView.py index 00e17df07..433517a03 100644 --- a/src/DataViews/_PersonView.py +++ b/src/DataViews/_PersonView.py @@ -103,6 +103,9 @@ class PersonView(PageView.PersonNavView): self.func_list = { 'F2' : self.key_goto_home_person, 'F3' : self.key_edit_selected_person, + 'Delete' : self.key_delete_selected_person, + 'BackSpace' : self.key_delete_selected_person, + 'Insert' : self.key_add_new_person, 'J' : self.jump, } self.dirty = True @@ -862,3 +865,13 @@ class PersonView(PageView.PersonNavView): self.edit(None) self.uistate.push_message(self.dbstate, _("Edit selected person")) + + def key_delete_selected_person(self): + self.remove(None) + self.uistate.push_message(self.dbstate, + _("Delete selected person")) + + def key_add_new_person(self): + self.add(None) + self.uistate.push_message(self.dbstate, + _("Add new person")) diff --git a/src/DataViews/_PlaceView.py b/src/DataViews/_PlaceView.py index 48d397c89..a0de3110e 100644 --- a/src/DataViews/_PlaceView.py +++ b/src/DataViews/_PlaceView.py @@ -95,6 +95,9 @@ class PlaceView(PageView.ListView): self.func_list = { 'J' : self.jump, + 'Insert' : self.key_insert, + 'Delete' : self.key_delete, + 'BackSpace' : self.key_delete, } PageView.ListView.__init__( diff --git a/src/DataViews/_RepositoryView.py b/src/DataViews/_RepositoryView.py index 00ac340ed..063d3dd5e 100644 --- a/src/DataViews/_RepositoryView.py +++ b/src/DataViews/_RepositoryView.py @@ -96,6 +96,9 @@ class RepositoryView(PageView.ListView): self.func_list = { 'J' : self.jump, + 'Insert' : self.key_insert, + 'Delete' : self.key_delete, + 'BackSpace' : self.key_delete, } PageView.ListView.__init__( diff --git a/src/DataViews/_SourceView.py b/src/DataViews/_SourceView.py index 3b8360f27..ae0da4773 100644 --- a/src/DataViews/_SourceView.py +++ b/src/DataViews/_SourceView.py @@ -89,6 +89,9 @@ class SourceView(PageView.ListView): self.func_list = { 'J' : self.jump, + 'Insert' : self.key_insert, + 'Delete' : self.key_delete, + 'BackSpace' : self.key_delete, } PageView.ListView.__init__( diff --git a/src/Filters/Rules/Place/Makefile.am b/src/Filters/Rules/Place/Makefile.am index 309c4d1af..558c57b9f 100644 --- a/src/Filters/Rules/Place/Makefile.am +++ b/src/Filters/Rules/Place/Makefile.am @@ -5,6 +5,8 @@ pkgdatadir = $(datadir)/@PACKAGE@/Filters/Rules/Place pkgdata_PYTHON = \ _AllPlaces.py\ _HasIdOf.py\ + _HasNoLatOrLon.py\ + _InLatLonNeighborhood.py\ _HasNoteMatchingSubstringOf.py\ _HasNoteRegexp.py\ _HasPlace.py\ diff --git a/src/Filters/Rules/Place/__init__.py b/src/Filters/Rules/Place/__init__.py index 542dfb0b0..26aa88ad0 100644 --- a/src/Filters/Rules/Place/__init__.py +++ b/src/Filters/Rules/Place/__init__.py @@ -34,6 +34,8 @@ from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf from _PlacePrivate import PlacePrivate from _MatchesFilter import MatchesFilter from _HasPlace import HasPlace +from _HasNoLatOrLon import HasNoLatOrLon +from _InLatLonNeighborhood import InLatLonNeighborhood editor_rule_list = [ AllPlaces, @@ -44,4 +46,6 @@ editor_rule_list = [ PlacePrivate, MatchesFilter, HasPlace, + HasNoLatOrLon, + InLatLonNeighborhood, ] diff --git a/src/PageView.py b/src/PageView.py index 9b336a693..9524f5c43 100644 --- a/src/PageView.py +++ b/src/PageView.py @@ -279,7 +279,7 @@ class PersonNavView(BookMarkView): self.fwd_action = gtk.ActionGroup(self.title + '/Forward') self.fwd_action.add_actions([ ('Forward',gtk.STOCK_GO_FORWARD,_("_Forward"), - None, _("Go to the next person in the history"), + "Right", _("Go to the next person in the history"), self.fwd_clicked) ]) @@ -287,7 +287,7 @@ class PersonNavView(BookMarkView): self.back_action = gtk.ActionGroup(self.title + '/Backward') self.back_action.add_actions([ ('Back',gtk.STOCK_GO_BACK,_("_Back"), - None, _("Go to the previous person in the history"), + "Left", _("Go to the previous person in the history"), self.back_clicked) ]) @@ -842,3 +842,8 @@ class ListView(BookMarkView): def change_page(self): self.edit_action.set_sensitive(not self.dbstate.db.readonly) + def key_delete(self): + self.remove(None) + + def key_insert(self): + self.add(None) diff --git a/src/ViewManager.py b/src/ViewManager.py index 090f96a71..f3401d249 100644 --- a/src/ViewManager.py +++ b/src/ViewManager.py @@ -178,6 +178,9 @@ uidefault = ''' + + + @@ -368,6 +371,9 @@ class ViewManager: ('F8', None, 'F9', "F8", None, self.keypress), ('F9', None, 'F9', "F9", None, self.keypress), ('F11', None, 'F11', "F11", None, self.keypress), + ('BackSpace', None, 'BackSpace', "BackSpace", None, self.keypress), + ('Delete', None, 'Delete', "Delete", None, self.keypress), + ('Insert', None, 'Insert', "Insert", None, self.keypress), ('F12', None, 'F12', "F12", None, self.keypress), ('J', None, 'J', "J", None, self.keypress), ('N', None, 'N', "N", None, self.next_view),