summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-09-30 10:58:10 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-10-02 17:01:13 +0300
commite846f3cfbeda59eaafe15302320f384332c11c82 (patch)
tree61ec1b27904629a689e5e08b5214c9a96e78a703
parentf2af441895316c77fb4b678ee724b365b2b72556 (diff)
Remove get_gui and sequences invocation from outside.
-rw-r--r--src/bin/egui_gui/editor.c2
-rw-r--r--src/bin/egui_gui/egui_layout.json87
-rw-r--r--src/bin/egui_gui/egui_logic.c331
-rw-r--r--src/bin/egui_gui/egui_logic.h2
-rw-r--r--src/bin/egui_gui/egui_logic_private.h2
-rw-r--r--src/bin/egui_gui/propview.c12
-rw-r--r--src/bin/egui_gui/rmview.c142
-rw-r--r--src/bin/egui_gui/rmview.h3
-rw-r--r--src/bin/egui_gui/settings_view.c48
-rw-r--r--src/bin/egui_gui/settings_view.h6
10 files changed, 290 insertions, 345 deletions
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index fbc3bf2..b280bc2 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -2761,7 +2761,7 @@ _wdg_border_draw_on_idle(void *data EINA_UNUSED)
2761void 2761void
2762editor_init(GuiLogicCbs *_guilogic_cbs) 2762editor_init(GuiLogicCbs *_guilogic_cbs)
2763{ 2763{
2764 g = get_gui(); 2764 g = egui_layout_gui_get();
2765 Action_Functions *funcs = manager_action_functions_get(MODE_EDITOR); 2765 Action_Functions *funcs = manager_action_functions_get(MODE_EDITOR);
2766 funcs->wdg_add = _widget_add; 2766 funcs->wdg_add = _widget_add;
2767 funcs->wdg_del = _widget_del; 2767 funcs->wdg_del = _widget_del;
diff --git a/src/bin/egui_gui/egui_layout.json b/src/bin/egui_gui/egui_layout.json
index 9ea1765..a101e60 100644
--- a/src/bin/egui_gui/egui_layout.json
+++ b/src/bin/egui_gui/egui_layout.json
@@ -6,7 +6,7 @@
6 "res_canvas_bg":"data/images/canvas_bg.jpg", 6 "res_canvas_bg":"data/images/canvas_bg.jpg",
7 "erigo_icon":"data/images/erigo_icon.png" 7 "erigo_icon":"data/images/erigo_icon.png"
8 }, 8 },
9 "Sequences":["BigBang", "fs_win_show", "rm_win_show", "settings_win_show", "graphviz_button_clicked", "itemview_item_add_but_clicked", "itemview_item_nested_add_but_clicked", "itemview_separator_add_but_clicked", "itemview_item_del_but_clicked"], 9 "Sequences":["BigBang", "graphviz_button_clicked"],
10 "Eo_Callbacks": 10 "Eo_Callbacks":
11 { 11 {
12 "_itemview_item_add_but_clicked_cb":"_itemview_item_add_but_clicked_cb", 12 "_itemview_item_add_but_clicked_cb":"_itemview_item_add_but_clicked_cb",
@@ -17,9 +17,7 @@
17 "_settings_apply_button_clicked":"_settings_apply_button_clicked", 17 "_settings_apply_button_clicked":"_settings_apply_button_clicked",
18 "_settings_win_request_delete":"_settings_win_request_delete", 18 "_settings_win_request_delete":"_settings_win_request_delete",
19 "_rm_win_request_delete":"_rm_win_request_delete", 19 "_rm_win_request_delete":"_rm_win_request_delete",
20 "_rm_win_show_post_cb":"_rm_win_show_post_cb",
21 "_gvc_win_show_post_cb":"_gvc_win_show_post_cb", 20 "_gvc_win_show_post_cb":"_gvc_win_show_post_cb",
22 "_settings_win_show_post_cb":"_settings_win_show_post_cb",
23 "_graphview_generate":"_graphview_generate", 21 "_graphview_generate":"_graphview_generate",
24 "_callbacksview_up_btn_clicked":"_callbacksview_up_btn_clicked", 22 "_callbacksview_up_btn_clicked":"_callbacksview_up_btn_clicked",
25 "_callbacksview_down_btn_clicked":"_callbacksview_down_btn_clicked", 23 "_callbacksview_down_btn_clicked":"_callbacksview_down_btn_clicked",
@@ -38,46 +36,6 @@
38 }, 36 },
39 "Sequences": 37 "Sequences":
40 { 38 {
41 "itemview_item_add_but_clicked":
42 {
43 "Desc":
44 {
45 },
46 "Actions":
47 {
48 "User":["_itemview_item_add_but_clicked_cb", ""]
49 }
50 },
51 "itemview_item_nested_add_but_clicked":
52 {
53 "Desc":
54 {
55 },
56 "Actions":
57 {
58 "User":["_itemview_item_nested_add_but_clicked_cb", ""]
59 }
60 },
61 "itemview_separator_add_but_clicked":
62 {
63 "Desc":
64 {
65 },
66 "Actions":
67 {
68 "User":["_itemview_separator_add_but_clicked_cb", ""]
69 }
70 },
71 "itemview_item_del_but_clicked":
72 {
73 "Desc":
74 {
75 },
76 "Actions":
77 {
78 "User":["_itemview_item_del_but_clicked_cb", ""]
79 }
80 },
81 "graphviz_button_clicked": 39 "graphviz_button_clicked":
82 { 40 {
83 "Desc": 41 "Desc":
@@ -90,41 +48,6 @@
90 "User":["_gvc_win_show_post_cb", ""] 48 "User":["_gvc_win_show_post_cb", ""]
91 } 49 }
92 }, 50 },
93 "fs_win_show":
94 {
95 "Desc":
96 {
97 "public":true
98 },
99 "Actions":
100 {
101 "Creation":"fs_win"
102 }
103 },
104 "rm_win_show":
105 {
106 "Desc":
107 {
108 "public":true
109 },
110 "Actions":
111 {
112 "Creation":"rm_win",
113 "User":["_rm_win_show_post_cb", ""]
114 }
115 },
116 "settings_win_show":
117 {
118 "Desc":
119 {
120 "public":true
121 },
122 "Actions":
123 {
124 "Creation":"settings_win",
125 "User":["_settings_win_show_post_cb", ""]
126 }
127 },
128 "BigBang": 51 "BigBang":
129 { 52 {
130 "Desc": 53 "Desc":
@@ -2867,7 +2790,7 @@
2867 }, 2790 },
2868 "Callbacks": 2791 "Callbacks":
2869 { 2792 {
2870 "clicked":"itemview_item_add_but_clicked" 2793 "clicked":"_itemview_item_add_but_clicked_cb"
2871 } 2794 }
2872 }, 2795 },
2873 "itemview_add_item_nested_but": 2796 "itemview_add_item_nested_but":
@@ -2885,7 +2808,7 @@
2885 }, 2808 },
2886 "Callbacks": 2809 "Callbacks":
2887 { 2810 {
2888 "clicked":"itemview_item_nested_add_but_clicked" 2811 "clicked":"_itemview_item_nested_add_but_clicked_cb"
2889 } 2812 }
2890 }, 2813 },
2891 "itemview_add_separator_but": 2814 "itemview_add_separator_but":
@@ -2903,7 +2826,7 @@
2903 }, 2826 },
2904 "Callbacks": 2827 "Callbacks":
2905 { 2828 {
2906 "clicked":"itemview_separator_add_but_clicked" 2829 "clicked":"_itemview_separator_add_but_clicked_cb"
2907 } 2830 }
2908 }, 2831 },
2909 "itemview_del_item_but": 2832 "itemview_del_item_but":
@@ -2920,7 +2843,7 @@
2920 }, 2843 },
2921 "Callbacks": 2844 "Callbacks":
2922 { 2845 {
2923 "clicked":"itemview_item_del_but_clicked" 2846 "clicked":"_itemview_item_del_but_clicked_cb"
2924 } 2847 }
2925 } 2848 }
2926 } 2849 }
diff --git a/src/bin/egui_gui/egui_logic.c b/src/bin/egui_gui/egui_logic.c
index 836b25a..5d5825a 100644
--- a/src/bin/egui_gui/egui_logic.c
+++ b/src/bin/egui_gui/egui_logic.c
@@ -15,13 +15,18 @@
15#include "generator.h" 15#include "generator.h"
16#include "simulator.h" 16#include "simulator.h"
17#include "ffi_glue.h" 17#include "ffi_glue.h"
18#include "egui_logic_private.h"
19#include "target.h" 18#include "target.h"
20 19
21/*FIXME: remove this include */ 20/*FIXME: remove this include */
22#include "objtree.h" 21#include "objtree.h"
23 22
24static const Egui_Layout_Widgets *g; 23#include "egui_logic_private.h"
24#include "egui_logic.h"
25#include "settings_view.h"
26#include "rmview.h"
27
28static const Egui_Layout_Widgets *g_main_wdgs = NULL;
29static Egui_Layout_Fs_Win_Widgets *fs_win = NULL;
25 30
26static GuiLogicCbs *_guilogic_cbs = NULL; 31static GuiLogicCbs *_guilogic_cbs = NULL;
27 32
@@ -63,7 +68,7 @@ enum
63Eo * 68Eo *
64canvas_get() 69canvas_get()
65{ 70{
66 return g->main_win->main_win; 71 return g_main_wdgs->main_win->main_win;
67} 72}
68 73
69static void 74static void
@@ -116,7 +121,7 @@ _canvas_name_update(const Gui_Context *ctx)
116 if (!project_name) project_name = "untitled"; 121 if (!project_name) project_name = "untitled";
117 sprintf(name, "Erigo - %s", project_name); 122 sprintf(name, "Erigo - %s", project_name);
118 } 123 }
119 eo_do(g->main_win->main_win, elm_obj_win_title_set(name)); 124 eo_do(g_main_wdgs->main_win->main_win, elm_obj_win_title_set(name));
120} 125}
121 126
122static void 127static void
@@ -181,7 +186,7 @@ _on_fs_done(void *data, Evas_Object *obj EINA_UNUSED, void *event)
181 _menu_item_disabled_set(project_menu, ITEM_SAVE, EINA_FALSE); 186 _menu_item_disabled_set(project_menu, ITEM_SAVE, EINA_FALSE);
182 _menu_item_disabled_set(project_menu, ITEM_SAVEAS, EINA_FALSE); 187 _menu_item_disabled_set(project_menu, ITEM_SAVEAS, EINA_FALSE);
183 _menu_item_disabled_set(project_menu, ITEM_EXPORT, EINA_FALSE); 188 _menu_item_disabled_set(project_menu, ITEM_EXPORT, EINA_FALSE);
184 const char *project_name = eo_do(g->fs_win->fs_project_name_entry, elm_obj_widget_part_text_get(NULL)); 189 const char *project_name = eo_do(fs_win->fs_project_name_entry, elm_obj_widget_part_text_get(NULL));
185 if (!strlen(project_name)) project_name = "New Project"; 190 if (!strlen(project_name)) project_name = "New Project";
186 191
187 char *default_filename = strdup(project_name), *p; 192 char *default_filename = strdup(project_name), *p;
@@ -225,7 +230,7 @@ _on_fs_done(void *data, Evas_Object *obj EINA_UNUSED, void *event)
225 gui_context_export_filename_set((Gui_Context *) ctx, filename); 230 gui_context_export_filename_set((Gui_Context *) ctx, filename);
226 gui_context_export_path_set((Gui_Context *) ctx, (const char *) parent_dir); 231 gui_context_export_path_set((Gui_Context *) ctx, (const char *) parent_dir);
227 int state = -1; 232 int state = -1;
228 eo_do(g->fs_win->fs_radio_c, state = elm_obj_radio_value_get()); 233 eo_do(fs_win->fs_radio_c, state = elm_obj_radio_value_get());
229 switch (state) 234 switch (state)
230 { 235 {
231 case 0: 236 case 0:
@@ -259,7 +264,7 @@ _on_fs_done(void *data, Evas_Object *obj EINA_UNUSED, void *event)
259 free(parent_dir); 264 free(parent_dir);
260 265
261end: 266end:
262 eo_del(g->fs_win->fs_win); 267 eo_del(fs_win->fs_win);
263} 268}
264 269
265static void 270static void
@@ -268,30 +273,30 @@ _fs_mode_open(int fs_mode)
268 const char *fs_path = NULL, *fs_file = NULL; 273 const char *fs_path = NULL, *fs_file = NULL;
269 const Gui_Context *ctx = _active_context_get(); 274 const Gui_Context *ctx = _active_context_get();
270 275
271 egui_layout_fs_win_show(NULL, NULL, NULL, NULL); 276 fs_win = egui_layout_fs_win_create(g_main_wdgs->main_win->main_win);
272 277
273 eo_do(g->fs_win->fileselector, elm_interface_fileselector_folder_only_set(EINA_FALSE)); 278 eo_do(fs_win->fileselector, elm_interface_fileselector_folder_only_set(EINA_FALSE));
274 eo_do(g->fs_win->fileselector, elm_interface_fileselector_is_save_set(EINA_FALSE)); 279 eo_do(fs_win->fileselector, elm_interface_fileselector_is_save_set(EINA_FALSE));
275 switch (fs_mode) 280 switch (fs_mode)
276 { 281 {
277 case ITEM_EXPORT: 282 case ITEM_EXPORT:
278 { 283 {
279 eo_do(g->fs_win->fs_radio_box, evas_obj_visibility_set(EINA_TRUE)); 284 eo_do(fs_win->fs_radio_box, evas_obj_visibility_set(EINA_TRUE));
280 eo_do(g->fs_win->fileselector, elm_interface_fileselector_is_save_set(EINA_TRUE)); 285 eo_do(fs_win->fileselector, elm_interface_fileselector_is_save_set(EINA_TRUE));
281 fs_path = gui_context_export_path_get(ctx); 286 fs_path = gui_context_export_path_get(ctx);
282 fs_file = gui_context_export_filename_get(ctx); 287 fs_file = gui_context_export_filename_get(ctx);
283 break; 288 break;
284 } 289 }
285 case ITEM_NEW: 290 case ITEM_NEW:
286 { 291 {
287 eo_do(g->fs_win->fs_project_name_box, evas_obj_visibility_set(EINA_TRUE)); 292 eo_do(fs_win->fs_project_name_box, evas_obj_visibility_set(EINA_TRUE));
288 eo_do(g->fs_win->fileselector, elm_interface_fileselector_is_save_set(EINA_TRUE)); 293 eo_do(fs_win->fileselector, elm_interface_fileselector_is_save_set(EINA_TRUE));
289 eo_do(g->fs_win->fileselector, elm_interface_fileselector_folder_only_set(EINA_TRUE)); 294 eo_do(fs_win->fileselector, elm_interface_fileselector_folder_only_set(EINA_TRUE));
290 break; 295 break;
291 } 296 }
292 case ITEM_SAVEAS: 297 case ITEM_SAVEAS:
293 { 298 {
294 eo_do(g->fs_win->fileselector, elm_interface_fileselector_is_save_set(EINA_TRUE)); 299 eo_do(fs_win->fileselector, elm_interface_fileselector_is_save_set(EINA_TRUE));
295 fs_file = gui_context_project_filename_get(ctx); 300 fs_file = gui_context_project_filename_get(ctx);
296 fs_path = gui_context_project_path_get(ctx); 301 fs_path = gui_context_project_path_get(ctx);
297 break; 302 break;
@@ -317,7 +322,7 @@ _fs_mode_open(int fs_mode)
317 322
318 if (ecore_file_exists(full_path)) 323 if (ecore_file_exists(full_path))
319 { 324 {
320 eo_do(g->fs_win->fileselector, elm_interface_fileselector_selected_set(full_path)); 325 eo_do(fs_win->fileselector, elm_interface_fileselector_selected_set(full_path));
321 } 326 }
322 else 327 else
323 { 328 {
@@ -330,7 +335,7 @@ _fs_mode_open(int fs_mode)
330 if (ecore_file_exists(full_path2)) 335 if (ecore_file_exists(full_path2))
331 { 336 {
332 ecore_file_cp(full_path2, full_path); 337 ecore_file_cp(full_path2, full_path);
333 Eina_Bool res = eo_do(g->fs_win->fileselector, elm_interface_fileselector_selected_set(full_path)); 338 Eina_Bool res = eo_do(fs_win->fileselector, elm_interface_fileselector_selected_set(full_path));
334 if (res) 339 if (res)
335 ecore_file_remove(full_path); 340 ecore_file_remove(full_path);
336 } 341 }
@@ -339,9 +344,9 @@ _fs_mode_open(int fs_mode)
339 } 344 }
340 else 345 else
341 { 346 {
342 eo_do(g->fs_win->fileselector, elm_interface_fileselector_path_set(fs_path)); 347 eo_do(fs_win->fileselector, elm_interface_fileselector_path_set(fs_path));
343 } 348 }
344 evas_object_smart_callback_add(g->fs_win->fileselector, "done", _on_fs_done, (void *)(intptr_t) fs_mode); 349 evas_object_smart_callback_add(fs_win->fileselector, "done", _on_fs_done, (void *)(intptr_t) fs_mode);
345} 350}
346 351
347#if 0 352#if 0
@@ -378,7 +383,7 @@ _toggle_menu(Eo *menu)
378static void 383static void
379_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 384_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
380{ 385{
381 _toggle_menu(g->menu_box); 386 _toggle_menu(g_main_wdgs->menu_box);
382} 387}
383#endif 388#endif
384 389
@@ -450,12 +455,14 @@ _toolbar_item_sel_cb
450 } 455 }
451 case RSRC_MNGR: 456 case RSRC_MNGR:
452 { 457 {
453 egui_layout_rm_win_show(NULL, NULL, NULL, NULL); 458 rm_win_set(egui_layout_rm_win_create(g_main_wdgs->main_win->main_win));
459 rm_win_post_configure();
454 break; 460 break;
455 } 461 }
456 case SETTINGS_WIN: 462 case SETTINGS_WIN:
457 { 463 {
458 egui_layout_settings_win_show(NULL, NULL, NULL, NULL); 464 settings_win_set(egui_layout_settings_win_create(g_main_wdgs->main_win->main_win));
465 settings_win_post_configure();
459 break; 466 break;
460 } 467 }
461 case CTX_REFRESH: 468 case CTX_REFRESH:
@@ -545,7 +552,7 @@ _sub_wins_hide_show_cb(void *data, Evas_Object *_obj EINA_UNUSED, void *event_in
545 switch (action) 552 switch (action)
546 { 553 {
547 case FACTORY_VIEW: 554 case FACTORY_VIEW:
548 obj = g->main_win->fctr_table; 555 obj = g_main_wdgs->main_win->fctr_table;
549 break; 556 break;
550 case FACTORY_VIEW_SWITCH: 557 case FACTORY_VIEW_SWITCH:
551 { 558 {
@@ -554,13 +561,13 @@ _sub_wins_hide_show_cb(void *data, Evas_Object *_obj EINA_UNUSED, void *event_in
554 break; 561 break;
555 } 562 }
556 case SEQUENCE_VIEW: 563 case SEQUENCE_VIEW:
557 obj = g->main_win->sequences_box; 564 obj = g_main_wdgs->main_win->sequences_box;
558 break; 565 break;
559 case OBJTREE_VIEW: 566 case OBJTREE_VIEW:
560 obj = g->main_win->objtree_table; 567 obj = g_main_wdgs->main_win->objtree_table;
561 break; 568 break;
562 case PROPERTIES_VIEW: 569 case PROPERTIES_VIEW:
563 obj = g->main_win->propsview_table; 570 obj = g_main_wdgs->main_win->propsview_table;
564 break; 571 break;
565 default: 572 default:
566 return; 573 return;
@@ -574,16 +581,16 @@ _sub_wins_hide_show_cb(void *data, Evas_Object *_obj EINA_UNUSED, void *event_in
574 switch(action) 581 switch(action)
575 { 582 {
576 case FACTORY_VIEW: 583 case FACTORY_VIEW:
577 //eo_do(g->left_panel_box, elm_obj_box_pack_start(obj)); 584 //eo_do(g_main_wdgs->left_panel_box, elm_obj_box_pack_start(obj));
578 break; 585 break;
579 case SEQUENCE_VIEW: 586 case SEQUENCE_VIEW:
580 //eo_do(g->left_panel_box, elm_obj_box_pack_end(obj)); 587 //eo_do(g_main_wdgs->left_panel_box, elm_obj_box_pack_end(obj));
581 break; 588 break;
582 case OBJTREE_VIEW: 589 case OBJTREE_VIEW:
583 eo_do(g->main_win->right_panel_box, elm_obj_box_pack_start(obj)); 590 eo_do(g_main_wdgs->main_win->right_panel_box, elm_obj_box_pack_start(obj));
584 break; 591 break;
585 case PROPERTIES_VIEW: 592 case PROPERTIES_VIEW:
586 eo_do(g->main_win->right_panel_box, elm_obj_box_pack_end(obj)); 593 eo_do(g_main_wdgs->main_win->right_panel_box, elm_obj_box_pack_end(obj));
587 break; 594 break;
588 default: 595 default:
589 break; 596 break;
@@ -595,11 +602,11 @@ _sub_wins_hide_show_cb(void *data, Evas_Object *_obj EINA_UNUSED, void *event_in
595 { 602 {
596 case FACTORY_VIEW: 603 case FACTORY_VIEW:
597 case SEQUENCE_VIEW: 604 case SEQUENCE_VIEW:
598 //eo_do(g->left_panel_box, elm_obj_box_unpack(obj)); 605 //eo_do(g_main_wdgs->left_panel_box, elm_obj_box_unpack(obj));
599 break; 606 break;
600 case OBJTREE_VIEW: 607 case OBJTREE_VIEW:
601 case PROPERTIES_VIEW: 608 case PROPERTIES_VIEW:
602 eo_do(g->main_win->right_panel_box, elm_obj_box_unpack(obj)); 609 eo_do(g_main_wdgs->main_win->right_panel_box, elm_obj_box_unpack(obj));
603 break; 610 break;
604 default: 611 default:
605 break; 612 break;
@@ -718,7 +725,7 @@ _graphview_generate(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_
718Eina_Bool 725Eina_Bool
719_gvc_win_show_post_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 726_gvc_win_show_post_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
720{ 727{
721 eo_do(g->gvc_win->gvc_img, efl_file_set("/tmp/truc.png", NULL)); 728 eo_do(g_main_wdgs->gvc_win->gvc_img, efl_file_set("/tmp/truc.png", NULL));
722 return EO_CALLBACK_CONTINUE; 729 return EO_CALLBACK_CONTINUE;
723} 730}
724#else 731#else
@@ -775,7 +782,7 @@ _toolbar_simulate_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info
775 session = simulator_ctx_call(_active_context_get(), target_name_get(td)); 782 session = simulator_ctx_call(_active_context_get(), target_name_get(td));
776 if (session) 783 if (session)
777 { 784 {
778 Eo *menu = elm_toolbar_item_menu_get(g->main_win->toolbar_simulate_it); 785 Eo *menu = elm_toolbar_item_menu_get(g_main_wdgs->main_win->toolbar_simulate_it);
779 Elm_Object_Item *it = elm_menu_item_add(menu, NULL, NULL, target_name_get(td), NULL, NULL); 786 Elm_Object_Item *it = elm_menu_item_add(menu, NULL, NULL, target_name_get(td), NULL, NULL);
780 elm_menu_item_add(menu, it, NULL, "Kill", _toolbar_session_kill_cb, session); 787 elm_menu_item_add(menu, it, NULL, "Kill", _toolbar_session_kill_cb, session);
781 session_population_zero_cb_set(session, _population_zero_cb, it); 788 session_population_zero_cb_set(session, _population_zero_cb, it);
@@ -804,84 +811,84 @@ _factory_item_finalize(Eo *item_box, char *image_name, char *egui_class_name)
804static void 811static void
805_factory_vertical_pack(Eina_Bool vertical_pack) 812_factory_vertical_pack(Eina_Bool vertical_pack)
806{ 813{
807 elm_table_clear(g->main_win->fctr_table, EINA_FALSE); 814 elm_table_clear(g_main_wdgs->main_win->fctr_table, EINA_FALSE);
808 if (vertical_pack) 815 if (vertical_pack)
809 { 816 {
810 //elm_table_homogeneous_set(g->main_win->fctr_table, EINA_TRUE); 817 //elm_table_homogeneous_set(g_main_wdgs->main_win->fctr_table, EINA_TRUE);
811 evas_object_size_hint_align_set(g->main_win->fctr_table, 0.1, -1); 818 evas_object_size_hint_align_set(g_main_wdgs->main_win->fctr_table, 0.1, -1);
812 elm_table_padding_set(g->main_win->fctr_table, 6, 7); 819 elm_table_padding_set(g_main_wdgs->main_win->fctr_table, 6, 7);
813 820
814 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_win_it, 0, 0, 1, 1); 821 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_win_it, 0, 0, 1, 1);
815 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_bg_it, 0, 1, 1, 1); 822 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_bg_it, 0, 1, 1, 1);
816 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_box_it, 0, 2, 1, 1); 823 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_box_it, 0, 2, 1, 1);
817 824
818 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_button_it, 0, 3, 1, 1); 825 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_button_it, 0, 3, 1, 1);
819 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_label_it, 0, 4, 1, 1); 826 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_label_it, 0, 4, 1, 1);
820 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_check_it, 0, 5, 1, 1); 827 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_check_it, 0, 5, 1, 1);
821 828
822 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_radio_it, 0, 6, 1, 1); 829 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_radio_it, 0, 6, 1, 1);
823 830
824 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_icon_it, 0, 7, 1, 1); 831 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_icon_it, 0, 7, 1, 1);
825 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_image_it, 0, 8, 1, 1); 832 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_image_it, 0, 8, 1, 1);
826 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_actionslider_it, 0, 9, 1, 1); 833 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_actionslider_it, 0, 9, 1, 1);
827 834
828 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_clock_it, 0, 10, 1, 1); 835 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_clock_it, 0, 10, 1, 1);
829 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_dayselector_it, 0, 11, 1, 1); 836 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_dayselector_it, 0, 11, 1, 1);
830 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_calendar_it, 0, 12, 1, 1); 837 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_calendar_it, 0, 12, 1, 1);
831 838
832 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_bubble_it, 0, 13, 1, 1); 839 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_bubble_it, 0, 13, 1, 1);
833 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_colorselector_it, 0, 14, 1, 1); 840 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_colorselector_it, 0, 14, 1, 1);
834 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_entry_it, 0, 15, 1, 1); 841 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_entry_it, 0, 15, 1, 1);
835 842
836 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_flip_it, 0, 16, 1, 1); 843 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_flip_it, 0, 16, 1, 1);
837 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_genlist_it, 0, 17, 1, 1); 844 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_genlist_it, 0, 17, 1, 1);
838 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_gengrid_it, 0, 18, 1, 1); 845 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_gengrid_it, 0, 18, 1, 1);
839 846
840 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_table_it, 0, 19, 1, 1); 847 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_table_it, 0, 19, 1, 1);
841 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_menu_it, 0, 20, 1, 1); 848 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_menu_it, 0, 20, 1, 1);
842 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_diskselector_it, 0, 21, 1, 1); 849 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_diskselector_it, 0, 21, 1, 1);
843 850
844 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_ctxpopup_it, 0, 22, 1, 1); 851 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_ctxpopup_it, 0, 22, 1, 1);
845 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_toolbar_it, 0, 23, 1, 1); 852 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_toolbar_it, 0, 23, 1, 1);
846 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_layout_it, 0, 24, 1, 1); 853 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_layout_it, 0, 24, 1, 1);
847 } 854 }
848 else 855 else
849 { 856 {
850 elm_table_padding_set(g->main_win->fctr_table, 2, 2); 857 elm_table_padding_set(g_main_wdgs->main_win->fctr_table, 2, 2);
851 858
852 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_win_it, 0, 0, 1, 1); 859 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_win_it, 0, 0, 1, 1);
853 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_bg_it, 1, 0, 1, 1); 860 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_bg_it, 1, 0, 1, 1);
854 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_box_it, 2, 0, 1, 1); 861 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_box_it, 2, 0, 1, 1);
855 862
856 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_button_it, 0, 1, 1, 1); 863 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_button_it, 0, 1, 1, 1);
857 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_label_it, 1, 1, 1, 1); 864 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_label_it, 1, 1, 1, 1);
858 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_check_it, 2, 1, 1, 1); 865 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_check_it, 2, 1, 1, 1);
859 866
860 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_radio_it, 0, 2, 1, 1); 867 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_radio_it, 0, 2, 1, 1);
861 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_icon_it, 1, 2, 1, 1); 868 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_icon_it, 1, 2, 1, 1);
862 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_image_it, 2, 2, 1, 1); 869 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_image_it, 2, 2, 1, 1);
863 870
864 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_actionslider_it, 0, 3, 1, 1); 871 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_actionslider_it, 0, 3, 1, 1);
865 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_clock_it, 1, 3, 1, 1); 872 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_clock_it, 1, 3, 1, 1);
866 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_dayselector_it, 2, 3, 1, 1); 873 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_dayselector_it, 2, 3, 1, 1);
867 874
868 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_calendar_it, 0, 4, 1, 1); 875 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_calendar_it, 0, 4, 1, 1);
869 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_bubble_it, 1, 4, 1, 1); 876 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_bubble_it, 1, 4, 1, 1);
870 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_colorselector_it, 2, 4, 1, 1); 877 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_colorselector_it, 2, 4, 1, 1);
871 878
872 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_entry_it, 0, 5, 1, 1); 879 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_entry_it, 0, 5, 1, 1);
873 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_flip_it, 1, 5, 1, 1); 880 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_flip_it, 1, 5, 1, 1);
874 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_genlist_it, 2, 5, 1, 1); 881 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_genlist_it, 2, 5, 1, 1);
875 882
876 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_gengrid_it, 0, 6, 1, 1); 883 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_gengrid_it, 0, 6, 1, 1);
877 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_table_it, 1, 6, 1, 1); 884 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_table_it, 1, 6, 1, 1);
878 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_menu_it, 2, 6, 1, 1); 885 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_menu_it, 2, 6, 1, 1);
879 886
880 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_diskselector_it, 0, 7, 1, 1); 887 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_diskselector_it, 0, 7, 1, 1);
881 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_ctxpopup_it, 1, 7, 1, 1); 888 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_ctxpopup_it, 1, 7, 1, 1);
882 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_toolbar_it, 2, 7, 1, 1); 889 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_toolbar_it, 2, 7, 1, 1);
883 890
884 elm_table_pack(g->main_win->fctr_table, g->main_win->fctr_layout_it, 0, 8, 1, 1); 891 elm_table_pack(g_main_wdgs->main_win->fctr_table, g_main_wdgs->main_win->fctr_layout_it, 0, 8, 1, 1);
885 } 892 }
886} 893}
887 894
@@ -904,20 +911,20 @@ _canvas_bg_show_on_idle(void *data EINA_UNUSED)
904{ 911{
905 Evas_Coord cv_x, cv_y, cv_w, cv_h, tmp; 912 Evas_Coord cv_x, cv_y, cv_w, cv_h, tmp;
906 913
907 eo_do(g->main_win->left_panes, evas_obj_size_get(&cv_x, NULL)); 914 eo_do(g_main_wdgs->main_win->left_panes, evas_obj_size_get(&cv_x, NULL));
908 cv_x = (double)cv_x * elm_panes_content_left_size_get(g->main_win->left_panes); 915 cv_x = (double)cv_x * elm_panes_content_left_size_get(g_main_wdgs->main_win->left_panes);
909 cv_x += 7; 916 cv_x += 7;
910 917
911 eo_do(g->main_win->right_panes, evas_obj_position_get(&cv_w, NULL)); 918 eo_do(g_main_wdgs->main_win->right_panes, evas_obj_position_get(&cv_w, NULL));
912 eo_do(g->main_win->right_panes, evas_obj_size_get(&tmp, NULL)); 919 eo_do(g_main_wdgs->main_win->right_panes, evas_obj_size_get(&tmp, NULL));
913 tmp = (double)tmp * elm_panes_content_left_size_get(g->main_win->right_panes); 920 tmp = (double)tmp * elm_panes_content_left_size_get(g_main_wdgs->main_win->right_panes);
914 cv_w += tmp; 921 cv_w += tmp;
915 cv_w -= (cv_x + 7); 922 cv_w -= (cv_x + 7);
916 eo_do(g->main_win->toolbar, evas_obj_size_get(NULL, &cv_y)); 923 eo_do(g_main_wdgs->main_win->toolbar, evas_obj_size_get(NULL, &cv_y));
917 eo_do(g->main_win->main_win, evas_obj_size_get(NULL, &cv_h)); 924 eo_do(g_main_wdgs->main_win->main_win, evas_obj_size_get(NULL, &cv_h));
918 cv_h -= cv_y; 925 cv_h -= cv_y;
919 926
920 eo_do(g->main_win->canvas_bg, 927 eo_do(g_main_wdgs->main_win->canvas_bg,
921 evas_obj_position_set(cv_x, cv_y), 928 evas_obj_position_set(cv_x, cv_y),
922 evas_obj_size_set(cv_w, cv_h)); 929 evas_obj_size_set(cv_w, cv_h));
923 return ECORE_CALLBACK_RENEW; 930 return ECORE_CALLBACK_RENEW;
@@ -926,54 +933,54 @@ _canvas_bg_show_on_idle(void *data EINA_UNUSED)
926void 933void
927egui_start() 934egui_start()
928{ 935{
929 g = get_gui(); 936 g_main_wdgs = egui_layout_gui_get();
930 937
931 // Post-configuration 938 // Post-configuration
932 eo_do(g->main_win->main_win, elm_obj_win_maximized_set(EINA_TRUE)); 939 eo_do(g_main_wdgs->main_win->main_win, elm_obj_win_maximized_set(EINA_TRUE));
933 eo_do(evas_object_smart_parent_get(g->main_win->main_box), evas_obj_smart_member_add(g->main_win->canvas_bg)); 940 eo_do(evas_object_smart_parent_get(g_main_wdgs->main_win->main_box), evas_obj_smart_member_add(g_main_wdgs->main_win->canvas_bg));
934 eo_do(g->main_win->canvas_bg, evas_obj_stack_below(g->main_win->main_box)); 941 eo_do(g_main_wdgs->main_win->canvas_bg, evas_obj_stack_below(g_main_wdgs->main_win->main_box));
935 942
936 //Eo *mmenu; 943 //Eo *mmenu;
937 //eo_do(g->main_win->main_win, elm_obj_win_main_menu_get(&mmenu)); 944 //eo_do(g_main_wdgs->main_win->main_win, elm_obj_win_main_menu_get(&mmenu));
938 //eo_do(mmenu, elm_obj_menu_item_add(NULL, NULL, "OPEN", NULL, NULL, NULL)); 945 //eo_do(mmenu, elm_obj_menu_item_add(NULL, NULL, "OPEN", NULL, NULL, NULL));
939 946
940 Evas_Object *seq_rect = evas_object_rectangle_add(evas_object_evas_get(g->main_win->seq_table)); 947 Evas_Object *seq_rect = evas_object_rectangle_add(evas_object_evas_get(g_main_wdgs->main_win->seq_table));
941 evas_object_size_hint_min_set(seq_rect, 200, 1); 948 evas_object_size_hint_min_set(seq_rect, 200, 1);
942 evas_object_size_hint_weight_set(seq_rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 949 evas_object_size_hint_weight_set(seq_rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
943 evas_object_size_hint_align_set(seq_rect, EVAS_HINT_FILL, EVAS_HINT_FILL); 950 evas_object_size_hint_align_set(seq_rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
944 elm_table_pack(g->main_win->seq_table, seq_rect, 0, 0, 1, 1); 951 elm_table_pack(g_main_wdgs->main_win->seq_table, seq_rect, 0, 0, 1, 1);
945 952
946 Evas_Object *objtree_rect = evas_object_rectangle_add(evas_object_evas_get(g->main_win->objtree_table)); 953 Evas_Object *objtree_rect = evas_object_rectangle_add(evas_object_evas_get(g_main_wdgs->main_win->objtree_table));
947 evas_object_size_hint_min_set(objtree_rect, 300, 100); 954 evas_object_size_hint_min_set(objtree_rect, 300, 100);
948 evas_object_size_hint_weight_set(objtree_rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 955 evas_object_size_hint_weight_set(objtree_rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
949 evas_object_size_hint_align_set(objtree_rect, EVAS_HINT_FILL, EVAS_HINT_FILL); 956 evas_object_size_hint_align_set(objtree_rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
950 elm_table_pack(g->main_win->objtree_table, objtree_rect, 0, 1, 1, 1); 957 elm_table_pack(g_main_wdgs->main_win->objtree_table, objtree_rect, 0, 1, 1, 1);
951 958
952 Evas_Object *propsview_rect = evas_object_rectangle_add(evas_object_evas_get(g->main_win->propsview_table)); 959 Evas_Object *propsview_rect = evas_object_rectangle_add(evas_object_evas_get(g_main_wdgs->main_win->propsview_table));
953 evas_object_size_hint_min_set(propsview_rect, 300, 100); 960 evas_object_size_hint_min_set(propsview_rect, 300, 100);
954 evas_object_size_hint_weight_set(propsview_rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 961 evas_object_size_hint_weight_set(propsview_rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
955 evas_object_size_hint_align_set(propsview_rect, EVAS_HINT_FILL, EVAS_HINT_FILL); 962 evas_object_size_hint_align_set(propsview_rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
956 elm_table_pack(g->main_win->propsview_table, propsview_rect, 0, 2, 1, 1); 963 elm_table_pack(g_main_wdgs->main_win->propsview_table, propsview_rect, 0, 2, 1, 1);
957 964
958 editor_init(guilogic_cbs_get()); 965 editor_init(guilogic_cbs_get());
959 966
960 evas_object_smart_callback_add(g->main_win->objtree_filter_entry, "changed,user", _entry_changed_cb, NULL); 967 evas_object_smart_callback_add(g_main_wdgs->main_win->objtree_filter_entry, "changed,user", _entry_changed_cb, NULL);
961 //elm_object_event_callback_add(g->main_win->main_win, _event, NULL); 968 //elm_object_event_callback_add(g_main_wdgs->main_win->main_win, _event, NULL);
962 969
963 /*Adding resizing to canvas frame*/ 970 /*Adding resizing to canvas frame*/
964 /* 971 /*
965 evas_object_event_callback_add(g->canvas_fr, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_ui, NULL); 972 evas_object_event_callback_add(g_main_wdgs->canvas_fr, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_ui, NULL);
966 eo_do(g->canvas_fr, eo_event_callback_add(EVAS_OBJECT_EVENT_MOUSE_UP, _mouse_up_ui, NULL)); 973 eo_do(g_main_wdgs->canvas_fr, eo_event_callback_add(EVAS_OBJECT_EVENT_MOUSE_UP, _mouse_up_ui, NULL));
967 */ 974 */
968 975
969 _idle_enterer = ecore_idle_enterer_add(_canvas_bg_show_on_idle, NULL); 976 _idle_enterer = ecore_idle_enterer_add(_canvas_bg_show_on_idle, NULL);
970 /* Toolbar */ 977 /* Toolbar */
971 Eo *menu; 978 Eo *menu;
972 elm_toolbar_item_selected_set(g->main_win->toolbar_project_it, EINA_FALSE); 979 elm_toolbar_item_selected_set(g_main_wdgs->main_win->toolbar_project_it, EINA_FALSE);
973 elm_toolbar_item_menu_set(g->main_win->toolbar_project_it, EINA_TRUE); 980 elm_toolbar_item_menu_set(g_main_wdgs->main_win->toolbar_project_it, EINA_TRUE);
974 elm_toolbar_item_priority_set(g->main_win->toolbar_project_it, -9999); 981 elm_toolbar_item_priority_set(g_main_wdgs->main_win->toolbar_project_it, -9999);
975 elm_toolbar_menu_parent_set(g->main_win->toolbar, g->main_win->main_win); 982 elm_toolbar_menu_parent_set(g_main_wdgs->main_win->toolbar, g_main_wdgs->main_win->main_win);
976 menu = elm_toolbar_item_menu_get(g->main_win->toolbar_project_it); 983 menu = elm_toolbar_item_menu_get(g_main_wdgs->main_win->toolbar_project_it);
977 project_menu = menu; 984 project_menu = menu;
978 985
979 Elm_Object_Item *it; 986 Elm_Object_Item *it;
@@ -994,24 +1001,24 @@ egui_start()
994 elm_object_item_data_set(it, (void *) ITEM_CLOSE); 1001 elm_object_item_data_set(it, (void *) ITEM_CLOSE);
995 elm_object_item_disabled_set(it, EINA_TRUE); 1002 elm_object_item_disabled_set(it, EINA_TRUE);
996 1003
997 elm_toolbar_item_separator_set(g->main_win->toolbar_separator1_it, EINA_TRUE); 1004 elm_toolbar_item_separator_set(g_main_wdgs->main_win->toolbar_separator1_it, EINA_TRUE);
998 1005
999 elm_object_item_data_set(g->main_win->toolbar_rm_it, (void *) (intptr_t) RSRC_MNGR); 1006 elm_object_item_data_set(g_main_wdgs->main_win->toolbar_rm_it, (void *) (intptr_t) RSRC_MNGR);
1000 elm_object_item_data_set(g->main_win->toolbar_settings_it, (void *) (intptr_t) SETTINGS_WIN); 1007 elm_object_item_data_set(g_main_wdgs->main_win->toolbar_settings_it, (void *) (intptr_t) SETTINGS_WIN);
1001 1008
1002 elm_toolbar_item_separator_set(g->main_win->toolbar_separator2_it, EINA_TRUE); 1009 elm_toolbar_item_separator_set(g_main_wdgs->main_win->toolbar_separator2_it, EINA_TRUE);
1003 1010
1004 elm_object_item_data_set(g->main_win->toolbar_undo_it, (void *) (intptr_t) CTX_UNDO); 1011 elm_object_item_data_set(g_main_wdgs->main_win->toolbar_undo_it, (void *) (intptr_t) CTX_UNDO);
1005 elm_object_item_disabled_set(g->main_win->toolbar_undo_it, EINA_TRUE); 1012 elm_object_item_disabled_set(g_main_wdgs->main_win->toolbar_undo_it, EINA_TRUE);
1006 elm_object_item_data_set(g->main_win->toolbar_redo_it, (void *) (intptr_t) CTX_REDO); 1013 elm_object_item_data_set(g_main_wdgs->main_win->toolbar_redo_it, (void *) (intptr_t) CTX_REDO);
1007 elm_object_item_disabled_set(g->main_win->toolbar_redo_it, EINA_TRUE); 1014 elm_object_item_disabled_set(g_main_wdgs->main_win->toolbar_redo_it, EINA_TRUE);
1008 elm_object_item_data_set(g->main_win->toolbar_reload_it, (void *) (intptr_t) CTX_REFRESH); 1015 elm_object_item_data_set(g_main_wdgs->main_win->toolbar_reload_it, (void *) (intptr_t) CTX_REFRESH);
1009 elm_object_item_data_set(g->main_win->toolbar_delete_it, (void *) (intptr_t) WDG_DELETE); 1016 elm_object_item_data_set(g_main_wdgs->main_win->toolbar_delete_it, (void *) (intptr_t) WDG_DELETE);
1010 1017
1011 elm_toolbar_item_menu_set(g->main_win->toolbar_view_it, EINA_TRUE); 1018 elm_toolbar_item_menu_set(g_main_wdgs->main_win->toolbar_view_it, EINA_TRUE);
1012 elm_toolbar_item_priority_set(g->main_win->toolbar_view_it, -9999); 1019 elm_toolbar_item_priority_set(g_main_wdgs->main_win->toolbar_view_it, -9999);
1013 1020
1014 menu = elm_toolbar_item_menu_get(g->main_win->toolbar_view_it); 1021 menu = elm_toolbar_item_menu_get(g_main_wdgs->main_win->toolbar_view_it);
1015 it = elm_menu_item_add(menu, NULL, "window-new", "Factory show/hide", _sub_wins_hide_show_cb,(void *) (intptr_t) FACTORY_VIEW); 1022 it = elm_menu_item_add(menu, NULL, "window-new", "Factory show/hide", _sub_wins_hide_show_cb,(void *) (intptr_t) FACTORY_VIEW);
1016 elm_object_item_disabled_set(it, EINA_TRUE); 1023 elm_object_item_disabled_set(it, EINA_TRUE);
1017 it = elm_menu_item_add(menu, NULL, "window-new", "Factory vert/hor", _sub_wins_hide_show_cb,(void *) (intptr_t) FACTORY_VIEW_SWITCH); 1024 it = elm_menu_item_add(menu, NULL, "window-new", "Factory vert/hor", _sub_wins_hide_show_cb,(void *) (intptr_t) FACTORY_VIEW_SWITCH);
@@ -1022,10 +1029,10 @@ egui_start()
1022 it = elm_menu_item_add(menu, NULL, "window-new", "Properties", _sub_wins_hide_show_cb,(void *) (intptr_t) PROPERTIES_VIEW); 1029 it = elm_menu_item_add(menu, NULL, "window-new", "Properties", _sub_wins_hide_show_cb,(void *) (intptr_t) PROPERTIES_VIEW);
1023 elm_object_item_disabled_set(it, EINA_TRUE); 1030 elm_object_item_disabled_set(it, EINA_TRUE);
1024 1031
1025 elm_toolbar_item_selected_set(g->main_win->toolbar_simulate_it, EINA_FALSE); 1032 elm_toolbar_item_selected_set(g_main_wdgs->main_win->toolbar_simulate_it, EINA_FALSE);
1026 elm_toolbar_item_priority_set(g->main_win->toolbar_simulate_it, -9999); 1033 elm_toolbar_item_priority_set(g_main_wdgs->main_win->toolbar_simulate_it, -9999);
1027 elm_toolbar_item_menu_set(g->main_win->toolbar_simulate_it, EINA_TRUE); 1034 elm_toolbar_item_menu_set(g_main_wdgs->main_win->toolbar_simulate_it, EINA_TRUE);
1028 menu = elm_toolbar_item_menu_get(g->main_win->toolbar_simulate_it); 1035 menu = elm_toolbar_item_menu_get(g_main_wdgs->main_win->toolbar_simulate_it);
1029 it = elm_menu_item_add(menu, NULL, NULL, "Create a new session...", NULL, NULL); 1036 it = elm_menu_item_add(menu, NULL, NULL, "Create a new session...", NULL, NULL);
1030 { 1037 {
1031 Eina_List *itr; 1038 Eina_List *itr;
@@ -1038,37 +1045,37 @@ egui_start()
1038 1045
1039 /* Disable GraphViz item if library not installed. */ 1046 /* Disable GraphViz item if library not installed. */
1040#ifndef HAVE_GRAPHVIZ 1047#ifndef HAVE_GRAPHVIZ
1041 elm_object_item_disabled_set(g->main_win->toolbar_graph_it, EINA_TRUE); 1048 elm_object_item_disabled_set(g_main_wdgs->main_win->toolbar_graph_it, EINA_TRUE);
1042#endif 1049#endif
1043 1050
1044 _factory_item_finalize(g->main_win->fctr_actionslider_it, "factory_actionslider.png", DB_DEF_ACTIONSLIDER_CLASS); 1051 _factory_item_finalize(g_main_wdgs->main_win->fctr_actionslider_it, "factory_actionslider.png", DB_DEF_ACTIONSLIDER_CLASS);
1045 _factory_item_finalize(g->main_win->fctr_bg_it, "factory_bg.png", DB_DEF_BG_CLASS); 1052 _factory_item_finalize(g_main_wdgs->main_win->fctr_bg_it, "factory_bg.png", DB_DEF_BG_CLASS);
1046 _factory_item_finalize(g->main_win->fctr_box_it, "factory_box.png", DB_DEF_BOX_CLASS); 1053 _factory_item_finalize(g_main_wdgs->main_win->fctr_box_it, "factory_box.png", DB_DEF_BOX_CLASS);
1047 _factory_item_finalize(g->main_win->fctr_bubble_it, "factory_bubble.png", DB_DEF_BUBBLE_CLASS); 1054 _factory_item_finalize(g_main_wdgs->main_win->fctr_bubble_it, "factory_bubble.png", DB_DEF_BUBBLE_CLASS);
1048 _factory_item_finalize(g->main_win->fctr_button_it, "factory_button.png", DB_DEF_BUTTON_CLASS); 1055 _factory_item_finalize(g_main_wdgs->main_win->fctr_button_it, "factory_button.png", DB_DEF_BUTTON_CLASS);
1049 _factory_item_finalize(g->main_win->fctr_calendar_it, "factory_calendar.png", DB_DEF_CALENDAR_CLASS); 1056 _factory_item_finalize(g_main_wdgs->main_win->fctr_calendar_it, "factory_calendar.png", DB_DEF_CALENDAR_CLASS);
1050 _factory_item_finalize(g->main_win->fctr_check_it, "factory_check.png", DB_DEF_CHECK_CLASS); 1057 _factory_item_finalize(g_main_wdgs->main_win->fctr_check_it, "factory_check.png", DB_DEF_CHECK_CLASS);
1051 _factory_item_finalize(g->main_win->fctr_radio_it, "factory_radio.png", DB_DEF_RADIO_CLASS); 1058 _factory_item_finalize(g_main_wdgs->main_win->fctr_radio_it, "factory_radio.png", DB_DEF_RADIO_CLASS);
1052 _factory_item_finalize(g->main_win->fctr_clock_it, "factory_clock.png", DB_DEF_CLOCK_CLASS); 1059 _factory_item_finalize(g_main_wdgs->main_win->fctr_clock_it, "factory_clock.png", DB_DEF_CLOCK_CLASS);
1053 _factory_item_finalize(g->main_win->fctr_colorselector_it, "factory_colorselector.png", DB_DEF_COLORSELECTOR_CLASS); 1060 _factory_item_finalize(g_main_wdgs->main_win->fctr_colorselector_it, "factory_colorselector.png", DB_DEF_COLORSELECTOR_CLASS);
1054 _factory_item_finalize(g->main_win->fctr_dayselector_it, "factory_dayselector.png", DB_DEF_DAYSELECTOR_CLASS); 1061 _factory_item_finalize(g_main_wdgs->main_win->fctr_dayselector_it, "factory_dayselector.png", DB_DEF_DAYSELECTOR_CLASS);
1055 _factory_item_finalize(g->main_win->fctr_image_it, "factory_image.png", DB_DEF_IMAGE_CLASS); 1062 _factory_item_finalize(g_main_wdgs->main_win->fctr_image_it, "factory_image.png", DB_DEF_IMAGE_CLASS);
1056 _factory_item_finalize(g->main_win->fctr_icon_it, "factory_icon.png", DB_DEF_ICON_CLASS); 1063 _factory_item_finalize(g_main_wdgs->main_win->fctr_icon_it, "factory_icon.png", DB_DEF_ICON_CLASS);
1057 _factory_item_finalize(g->main_win->fctr_label_it, "factory_label.png", DB_DEF_LABEL_CLASS); 1064 _factory_item_finalize(g_main_wdgs->main_win->fctr_label_it, "factory_label.png", DB_DEF_LABEL_CLASS);
1058 _factory_item_finalize(g->main_win->fctr_win_it, "factory_win.png", DB_DEF_WIN_CLASS); 1065 _factory_item_finalize(g_main_wdgs->main_win->fctr_win_it, "factory_win.png", DB_DEF_WIN_CLASS);
1059 _factory_item_finalize(g->main_win->fctr_entry_it, "factory_entry.png", DB_DEF_ENTRY_CLASS); 1066 _factory_item_finalize(g_main_wdgs->main_win->fctr_entry_it, "factory_entry.png", DB_DEF_ENTRY_CLASS);
1060 _factory_item_finalize(g->main_win->fctr_flip_it, "factory_flip.png", DB_DEF_FLIP_CLASS); 1067 _factory_item_finalize(g_main_wdgs->main_win->fctr_flip_it, "factory_flip.png", DB_DEF_FLIP_CLASS);
1061 _factory_item_finalize(g->main_win->fctr_genlist_it, "factory_genlist.png", DB_DEF_GENLIST_CLASS); 1068 _factory_item_finalize(g_main_wdgs->main_win->fctr_genlist_it, "factory_genlist.png", DB_DEF_GENLIST_CLASS);
1062 _factory_item_finalize(g->main_win->fctr_gengrid_it, "factory_gengrid.png", DB_DEF_GENGRID_CLASS); 1069 _factory_item_finalize(g_main_wdgs->main_win->fctr_gengrid_it, "factory_gengrid.png", DB_DEF_GENGRID_CLASS);
1063 _factory_item_finalize(g->main_win->fctr_table_it, "factory_table.png", DB_DEF_TABLE_CLASS); 1070 _factory_item_finalize(g_main_wdgs->main_win->fctr_table_it, "factory_table.png", DB_DEF_TABLE_CLASS);
1064 _factory_item_finalize(g->main_win->fctr_menu_it, "factory_menu.png", DB_DEF_MENU_CLASS); 1071 _factory_item_finalize(g_main_wdgs->main_win->fctr_menu_it, "factory_menu.png", DB_DEF_MENU_CLASS);
1065 _factory_item_finalize(g->main_win->fctr_diskselector_it, "factory_diskselector.png", DB_DEF_DISKSELECTOR_CLASS); 1072 _factory_item_finalize(g_main_wdgs->main_win->fctr_diskselector_it, "factory_diskselector.png", DB_DEF_DISKSELECTOR_CLASS);
1066 _factory_item_finalize(g->main_win->fctr_ctxpopup_it, "factory_ctxpopup.png", DB_DEF_CTXPOPUP_CLASS); 1073 _factory_item_finalize(g_main_wdgs->main_win->fctr_ctxpopup_it, "factory_ctxpopup.png", DB_DEF_CTXPOPUP_CLASS);
1067 _factory_item_finalize(g->main_win->fctr_toolbar_it, "factory_toolbar.png", DB_DEF_TOOLBAR_CLASS); 1074 _factory_item_finalize(g_main_wdgs->main_win->fctr_toolbar_it, "factory_toolbar.png", DB_DEF_TOOLBAR_CLASS);
1068 _factory_item_finalize(g->main_win->fctr_layout_it, "factory_layout.png", DB_DEF_LAYOUT_CLASS); 1075 _factory_item_finalize(g_main_wdgs->main_win->fctr_layout_it, "factory_layout.png", DB_DEF_LAYOUT_CLASS);
1069 1076
1070 /*FIXME: Need to unpack inline image, so pass it into delete callback*/ 1077 /*FIXME: Need to unpack inline image, so pass it into delete callback*/
1071 evas_object_smart_callback_add(g->main_win->main_win, "delete,request", _main_win_del_cb, NULL); 1078 evas_object_smart_callback_add(g_main_wdgs->main_win->main_win, "delete,request", _main_win_del_cb, NULL);
1072} 1079}
1073 1080
1074void 1081void
diff --git a/src/bin/egui_gui/egui_logic.h b/src/bin/egui_gui/egui_logic.h
index bf89e1f..b363d72 100644
--- a/src/bin/egui_gui/egui_logic.h
+++ b/src/bin/egui_gui/egui_logic.h
@@ -2,6 +2,8 @@
2#ifndef _egui_logic_h 2#ifndef _egui_logic_h
3#define _egui_logic_h 3#define _egui_logic_h
4 4
5#include "egui_layout.h"
6
5void egui_start(); 7void egui_start();
6void egui_stop(); 8void egui_stop();
7 9
diff --git a/src/bin/egui_gui/egui_logic_private.h b/src/bin/egui_gui/egui_logic_private.h
index bf978ae..2e48332 100644
--- a/src/bin/egui_gui/egui_logic_private.h
+++ b/src/bin/egui_gui/egui_logic_private.h
@@ -5,8 +5,6 @@
5#include "egui_layout.h" 5#include "egui_layout.h"
6#include "seqview.h" 6#include "seqview.h"
7 7
8#define get_gui egui_layout_gui_get
9
10typedef struct 8typedef struct
11{ 9{
12 Eina_Bool (*_editor_undo)(const Gui_Context *ctx); 10 Eina_Bool (*_editor_undo)(const Gui_Context *ctx);
diff --git a/src/bin/egui_gui/propview.c b/src/bin/egui_gui/propview.c
index f9620b9..e05a0b0 100644
--- a/src/bin/egui_gui/propview.c
+++ b/src/bin/egui_gui/propview.c
@@ -336,7 +336,7 @@ _cb_sequence_modify(void *data, Eo *obj, const Eo_Event_Description *desc EINA_U
336 dep_data_cb_set(dep_data, new_cb); 336 dep_data_cb_set(dep_data, new_cb);
337 } 337 }
338 gui_context_memento_add(ctx, memento); 338 gui_context_memento_add(ctx, memento);
339 Egui_Layout_Widgets *g = get_gui(); 339 Egui_Layout_Widgets *g = egui_layout_gui_get();
340 elm_object_item_disabled_set(g->main_win->toolbar_redo_it, EINA_TRUE); 340 elm_object_item_disabled_set(g->main_win->toolbar_redo_it, EINA_TRUE);
341 elm_object_item_disabled_set(g->main_win->toolbar_undo_it, EINA_FALSE); 341 elm_object_item_disabled_set(g->main_win->toolbar_undo_it, EINA_FALSE);
342 342
@@ -616,7 +616,7 @@ PropViewCbs *propview_cbs_get()
616static const char* 616static const char*
617_filter_string_get() 617_filter_string_get()
618{ 618{
619 Egui_Layout_Widgets *g = get_gui(); 619 Egui_Layout_Widgets *g = egui_layout_gui_get();
620 const char *str = elm_entry_entry_get(g->main_win->propsview_filter_entry); 620 const char *str = elm_entry_entry_get(g->main_win->propsview_filter_entry);
621 //Trim from left 621 //Trim from left
622 while (*str == ' ') str++; 622 while (*str == ' ') str++;
@@ -1226,7 +1226,7 @@ _callbacks_build(const Gui_Widget *wdg)
1226static void 1226static void
1227_propview_build_post_cb(const Gui_Widget *wdg, It_Data_Type new_type) 1227_propview_build_post_cb(const Gui_Widget *wdg, It_Data_Type new_type)
1228{ 1228{
1229 Egui_Layout_Widgets *g = get_gui(); 1229 Egui_Layout_Widgets *g = egui_layout_gui_get();
1230 /* Unsetting view according to old selected toolbar's item. */ 1230 /* Unsetting view according to old selected toolbar's item. */
1231 switch (_propsview_toolbar_selected_item_type) 1231 switch (_propsview_toolbar_selected_item_type)
1232 { 1232 {
@@ -1456,7 +1456,7 @@ void
1456propsview_view_switch(It_Data_Type type) 1456propsview_view_switch(It_Data_Type type)
1457{ 1457{
1458 Elm_Object_Item *it; 1458 Elm_Object_Item *it;
1459 Egui_Layout_Widgets *g = get_gui(); 1459 Egui_Layout_Widgets *g = egui_layout_gui_get();
1460 switch (type) 1460 switch (type)
1461 { 1461 {
1462 case PROPERTY_TYPE: 1462 case PROPERTY_TYPE:
@@ -1520,7 +1520,7 @@ _selected_callback_move(int dir)
1520 wdg_cb_container_unset((Gui_Widget *) wdg); 1520 wdg_cb_container_unset((Gui_Widget *) wdg);
1521 wdg_cb_container_set((Gui_Widget *) wdg, cc_new); 1521 wdg_cb_container_set((Gui_Widget *) wdg, cc_new);
1522 1522
1523 Egui_Layout_Widgets *g = get_gui(); 1523 Egui_Layout_Widgets *g = egui_layout_gui_get();
1524 elm_object_item_disabled_set(g->main_win->toolbar_redo_it, EINA_TRUE); 1524 elm_object_item_disabled_set(g->main_win->toolbar_redo_it, EINA_TRUE);
1525 elm_object_item_disabled_set(g->main_win->toolbar_undo_it, EINA_FALSE); 1525 elm_object_item_disabled_set(g->main_win->toolbar_undo_it, EINA_FALSE);
1526 1526
@@ -1574,7 +1574,7 @@ _callbacksview_del_btn_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, cons
1574 wdg_cb_container_unset((Gui_Widget *) wdg); 1574 wdg_cb_container_unset((Gui_Widget *) wdg);
1575 wdg_cb_container_set((Gui_Widget *) wdg, cc_new); 1575 wdg_cb_container_set((Gui_Widget *) wdg, cc_new);
1576 1576
1577 Egui_Layout_Widgets *g = get_gui(); 1577 Egui_Layout_Widgets *g = egui_layout_gui_get();
1578 elm_object_item_disabled_set(g->main_win->toolbar_redo_it, EINA_TRUE); 1578 elm_object_item_disabled_set(g->main_win->toolbar_redo_it, EINA_TRUE);
1579 elm_object_item_disabled_set(g->main_win->toolbar_undo_it, EINA_FALSE); 1579 elm_object_item_disabled_set(g->main_win->toolbar_undo_it, EINA_FALSE);
1580 } 1580 }
diff --git a/src/bin/egui_gui/rmview.c b/src/bin/egui_gui/rmview.c
index 68fa102..5a2a450 100644
--- a/src/bin/egui_gui/rmview.c
+++ b/src/bin/egui_gui/rmview.c
@@ -22,10 +22,17 @@
22#define EVAS_CALLBACK_STR "EVAS_CALLBACK" 22#define EVAS_CALLBACK_STR "EVAS_CALLBACK"
23#define EVAS_SMART_CALLBACK_STR "EVAS_SMART_CALLBACK" 23#define EVAS_SMART_CALLBACK_STR "EVAS_SMART_CALLBACK"
24 24
25static Egui_Layout_Widgets *g;
26/* currently selected toolbar item */ 25/* currently selected toolbar item */
27static Rmview_Resource_Type _rmview_toolbar_selected_type = RMVIEW_NOT_SELECTED; 26static Rmview_Resource_Type _rmview_toolbar_selected_type = RMVIEW_NOT_SELECTED;
28 27
28static Egui_Layout_Rm_Win_Widgets *g_rm_win = NULL;
29
30void rm_win_set(Egui_Layout_Rm_Win_Widgets *rm_win)
31{
32 if (g_rm_win) free(g_rm_win);
33 g_rm_win = rm_win;
34}
35
29static void 36static void
30_rmview_build(Rmview_Resource_Type type); 37_rmview_build(Rmview_Resource_Type type);
31 38
@@ -443,7 +450,7 @@ _rmview_build(Rmview_Resource_Type type)
443 Eo *label, *en, *bt, *icon; 450 Eo *label, *en, *bt, *icon;
444 const char *header1 = NULL, *header2 = NULL; 451 const char *header1 = NULL, *header2 = NULL;
445 Gui_Resource_Type type_start, type_end, type_itr; 452 Gui_Resource_Type type_start, type_end, type_itr;
446 eo_do(g->rm_win->rm_table, elm_obj_table_clear(EINA_TRUE)); 453 eo_do(g_rm_win->rm_table, elm_obj_table_clear(EINA_TRUE));
447 454
448 switch (type) 455 switch (type)
449 { 456 {
@@ -493,11 +500,11 @@ _rmview_build(Rmview_Resource_Type type)
493 break; 500 break;
494 } 501 }
495 } 502 }
496 label = _rmview_label_add(g->rm_win->rm_table, header1); 503 label = _rmview_label_add(g_rm_win->rm_table, header1);
497 eo_do(g->rm_win->rm_table, elm_obj_table_pack(label, 0, 0, 1, 1)); 504 eo_do(g_rm_win->rm_table, elm_obj_table_pack(label, 0, 0, 1, 1));
498 505
499 label = _rmview_label_add(g->rm_win->rm_table, header2); 506 label = _rmview_label_add(g_rm_win->rm_table, header2);
500 eo_do(g->rm_win->rm_table, elm_obj_table_pack(label, 1, 0, 1, 1)); 507 eo_do(g_rm_win->rm_table, elm_obj_table_pack(label, 1, 0, 1, 1));
501 508
502 Eina_List *itr; 509 Eina_List *itr;
503 Dep_Id *res_id; 510 Dep_Id *res_id;
@@ -522,9 +529,9 @@ _rmview_build(Rmview_Resource_Type type)
522 Rmview_Item_Data *it_data = calloc(1, sizeof(Rmview_Item_Data)); 529 Rmview_Item_Data *it_data = calloc(1, sizeof(Rmview_Item_Data));
523 it_data->res = (Gui_Resource *)res; 530 it_data->res = (Gui_Resource *)res;
524 531
525 en = _rmview_entry_add(g->rm_win->rm_table,res_name); 532 en = _rmview_entry_add(g_rm_win->rm_table,res_name);
526 it_data->en1 = en; 533 it_data->en1 = en;
527 eo_do(g->rm_win->rm_table, elm_obj_table_pack(en, table_col++, table_line, 1, 1)); 534 eo_do(g_rm_win->rm_table, elm_obj_table_pack(en, table_col++, table_line, 1, 1));
528 data = RMVIEW_FIELD_DATA_BUILD(0, it_data); 535 data = RMVIEW_FIELD_DATA_BUILD(0, it_data);
529 536
530 eo_do(en, eo_key_data_set(_STR_RMVIEW, data, _field_data_free)); 537 eo_do(en, eo_key_data_set(_STR_RMVIEW, data, _field_data_free));
@@ -535,9 +542,9 @@ _rmview_build(Rmview_Resource_Type type)
535 /* Add fields specific to CALLBACKs */ 542 /* Add fields specific to CALLBACKs */
536 case RESOURCE_EO_CALLBACK: 543 case RESOURCE_EO_CALLBACK:
537 { 544 {
538 en = _rmview_entry_add(g->rm_win->rm_table, value); 545 en = _rmview_entry_add(g_rm_win->rm_table, value);
539 it_data->en2 = en; 546 it_data->en2 = en;
540 eo_do(g->rm_win->rm_table, elm_obj_table_pack(en, table_col++, table_line, 1, 1)); 547 eo_do(g_rm_win->rm_table, elm_obj_table_pack(en, table_col++, table_line, 1, 1));
541 data = RMVIEW_FIELD_DATA_BUILD(1, it_data); 548 data = RMVIEW_FIELD_DATA_BUILD(1, it_data);
542 eo_do(en, eo_key_data_set(_STR_RMVIEW, data, _field_data_free)); 549 eo_do(en, eo_key_data_set(_STR_RMVIEW, data, _field_data_free));
543 eo_do(en, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _res_changed, NULL)); 550 eo_do(en, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _res_changed, NULL));
@@ -546,11 +553,11 @@ _rmview_build(Rmview_Resource_Type type)
546 /* Add field (fileselector entry) specific to IMAGE */ 553 /* Add field (fileselector entry) specific to IMAGE */
547 case RESOURCE_IMAGE: 554 case RESOURCE_IMAGE:
548 { 555 {
549 en = _rmview_fs_entry_add(g->rm_win->rm_table, "..."); 556 en = _rmview_fs_entry_add(g_rm_win->rm_table, "...");
550 eo_do(en, elm_interface_fileselector_path_set(value)); 557 eo_do(en, elm_interface_fileselector_path_set(value));
551 558
552 it_data->en2 = en; 559 it_data->en2 = en;
553 eo_do(g->rm_win->rm_table, elm_obj_table_pack(en, table_col++, table_line, 1, 1)); 560 eo_do(g_rm_win->rm_table, elm_obj_table_pack(en, table_col++, table_line, 1, 1));
554 data = RMVIEW_FIELD_DATA_BUILD(1, it_data); 561 data = RMVIEW_FIELD_DATA_BUILD(1, it_data);
555 eo_do(en, eo_key_data_set(_STR_RMVIEW, data, _field_data_free)); 562 eo_do(en, eo_key_data_set(_STR_RMVIEW, data, _field_data_free));
556 eo_do(en, eo_event_callback_add(ELM_FILESELECTOR_ENTRY_EVENT_CHANGED, _res_changed, NULL)); 563 eo_do(en, eo_event_callback_add(ELM_FILESELECTOR_ENTRY_EVENT_CHANGED, _res_changed, NULL));
@@ -563,18 +570,18 @@ _rmview_build(Rmview_Resource_Type type)
563 Gui_Sequence *seq = sequence_get(seq_id); 570 Gui_Sequence *seq = sequence_get(seq_id);
564 Eina_Bool state = sequence_public_get(seq); 571 Eina_Bool state = sequence_public_get(seq);
565 572
566 Eo *ck = _rmview_check_add(g->rm_win->rm_table, state); 573 Eo *ck = _rmview_check_add(g_rm_win->rm_table, state);
567 it_data->en2 = ck; 574 it_data->en2 = ck;
568 data = RMVIEW_FIELD_DATA_BUILD(1, it_data); 575 data = RMVIEW_FIELD_DATA_BUILD(1, it_data);
569 eo_do(ck, eo_key_data_set(_STR_RMVIEW, data, _field_data_free)); 576 eo_do(ck, eo_key_data_set(_STR_RMVIEW, data, _field_data_free));
570 eo_do(g->rm_win->rm_table, elm_obj_table_pack(ck, table_col++, table_line, 1, 1)); 577 eo_do(g_rm_win->rm_table, elm_obj_table_pack(ck, table_col++, table_line, 1, 1));
571 eo_do(ck, eo_event_callback_add(ELM_CHECK_EVENT_CHANGED, _res_changed, NULL)); 578 eo_do(ck, eo_event_callback_add(ELM_CHECK_EVENT_CHANGED, _res_changed, NULL));
572 break; 579 break;
573 } 580 }
574 /* Add field (double entry) specific to EDJE */ 581 /* Add field (double entry) specific to EDJE */
575 case RESOURCE_EDJE: 582 case RESOURCE_EDJE:
576 { 583 {
577 Eo *box = _rmview_box_add(g->rm_win->rm_table, EINA_FALSE); 584 Eo *box = _rmview_box_add(g_rm_win->rm_table, EINA_FALSE);
578 585
579 en = _rmview_fs_entry_add(box, "..."); 586 en = _rmview_fs_entry_add(box, "...");
580 value = resource_edj_path_get(res); 587 value = resource_edj_path_get(res);
@@ -594,15 +601,15 @@ _rmview_build(Rmview_Resource_Type type)
594 eo_do(box, elm_obj_box_pack_end(en)); 601 eo_do(box, elm_obj_box_pack_end(en));
595 it_data->en3 = en; 602 it_data->en3 = en;
596 603
597 eo_do(g->rm_win->rm_table, elm_obj_table_pack(box, table_col++, table_line, 1, 1)); 604 eo_do(g_rm_win->rm_table, elm_obj_table_pack(box, table_col++, table_line, 1, 1));
598 break; 605 break;
599 } 606 }
600 /* Add field (entry) specific to STRING */ 607 /* Add field (entry) specific to STRING */
601 case RESOURCE_STRING: 608 case RESOURCE_STRING:
602 { 609 {
603 en = _rmview_entry_add(g->rm_win->rm_table, value); 610 en = _rmview_entry_add(g_rm_win->rm_table, value);
604 it_data->en2 = en; 611 it_data->en2 = en;
605 eo_do(g->rm_win->rm_table, elm_obj_table_pack(en, table_col++, table_line, 1, 1)); 612 eo_do(g_rm_win->rm_table, elm_obj_table_pack(en, table_col++, table_line, 1, 1));
606 data = RMVIEW_FIELD_DATA_BUILD(1, it_data); 613 data = RMVIEW_FIELD_DATA_BUILD(1, it_data);
607 eo_do(en, eo_key_data_set(_STR_RMVIEW, data, _field_data_free)); 614 eo_do(en, eo_key_data_set(_STR_RMVIEW, data, _field_data_free));
608 eo_do(en, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _res_changed, NULL)); 615 eo_do(en, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _res_changed, NULL));
@@ -617,19 +624,19 @@ _rmview_build(Rmview_Resource_Type type)
617#ifdef HAVE_ENVENTOR 624#ifdef HAVE_ENVENTOR
618 if (res_type == RESOURCE_EDJE) 625 if (res_type == RESOURCE_EDJE)
619 { 626 {
620 icon = elm_image_add(g->rm_win->rm_table); 627 icon = elm_image_add(g_rm_win->rm_table);
621 eo_do(icon, 628 eo_do(icon,
622 efl_file_set(PACKAGE_DATA_DIR"/images/enventor_icon.png", NULL), 629 efl_file_set(PACKAGE_DATA_DIR"/images/enventor_icon.png", NULL),
623 evas_obj_size_hint_min_set(25, 25), 630 evas_obj_size_hint_min_set(25, 25),
624 elm_obj_image_resizable_set(EINA_TRUE, EINA_TRUE), 631 elm_obj_image_resizable_set(EINA_TRUE, EINA_TRUE),
625 evas_obj_visibility_set(EINA_TRUE) 632 evas_obj_visibility_set(EINA_TRUE)
626 ); 633 );
627 bt = _rmview_button_add(g->rm_win->rm_table, ""); 634 bt = _rmview_button_add(g_rm_win->rm_table, "");
628 eo_do(bt, 635 eo_do(bt,
629 elm_obj_container_content_set("icon", icon), 636 elm_obj_container_content_set("icon", icon),
630 elm_obj_widget_disabled_set(EINA_FALSE) 637 elm_obj_widget_disabled_set(EINA_FALSE)
631 ); 638 );
632 eo_do(g->rm_win->rm_table, elm_obj_table_pack(bt, table_col++, table_line, 1, 1)); 639 eo_do(g_rm_win->rm_table, elm_obj_table_pack(bt, table_col++, table_line, 1, 1));
633 640
634 data = RMVIEW_FIELD_DATA_BUILD(2, it_data); 641 data = RMVIEW_FIELD_DATA_BUILD(2, it_data);
635 eo_do(bt, eo_key_data_set(_STR_RMVIEW, data, _field_data_free)); 642 eo_do(bt, eo_key_data_set(_STR_RMVIEW, data, _field_data_free));
@@ -637,19 +644,19 @@ _rmview_build(Rmview_Resource_Type type)
637 } 644 }
638#endif 645#endif
639 646
640 bt = _rmview_button_add(g->rm_win->rm_table, "save"); 647 bt = _rmview_button_add(g_rm_win->rm_table, "save");
641 it_data->bt_save = bt; 648 it_data->bt_save = bt;
642 eo_do(bt, elm_obj_widget_disabled_set(EINA_TRUE)); 649 eo_do(bt, elm_obj_widget_disabled_set(EINA_TRUE));
643 eo_do(bt, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _bt_save_clicked, NULL)); 650 eo_do(bt, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _bt_save_clicked, NULL));
644 651
645 eo_do(g->rm_win->rm_table, elm_obj_table_pack(bt, table_col++, table_line, 1, 1)); 652 eo_do(g_rm_win->rm_table, elm_obj_table_pack(bt, table_col++, table_line, 1, 1));
646 data = RMVIEW_FIELD_DATA_BUILD(2, it_data); 653 data = RMVIEW_FIELD_DATA_BUILD(2, it_data);
647 eo_do(bt, eo_key_data_set(_STR_RMVIEW, data, _field_data_free)); 654 eo_do(bt, eo_key_data_set(_STR_RMVIEW, data, _field_data_free));
648 655
649 bt = _rmview_button_add(g->rm_win->rm_table, "del"); 656 bt = _rmview_button_add(g_rm_win->rm_table, "del");
650 eo_do(bt, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _bt_del_clicked, NULL)); 657 eo_do(bt, eo_event_callback_add(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _bt_del_clicked, NULL));
651 658
652 eo_do(g->rm_win->rm_table, elm_obj_table_pack(bt, table_col++, table_line, 1, 1)); 659 eo_do(g_rm_win->rm_table, elm_obj_table_pack(bt, table_col++, table_line, 1, 1));
653 data = RMVIEW_FIELD_DATA_BUILD(3, it_data); 660 data = RMVIEW_FIELD_DATA_BUILD(3, it_data);
654 eo_do(bt, eo_key_data_set(_STR_RMVIEW, data, _field_data_free)); 661 eo_do(bt, eo_key_data_set(_STR_RMVIEW, data, _field_data_free));
655 662
@@ -658,49 +665,49 @@ _rmview_build(Rmview_Resource_Type type)
658 } 665 }
659 /* Adding last line of buttons to add new resources. */ 666 /* Adding last line of buttons to add new resources. */
660 { 667 {
661 eo_do(g->rm_win->rm_buttons_box, elm_obj_box_unpack_all()); 668 eo_do(g_rm_win->rm_buttons_box, elm_obj_box_unpack_all());
662 eo_do(g->rm_win->rm_buttons_box, elm_obj_box_pack_end(g->rm_win->rm_alias_entry)); 669 eo_do(g_rm_win->rm_buttons_box, elm_obj_box_pack_end(g_rm_win->rm_alias_entry));
663 670
664 eo_do(g->rm_win->rm_value_entry, evas_obj_visibility_set(EINA_FALSE)); 671 eo_do(g_rm_win->rm_value_entry, evas_obj_visibility_set(EINA_FALSE));
665 eo_do(g->rm_win->rm_seq_pub_check, evas_obj_visibility_set(EINA_FALSE)); 672 eo_do(g_rm_win->rm_seq_pub_check, evas_obj_visibility_set(EINA_FALSE));
666 eo_do(g->rm_win->rm_image_fileselector, evas_obj_visibility_set(EINA_FALSE)); 673 eo_do(g_rm_win->rm_image_fileselector, evas_obj_visibility_set(EINA_FALSE));
667 eo_do(g->rm_win->rm_edje_box, evas_obj_visibility_set(EINA_FALSE)); 674 eo_do(g_rm_win->rm_edje_box, evas_obj_visibility_set(EINA_FALSE));
668 eo_do(g->rm_win->rm_edje_fs_edj, evas_obj_visibility_set(EINA_FALSE)); 675 eo_do(g_rm_win->rm_edje_fs_edj, evas_obj_visibility_set(EINA_FALSE));
669 eo_do(g->rm_win->rm_edje_fs_edc, evas_obj_visibility_set(EINA_FALSE)); 676 eo_do(g_rm_win->rm_edje_fs_edc, evas_obj_visibility_set(EINA_FALSE));
670 677
671 switch (_rmview_toolbar_selected_type ) 678 switch (_rmview_toolbar_selected_type )
672 { 679 {
673 case RMVIEW_IMAGE: 680 case RMVIEW_IMAGE:
674 { 681 {
675 eo_do(g->rm_win->rm_image_fileselector, evas_obj_visibility_set(EINA_TRUE)); 682 eo_do(g_rm_win->rm_image_fileselector, evas_obj_visibility_set(EINA_TRUE));
676 eo_do(g->rm_win->rm_buttons_box, elm_obj_box_pack_end(g->rm_win->rm_image_fileselector)); 683 eo_do(g_rm_win->rm_buttons_box, elm_obj_box_pack_end(g_rm_win->rm_image_fileselector));
677 break; 684 break;
678 } 685 }
679 case RMVIEW_CALLBACK: 686 case RMVIEW_CALLBACK:
680 { 687 {
681 eo_do(g->rm_win->rm_value_entry, evas_obj_visibility_set(EINA_TRUE)); 688 eo_do(g_rm_win->rm_value_entry, evas_obj_visibility_set(EINA_TRUE));
682 eo_do(g->rm_win->rm_buttons_box, elm_obj_box_pack_end(g->rm_win->rm_value_entry)); 689 eo_do(g_rm_win->rm_buttons_box, elm_obj_box_pack_end(g_rm_win->rm_value_entry));
683 break; 690 break;
684 } 691 }
685 case RMVIEW_SEQUENCE: 692 case RMVIEW_SEQUENCE:
686 { 693 {
687 eo_do(g->rm_win->rm_seq_pub_check, evas_obj_visibility_set(EINA_TRUE)); 694 eo_do(g_rm_win->rm_seq_pub_check, evas_obj_visibility_set(EINA_TRUE));
688 eo_do(g->rm_win->rm_value_entry, evas_obj_visibility_set(EINA_FALSE)); 695 eo_do(g_rm_win->rm_value_entry, evas_obj_visibility_set(EINA_FALSE));
689 eo_do(g->rm_win->rm_buttons_box, elm_obj_box_pack_end(g->rm_win->rm_seq_pub_check)); 696 eo_do(g_rm_win->rm_buttons_box, elm_obj_box_pack_end(g_rm_win->rm_seq_pub_check));
690 break; 697 break;
691 } 698 }
692 case RMVIEW_EDJE: 699 case RMVIEW_EDJE:
693 { 700 {
694 eo_do(g->rm_win->rm_edje_box, evas_obj_visibility_set(EINA_TRUE)); 701 eo_do(g_rm_win->rm_edje_box, evas_obj_visibility_set(EINA_TRUE));
695 eo_do(g->rm_win->rm_edje_fs_edj, evas_obj_visibility_set(EINA_TRUE)); 702 eo_do(g_rm_win->rm_edje_fs_edj, evas_obj_visibility_set(EINA_TRUE));
696 eo_do(g->rm_win->rm_edje_fs_edc, evas_obj_visibility_set(EINA_TRUE)); 703 eo_do(g_rm_win->rm_edje_fs_edc, evas_obj_visibility_set(EINA_TRUE));
697 eo_do(g->rm_win->rm_buttons_box, elm_obj_box_pack_end(g->rm_win->rm_edje_box)); 704 eo_do(g_rm_win->rm_buttons_box, elm_obj_box_pack_end(g_rm_win->rm_edje_box));
698 break; 705 break;
699 } 706 }
700 case RMVIEW_STRING: 707 case RMVIEW_STRING:
701 { 708 {
702 eo_do(g->rm_win->rm_value_entry, evas_obj_visibility_set(EINA_TRUE)); 709 eo_do(g_rm_win->rm_value_entry, evas_obj_visibility_set(EINA_TRUE));
703 eo_do(g->rm_win->rm_buttons_box, elm_obj_box_pack_end(g->rm_win->rm_value_entry)); 710 eo_do(g_rm_win->rm_buttons_box, elm_obj_box_pack_end(g_rm_win->rm_value_entry));
704 break; 711 break;
705 } 712 }
706 default: 713 default:
@@ -709,7 +716,7 @@ _rmview_build(Rmview_Resource_Type type)
709 } 716 }
710 } 717 }
711 718
712 eo_do(g->rm_win->rm_buttons_box, elm_obj_box_pack_end(g->rm_win->rm_button_add)); 719 eo_do(g_rm_win->rm_buttons_box, elm_obj_box_pack_end(g_rm_win->rm_button_add));
713 } 720 }
714} 721}
715 722
@@ -738,11 +745,10 @@ _rmview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_in
738Eina_Bool 745Eina_Bool
739_rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 746_rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
740{ 747{
741 Egui_Layout_Widgets *_g = get_gui();
742 Gui_Resource_Type res_type; 748 Gui_Resource_Type res_type;
743 const char *alias_str = NULL, *value_str = NULL; 749 const char *alias_str = NULL, *value_str = NULL;
744 const Gui_Context *ctx = _active_context_get(); 750 const Gui_Context *ctx = _active_context_get();
745 eo_do(_g->rm_win->rm_alias_entry, alias_str = elm_obj_widget_part_text_get(NULL)); 751 eo_do(g_rm_win->rm_alias_entry, alias_str = elm_obj_widget_part_text_get(NULL));
746 752
747 if (!strlen(alias_str)) 753 if (!strlen(alias_str))
748 return EO_CALLBACK_CONTINUE; 754 return EO_CALLBACK_CONTINUE;
@@ -791,21 +797,21 @@ _rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Eve
791 /* For CALLBACKS and STRINGS: check that value str is not empty. */ 797 /* For CALLBACKS and STRINGS: check that value str is not empty. */
792 if ((res_type != RESOURCE_SEQUENCE) && (res_type != RESOURCE_IMAGE) && (res_type != RESOURCE_EDJE)) 798 if ((res_type != RESOURCE_SEQUENCE) && (res_type != RESOURCE_IMAGE) && (res_type != RESOURCE_EDJE))
793 { 799 {
794 eo_do(_g->rm_win->rm_value_entry, value_str = elm_obj_widget_part_text_get(NULL)); 800 eo_do(g_rm_win->rm_value_entry, value_str = elm_obj_widget_part_text_get(NULL));
795 if (!strlen(value_str)) 801 if (!strlen(value_str))
796 return EO_CALLBACK_CONTINUE; 802 return EO_CALLBACK_CONTINUE;
797 } 803 }
798 /* For IMAGES: check that path is not empty. */ 804 /* For IMAGES: check that path is not empty. */
799 else if (res_type == RESOURCE_IMAGE) 805 else if (res_type == RESOURCE_IMAGE)
800 { 806 {
801 eo_do(_g->rm_win->rm_image_fileselector, value_str = elm_interface_fileselector_path_get()); 807 eo_do(g_rm_win->rm_image_fileselector, value_str = elm_interface_fileselector_path_get());
802 if (!strlen(value_str)) 808 if (!strlen(value_str))
803 return EO_CALLBACK_CONTINUE; 809 return EO_CALLBACK_CONTINUE;
804 } 810 }
805 /* For EDJES: check that edj path is not empty. */ 811 /* For EDJES: check that edj path is not empty. */
806 else if (res_type == RESOURCE_EDJE) 812 else if (res_type == RESOURCE_EDJE)
807 { 813 {
808 eo_do(_g->rm_win->rm_edje_fs_edj, value_str = elm_interface_fileselector_path_get()); 814 eo_do(g_rm_win->rm_edje_fs_edj, value_str = elm_interface_fileselector_path_get());
809 if (!strlen(value_str)) 815 if (!strlen(value_str))
810 return EO_CALLBACK_CONTINUE; 816 return EO_CALLBACK_CONTINUE;
811 } 817 }
@@ -822,7 +828,7 @@ _rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Eve
822 Dep_Id *dep_id = gui_context_dep_id_by_name_get(ctx, alias_str); 828 Dep_Id *dep_id = gui_context_dep_id_by_name_get(ctx, alias_str);
823 Gui_Sequence *seq = sequence_new(ctx, dep_id); 829 Gui_Sequence *seq = sequence_new(ctx, dep_id);
824 Eina_Bool state; 830 Eina_Bool state;
825 eo_do(_g->rm_win->rm_seq_pub_check, state = elm_obj_check_state_get()); 831 eo_do(g_rm_win->rm_seq_pub_check, state = elm_obj_check_state_get());
826 sequence_public_set(seq, state); 832 sequence_public_set(seq, state);
827 seqview_fill(ctx); 833 seqview_fill(ctx);
828 } 834 }
@@ -831,10 +837,10 @@ _rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Eve
831 resource_value_set(gui_res, value_str); 837 resource_value_set(gui_res, value_str);
832 if (res_type == RESOURCE_EDJE) 838 if (res_type == RESOURCE_EDJE)
833 { 839 {
834 resource_edc_path_set(gui_res, eo_do(_g->rm_win->rm_edje_fs_edc, elm_interface_fileselector_path_get())); 840 resource_edc_path_set(gui_res, eo_do(g_rm_win->rm_edje_fs_edc, elm_interface_fileselector_path_get()));
835 resource_edj_path_set(gui_res, value_str); 841 resource_edj_path_set(gui_res, value_str);
836 eo_do(_g->rm_win->rm_edje_fs_edc, elm_obj_widget_part_text_set(NULL, NULL)); 842 eo_do(g_rm_win->rm_edje_fs_edc, elm_obj_widget_part_text_set(NULL, NULL));
837 eo_do(_g->rm_win->rm_edje_fs_edj, elm_obj_widget_part_text_set(NULL, NULL)); 843 eo_do(g_rm_win->rm_edje_fs_edj, elm_obj_widget_part_text_set(NULL, NULL));
838 } 844 }
839 const Gui_Widget *wdg = gui_context_data_get(ctx, SELECTED_WDG); 845 const Gui_Widget *wdg = gui_context_data_get(ctx, SELECTED_WDG);
840 propview_build(wdg); 846 propview_build(wdg);
@@ -845,29 +851,27 @@ _rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Eve
845 } 851 }
846 852
847 _rmview_build(_rmview_toolbar_selected_type); 853 _rmview_build(_rmview_toolbar_selected_type);
848 eo_do(_g->rm_win->rm_seq_pub_check, elm_obj_check_state_set(EINA_FALSE)); 854 eo_do(g_rm_win->rm_seq_pub_check, elm_obj_check_state_set(EINA_FALSE));
849 eo_do(_g->rm_win->rm_image_fileselector, elm_interface_fileselector_path_set(getenv("HOME"))); 855 eo_do(g_rm_win->rm_image_fileselector, elm_interface_fileselector_path_set(getenv("HOME")));
850 eo_do(_g->rm_win->rm_alias_entry, elm_obj_widget_part_text_set(NULL, NULL)); 856 eo_do(g_rm_win->rm_alias_entry, elm_obj_widget_part_text_set(NULL, NULL));
851 eo_do(_g->rm_win->rm_value_entry, elm_obj_widget_part_text_set(NULL, NULL)); 857 eo_do(g_rm_win->rm_value_entry, elm_obj_widget_part_text_set(NULL, NULL));
852 return EO_CALLBACK_CONTINUE; 858 return EO_CALLBACK_CONTINUE;
853} 859}
854 860
855/* This callback is called in the end of creation of RM view window. */ 861/* This callback is called in the end of creation of RM view window. */
856Eina_Bool 862void
857_rm_win_show_post_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 863rm_win_post_configure()
858{ 864{
859 g = get_gui(); 865 eo_do(g_rm_win->rm_toolbar, elm_obj_toolbar_item_append("emblem-photos", "Images",
860 eo_do(g->rm_win->rm_toolbar, elm_obj_toolbar_item_append("emblem-photos", "Images",
861 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_IMAGE)); 866 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_IMAGE));
862 eo_do(g->rm_win->rm_toolbar, elm_obj_toolbar_item_append("emblem-photos", "Edjes", 867 eo_do(g_rm_win->rm_toolbar, elm_obj_toolbar_item_append("emblem-photos", "Edjes",
863 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_EDJE)); 868 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_EDJE));
864 eo_do(g->rm_win->rm_toolbar, elm_obj_toolbar_item_append("call-start", "Callbacks", 869 eo_do(g_rm_win->rm_toolbar, elm_obj_toolbar_item_append("call-start", "Callbacks",
865 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_CALLBACK)); 870 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_CALLBACK));
866 eo_do(g->rm_win->rm_toolbar, elm_obj_toolbar_item_append("format-justify-fill", "Sequences", 871 eo_do(g_rm_win->rm_toolbar, elm_obj_toolbar_item_append("format-justify-fill", "Sequences",
867 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_SEQUENCE)); 872 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_SEQUENCE));
868 eo_do(g->rm_win->rm_toolbar, elm_obj_toolbar_item_append("format-text-bold", "Strings", 873 eo_do(g_rm_win->rm_toolbar, elm_obj_toolbar_item_append("format-text-bold", "Strings",
869 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_STRING)); 874 _rmview_toolbar_clicked, (void *) (intptr_t) RMVIEW_STRING));
870 875
871 return EO_CALLBACK_CONTINUE;
872} 876}
873 877
diff --git a/src/bin/egui_gui/rmview.h b/src/bin/egui_gui/rmview.h
index e6bcba8..b6125d3 100644
--- a/src/bin/egui_gui/rmview.h
+++ b/src/bin/egui_gui/rmview.h
@@ -3,6 +3,9 @@
3#ifndef _RMVIEW_H 3#ifndef _RMVIEW_H
4#define _RMVIEW_H 4#define _RMVIEW_H
5 5
6void rm_win_set(Egui_Layout_Rm_Win_Widgets *rm_win);
7void rm_win_post_configure();
8
6typedef enum 9typedef enum
7{ 10{
8 RMVIEW_NOT_SELECTED, 11 RMVIEW_NOT_SELECTED,
diff --git a/src/bin/egui_gui/settings_view.c b/src/bin/egui_gui/settings_view.c
index 383ae4c..7ef92ba 100644
--- a/src/bin/egui_gui/settings_view.c
+++ b/src/bin/egui_gui/settings_view.c
@@ -11,13 +11,19 @@
11 11
12static SettingsView_Type _toolbar_selected_type = SETTINGSVIEW_NOT_SELECTED; 12static SettingsView_Type _toolbar_selected_type = SETTINGSVIEW_NOT_SELECTED;
13 13
14static Egui_Layout_Settings_Win_Widgets *g_settings_win = NULL;
15
16void settings_win_set(Egui_Layout_Settings_Win_Widgets *settings_win)
17{
18 if (g_settings_win) free(g_settings_win);
19 g_settings_win = settings_win;
20}
14 21
15/* Enable "Apply" button." */ 22/* Enable "Apply" button." */
16static Eina_Bool 23static Eina_Bool
17_settings_apply_button_enable(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 24_settings_apply_button_enable(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
18{ 25{
19 Egui_Layout_Widgets *_g = get_gui(); 26 eo_do(g_settings_win->settings_button_apply, elm_obj_widget_disabled_set(EINA_FALSE));
20 eo_do(_g->settings_win->settings_button_apply, elm_obj_widget_disabled_set(EINA_FALSE));
21 return EO_CALLBACK_CONTINUE; 27 return EO_CALLBACK_CONTINUE;
22} 28}
23 29
@@ -26,31 +32,29 @@ static void
26_settingsview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 32_settingsview_toolbar_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
27{ 33{
28 SettingsView_Type type = (int) (intptr_t) data; 34 SettingsView_Type type = (int) (intptr_t) data;
29 Egui_Layout_Widgets *g = get_gui();
30 if (_toolbar_selected_type == type) 35 if (_toolbar_selected_type == type)
31 return; 36 return;
32 _toolbar_selected_type = type; 37 _toolbar_selected_type = type;
33 38
34 const Gui_Context *ctx = _active_context_get(); 39 const Gui_Context *ctx = _active_context_get();
35 eo_do(g->settings_win->project_name_entry, elm_obj_widget_part_text_set(NULL, gui_context_project_name_get(ctx))); 40 eo_do(g_settings_win->project_name_entry, elm_obj_widget_part_text_set(NULL, gui_context_project_name_get(ctx)));
36 eo_do(g->settings_win->settings_table, elm_obj_table_pack(g->settings_win->project_name_label, 0, 0, 1, 1)); 41 eo_do(g_settings_win->settings_table, elm_obj_table_pack(g_settings_win->project_name_label, 0, 0, 1, 1));
37 eo_do(g->settings_win->settings_table, elm_obj_table_pack(g->settings_win->project_name_entry, 1, 0, 1, 1)); 42 eo_do(g_settings_win->settings_table, elm_obj_table_pack(g_settings_win->project_name_entry, 1, 0, 1, 1));
38 eo_do(g->settings_win->project_name_entry, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _settings_apply_button_enable, NULL)); 43 eo_do(g_settings_win->project_name_entry, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _settings_apply_button_enable, NULL));
39 44
40 eo_do(g->settings_win->images_prefix_entry, elm_obj_widget_part_text_set(NULL, gui_context_images_prefix_get(ctx))); 45 eo_do(g_settings_win->images_prefix_entry, elm_obj_widget_part_text_set(NULL, gui_context_images_prefix_get(ctx)));
41 eo_do(g->settings_win->settings_table, elm_obj_table_pack(g->settings_win->images_prefix_label, 0, 1, 1, 1)); 46 eo_do(g_settings_win->settings_table, elm_obj_table_pack(g_settings_win->images_prefix_label, 0, 1, 1, 1));
42 eo_do(g->settings_win->settings_table, elm_obj_table_pack(g->settings_win->images_prefix_entry, 1, 1, 1, 1)); 47 eo_do(g_settings_win->settings_table, elm_obj_table_pack(g_settings_win->images_prefix_entry, 1, 1, 1, 1));
43 eo_do(g->settings_win->images_prefix_entry, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _settings_apply_button_enable, NULL)); 48 eo_do(g_settings_win->images_prefix_entry, eo_event_callback_add(ELM_ENTRY_EVENT_CHANGED_USER, _settings_apply_button_enable, NULL));
44} 49}
45 50
46/* "Apply" button "clicked" callback." */ 51/* "Apply" button "clicked" callback." */
47Eina_Bool 52Eina_Bool
48_settings_apply_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 53_settings_apply_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
49{ 54{
50 Egui_Layout_Widgets *_g = get_gui();
51 const Gui_Context *ctx = _active_context_get(); 55 const Gui_Context *ctx = _active_context_get();
52 const char *new_val = NULL, *old_val; 56 const char *new_val = NULL, *old_val;
53 eo_do(_g->settings_win->project_name_entry, new_val = elm_obj_widget_part_text_get(NULL)); 57 eo_do(g_settings_win->project_name_entry, new_val = elm_obj_widget_part_text_get(NULL));
54 old_val = gui_context_project_name_get(ctx); 58 old_val = gui_context_project_name_get(ctx);
55 if (!old_val) old_val = ""; 59 if (!old_val) old_val = "";
56 60
@@ -60,10 +64,10 @@ _settings_apply_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, cons
60 } 64 }
61 else if (!strlen(new_val)) 65 else if (!strlen(new_val))
62 { 66 {
63 eo_do(_g->settings_win->project_name_entry, elm_obj_widget_part_text_set(NULL, old_val)); 67 eo_do(g_settings_win->project_name_entry, elm_obj_widget_part_text_set(NULL, old_val));
64 } 68 }
65 69
66 eo_do(_g->settings_win->images_prefix_entry, new_val = elm_obj_widget_part_text_get(NULL)); 70 eo_do(g_settings_win->images_prefix_entry, new_val = elm_obj_widget_part_text_get(NULL));
67 old_val = gui_context_images_prefix_get(ctx); 71 old_val = gui_context_images_prefix_get(ctx);
68 72
69 //if (new_val && old_val && strlen(new_val) && (strcmp(new_val, old_val))) 73 //if (new_val && old_val && strlen(new_val) && (strcmp(new_val, old_val)))
@@ -74,10 +78,10 @@ _settings_apply_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, cons
74 } 78 }
75 else if (!new_val || !strlen(new_val)) 79 else if (!new_val || !strlen(new_val))
76 { 80 {
77 eo_do(_g->settings_win->images_prefix_entry, elm_obj_widget_part_text_set(NULL, old_val)); 81 eo_do(g_settings_win->images_prefix_entry, elm_obj_widget_part_text_set(NULL, old_val));
78 } 82 }
79 83
80 eo_do(_g->settings_win->settings_button_apply, elm_obj_widget_disabled_set(EINA_TRUE)); 84 eo_do(g_settings_win->settings_button_apply, elm_obj_widget_disabled_set(EINA_TRUE));
81 return EO_CALLBACK_CONTINUE; 85 return EO_CALLBACK_CONTINUE;
82} 86}
83 87
@@ -90,11 +94,9 @@ _settings_win_request_delete(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const
90} 94}
91 95
92/* This callback is called in the end of creation of settings view window. */ 96/* This callback is called in the end of creation of settings view window. */
93Eina_Bool 97void
94_settings_win_show_post_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) 98settings_win_post_configure()
95{ 99{
96 Egui_Layout_Widgets *g = get_gui(); 100 eo_do(g_settings_win->settings_toolbar, elm_obj_toolbar_item_append("preferences-system", "Project",
97 eo_do(g->settings_win->settings_toolbar, elm_obj_toolbar_item_append("preferences-system", "Project",
98 _settingsview_toolbar_clicked, (void *) (intptr_t) SETTINGSVIEW_MAIN)); 101 _settingsview_toolbar_clicked, (void *) (intptr_t) SETTINGSVIEW_MAIN));
99 return EO_CALLBACK_CONTINUE;
100} 102}
diff --git a/src/bin/egui_gui/settings_view.h b/src/bin/egui_gui/settings_view.h
index 667ef97..3733168 100644
--- a/src/bin/egui_gui/settings_view.h
+++ b/src/bin/egui_gui/settings_view.h
@@ -2,10 +2,16 @@
2#ifndef _SETTINGSVIEW_H 2#ifndef _SETTINGSVIEW_H
3#define _SETTINGSVIEW_H 3#define _SETTINGSVIEW_H
4 4
5#include "egui_layout.h"
6
5typedef enum 7typedef enum
6{ 8{
7 SETTINGSVIEW_NOT_SELECTED, 9 SETTINGSVIEW_NOT_SELECTED,
8 SETTINGSVIEW_MAIN 10 SETTINGSVIEW_MAIN
9} SettingsView_Type; 11} SettingsView_Type;
10 12
13void settings_win_set(Egui_Layout_Settings_Win_Widgets *settings_win);
14
15void settings_win_post_configure();
16
11#endif 17#endif