summaryrefslogtreecommitdiff
path: root/src/bin/egui_gui/props_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/egui_gui/props_helper.c')
-rw-r--r--src/bin/egui_gui/props_helper.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/bin/egui_gui/props_helper.c b/src/bin/egui_gui/props_helper.c
index 333b682..3d48a2d 100644
--- a/src/bin/egui_gui/props_helper.c
+++ b/src/bin/egui_gui/props_helper.c
@@ -109,10 +109,13 @@ props_hoversel_enums_add(Eo *box, Eo *hover_parent, const char *default_val, con
109} 109}
110 110
111Eo * 111Eo *
112props_hoversel_objects_add(Eo *box, Eo *hover_parent, const char *default_val, const Eina_List *wdgs_list, const Gui_Widget *wdg) 112props_hoversel_objects_add(Eo *box, Eo *hoversel, Eo *hover_parent, const char *default_val, const Eina_List *wdgs_list, const Gui_Widget *wdg)
113{ 113{
114 Eo *hoversel = eo_add(ELM_HOVERSEL_CLASS, box); 114 if (!hoversel)
115 eo_do(hoversel, elm_obj_hoversel_hover_parent_set(hover_parent)); 115 {
116 hoversel = eo_add(ELM_HOVERSEL_CLASS, box);
117 eo_do(hoversel, elm_obj_hoversel_hover_parent_set(hover_parent));
118 }
116 119
117 if ((wdg) && 120 if ((wdg) &&
118 (!strcmp(wdg_class_name_get(wdg), DB_DEF_CTXPOPUP_CLASS) || 121 (!strcmp(wdg_class_name_get(wdg), DB_DEF_CTXPOPUP_CLASS) ||
@@ -163,7 +166,7 @@ props_hoversel_objects_add(Eo *box, Eo *hover_parent, const char *default_val, c
163 166
164 eo_do(hoversel, evas_obj_size_hint_weight_set(0.0, 0.0)); 167 eo_do(hoversel, evas_obj_size_hint_weight_set(0.0, 0.0));
165 eo_do(hoversel, evas_obj_size_hint_align_set(0.5, 0.5)); 168 eo_do(hoversel, evas_obj_size_hint_align_set(0.5, 0.5));
166 eo_do(box, elm_obj_box_pack_end(hoversel)); 169 if (box) eo_do(box, elm_obj_box_pack_end(hoversel));
167 eo_do(hoversel, evas_obj_visibility_set(EINA_TRUE)); 170 eo_do(hoversel, evas_obj_visibility_set(EINA_TRUE));
168 return hoversel; 171 return hoversel;
169} 172}
@@ -273,7 +276,7 @@ props_value_add(Eo *box, const Gui_Context *ctx, const Gui_Widget *wdg, const Gu
273 if (dep_id) 276 if (dep_id)
274 default_str = dep_name_get(dep_id); 277 default_str = dep_name_get(dep_id);
275 } 278 }
276 new_obj = props_hoversel_objects_add(box, elm_widget_top_get(box), default_str, gui_context_wdg_list_get(ctx), wdg); 279 new_obj = props_hoversel_objects_add(box, NULL, elm_widget_top_get(box), default_str, gui_context_wdg_list_get(ctx), wdg);
277 break; 280 break;
278 } 281 }
279 case GUI_TYPE_DOUBLE: 282 case GUI_TYPE_DOUBLE: