struct _Widget_Data
{
- Evas_Object *ent, *scroller, *end, *icon;
+ Evas_Object *ent, *scroller;
Evas_Object *hoversel;
Ecore_Job *deferred_recalc_job;
Ecore_Event_Handler *sel_notify_handler;
if ((!wd) || (!content)) return;
edje = elm_smart_scroller_edje_object_get(wd->scroller);
+
+ /* Delete the currently swallowed object */
+ {
+ Evas_Object *cswallow = edje_object_part_swallow_get(edje, part);
+ if (cswallow)
+ evas_object_del(cswallow);
+ }
+
if (!strcmp(part, "elm.swallow.icon"))
{
- if (wd->icon)
- evas_object_del(wd->icon);
- wd->icon = content;
edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
}
else if (!strcmp(part, "elm.swallow.end"))
{
- if (wd->end)
- evas_object_del(wd->end);
- wd->end = content;
edje_object_signal_emit(edje, "elm,action,show,end", "elm");
}
evas_event_freeze(evas_object_evas_get(obj));
edje = elm_smart_scroller_edje_object_get(wd->scroller);
if (!strcmp(part, "elm.swallow.icon"))
{
- wd->icon = NULL;
edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
}
else if (!strcmp(part, "elm.swallow.end"))
{
- wd->end = NULL;
edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
}
Evas_Object *content = NULL, *edje;
if (!wd) return NULL;
- if (!strcmp(part, "elm.swallow.icon"))
- return wd->icon;
- if (!strcmp(part, "elm.swallow.end"))
- return wd->end;
-
edje = elm_smart_scroller_edje_object_get(wd->scroller);
if (edje)
content = edje_object_part_swallow_get(edje, part);
Evas_Object *edje;
edje = elm_smart_scroller_edje_object_get(wd->scroller);
- if (sub == wd->icon)
+ if (sub == edje_object_part_swallow_get(edje, "elm.swallow.icon"))
{
- wd->icon = NULL;
+ edje_object_part_unswallow(edje, sub);
if (edje)
edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
}
- else if (sub == wd->end)
+ else if (sub == edje_object_part_swallow_get(edje, "elm.swallow.end"))
{
- wd->end = NULL;
+ edje_object_part_unswallow(edje, sub);
if (edje)
edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
}
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *edje;
- if ((!wd) || (!wd->icon)) return;
+ if (!wd) return;
edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!edje_object_part_swallow_get(edje, "elm.swallow.icon")) return;
if (!edje) return;
if (setting)
edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *edje;
- if ((!wd) || (!wd->end)) return;
+ if (!wd) return;
edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!edje_object_part_swallow_get(edje, "elm.swallow.end")) return;
+
if (!edje) return;
if (setting)
edje_object_signal_emit(edje, "elm,action,show,end", "elm");