summaryrefslogtreecommitdiff
path: root/src/bin/test_fileselector.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/test_fileselector.c')
-rw-r--r--src/bin/test_fileselector.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bin/test_fileselector.c b/src/bin/test_fileselector.c
index a0e003008..9a187564e 100644
--- a/src/bin/test_fileselector.c
+++ b/src/bin/test_fileselector.c
@@ -88,6 +88,20 @@ _path_get_clicked(void *data,
88 printf("Get Path: %s\n", elm_fileselector_path_get(fs)); 88 printf("Get Path: %s\n", elm_fileselector_path_get(fs));
89} 89}
90 90
91static void
92_mode_cycle_clicked(void *data,
93 Evas_Object *obj __UNUSED__,
94 void *event_info __UNUSED__)
95{
96 Evas_Object *fs = data;
97 Elm_Fileselector_Mode mode;
98
99 mode = (elm_fileselector_mode_get(fs) + 1) % ELM_FILESELECTOR_LAST;
100 elm_fileselector_mode_set(fs, mode);
101
102 printf("Setting mode to: %d\n", mode);
103}
104
91void 105void
92test_fileselector(void *data __UNUSED__, 106test_fileselector(void *data __UNUSED__,
93 Evas_Object *obj __UNUSED__, 107 Evas_Object *obj __UNUSED__,
@@ -183,6 +197,12 @@ test_fileselector(void *data __UNUSED__,
183 elm_box_pack_end(hbox, bt); 197 elm_box_pack_end(hbox, bt);
184 evas_object_show(bt); 198 evas_object_show(bt);
185 199
200 bt = elm_button_add(win);
201 elm_button_label_set(bt, "mode cycle");
202 evas_object_smart_callback_add(bt, "clicked", _mode_cycle_clicked, fs);
203 elm_box_pack_end(hbox, bt);
204 evas_object_show(bt);
205
186 evas_object_resize(win, 240, 350); 206 evas_object_resize(win, 240, 350);
187 evas_object_show(win); 207 evas_object_show(win);
188} 208}