elm/genlist - Fix bounce option getter.
authorantognolli <antognolli@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 22 Jul 2011 17:15:33 +0000 (17:15 +0000)
committerantognolli <antognolli@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 22 Jul 2011 17:15:33 +0000 (17:15 +0000)
Try to get the bounce option from the internal els_scroller, and also
add checks on the els_scroller api to see if the arguments were given.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61592 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_genlist.c
src/lib/els_scroller.c

index c4137cd..305d40c 100644 (file)
@@ -5474,7 +5474,7 @@ elm_genlist_bounce_get(const Evas_Object *obj,
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   elm_smart_scroller_bounce_allow_get(obj, h_bounce, v_bounce);
+   elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
 }
 
 /**
index 5ccdaad..26028b2 100644 (file)
@@ -1277,8 +1277,8 @@ void
 elm_smart_scroller_bounce_allow_get(const Evas_Object *obj, Eina_Bool *horiz, Eina_Bool *vert)
 {
    API_ENTRY return;
-   *horiz = sd->bounce_horiz;
-   *vert = sd->bounce_vert;
+   if (horiz) *horiz = sd->bounce_horiz;
+   if (vert) *vert = sd->bounce_vert;
 }
 
 void