elm_menu: Deprecate elm_menu_item_object_icon_name_get/set and rename it to elm_menu_...
authorpespin <pespin@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Mar 2012 12:05:10 +0000 (12:05 +0000)
committerpespin <pespin@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Mar 2012 12:05:10 +0000 (12:05 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68568 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_deprecated.h
src/lib/elm_menu.c
src/lib/elm_menu.h

index d7487ba..4fa6563 100644 (file)
@@ -2014,6 +2014,28 @@ EINA_DEPRECATED EAPI void                         elm_menu_item_del(Elm_Object_I
 EINA_DEPRECATED EAPI Evas_Object                 *elm_menu_item_menu_get(const Elm_Object_Item *it);
 
 /**
+ * @brief Set the icon of a menu item to the standard icon with name @p icon
+ *
+ * @param it The menu item object.
+ * @param icon The icon object to set for the content of @p item
+ *
+ * @deprecated elm_menu_item_icon_name_set() instead
+ * Once this icon is set, any previously set icon will be deleted.
+ */
+EINA_DEPRECATED EAPI void                         elm_menu_item_object_icon_name_set(Elm_Object_Item *it, const char *icon);
+
+/**
+ * @brief Get the string representation from the icon of a menu item
+ *
+ * @param it The menu item object.
+ * @return The string representation of @p item's icon or NULL
+ *
+ * @deprecated elm_menu_item_icon_name_get() instead
+ * @see elm_menu_item_icon_name_set()
+ */
+EINA_DEPRECATED EAPI const char                  *elm_menu_item_object_icon_name_get(const Elm_Object_Item *it);
+
+/**
  * @brief Set the content of the notify widget
  *
  * @param obj The notify object
index c1d7921..00a9fb1 100644 (file)
@@ -117,7 +117,7 @@ _theme_hook(Evas_Object *obj)
                       elm_widget_style_get(obj));
                   elm_object_item_text_set((Elm_Object_Item *) item,
                                            item->label);
-                  elm_menu_item_object_icon_name_set((Elm_Object_Item *) item,
+                  elm_menu_item_icon_name_set((Elm_Object_Item *) item,
                                                      item->icon_str);
                }
              else
@@ -126,7 +126,7 @@ _theme_hook(Evas_Object *obj)
                                         elm_widget_style_get(obj));
                   elm_object_item_text_set((Elm_Object_Item *) item,
                                            item->label);
-                  elm_menu_item_object_icon_name_set((Elm_Object_Item *) item,
+                  elm_menu_item_icon_name_set((Elm_Object_Item *) item,
                                                      item->icon_str);
                }
              _item_disable_hook((Elm_Object_Item *) item);
@@ -498,7 +498,7 @@ _item_submenu_obj_create(Elm_Menu_Item *item)
    elm_object_item_text_set((Elm_Object_Item *) item,
                             item->label);
    if (item->icon_str)
-     elm_menu_item_object_icon_name_set((Elm_Object_Item *) item,
+     elm_menu_item_icon_name_set((Elm_Object_Item *) item,
                                         item->icon_str);
    edje_object_signal_callback_add(VIEW(item), "elm,action,open", "",
                                    _submenu_open, item);
@@ -744,7 +744,7 @@ elm_menu_item_add(Evas_Object *obj, Elm_Object_Item *parent, const char *icon, c
    elm_widget_sub_object_add(WIDGET(subitem), subitem->content);
    edje_object_part_swallow(VIEW(subitem), "elm.swallow.content", subitem->content);
    if (icon)
-     elm_menu_item_object_icon_name_set((Elm_Object_Item *) subitem, icon);
+     elm_menu_item_icon_name_set((Elm_Object_Item *) subitem, icon);
 
    _elm_menu_item_add_helper(obj, (Elm_Menu_Item *) parent, subitem, wd);
 
@@ -805,9 +805,15 @@ elm_menu_item_label_get(const Elm_Object_Item *it)
    return _item_text_get_hook(it, NULL);
 }
 
-EAPI void
+EINA_DEPRECATED EAPI void
 elm_menu_item_object_icon_name_set(Elm_Object_Item *it, const char *icon)
 {
+   elm_menu_item_icon_name_set(it, icon);
+}
+
+EAPI void
+elm_menu_item_icon_name_set(Elm_Object_Item *it, const char *icon)
+{
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
    EINA_SAFETY_ON_NULL_RETURN(icon);
    char icon_tmp[512];
@@ -896,9 +902,15 @@ elm_menu_item_object_content_get(const Elm_Object_Item *it)
    return _item_content_get_hook(it, NULL);
 }
 
-EAPI const char *
+EINA_DEPRECATED EAPI const char *
 elm_menu_item_object_icon_name_get(const Elm_Object_Item *it)
 {
+   return elm_menu_item_icon_name_get(it);
+}
+
+EAPI const char *
+elm_menu_item_icon_name_get(const Elm_Object_Item *it)
+{
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
    return ((Elm_Menu_Item *) it)->icon_str;
 }
index f720d63..f212a09 100644 (file)
@@ -135,7 +135,7 @@ EAPI Elm_Object_Item             *elm_menu_item_add_object(Evas_Object *obj, Elm
  *
  * Once this icon is set, any previously set icon will be deleted.
  */
-EAPI void                         elm_menu_item_object_icon_name_set(Elm_Object_Item *it, const char *icon);
+EAPI void                         elm_menu_item_icon_name_set(Elm_Object_Item *it, const char *icon);
 
 /**
  * @brief Get the string representation from the icon of a menu item
@@ -143,9 +143,9 @@ EAPI void                         elm_menu_item_object_icon_name_set(Elm_Object_
  * @param it The menu item object.
  * @return The string representation of @p item's icon or NULL
  *
- * @see elm_menu_item_object_icon_name_set()
+ * @see elm_menu_item_icon_name_set()
  */
-EAPI const char                  *elm_menu_item_object_icon_name_get(const Elm_Object_Item *it);
+EAPI const char                  *elm_menu_item_icon_name_get(const Elm_Object_Item *it);
 
 /**
  * @brief Set the selected state of @p item.