mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[text] Add select-all binding
Bind Ctrl+A to the "select all" action.
This commit is contained in:
parent
92e8b886d2
commit
55a22d5750
@ -1379,6 +1379,18 @@ clutter_text_real_line_end (ClutterText *self,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
clutter_text_real_select_all (ClutterText *self,
|
||||||
|
const gchar *action,
|
||||||
|
guint keyval,
|
||||||
|
ClutterModifierType modifiers)
|
||||||
|
{
|
||||||
|
clutter_text_set_cursor_position (self, 0);
|
||||||
|
clutter_text_set_selection_bound (self, self->priv->n_chars);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_text_real_del_next (ClutterText *self,
|
clutter_text_real_del_next (ClutterText *self,
|
||||||
const gchar *action,
|
const gchar *action,
|
||||||
@ -1929,6 +1941,11 @@ clutter_text_class_init (ClutterTextClass *klass)
|
|||||||
CLUTTER_KP_End,
|
CLUTTER_KP_End,
|
||||||
G_CALLBACK (clutter_text_real_line_end));
|
G_CALLBACK (clutter_text_real_line_end));
|
||||||
|
|
||||||
|
clutter_binding_pool_install_action (binding_pool, "select-all",
|
||||||
|
CLUTTER_a, CLUTTER_CONTROL_MASK,
|
||||||
|
G_CALLBACK (clutter_text_real_select_all),
|
||||||
|
NULL, NULL);
|
||||||
|
|
||||||
clutter_binding_pool_install_action (binding_pool, "delete-next",
|
clutter_binding_pool_install_action (binding_pool, "delete-next",
|
||||||
CLUTTER_Delete, 0,
|
CLUTTER_Delete, 0,
|
||||||
G_CALLBACK (clutter_text_real_del_next),
|
G_CALLBACK (clutter_text_real_del_next),
|
||||||
|
Loading…
Reference in New Issue
Block a user