{
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
+ if (wd->timer)
+ {
+ ecore_timer_del(wd->timer);
+ wd->timer = NULL;
+ }
+ wd->repeating = EINA_FALSE;
evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
_signal_unpressed(data, obj, emission, source); /* safe guard when the theme does not emit the 'unpress' signal */
}
if (!wd) return ECORE_CALLBACK_CANCEL;
evas_object_smart_callback_call(data, SIG_REPEATED, NULL);
+ if (!wd->repeating)
+ {
+ wd->timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
return ECORE_CALLBACK_RENEW;
}
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return ECORE_CALLBACK_CANCEL;
+ if (wd->timer) ecore_timer_del(wd->timer);
+ wd->repeating = EINA_TRUE;
_autorepeat_send(data);
wd->timer = ecore_timer_add(wd->ar_interval, _autorepeat_send, data);
- wd->repeating = 1;
return ECORE_CALLBACK_CANCEL;
}
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
- if (wd->autorepeat)
+ if (wd->autorepeat && !wd->repeating)
{
if (wd->ar_threshold <= 0.0)
_autorepeat_initial_send(data); /* call immediately */
{
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
- evas_object_smart_callback_call(data, SIG_UNPRESSED, NULL);
if (wd->timer)
{
ecore_timer_del(wd->timer);
wd->timer = NULL;
}
- wd->repeating = 0;
+ wd->repeating = EINA_FALSE;
+ evas_object_smart_callback_call(data, SIG_UNPRESSED, NULL);
}
/**
wd->timer = NULL;
}
wd->autorepeat = on;
+ wd->repeating = EINA_FALSE;
}
/**
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->ar_interval == t) return;
- if (wd->timer)
- {
- ecore_timer_del(wd->timer);
- wd->timer = NULL;
- }
+
wd->ar_interval = t;
- if (wd->repeating)
- wd->timer = ecore_timer_add(t, _autorepeat_send, obj);
+ if (wd->repeating && wd->timer) ecore_timer_interval_set(wd->timer, t);
}