summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean@guyomarch.bzh>2018-01-03 22:55:03 +0100
committerJean Guyomarc'h <jean@guyomarch.bzh>2018-01-03 22:55:03 +0100
commit2e68483c6b2629459da6821c66a74310cfb198c5 (patch)
tree85515b5cf361225d390c4975ed9d6d615e67b222
parent8c0c3b14555916e0c9c39dba81e1385404a31bd0 (diff)
gui: fix invalid handling of group parts in edje
For some reason, there was a behavior change between efl 1.20.3 that makes the edje theme behave as I was expected in latest EFL, but was completely broken in efl <= 1.20.3 (maybe 1.20.4 also? untested). We now stop relying on an undefined behavior and actually do handle the swallowed text parts as they should. Fixes #20
-rw-r--r--src/gui.c14
-rw-r--r--src/include/eovim/gui.h2
2 files changed, 6 insertions, 10 deletions
diff --git a/src/gui.c b/src/gui.c
index 27a8972..5d07aff 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -224,9 +224,6 @@ gui_add(s_gui *gui,
224 * Command-Line GUI objects 224 * Command-Line GUI objects
225 * ===================================================================== */ 225 * ===================================================================== */
226 226
227 gui->cmdline.obj = edje_object_part_swallow_get(gui->edje, "eovim.cmdline");
228 gui->cmdline.info = edje_object_part_swallow_get(gui->edje, "eovim.cmdline_info");
229
230 /* Table: will hold both the spacer and the genlist */ 227 /* Table: will hold both the spacer and the genlist */
231 gui->cmdline.table = o = elm_table_add(gui->layout); 228 gui->cmdline.table = o = elm_table_add(gui->layout);
232 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 229 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -997,9 +994,10 @@ gui_cmdline_show(s_gui *gui,
997 .str = (char *)firstc, 994 .str = (char *)firstc,
998 }; 995 };
999 termview_cursor_visibility_set(gui->termview, EINA_FALSE); 996 termview_cursor_visibility_set(gui->termview, EINA_FALSE);
1000 edje_object_message_send(gui->cmdline.info, EDJE_MESSAGE_STRING, 997 edje_object_message_send(gui->edje, EDJE_MESSAGE_STRING,
1001 THEME_MSG_CMDLINE_INFO, (void *)(&msg)); 998 THEME_MSG_CMDLINE_INFO, (void *)(&msg));
1002 edje_object_part_text_unescaped_set(gui->cmdline.obj, "eovim.cmdline.text", 999 edje_object_part_text_unescaped_set(gui->edje,
1000 "eovim.cmdline:eovim.cmdline.text",
1003 content); 1001 content);
1004 1002
1005 /* Show the completion panel */ 1003 /* Show the completion panel */
@@ -1020,7 +1018,8 @@ gui_cmdline_cursor_pos_set(s_gui *gui,
1020 size_t pos) 1018 size_t pos)
1021{ 1019{
1022 gui->cmdline.cpos = pos; 1020 gui->cmdline.cpos = pos;
1023 edje_object_part_text_cursor_pos_set(gui->cmdline.obj, "eovim.cmdline.text", 1021 edje_object_part_text_cursor_pos_set(gui->edje,
1022 "eovim.cmdline:eovim.cmdline.text",
1024 EDJE_CURSOR_MAIN, (int)pos); 1023 EDJE_CURSOR_MAIN, (int)pos);
1025} 1024}
1026 1025
@@ -1206,9 +1205,8 @@ _wildmenu_resize(s_gui *gui)
1206 int item_height; 1205 int item_height;
1207 evas_object_geometry_get(track, NULL, NULL, NULL, &item_height); 1206 evas_object_geometry_get(track, NULL, NULL, NULL, &item_height);
1208 1207
1209 int win_h, info_x, info_y, info_h, menu_w; 1208 int win_h, menu_w;
1210 evas_object_geometry_get(gui->win, NULL, NULL, NULL, &win_h); 1209 evas_object_geometry_get(gui->win, NULL, NULL, NULL, &win_h);
1211 evas_object_geometry_get(gui->cmdline.info, &info_x, &info_y, NULL, &info_h);
1212 evas_object_geometry_get(gui->cmdline.table, NULL, NULL, &menu_w, NULL); 1210 evas_object_geometry_get(gui->cmdline.table, NULL, NULL, &menu_w, NULL);
1213 1211
1214 const int height = item_height * (int)(gui->cmdline.items_count) + 2; 1212 const int height = item_height * (int)(gui->cmdline.items_count) + 2;
diff --git a/src/include/eovim/gui.h b/src/include/eovim/gui.h
index bd762aa..8c8dc2c 100644
--- a/src/include/eovim/gui.h
+++ b/src/include/eovim/gui.h
@@ -54,8 +54,6 @@ struct gui
54 } completion; 54 } completion;
55 55
56 struct { 56 struct {
57 Evas_Object *obj;
58 Evas_Object *info;
59 Evas_Object *menu; 57 Evas_Object *menu;
60 Evas_Object *table; 58 Evas_Object *table;
61 Evas_Object *spacer; 59 Evas_Object *spacer;