eina_stringshare_del(cfg->indicator_service_90);
eina_stringshare_del(cfg->indicator_service_180);
eina_stringshare_del(cfg->indicator_service_270);
+ eina_stringshare_del(cfg->icon_theme);
free(cfg);
}
EAPI const char *
elm_config_icon_theme_get(void)
{
+ if (!_elm_config->icon_theme)
+ return ELM_CONFIG_ICON_THEME_ELEMENTARY;
+
return _elm_config->icon_theme;
}
ELM_ICON_DATA_GET(obj, sd);
- /* try locating the icon using the specified lookup order */
- switch (sd->lookup_order)
+ /* try locating the icon using the specified theme */
+ if (!strcmp(ELM_CONFIG_ICON_THEME_ELEMENTARY, elm_config_icon_theme_get()))
{
- case ELM_ICON_LOOKUP_FDO:
- ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
- if (ret && fdo) *fdo = EINA_TRUE;
- break;
-
- case ELM_ICON_LOOKUP_THEME:
- ret = _icon_standard_set(obj, name);
- break;
-
- case ELM_ICON_LOOKUP_THEME_FDO:
ret = _icon_standard_set(obj, name);
- if (!ret)
- {
- ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
- if (ret && fdo) *fdo = EINA_TRUE;
- }
- break;
-
- case ELM_ICON_LOOKUP_FDO_THEME:
- default:
+ if (ret && fdo) *fdo = EINA_FALSE;
+ }
+ else
+ {
ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
- if (!ret)
- ret = _icon_standard_set(obj, name);
- else if (fdo)
- *fdo = EINA_TRUE;
- break;
+ if (ret && fdo) *fdo = EINA_TRUE;
}
if (ret)
}
if (_path_is_absolute(name))
- return _icon_file_set(sd, obj, name);
+ {
+ if (fdo)
+ *fdo = EINA_FALSE;
+ return _icon_file_set(sd, obj, name);
+ }
/* if that fails, see if icon name is in the format size/name. if so,
try locating a fallback without the size specification */
if (!(tmp = strchr(name, '/'))) return EINA_FALSE;
++tmp;
- if (*tmp) return elm_icon_standard_set(obj, tmp);
+ if (*tmp) return _internal_elm_icon_standard_set(obj, tmp, fdo);
/* give up */
return EINA_FALSE;
}
evas_obj_smart_add(eo_super(obj, MY_CLASS));
elm_widget_sub_object_parent_add(obj);
- priv->lookup_order = ELM_ICON_LOOKUP_THEME_FDO;
-
priv->thumb.request = NULL;
}
return sd->stdicon;
}
-EOLIAN static void
-_elm_icon_order_lookup_set(Eo *obj EINA_UNUSED, Elm_Icon_Data *sd, Elm_Icon_Lookup_Order order)
+EINA_DEPRECATED EOLIAN static void
+_elm_icon_order_lookup_set(Eo *obj EINA_UNUSED, Elm_Icon_Data *sd EINA_UNUSED,
+ Elm_Icon_Lookup_Order order EINA_UNUSED)
{
- sd->lookup_order = order;
+ // this method's behaviour has been overridden by elm_config_icon_theme_set
}
-EOLIAN static Elm_Icon_Lookup_Order
-_elm_icon_order_lookup_get(Eo *obj EINA_UNUSED, Elm_Icon_Data *sd)
+EINA_DEPRECATED EOLIAN static Elm_Icon_Lookup_Order
+_elm_icon_order_lookup_get(Eo *obj EINA_UNUSED, Elm_Icon_Data *sd EINA_UNUSED)
{
- return sd->lookup_order;
+ return ELM_ICON_LOOKUP_FDO_THEME;
}
EAPI void
{
[[Lookup order used by elm_icon_standard_set(). Should look for icons in
the theme, FDO paths, or both?
+
+ Warning: This enum will be removed as the lookup_order is deprecated.
]]
legacy: elm_icon_lookup;
fdo_theme, [[Icon look up order: freedesktop, theme.]]
eo_prefix: elm_obj_icon;
methods {
@property order_lookup {
+ [[Warning: the order_lookup property is deprecated.
+ See elm_config_icon_theme_set instead.]]
set {
[[Sets the icon lookup order used by elm_icon_standard_set().
elm_interface_atspi_accessible_type_set(VIEW(it), ELM_ATSPI_TYPE_DISABLED);
icon_obj = elm_icon_add(VIEW(it));
- elm_icon_order_lookup_set(icon_obj, sd->lookup_order);
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
_access_widget_item_register(it);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move_cb, obj);
evas_object_event_callback_add
(priv->bx, EVAS_CALLBACK_RESIZE, _resize_cb, obj);
- elm_toolbar_icon_order_lookup_set(obj, ELM_ICON_LOOKUP_THEME_FDO);
_elm_toolbar_highlight_in_theme(obj);
_sizing_eval(obj);
}
icon_obj = elm_icon_add(obj);
- elm_icon_order_lookup_set(icon_obj, sd->lookup_order);
if (!icon_obj) goto error_state_add;
if (!_item_icon_set(icon_obj, "toolbar/", icon))
return eina_list_data_get(prev_state);
}
-EOLIAN static void
-_elm_toolbar_icon_order_lookup_set(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, Elm_Icon_Lookup_Order order)
+EINA_DEPRECATED EOLIAN static void
+_elm_toolbar_icon_order_lookup_set(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd EINA_UNUSED,
+ Elm_Icon_Lookup_Order order EINA_UNUSED)
{
- Elm_Toolbar_Item_Data *it;
-
-
- if (sd->lookup_order == order) return;
- sd->lookup_order = order;
- EINA_INLIST_FOREACH(sd->items, it)
- elm_icon_order_lookup_set(it->icon, order);
- if (sd->more_item)
- elm_icon_order_lookup_set(sd->more_item->icon, order);
+ // this method's behaviour has been overridden by elm_config_icon_theme_set
}
-EOLIAN static Elm_Icon_Lookup_Order
-_elm_toolbar_icon_order_lookup_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
+EINA_DEPRECATED EOLIAN static Elm_Icon_Lookup_Order
+_elm_toolbar_icon_order_lookup_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd EINA_UNUSED)
{
- return sd->lookup_order;
+ return ELM_ICON_LOOKUP_FDO_THEME;
}
EOLIAN static void
[[Sets icon lookup order, for toolbar items' icons.
Icons added before calling this function will not be affected.
- The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO.]]
+ The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO.
+
+ Warning: the icon_order_lookup property is deprecated.
+ See elm_config_icon_theme_set instead.]]
set {
}
get {
{
Evas_Object *obj; // the object itself
const char *stdicon;
- Elm_Icon_Lookup_Order lookup_order;
struct
{
Elm_Object_Item *last_focused_item; /**< This records the last focused item when widget looses focus. This is required to set the focus on last focused item when widgets gets focus. */
Elm_Toolbar_Item_Data *reorder_empty, *reorder_item;
Elm_Toolbar_Shrink_Mode shrink_mode;
- Elm_Icon_Lookup_Order lookup_order;
int theme_icon_size, priv_icon_size,
icon_size;
int standard_priority;