Commit 8affcf9d authored by Guido Gunther's avatar Guido Gunther

Don't wait for timeout to expire if button has only a single symbol

parent 9804ec63
......@@ -79,7 +79,7 @@ button_clicked_cb(HdyDialerCycleButton *self, GdkEventButton *event)
g_return_val_if_fail (HDY_IS_DIALER_CYCLE_BUTTON (self), FALSE);
/* Only cycle if we have more than one symbol */
if (!strlen(hdy_dialer_button_get_letters (HDY_DIALER_BUTTON (self))))
if (strlen(hdy_dialer_button_get_letters (HDY_DIALER_BUTTON (self))) < 2)
return FALSE;
if (hdy_dialer_cycle_button_is_cycling(self)) {
......
......@@ -87,7 +87,7 @@ hdy_cycle_button_clicked (HdyDialer *self, HdyDialerCycleButton *btn)
if (priv->cycle_btn != btn) {
stop_cycle_mode (self);
priv->cycle_btn = btn;
} else if (priv->number->len) {
} else if (priv->number->len && hdy_dialer_cycle_button_is_cycling (btn)) {
hdy_string_utf8_truncate (priv->number, hdy_string_utf8_len (priv->number)-1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment