forked from enlightenment/enlightenment
ahh never too late for an API/ABI break. e_icon_file_get now returns edje group, which fixes fileman border icons
ticket #rasternaggedme SVN revision: 81387
This commit is contained in:
parent
23e2a04c29
commit
271f92f912
|
@ -7594,10 +7594,11 @@ static void
|
|||
_e_fm2_cb_icon_thumb_gen(void *data, Evas_Object *obj, void *event_info __UNUSED__)
|
||||
{
|
||||
E_Fm2_Icon *ic;
|
||||
const char *file;
|
||||
|
||||
ic = data;
|
||||
|
||||
if (e_icon_file_get(obj))
|
||||
if (e_icon_file_get(obj, &file, NULL))
|
||||
{
|
||||
Evas_Coord w = 0, h = 0;
|
||||
int have_alpha;
|
||||
|
|
|
@ -499,24 +499,30 @@ e_icon_object_set(Evas_Object *obj, Evas_Object *o)
|
|||
_e_icon_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
e_icon_file_get(const Evas_Object *obj)
|
||||
EAPI Eina_Bool
|
||||
e_icon_file_get(const Evas_Object *obj, const char **file, const char **group)
|
||||
{
|
||||
E_Smart_Data *sd;
|
||||
const char *file;
|
||||
|
||||
if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL);
|
||||
if (!(sd = evas_object_smart_data_get(obj))) return NULL;
|
||||
if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(EINA_FALSE);
|
||||
if ((!file) && (!group)) return EINA_FALSE;
|
||||
if (file) *file = NULL;
|
||||
if (group) *group = NULL;
|
||||
if (!(sd = evas_object_smart_data_get(obj))) return EINA_FALSE;
|
||||
#ifdef USE_ICON_CACHE
|
||||
if (sd->file) return sd->file;
|
||||
if (sd->file)
|
||||
{
|
||||
if (file) *file = sd->file;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
#endif
|
||||
if (sd->edje)
|
||||
{
|
||||
edje_object_file_get(sd->obj, &file, NULL);
|
||||
return file;
|
||||
edje_object_file_get(sd->obj, file, group);
|
||||
return file || group;
|
||||
}
|
||||
evas_object_image_file_get(sd->obj, &file, NULL);
|
||||
return file;
|
||||
evas_object_image_file_get(sd->obj, file, group);
|
||||
return file || group;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -13,7 +13,7 @@ EAPI Eina_Bool e_icon_file_edje_set (Evas_Object *obj, const char *file, c
|
|||
EAPI Eina_Bool e_icon_fdo_icon_set (Evas_Object *obj, const char *icon);
|
||||
EAPI void e_icon_edje_object_set(Evas_Object *obj, Evas_Object *edje);
|
||||
EAPI void e_icon_object_set (Evas_Object *obj, Evas_Object *o) EINA_DEPRECATED;
|
||||
EAPI const char *e_icon_file_get (const Evas_Object *obj);
|
||||
EAPI Eina_Bool e_icon_file_get(const Evas_Object *obj, const char **file, const char **group);
|
||||
EAPI void e_icon_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth);
|
||||
EAPI Eina_Bool e_icon_smooth_scale_get (const Evas_Object *obj);
|
||||
EAPI void e_icon_alpha_set (Evas_Object *obj, Eina_Bool smooth);
|
||||
|
|
|
@ -2238,9 +2238,9 @@ _e_fwin_border_set(E_Fwin_Page *page, E_Fwin *fwin, E_Fm2_Icon_Info *ici)
|
|||
}
|
||||
else
|
||||
{
|
||||
file = e_icon_file_get(oic);
|
||||
fwin->win->border->internal_icon =
|
||||
eina_stringshare_add(file);
|
||||
e_icon_file_get(oic, &file, &group);
|
||||
fwin->win->border->internal_icon = eina_stringshare_add(file);
|
||||
fwin->win->border->internal_icon_key = eina_stringshare_add(group);
|
||||
}
|
||||
evas_object_del(oic);
|
||||
if (fwin->win->border->placed) return;
|
||||
|
|
|
@ -390,7 +390,7 @@ _cb_up(void *data, void *data2 __UNUSED__)
|
|||
void *nddata;
|
||||
Evas_Object *ic;
|
||||
Eina_List *l;
|
||||
const char *lbl;
|
||||
const char *lbl, *file;
|
||||
int n;
|
||||
|
||||
if (!(cfdata = data)) return;
|
||||
|
@ -409,7 +409,8 @@ _cb_up(void *data, void *data2 __UNUSED__)
|
|||
e_widget_ilist_freeze(cfdata->used_list);
|
||||
|
||||
ic = e_icon_add(cfdata->evas);
|
||||
e_icon_file_set(ic, e_icon_file_get(e_widget_ilist_nth_icon_get(cfdata->used_list, n)));
|
||||
e_icon_file_get(e_widget_ilist_nth_icon_get(cfdata->used_list, n), &file, NULL);
|
||||
e_icon_file_set(ic, file);
|
||||
lbl = e_widget_ilist_nth_label_get(cfdata->used_list, n);
|
||||
e_widget_ilist_prepend_relative_full(cfdata->used_list, ic, NULL, lbl, _cb_used_select, cfdata, NULL, (n - 1));
|
||||
e_widget_ilist_remove_num(cfdata->used_list, n);
|
||||
|
@ -429,7 +430,7 @@ _cb_dn(void *data, void *data2 __UNUSED__)
|
|||
void *nddata;
|
||||
Evas_Object *ic;
|
||||
Eina_List *l;
|
||||
const char *lbl;
|
||||
const char *lbl, *file;
|
||||
int n;
|
||||
|
||||
if (!(cfdata = data)) return;
|
||||
|
@ -448,7 +449,8 @@ _cb_dn(void *data, void *data2 __UNUSED__)
|
|||
e_widget_ilist_freeze(cfdata->used_list);
|
||||
|
||||
ic = e_icon_add(cfdata->evas);
|
||||
e_icon_file_set(ic, e_icon_file_get(e_widget_ilist_nth_icon_get(cfdata->used_list, n)));
|
||||
e_icon_file_get(e_widget_ilist_nth_icon_get(cfdata->used_list, n), &file, NULL);
|
||||
e_icon_file_set(ic, file);
|
||||
lbl = e_widget_ilist_nth_label_get(cfdata->used_list, n);
|
||||
e_widget_ilist_append_relative_full(cfdata->used_list, ic, NULL, lbl, _cb_used_select, cfdata, NULL, n);
|
||||
e_widget_ilist_remove_num(cfdata->used_list, n);
|
||||
|
|
Loading…
Reference in New Issue