kill off some unused variables, return values on some widtype check fails
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 27 May 2010 09:01:41 +0000 (09:01 +0000)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 27 May 2010 09:01:41 +0000 (09:01 +0000)
SVN revision: 49222

src/lib/elm_config.c
src/lib/elm_hover.c
src/lib/elm_index.c
src/lib/elm_toolbar.c

index 97a265d..bb112b8 100644 (file)
@@ -364,7 +364,7 @@ _config_load(void)
 static void
 _env_get(void)
 {
-   char buf[PATH_MAX], *p, *s;
+   char *s;
    
    s = getenv("ELM_ENGINE");
    if (s)
index 2508aab..9e0d43c 100644 (file)
@@ -399,7 +399,7 @@ elm_hover_target_get(Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
+   if (!wd) return NULL;
 
    return wd->target;
 }
@@ -417,7 +417,7 @@ elm_hover_parent_get(Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
+   if (!wd) return NULL;
 
    return wd->parent;
 }
index 6cd0ee2..31c1a1f 100644 (file)
@@ -825,7 +825,7 @@ elm_index_item_del(Evas_Object *obj, const void *item)
 EAPI Elm_Index_Item *
 elm_index_item_find(Evas_Object *obj, const void *item)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
    return _item_find(obj, item);
index 10173f9..94763e7 100644 (file)
@@ -659,10 +659,10 @@ elm_toolbar_scrollable_set(Evas_Object *obj, Eina_Bool scrollable)
 EAPI Eina_Bool
 elm_toolbar_scrollable_get(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) 0;
    Widget_Data *wd = elm_widget_data_get(obj);
 
-   if (!wd) return;
+   if (!wd) return 0;
    return wd->scrollable;
 }
 
@@ -696,10 +696,10 @@ elm_toolbar_homogenous_set(Evas_Object *obj, Eina_Bool homogenous)
 EAPI Eina_Bool
 elm_toolbar_homogenous_get(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) 0;
    Widget_Data *wd = elm_widget_data_get(obj);
 
-   if (!wd) return;
+   if (!wd) return 0;
    return wd->homogeneous;
 }
 
@@ -774,6 +774,21 @@ elm_toolbar_item_unselect_all(Evas_Object *obj)
 }
 
 /**
+ * Unselect the specified toolbar item.
+ *
+ * @param item The toolbar item
+ *
+ * @ingroup Toolbar
+ */
+EAPI void
+elm_toolbar_item_unselect(Elm_Toolbar_Item *item)
+{
+   if ((!item) || (!item->selected)) return;
+   item->selected = EINA_FALSE;
+   edje_object_signal_emit(item->base, "elm,state,unselected", "elm");
+}
+
+/**
  * Set the alignment of the items.
  *
  * @param obj The toolbar object
@@ -874,8 +889,6 @@ elm_toolbar_item_menu_get(Elm_Toolbar_Item *item)
 EAPI Eina_List *
 elm_toolbar_item_get_all(Evas_Object *obj)
 {
-   Eina_List *l;
-   Elm_Toolbar_Item *it;
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
@@ -895,7 +908,6 @@ elm_toolbar_item_get_all(Evas_Object *obj)
 EAPI Elm_Toolbar_Item *
 elm_toolbar_item_get_first(Evas_Object *obj)
 {
-   Eina_List *l;
    Elm_Toolbar_Item *it;
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -917,7 +929,7 @@ elm_toolbar_item_get_first(Evas_Object *obj)
 EAPI Elm_Toolbar_Item *
 elm_toolbar_item_get_last(Evas_Object *obj)
 {
-   Eina_List *l, *last;
+   Eina_List *last;
    Elm_Toolbar_Item *it;
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);