rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=e191fceabd8bebe533c4331a9e5efa2475ed4543
commit e191fceabd8bebe533c4331a9e5efa2475ed4543 Author: Vyacheslav Reutskiy <v.reuts...@samsung.com> Date: Wed Oct 7 14:22:02 2015 +0300 popup: add multiselect and is_save option for fileselector helper Change-Id: I125b5fb8f6a453c3faae7b5fc4e10ccdab83f4f7 --- src/bin/ui/main_window.h | 9 ++++++--- src/bin/ui/popup.c | 19 +++++++++++++------ src/bin/ui/tab_home_import_edc.c | 6 ++++-- src/bin/ui/tab_home_import_edj.c | 6 ++++-- src/bin/ui/tab_home_new.c | 3 ++- 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h index ab40eb3..5b9ad39 100644 --- a/src/bin/ui/main_window.h +++ b/src/bin/ui/main_window.h @@ -416,15 +416,18 @@ popup_buttons_disabled_set(Popup_Button p_btns, Eina_Bool disabled); void popup_fileselector_folder_helper(Evas_Object *follow_up, const char *path, - Evas_Smart_Cb func, void *data); + Evas_Smart_Cb func, void *data, + Eina_Bool multi, Eina_Bool is_save); void popup_fileselector_edj_helper(const char *title, Evas_Object *follow_up, const char *path, - Evas_Smart_Cb func, void *data); + Evas_Smart_Cb func, void *data, + Eina_Bool multi, Eina_Bool is_save); void popup_fileselector_edc_helper(Evas_Object *follow_up, const char *path, - Evas_Smart_Cb func, void *data); + Evas_Smart_Cb func, void *data, + Eina_Bool multi, Eina_Bool is_save); void popup_log_message_helper(const char *msg); diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c index 76ab48b..6008525 100644 --- a/src/bin/ui/popup.c +++ b/src/bin/ui/popup.c @@ -193,6 +193,8 @@ static void _fileselector_helper(const char *title, Evas_Object *follow_up, const char *path, + Eina_Bool multi, + Eina_Bool is_save, Evas_Smart_Cb func, void *data, Elm_Fileselector_Filter_Func filter_cb) @@ -206,6 +208,8 @@ _fileselector_helper(const char *title, fs = elm_fileselector_add(ap.win); elm_fileselector_expandable_set(fs, false); + elm_fileselector_is_save_set(fs, is_save); + elm_fileselector_multi_select_set(fs, multi); if (filter_cb) { elm_fileselector_custom_filter_append(fs, filter_cb, NULL, "edj"); @@ -241,9 +245,10 @@ _fileselector_helper(const char *title, void popup_fileselector_folder_helper(Evas_Object *follow_up, const char *path, - Evas_Smart_Cb func, void *data) + Evas_Smart_Cb func, void *data, + Eina_Bool multi, Eina_Bool is_save) { - _fileselector_helper(NULL, follow_up, path, func, data, NULL); + _fileselector_helper(NULL, follow_up, path, multi, is_save, func, data, NULL); } static Eina_Bool @@ -260,9 +265,10 @@ _edj_filter(const char *path, void popup_fileselector_edj_helper(const char *title, Evas_Object *follow_up, const char *path, - Evas_Smart_Cb func, void *data) + Evas_Smart_Cb func, void *data, + Eina_Bool multi, Eina_Bool is_save) { - _fileselector_helper(title, follow_up, path, func, data, _edj_filter); + _fileselector_helper(title, follow_up, path, multi, is_save, func, data, _edj_filter); } static Eina_Bool @@ -279,9 +285,10 @@ _edc_filter(const char *path, void popup_fileselector_edc_helper(Evas_Object *follow_up, const char *path, - Evas_Smart_Cb func, void *data) + Evas_Smart_Cb func, void *data, + Eina_Bool multi, Eina_Bool is_save) { - _fileselector_helper(NULL, follow_up, path, func, data, _edc_filter); + _fileselector_helper(NULL, follow_up, path, multi, is_save, func, data, _edc_filter); } void diff --git a/src/bin/ui/tab_home_import_edc.c b/src/bin/ui/tab_home_import_edc.c index 5fe592f..bdc3850 100644 --- a/src/bin/ui/tab_home_import_edc.c +++ b/src/bin/ui/tab_home_import_edc.c @@ -108,7 +108,8 @@ _elipsis(void *data, { popup_fileselector_folder_helper((Evas_Object *)data, elm_entry_entry_get(tab_edc.path), - entry_path_set, (Evas_Object *)data); + entry_path_set, (Evas_Object *)data, + false, false); } static void @@ -118,7 +119,8 @@ _elipsis_edc(void *data __UNUSED__, { popup_fileselector_edc_helper(tab_edc.edc, NULL, - entry_path_set, tab_edc.edc); + entry_path_set, tab_edc.edc, + false, false); } static void diff --git a/src/bin/ui/tab_home_import_edj.c b/src/bin/ui/tab_home_import_edj.c index 896fc7a..3c0d38e 100644 --- a/src/bin/ui/tab_home_import_edj.c +++ b/src/bin/ui/tab_home_import_edj.c @@ -124,7 +124,8 @@ _elipsis(void *data __UNUSED__, { popup_fileselector_folder_helper(tab_edj.path, elm_entry_entry_get(tab_edj.path), - entry_path_set, tab_edj.path); + entry_path_set, tab_edj.path, + false, false); } static void @@ -133,7 +134,8 @@ _elipsis_edj(void *data __UNUSED__, void *event_info __UNUSED__) { popup_fileselector_edj_helper(NULL, tab_edj.edj, NULL, - entry_path_set, tab_edj.edj); + entry_path_set, tab_edj.edj, + false, false); } Evas_Object * diff --git a/src/bin/ui/tab_home_new.c b/src/bin/ui/tab_home_new.c index fb39b72..32ace1c 100644 --- a/src/bin/ui/tab_home_new.c +++ b/src/bin/ui/tab_home_new.c @@ -537,7 +537,8 @@ _elipsis(void *data __UNUSED__, void *event_info __UNUSED__) { popup_fileselector_folder_helper(tab_new.path, elm_entry_entry_get(tab_new.path), - entry_path_set, tab_new.path); + entry_path_set, tab_new.path, + false, false); } Evas_Object * --