2008-02-15 Gary Burton <gary.burton@zen.co.uk>
* src/DataViews/RelationView.py: * src/Editors/_EditFamily.py: prevent right mouse button causing crash. Bug #1729 svn: r10041
This commit is contained in:
parent
15e789467b
commit
6ba049eb94
@ -1,3 +1,8 @@
|
||||
2008-02-15 Gary Burton <gary.burton@zen.co.uk>
|
||||
* src/DataViews/RelationView.py:
|
||||
* src/Editors/_EditFamily.py: prevent right mouse button causing crash.
|
||||
Bug #1729
|
||||
|
||||
2008-02-15 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
* src/DisplayTabs/_SourceEmbedList.py:
|
||||
* src/DisplayTabs/_PersonRefEmbedList.py:
|
||||
|
@ -1217,7 +1217,7 @@ 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 \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
self.edit_person(obj, handle)
|
||||
|
||||
@ -1230,7 +1230,7 @@ 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 \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
from Editors import EditFamily
|
||||
family = self.dbstate.db.get_family_from_handle(handle)
|
||||
@ -1240,7 +1240,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
pass
|
||||
|
||||
def add_family(self, obj, event, handle):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
|
||||
if event.type == gtk.gdk.BUTTON_PRESS \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
from Editors import EditFamily
|
||||
family = gen.lib.Family()
|
||||
person = self.dbstate.active
|
||||
@ -1280,6 +1281,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
self.edit_person(obj, phandle)
|
||||
|
||||
def add_child_to_fam(self, obj, event, handle):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
callback = lambda x: self.callback_add_child(x, handle)
|
||||
from Editors import EditPerson
|
||||
person = gen.lib.Person()
|
||||
@ -1312,6 +1315,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
|
||||
def sel_child_to_fam(self, obj, event, handle):
|
||||
from Selectors import selector_factory
|
||||
if event.type == gtk.gdk.BUTTON_PRESS \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
SelectPerson = selector_factory('Person')
|
||||
family = self.dbstate.db.get_family_from_handle(handle)
|
||||
# it only makes sense to skip those who are already in the family
|
||||
@ -1327,7 +1332,7 @@ class RelationshipView(PageView.PersonNavView):
|
||||
self.callback_add_child(person, handle)
|
||||
|
||||
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 \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
from Selectors import selector_factory
|
||||
SelectFamily = selector_factory('Family')
|
||||
|
@ -780,7 +780,7 @@ 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 \
|
||||
or event.keyval in (_RETURN, _KP_ENTER):
|
||||
from _EditPerson import EditPerson
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user