button,inwin,radio,scroller,slider: Do not call smart_activate when the widget is...
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 8 Nov 2013 12:49:52 +0000 (21:49 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 8 Nov 2013 12:49:52 +0000 (21:49 +0900)
legacy/elementary/src/lib/elm_button.c
legacy/elementary/src/lib/elm_inwin.c
legacy/elementary/src/lib/elm_radio.c
legacy/elementary/src/lib/elm_scroller.c
legacy/elementary/src/lib/elm_slider.c

index 835ba32..d89916f 100644 (file)
@@ -82,14 +82,12 @@ _elm_button_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
    Eina_Bool *ret = va_arg(*list, Eina_Bool *);
    if (ret) *ret = EINA_FALSE;
 
+   if (elm_widget_disabled_get(obj)) return;
    if (act != ELM_ACTIVATE_DEFAULT) return;
+   if (evas_object_freeze_events_get(obj)) return;
 
-   if (!elm_widget_disabled_get(obj) &&
-       !evas_object_freeze_events_get(obj))
-     {
-        evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
-        elm_layout_signal_emit(obj, "elm,anim,activate", "elm");
-     }
+   evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
+   elm_layout_signal_emit(obj, "elm,anim,activate", "elm");
 
    if (ret) *ret = EINA_TRUE;
 }
index 8d7ed11..16696bc 100644 (file)
@@ -140,6 +140,8 @@ _elm_inwin_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNU
 {
    ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
 
+   if (elm_widget_disabled_get(obj)) return;
+
    evas_object_raise(obj);
    evas_object_show(obj);
    edje_object_signal_emit
index 6883784..d30d6cc 100644 (file)
@@ -526,6 +526,7 @@ _elm_radio_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
    Eina_Bool *ret = va_arg(*list, Eina_Bool *);
    if (ret) *ret = EINA_FALSE;
 
+   if (elm_widget_disabled_get(obj)) return;
    if (act != ELM_ACTIVATE_DEFAULT) return;
 
    _activate(obj);
index 0107121..48ffa5c 100644 (file)
@@ -270,8 +270,8 @@ _elm_scroller_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
    Evas_Coord page_x = 0;
    Evas_Coord page_y = 0;
 
-   if ((elm_widget_disabled_get(obj)) ||
-       (act == ELM_ACTIVATE_DEFAULT)) return;
+   if (elm_widget_disabled_get(obj)) return;
+   if (act != ELM_ACTIVATE_DEFAULT) return;
 
    eo_do(obj,
          elm_scrollable_interface_content_pos_get(&x, &y),
index 6689566..8ae88e4 100644 (file)
@@ -457,8 +457,8 @@ _elm_slider_smart_activate(Eo *obj, void *_pd, va_list *list)
    if (ret) *ret = EINA_FALSE;
    Elm_Slider_Smart_Data *sd = _pd;
 
-   if ((elm_widget_disabled_get(obj)) ||
-       (act == ELM_ACTIVATE_DEFAULT)) return;
+   if (elm_widget_disabled_get(obj)) return;
+   if (act != ELM_ACTIVATE_DEFAULT) return;
 
    if ((act == ELM_ACTIVATE_UP) ||
        (act == ELM_ACTIVATE_RIGHT))