2007-10-19 Gary Burton <gary.burton@zen.co.uk>
* src/DisplayTabs/_EmbeddedList.py: * src/DisplayTabs/_ButtonTab.py: ENTER is edit on embedded lists, issue #1296 svn: r9214
This commit is contained in:
parent
addfde0e5f
commit
0d285b9bb4
@ -1,3 +1,8 @@
|
|||||||
|
2007-10-19 Gary Burton <gary.burton@zen.co.uk>
|
||||||
|
* src/DisplayTabs/_EmbeddedList.py:
|
||||||
|
* src/DisplayTabs/_ButtonTab.py:
|
||||||
|
ENTER is edit on embedded lists, issue #1296
|
||||||
|
|
||||||
2007-10-18 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
2007-10-18 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
||||||
* src/BasicUtils/_NameDisplay.py: bug in making patterns with uppercase
|
* src/BasicUtils/_NameDisplay.py: bug in making patterns with uppercase
|
||||||
|
|
||||||
|
@ -43,6 +43,9 @@ from GrampsWidgets import SimpleButton
|
|||||||
from _GrampsTab import GrampsTab
|
from _GrampsTab import GrampsTab
|
||||||
import Errors
|
import Errors
|
||||||
|
|
||||||
|
_KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
|
||||||
|
_RETURN = gtk.gdk.keyval_from_name("Return")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Classes
|
# Classes
|
||||||
@ -164,6 +167,18 @@ class ButtonTab(GrampsTab):
|
|||||||
except Errors.WindowActiveError:
|
except Errors.WindowActiveError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def key_pressed(self, obj, event):
|
||||||
|
"""
|
||||||
|
Handles the return key being pressed on list. If the key is pressed,
|
||||||
|
the Edit button handler is called
|
||||||
|
"""
|
||||||
|
if event.type == gtk.gdk.KEY_PRESS and \
|
||||||
|
event.keyval in (_RETURN, _KP_ENTER):
|
||||||
|
try:
|
||||||
|
self.edit_button_clicked(obj)
|
||||||
|
except Errors.WindowActiveError:
|
||||||
|
pass
|
||||||
|
|
||||||
def add_button_clicked(self, obj):
|
def add_button_clicked(self, obj):
|
||||||
"""
|
"""
|
||||||
Function called with the Add button is clicked. This function
|
Function called with the Add button is clicked. This function
|
||||||
|
@ -311,6 +311,7 @@ class EmbeddedList(ButtonTab):
|
|||||||
self.tree.set_reorderable(True)
|
self.tree.set_reorderable(True)
|
||||||
self.tree.set_rules_hint(True)
|
self.tree.set_rules_hint(True)
|
||||||
self.tree.connect('button_press_event', self.double_click)
|
self.tree.connect('button_press_event', self.double_click)
|
||||||
|
self.tree.connect('key_press_event', self.key_pressed)
|
||||||
|
|
||||||
# create the scrolled window, and attach the treeview
|
# create the scrolled window, and attach the treeview
|
||||||
scroll = gtk.ScrolledWindow()
|
scroll = gtk.ScrolledWindow()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user