* is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
* can changed the theme API */
static void
-_icon_signal_emit(Evas_Object *obj)
+_icon_signal_emit(Evas_Object *obj, Eina_Bool vis)
{
char buf[64];
if (!elm_widget_resize_object_get(obj)) return;
- snprintf(buf, sizeof(buf), "elm,state,icon,%s",
- elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
+ snprintf(buf, sizeof(buf), "elm,state,icon,%s", vis ? "visible" : "hidden");
elm_layout_signal_emit(obj, buf, "elm");
edje_object_message_signal_process(elm_layout_edje_get(obj));
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_FAILED;
- _icon_signal_emit(obj);
+ _icon_signal_emit(obj, !!elm_layout_content_get(obj, "icon"));
#ifdef TIZEN_VECTOR_UX
tizen_vg_button_set(obj);
int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS), sobj);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _icon_signal_emit(obj, EINA_FALSE);
return EINA_TRUE;
}
int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS), part), content);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ if (content)
+ _icon_signal_emit(obj, EINA_TRUE);
return EINA_TRUE;
}
* is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
* can changed the theme API */
static void
-_icon_signal_emit(Evas_Object *obj)
+_icon_signal_emit(Evas_Object *obj, Eina_Bool vis)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
char buf[64];
if (!elm_widget_resize_object_get(obj)) return;
- snprintf(buf, sizeof(buf), "elm,state,icon,%s",
- elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
+ snprintf(buf, sizeof(buf), "elm,state,icon,%s", vis ? "visible" : "hidden");
elm_layout_signal_emit(obj, buf, "elm");
edje_object_message_signal_process(wd->resize_obj);
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_FAILED;
- _icon_signal_emit(obj);
+ _icon_signal_emit(obj, !!elm_layout_content_get(obj, "icon"));
return int_ret;
}
int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS), sobj);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _icon_signal_emit(obj, EINA_FALSE);
return EINA_TRUE;
}
int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS), part), content);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ if (content)
+ _icon_signal_emit(obj, EINA_TRUE);
return EINA_TRUE;
}
* is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
* can changed the theme API */
static void
-_icon_signal_emit(Evas_Object *obj)
+_icon_signal_emit(Evas_Object *obj, Eina_Bool vis)
{
char buf[64];
if (!elm_widget_resize_object_get(obj)) return;
- snprintf(buf, sizeof(buf), "elm,state,icon,%s",
- elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
+ snprintf(buf, sizeof(buf), "elm,state,icon,%s", vis ? "visible" : "hidden");
elm_layout_signal_emit(obj, buf, "elm");
edje_object_message_signal_process(elm_layout_edje_get(obj));
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS));
if (!int_ret) return EFL_UI_THEME_APPLY_FAILED;
- _icon_signal_emit(obj);
+ _icon_signal_emit(obj, !!elm_layout_content_get(obj, "icon"));
return int_ret;
}
int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS), sobj);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _icon_signal_emit(obj, EINA_FALSE);
return EINA_TRUE;
}
int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS), part), content);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ if (content)
+ _icon_signal_emit(obj, EINA_TRUE);
return EINA_TRUE;
}
* is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
* can changed the theme API */
static void
-_icon_signal_emit(Evas_Object *obj)
+_icon_signal_emit(Evas_Object *obj, Eina_Bool vis)
{
char buf[63];
Eo *edje;
edje = elm_widget_resize_object_get(obj);
if (!edje) return;
- snprintf(buf, sizeof(buf), "elm,state,icon,%s",
- elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
+ snprintf(buf, sizeof(buf), "elm,state,icon,%s", vis ? "visible" : "hidden");
elm_layout_signal_emit(obj, buf, "elm");
edje_object_message_signal_process(edje);
/* FIXME: replicated from elm_layout just because radio's icon
* spot is elm.swallow.content, not elm.swallow.icon. Fix that
* whenever we can changed the theme API */
- _icon_signal_emit(obj);
+ _icon_signal_emit(obj, !!elm_layout_content_get(obj, "icon"));
return int_ret;
}
int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_RADIO_LEGACY_CLASS), sobj);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ _icon_signal_emit(obj, EINA_FALSE);
return EINA_TRUE;
}
int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_RADIO_LEGACY_CLASS), part), content);
if (!int_ret) return EINA_FALSE;
- _icon_signal_emit(obj);
+ if (content)
+ _icon_signal_emit(obj, EINA_TRUE);
return EINA_TRUE;
}