2007-09-28 Gary Burton <gary.burton@zen.co.uk>
* src/DataViews/_RelationView.py: * src/Editors/_EditFamily.py: * src/GrampsWidgets.py: Allow enter to open iconbuttons that are not delete, issue #1159 svn: r9058
This commit is contained in:
parent
7a7d31bbbc
commit
6e4e4887a1
@ -1,3 +1,9 @@
|
||||
2007-09-28 Gary Burton <gary.burton@zen.co.uk>
|
||||
* src/DataViews/_RelationView.py:
|
||||
* src/Editors/_EditFamily.py:
|
||||
* src/GrampsWidgets.py:
|
||||
Allow enter to open iconbuttons that are not delete, issue #1159
|
||||
|
||||
2007-10-01 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
* src/GrampsDbUtils/_ReadXML.py: read region tag in xml
|
||||
* src/GrampsDb/_GrampsDbWriteXML.py: output region tag in xml (=subsection of picture)
|
||||
|
@ -89,6 +89,8 @@ _ADATA_START = _ALABEL_STOP
|
||||
_ADATA_STOP = _ADATA_START+3
|
||||
_SDATA_START = 2
|
||||
_SDATA_STOP = 4
|
||||
_RETURN = gtk.gdk.keyval_from_name("Return")
|
||||
_KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
|
||||
|
||||
class AttachList:
|
||||
|
||||
@ -1139,7 +1141,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
self.row += 1
|
||||
|
||||
def edit_button_press(self, obj, event, handle):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1 \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
self.edit_person(obj, handle)
|
||||
|
||||
def edit_person(self, obj, handle):
|
||||
@ -1151,7 +1154,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
pass
|
||||
|
||||
def edit_family(self, obj, event, handle):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1 \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
from Editors import EditFamily
|
||||
family = self.dbstate.db.get_family_from_handle(handle)
|
||||
try:
|
||||
@ -1200,7 +1204,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
self.edit_person(obj, phandle)
|
||||
|
||||
def select_family(self, obj, event, handle):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1 \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
from Selectors import selector_factory
|
||||
SelectFamily = selector_factory('Family')
|
||||
|
||||
|
@ -70,6 +70,9 @@ import QuestionDialog
|
||||
from Selectors import selector_factory
|
||||
SelectPerson = selector_factory('Person')
|
||||
|
||||
_RETURN = gtk.gdk.keyval_from_name("Return")
|
||||
_KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
|
||||
|
||||
class ChildEmbedList(EmbeddedList):
|
||||
"""
|
||||
The child embed list is specific to the Edit Family dialog, so it
|
||||
@ -724,7 +727,8 @@ class EditFamily(EditPrimary):
|
||||
'select the existing family'))
|
||||
|
||||
def edit_person(self,obj,event,handle):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1 \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
from _EditPerson import EditPerson
|
||||
try:
|
||||
person = self.db.get_person_from_handle(handle)
|
||||
|
@ -176,6 +176,7 @@ class IconButton(gtk.Button):
|
||||
|
||||
if func:
|
||||
self.connect('button-press-event', func, handle)
|
||||
self.connect('key-press-event', func, handle)
|
||||
|
||||
class WarnButton(gtk.Button):
|
||||
def __init__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user