summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-01-24 12:58:48 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-10-05 12:54:39 +0200
commit0086f17aecc58265b896dac6a4b2976b4869f68e (patch)
tree2769e90f4f5dcf5e5cf4f64a85124446db18e7a9
parentd91b820a9497326ad5aa91bd980a82303d223a25 (diff)
settingswidget test: Added a buttom to test delete items.
-rw-r--r--src/bin/test_settingspane.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bin/test_settingspane.c b/src/bin/test_settingspane.c
index 60e680b98..3afdc0b6f 100644
--- a/src/bin/test_settingspane.c
+++ b/src/bin/test_settingspane.c
@@ -192,9 +192,19 @@ save_q_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED
192 printf("No.\n"); 192 printf("No.\n");
193 else 193 else
194 printf("Yes :)\n"); 194 printf("Yes :)\n");
195}
196
197static void
198del_focused_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
199{
200 Elm_Settingspane_Item *item;
201
202 item = elm_settingspane_focused_get(data);
195 203
204 elm_settingspane_item_delete(item);
196} 205}
197 206
207
198void 208void
199test_settingspane(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 209test_settingspane(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
200{ 210{
@@ -282,6 +292,14 @@ test_settingspane(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
282 elm_box_pack_end(btnbox, o); 292 elm_box_pack_end(btnbox, o);
283 evas_object_show(o); 293 evas_object_show(o);
284 294
295 o = elm_button_add(win);
296 elm_object_text_set(o, "Delete focused item");
297 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
298 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
299 evas_object_smart_callback_add(o, "clicked", del_focused_cb, sw);
300 elm_box_pack_end(btnbox, o);
301 evas_object_show(o);
302
285 evas_object_show(win); 303 evas_object_show(win);
286 evas_object_resize(win, 500, 500); 304 evas_object_resize(win, 500, 500);
287} 305}