aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-19 17:00:10 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-19 17:00:10 +0000
commit271f92f9124eeea35ec801cf1947e00a2731f13d (patch)
tree319bf3946b757b0fb9dd3a7fbac54e9cd78d4edd
parent23e2a04c291b6bab302e936095935444f31fa8d3 (diff)
downloadenlightenment-271f92f9124eeea35ec801cf1947e00a2731f13d.tar.gz
enlightenment-271f92f9124eeea35ec801cf1947e00a2731f13d.tar.xz
enlightenment-271f92f9124eeea35ec801cf1947e00a2731f13d.zip
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
-rw-r--r--src/bin/e_fm.c3
-rw-r--r--src/bin/e_icon.c26
-rw-r--r--src/bin/e_icon.h2
-rw-r--r--src/modules/fileman/e_fwin.c6
-rw-r--r--src/modules/xkbswitch/e_mod_config.c10
5 files changed, 28 insertions, 19 deletions
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index a0c25fc55..2efb83196 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -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;
diff --git a/src/bin/e_icon.c b/src/bin/e_icon.c
index 34eaf5d8a..02c8d0d55 100644
--- a/src/bin/e_icon.c
+++ b/src/bin/e_icon.c
@@ -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
diff --git a/src/bin/e_icon.h b/src/bin/e_icon.h
index 2104a8422..6b33fa534 100644
--- a/src/bin/e_icon.h
+++ b/src/bin/e_icon.h
@@ -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);
diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c
index 2aa0f5c1e..ede0901b4 100644
--- a/src/modules/fileman/e_fwin.c
+++ b/src/modules/fileman/e_fwin.c
@@ -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;
diff --git a/src/modules/xkbswitch/e_mod_config.c b/src/modules/xkbswitch/e_mod_config.c
index 413cbcf8a..ef35d634d 100644
--- a/src/modules/xkbswitch/e_mod_config.c
+++ b/src/modules/xkbswitch/e_mod_config.c
@@ -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);