summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-12-17 03:02:45 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-12-17 03:02:45 +0900
commit56f6d11070727a93c8eb2de2a861227abc0dbfb8 (patch)
treee6634fddad66c55763283b1581aca744b9440fac
parent535211ae50a82c95edc1c2b32bc77f95ef880e6a (diff)
gui: added about dialog.
-rw-r--r--src/bin/gui.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/bin/gui.c b/src/bin/gui.c
index 4ef882e..5826b66 100644
--- a/src/bin/gui.c
+++ b/src/bin/gui.c
@@ -249,13 +249,35 @@ _toolbar_option_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
249} 249}
250 250
251static void 251static void
252_toolbar_about_btn_cb(void *data, Evas_Object *obj EINA_UNUSED,
253 void *event_info EINA_UNUSED)
254{
255 evas_object_del(data);
256}
257
258static void
252_toolbar_about_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, 259_toolbar_about_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
253 void *event_info) 260 void *event_info)
254{ 261{
255 Elm_Object_Item *it = event_info; 262 Elm_Object_Item *it = event_info;
263 Evas_Object *o = NULL, *btn = NULL;
256 if (!it) return; 264 if (!it) return;
257 265
258 elm_toolbar_item_selected_set(it, EINA_FALSE); 266 elm_toolbar_item_selected_set(it, EINA_FALSE);
267
268 o = elm_popup_add(gd->win);
269 elm_object_part_text_set(o, "title,text", "About");
270 elm_object_text_set(o, "Elm Theme Viewer v0.1 "
271 "@copyright 2012-2013. "
272 "Elm Theme Viewer team leaded by Daniel Juyung Seo.");
273 btn = elm_button_add(o);
274 elm_object_text_set(btn, "Close");
275 evas_object_smart_callback_add(btn, "clicked",
276 _toolbar_about_btn_cb, o);
277 elm_object_part_content_set(o, "button1", btn);
278 evas_object_show(btn);
279
280 evas_object_show(o);
259} 281}
260 282
261static void 283static void
@@ -365,8 +387,7 @@ gui_create(const char *edje_file,
365 elm_toolbar_item_append(o, "edit", "Option", _toolbar_option_cb, NULL); 387 elm_toolbar_item_append(o, "edit", "Option", _toolbar_option_cb, NULL);
366 it = elm_toolbar_item_append(o, NULL, "Code", NULL, NULL); 388 it = elm_toolbar_item_append(o, NULL, "Code", NULL, NULL);
367 elm_object_item_disabled_set(it, EINA_TRUE); 389 elm_object_item_disabled_set(it, EINA_TRUE);
368 it = elm_toolbar_item_append(o, "media_player/info", "About", _toolbar_about_cb, NULL); 390 elm_toolbar_item_append(o, "media_player/info", "About", _toolbar_about_cb, NULL);
369 elm_object_item_disabled_set(it, EINA_TRUE);
370 elm_toolbar_item_append(o, "close", "Exit", _toolbar_exit_cb, NULL); 391 elm_toolbar_item_append(o, "close", "Exit", _toolbar_exit_cb, NULL);
371 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 392 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
372 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 393 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);