summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorRyuan Choi <ryuan.choi@gmail.com>2014-01-21 22:50:35 +0900
committerRyuan Choi <ryuan.choi@gmail.com>2014-01-21 22:50:35 +0900
commit0b4b942bfc2ebb9c4ac7349232ff6fd428d21e1a (patch)
treef0a56014b6c91a88c3c1521b069378949ce67f51 /src/bin
parent5eee2aa4162193c600764fcd81248b6fde305cb2 (diff)
Introduce fileselector interface and applied to elm_fileselector.
Summary: fileselector_button and fileselector_entry should have almost same interfaces with fileselector. Previously , we exposed them individually such as elm_fileselector_is_save_set(). Instead of adding the same APIs three times, we can reuse one fileselector's API using Eo interface. This patch introduced fileselector interface and applied it to elm_fileselector. Reviewers: seoz, raster Reviewed By: raster Differential Revision: https://phab.enlightenment.org/D475
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/test_fileselector_button.c8
-rw-r--r--src/bin/test_fileselector_entry.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/test_fileselector_button.c b/src/bin/test_fileselector_button.c
index cba4462a6..f87db9d0e 100644
--- a/src/bin/test_fileselector_button.c
+++ b/src/bin/test_fileselector_button.c
@@ -119,7 +119,7 @@ _current_sel_toggle(void *data,
119{ 119{
120 Evas_Object *fs_bt = data; 120 Evas_Object *fs_bt = data;
121 Eina_Bool value = elm_check_state_get(obj); 121 Eina_Bool value = elm_check_state_get(obj);
122 elm_fileselector_button_is_save_set(fs_bt, value); 122 elm_fileselector_is_save_set(fs_bt, value);
123 printf("Current selection editable entry set to: %s\n", 123 printf("Current selection editable entry set to: %s\n",
124 value ? "true" : "false"); 124 value ? "true" : "false");
125} 125}
@@ -131,7 +131,7 @@ _folder_only_toggle(void *data,
131{ 131{
132 Evas_Object *fs_bt = data; 132 Evas_Object *fs_bt = data;
133 Eina_Bool value = elm_check_state_get(obj); 133 Eina_Bool value = elm_check_state_get(obj);
134 elm_fileselector_button_folder_only_set(fs_bt, value); 134 elm_fileselector_folder_only_set(fs_bt, value);
135 printf("Folder only flag set to: %s\n", value ? "true" : "false"); 135 printf("Folder only flag set to: %s\n", value ? "true" : "false");
136} 136}
137 137
@@ -142,7 +142,7 @@ _expandable_toggle(void *data,
142{ 142{
143 Evas_Object *fs_bt = data; 143 Evas_Object *fs_bt = data;
144 Eina_Bool value = elm_check_state_get(obj); 144 Eina_Bool value = elm_check_state_get(obj);
145 elm_fileselector_button_expandable_set(fs_bt, value); 145 elm_fileselector_expandable_set(fs_bt, value);
146 printf("Expandable flag set to: %s\n", value ? "true" : "false"); 146 printf("Expandable flag set to: %s\n", value ? "true" : "false");
147} 147}
148 148
@@ -190,7 +190,7 @@ test_fileselector_button(void *data EINA_UNUSED,
190 fs_bt = elm_fileselector_button_add(win); 190 fs_bt = elm_fileselector_button_add(win);
191 elm_object_text_set(fs_bt, "Select a file"); 191 elm_object_text_set(fs_bt, "Select a file");
192 elm_object_part_content_set(fs_bt, "icon", ic); 192 elm_object_part_content_set(fs_bt, "icon", ic);
193 elm_fileselector_button_path_set(fs_bt, "/tmp/test_fs_bt"); 193 elm_fileselector_path_set(fs_bt, "/tmp/test_fs_bt");
194 194
195 elm_box_pack_end(vbox, fs_bt); 195 elm_box_pack_end(vbox, fs_bt);
196 evas_object_show(fs_bt); 196 evas_object_show(fs_bt);
diff --git a/src/bin/test_fileselector_entry.c b/src/bin/test_fileselector_entry.c
index 60aa144de..8e41ac196 100644
--- a/src/bin/test_fileselector_entry.c
+++ b/src/bin/test_fileselector_entry.c
@@ -116,8 +116,8 @@ _folder_only_toggle(void *data,
116{ 116{
117 Evas_Object *fs_en = data; 117 Evas_Object *fs_en = data;
118 Evas_Object *ic = elm_object_part_content_get(fs_en, "button icon"); 118 Evas_Object *ic = elm_object_part_content_get(fs_en, "button icon");
119 Eina_Bool value = elm_fileselector_entry_folder_only_get(fs_en); 119 Eina_Bool value = elm_fileselector_folder_only_get(fs_en);
120 elm_fileselector_entry_folder_only_set(fs_en, !value); 120 elm_fileselector_folder_only_set(fs_en, !value);
121 printf("Folder only flag set to: %s\n", value ? "false" : "true"); 121 printf("Folder only flag set to: %s\n", value ? "false" : "true");
122 if (!value) 122 if (!value)
123 { 123 {
@@ -137,8 +137,8 @@ _expandable_toggle(void *data,
137 void *event_info EINA_UNUSED) 137 void *event_info EINA_UNUSED)
138{ 138{
139 Evas_Object *fs_en = data; 139 Evas_Object *fs_en = data;
140 Eina_Bool value = elm_fileselector_entry_expandable_get(fs_en); 140 Eina_Bool value = elm_fileselector_expandable_get(fs_en);
141 elm_fileselector_entry_expandable_set(fs_en, !value); 141 elm_fileselector_expandable_set(fs_en, !value);
142 printf("Expandable flag set to: %s\n", value ? "false" : "true"); 142 printf("Expandable flag set to: %s\n", value ? "false" : "true");
143} 143}
144 144
@@ -197,7 +197,7 @@ test_fileselector_entry(void *data EINA_UNUSED,
197 elm_icon_standard_set(ic, "file"); 197 elm_icon_standard_set(ic, "file");
198 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); 198 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
199 fs_en = elm_fileselector_entry_add(win); 199 fs_en = elm_fileselector_entry_add(win);
200 elm_fileselector_entry_path_set(fs_en, "/tmp/test_fs_bt"); 200 elm_fileselector_path_set(fs_en, "/tmp/test_fs_bt");
201 elm_object_text_set(fs_en, "Select a file"); 201 elm_object_text_set(fs_en, "Select a file");
202 elm_object_part_content_set(fs_en, "button icon", ic); 202 elm_object_part_content_set(fs_en, "button icon", ic);
203 evas_object_size_hint_weight_set(fs_en, EVAS_HINT_EXPAND, 0.0); 203 evas_object_size_hint_weight_set(fs_en, EVAS_HINT_EXPAND, 0.0);