From a78acc35d790af56d4e8f9f4df46143a174ffd2f Mon Sep 17 00:00:00 2001 From: Gustavo Lima Chaves Date: Thu, 13 Mar 2014 00:20:32 -0300 Subject: [PATCH] Make zero-time switches between tabs flick-less. --- src/bin/main.c | 8 +++++--- src/bin/options_behavior.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/bin/main.c b/src/bin/main.c index 9ccb4a0c..55ab5538 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -1373,6 +1373,7 @@ _cb_prev(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { Term *term = data; Term *term2 = NULL; + Config *config = termio_config_get(term->term); if (term->focused) term2 = _term_prev_get(term); if (term2) @@ -1381,7 +1382,7 @@ _cb_prev(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) sp0 = _split_find(term->wn->win, term->term); sp = _split_find(term2->wn->win, term2->term); - if (sp == sp0) + if (sp == sp0 && config->tab_zoom >= 0.01) _sel_go(sp, term2); else { @@ -1396,7 +1397,8 @@ _cb_next(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { Term *term = data; Term *term2 = NULL; - + Config *config = termio_config_get(term->term); + if (term->focused) term2 = _term_next_get(term); if (term2) { @@ -1404,7 +1406,7 @@ _cb_next(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) sp0 = _split_find(term->wn->win, term->term); sp = _split_find(term2->wn->win, term2->term); - if (sp == sp0) + if (sp == sp0 && config->tab_zoom >= 0.01) _sel_go(sp, term2); else { diff --git a/src/bin/options_behavior.c b/src/bin/options_behavior.c index 1e671fad..ac3fa193 100644 --- a/src/bin/options_behavior.c +++ b/src/bin/options_behavior.c @@ -524,11 +524,21 @@ options_behavior(Evas_Object *opbox, Evas_Object *term) o = elm_label_add(bx); evas_object_size_hint_weight_set(o, 0.0, 0.0); evas_object_size_hint_align_set(o, 0.0, 0.5); - elm_object_text_set(o, "Tab Zoom Animation:"); + elm_object_text_set(o, "Tab zoom/switch animation time:"); + elm_object_tooltip_text_set + (o, "Set the time of the animation that
" + "takes places on tab switches,
" + "be them by key binding, mouse
" + "wheel or tabs panel mouse move"); elm_box_pack_end(bx, o); evas_object_show(o); o = elm_slider_add(bx); + elm_object_tooltip_text_set + (o, "Set the time of the animation that
" + "takes places on tab switches,
" + "be them by key binding, mouse
" + "wheel or tabs panel mouse move"); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0); elm_slider_span_size_set(o, 40);