From: Enlightenment S. <no-...@en...> - 2011-07-24 08:17:24
|
Log: ctrl+a now selects all text in an entry Author: discomfitor Date: 2011-07-24 01:17:18 -0700 (Sun, 24 Jul 2011) New Revision: 61635 Trac: http://trac.enlightenment.org/e/changeset/61635 Modified: trunk/elementary/src/lib/elm_entry.c Modified: trunk/elementary/src/lib/elm_entry.c =================================================================== --- trunk/elementary/src/lib/elm_entry.c 2011-07-24 08:10:35 UTC (rev 61634) +++ trunk/elementary/src/lib/elm_entry.c 2011-07-24 08:17:18 UTC (rev 61635) @@ -1312,6 +1312,14 @@ } static void +_signal_selection_all(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) +{ + Widget_Data *wd = elm_widget_data_get(data); + if (!wd) return; + elm_entry_select_all(data); +} + +static void _signal_selection_changed(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) { Widget_Data *wd = elm_widget_data_get(data); @@ -1968,6 +1976,8 @@ _signal_selection_start, obj); edje_object_signal_callback_add(wd->ent, "selection,changed", "elm.text", _signal_selection_changed, obj); + edje_object_signal_callback_add(wd->ent, "entry,selection,all,request", "elm.text", + _signal_selection_all, obj); edje_object_signal_callback_add(wd->ent, "selection,cleared", "elm.text", _signal_selection_cleared, obj); edje_object_signal_callback_add(wd->ent, "entry,paste,request,1", "elm.text", |