summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_popup.c')
-rw-r--r--src/lib/elementary/efl_ui_popup.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index 43150df..cc8772d 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -218,10 +218,10 @@ _efl_ui_popup_efl_object_constructor(Eo *obj, Efl_Ui_Popup_Data *pd)
218 elm_widget_sub_object_parent_add(obj); 218 elm_widget_sub_object_parent_add(obj);
219 219
220 elm_widget_can_focus_set(obj, EINA_TRUE); 220 elm_widget_can_focus_set(obj, EINA_TRUE);
221 if (!elm_widget_theme_object_set(obj, wd->resize_obj, 221 if (elm_widget_theme_object_set(obj, wd->resize_obj,
222 elm_widget_theme_klass_get(obj), 222 elm_widget_theme_klass_get(obj),
223 elm_widget_theme_element_get(obj), 223 elm_widget_theme_element_get(obj),
224 elm_widget_theme_style_get(obj))) 224 elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
225 CRI("Failed to set layout!"); 225 CRI("Failed to set layout!");
226 226
227 pd->backwall = edje_object_add(evas_object_evas_get(obj)); 227 pd->backwall = edje_object_add(evas_object_evas_get(obj));
@@ -351,12 +351,19 @@ _efl_ui_popup_part_backwall_repeat_events_get(const Eo *obj, void *_pd EINA_UNUS
351 return efl_canvas_object_repeat_events_get(sd->backwall); 351 return efl_canvas_object_repeat_events_get(sd->backwall);
352} 352}
353 353
354EOLIAN static Eina_Bool 354EOLIAN static Eina_Error
355_efl_ui_popup_part_backwall_efl_file_file_set(Eo *obj, void *_pd EINA_UNUSED, const char *file, const char *group) 355_efl_ui_popup_part_backwall_efl_file_load(Eo *obj, void *_pd EINA_UNUSED)
356{ 356{
357 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 357 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
358 Efl_Ui_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_POPUP_CLASS); 358 Efl_Ui_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_POPUP_CLASS);
359 359
360 Eina_Error err;
361
362 if (efl_file_loaded_get(obj)) return 0;
363
364 err = efl_file_load(efl_super(obj, MY_CLASS));
365 if (err) return err;
366
360 Eo *prev_obj = edje_object_part_swallow_get(sd->backwall, "efl.content"); 367 Eo *prev_obj = edje_object_part_swallow_get(sd->backwall, "efl.content");
361 if (prev_obj) 368 if (prev_obj)
362 { 369 {
@@ -366,16 +373,23 @@ _efl_ui_popup_part_backwall_efl_file_file_set(Eo *obj, void *_pd EINA_UNUSED, co
366 } 373 }
367 374
368 Eo *image = elm_image_add(pd->obj); 375 Eo *image = elm_image_add(pd->obj);
369 Eina_Bool ret = elm_image_file_set(image, file, group); 376 Eina_Bool ret;
377 const Eina_File *f;
378
379 f = efl_file_mmap_get(obj);
380 if (f)
381 ret = elm_image_mmap_set(image, f, efl_file_key_get(obj));
382 else
383 ret = elm_image_file_set(image, efl_file_get(obj), efl_file_key_get(obj));
370 if (!ret) 384 if (!ret)
371 { 385 {
372 efl_del(image); 386 efl_del(image);
373 return EINA_FALSE; 387 return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
374 } 388 }
375 edje_object_part_swallow(sd->backwall, "efl.content", image); 389 edje_object_part_swallow(sd->backwall, "efl.content", image);
376 edje_object_signal_emit(sd->backwall, "efl,state,content,set", "efl"); 390 edje_object_signal_emit(sd->backwall, "efl,state,content,set", "efl");
377 391
378 return EINA_TRUE; 392 return 0;
379} 393}
380 394
381#include "efl_ui_popup_part_backwall.eo.c" 395#include "efl_ui_popup_part_backwall.eo.c"