summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2013-12-20 18:54:57 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-12-20 18:54:57 +0900
commit4d761f3a63270c88fa516764d9288f8bf0ff4a11 (patch)
tree1ac80c10648c3d811046619f865f5067a32e3fb7
parent46fd22b0335881c88cd27e456c434cd639125f60 (diff)
fileselector: enter key press in name entry acts like ok button click.
- I used "activate" signal of entry and this will call ok button clicked function directly. - This is very useful when the fileselector is used in desktop with keyboard.
-rw-r--r--src/lib/elc_fileselector.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 081a54100..198d2a4e9 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -1271,6 +1271,13 @@ _resource_deleted(void *data, int type EINA_UNUSED, void *ev)
1271} 1271}
1272 1272
1273static void 1273static void
1274_name_entry_activated_cb(void *data, Evas_Object *obj EINA_UNUSED,
1275 void *event_info EINA_UNUSED)
1276{
1277 _ok(data, NULL, NULL);
1278}
1279
1280static void
1274_elm_fileselector_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) 1281_elm_fileselector_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1275{ 1282{
1276 Evas_Object *ic, *bt, *en, *pb; 1283 Evas_Object *ic, *bt, *en, *pb;
@@ -1360,6 +1367,8 @@ _elm_fileselector_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1360 elm_entry_line_wrap_set(en, ELM_WRAP_CHAR); 1367 elm_entry_line_wrap_set(en, ELM_WRAP_CHAR);
1361 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 1368 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1362 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL); 1369 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
1370 evas_object_smart_callback_add(en, "activated",
1371 _name_entry_activated_cb, obj);
1363 1372
1364 elm_widget_sub_object_add(obj, en); 1373 elm_widget_sub_object_add(obj, en);
1365 priv->name_entry = en; 1374 priv->name_entry = en;