summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-05-27 13:54:17 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-05-27 14:03:18 +0300
commit53a1a87232c6c498e90e74ed7b7d04795d8c69bb (patch)
treef58d6ff10dcdf8095848ee64f5cb04d96d4cc46b
parent4970857f5f1577fe46858498c5563b6009107be2 (diff)
fix ResMan view
-rw-r--r--src/bin/egui_gui/egui_layout_c.json8
-rw-r--r--src/bin/egui_gui/rmview.c10
-rw-r--r--src/bin/egui_gui/rmview.h1
3 files changed, 18 insertions, 1 deletions
diff --git a/src/bin/egui_gui/egui_layout_c.json b/src/bin/egui_gui/egui_layout_c.json
index 4ece902..38e0e34 100644
--- a/src/bin/egui_gui/egui_layout_c.json
+++ b/src/bin/egui_gui/egui_layout_c.json
@@ -38,6 +38,7 @@ static Eo *main_win;
38 "_rm_add_button_clicked":"_rm_add_button_clicked", 38 "_rm_add_button_clicked":"_rm_add_button_clicked",
39 "_settings_apply_button_clicked":"_settings_apply_button_clicked", 39 "_settings_apply_button_clicked":"_settings_apply_button_clicked",
40 "_settings_win_request_delete":"_settings_win_request_delete", 40 "_settings_win_request_delete":"_settings_win_request_delete",
41 "_rm_win_request_delete":"_rm_win_request_delete",
41 "_rm_win_show_post_cb":"_rm_win_show_post_cb", 42 "_rm_win_show_post_cb":"_rm_win_show_post_cb",
42 "_settings_win_show_post_cb":"_settings_win_show_post_cb" 43 "_settings_win_show_post_cb":"_settings_win_show_post_cb"
43 } 44 }
@@ -76,6 +77,8 @@ _settings_apply_button_clicked(void *data, Eo *obj, const Eo_Event_Description *
76extern Eina_Bool 77extern Eina_Bool
77_settings_win_request_delete(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info); 78_settings_win_request_delete(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
78extern Eina_Bool 79extern Eina_Bool
80_rm_win_request_delete(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
81extern Eina_Bool
79_rm_win_show_post_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info); 82_rm_win_show_post_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
80extern Eina_Bool 83extern Eina_Bool
81_settings_win_show_post_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info); 84_settings_win_show_post_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
@@ -440,6 +443,10 @@ _create_rm_win()
440 "resize_object_add":["rm_vbox"], 443 "resize_object_add":["rm_vbox"],
441 "modal":[true], 444 "modal":[true],
442 "visibility":[true] 445 "visibility":[true]
446 },
447 "Callbacks":
448 {
449 "delete,request":"_rm_win_request_delete"
443 } 450 }
444 } 451 }
445 } 452 }
@@ -451,6 +458,7 @@ _create_rm_win()
451 eo_do(rm_win, elm_obj_win_autodel_set(EINA_TRUE)); 458 eo_do(rm_win, elm_obj_win_autodel_set(EINA_TRUE));
452 eo_do(rm_win, evas_obj_size_set(640, 480)); 459 eo_do(rm_win, evas_obj_size_set(640, 480));
453 eo_do(rm_win, elm_obj_win_modal_set(EINA_TRUE)); 460 eo_do(rm_win, elm_obj_win_modal_set(EINA_TRUE));
461 eo_do(rm_win, eo_event_callback_add(ELM_WIN_EVENT_DELETE_REQUEST, _rm_win_request_delete, NULL));
454/* @egui 462/* @egui
455{ 463{
456 "bg3": 464 "bg3":
diff --git a/src/bin/egui_gui/rmview.c b/src/bin/egui_gui/rmview.c
index f45e22c..df4b4be 100644
--- a/src/bin/egui_gui/rmview.c
+++ b/src/bin/egui_gui/rmview.c
@@ -18,7 +18,7 @@
18#define EVAS_SMART_CALLBACK_STR "EVAS_SMART_CALLBACK" 18#define EVAS_SMART_CALLBACK_STR "EVAS_SMART_CALLBACK"
19 19
20/* currently selected toolbar */ 20/* currently selected toolbar */
21static Rmview_Resource_Type _rmview_toolbar_selected_type = -1; 21static Rmview_Resource_Type _rmview_toolbar_selected_type = RMVIEW_NOT_SELECTED;
22 22
23static void 23static void
24_rmview_build(Rmview_Resource_Type type); 24_rmview_build(Rmview_Resource_Type type);
@@ -347,6 +347,14 @@ _rmview_build(Rmview_Resource_Type type)
347 } 347 }
348} 348}
349 349
350/* Delete window callback. */
351Eina_Bool
352_rm_win_request_delete(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
353{
354 _rmview_toolbar_selected_type = RMVIEW_NOT_SELECTED;
355 return EO_CALLBACK_CONTINUE;
356}
357
350static void 358static void
351_rmview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 359_rmview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
352{ 360{
diff --git a/src/bin/egui_gui/rmview.h b/src/bin/egui_gui/rmview.h
index c392625..d5c252c 100644
--- a/src/bin/egui_gui/rmview.h
+++ b/src/bin/egui_gui/rmview.h
@@ -5,6 +5,7 @@
5 5
6typedef enum 6typedef enum
7{ 7{
8 RMVIEW_NOT_SELECTED,
8 RMVIEW_IMAGE, 9 RMVIEW_IMAGE,
9 RMVIEW_STRING, 10 RMVIEW_STRING,
10 RMVIEW_CALLBACK, 11 RMVIEW_CALLBACK,