forked from AuroraMiddleware/gtk
GtkEntry: Add a key binding for clearing the entry
Ctrl-u is a fine, well-established keybinding for this purpose, lets just use it.
This commit is contained in:
parent
e7bd73f2b0
commit
414bc202e7
@ -1978,6 +1978,16 @@ gtk_entry_class_init (GtkEntryClass *class)
|
|||||||
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, 0,
|
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, 0,
|
||||||
"backspace", 0);
|
"backspace", 0);
|
||||||
|
|
||||||
|
gtk_binding_entry_add_signal (binding_set, GDK_KEY_u, GDK_CONTROL_MASK,
|
||||||
|
"move-cursor", 3,
|
||||||
|
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
|
||||||
|
G_TYPE_INT, -1,
|
||||||
|
G_TYPE_BOOLEAN, FALSE);
|
||||||
|
gtk_binding_entry_add_signal (binding_set, GDK_KEY_u, GDK_CONTROL_MASK,
|
||||||
|
"delete-from-cursor", 2,
|
||||||
|
G_TYPE_ENUM, GTK_DELETE_PARAGRAPH_ENDS,
|
||||||
|
G_TYPE_INT, 1);
|
||||||
|
|
||||||
/* Make this do the same as Backspace, to help with mis-typing */
|
/* Make this do the same as Backspace, to help with mis-typing */
|
||||||
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, GDK_SHIFT_MASK,
|
gtk_binding_entry_add_signal (binding_set, GDK_KEY_BackSpace, GDK_SHIFT_MASK,
|
||||||
"backspace", 0);
|
"backspace", 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user