cedric pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=5f15fae4e70473cd85a1de94a502f2d9e941b4ba
commit 5f15fae4e70473cd85a1de94a502f2d9e941b4ba Author: Cedric BAIL <cedric.b...@samsung.com> Date: Fri Dec 13 14:58:36 2013 +0900 tabs: improve behavior by making possible to navigate between them by using mouse wheel. More theme work is needed, but first step for T449. --- data/themes/default.edc | 8 ++++++++ src/bin/main.c | 22 +++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/data/themes/default.edc b/data/themes/default.edc index bab182e..0346761 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -498,6 +498,14 @@ collections { signal: "mouse,clicked,1"; source: "tabcount_ev"; action: SIGNAL_EMIT "tabcount,go" "terminology"; } + program { + signal: "mouse,wheel,0,-1"; source: "tabcount_ev"; + action: SIGNAL_EMIT "tabcount,prev" "terminology"; + } + program { + signal: "mouse,wheel,0,1"; source: "tabcount_ev"; + action: SIGNAL_EMIT "tabcount,next" "terminology"; + } program { signal: "tabcount,off"; source: "terminology"; action: STATE_SET "default" 0.0; diff --git a/src/bin/main.c b/src/bin/main.c index 9367d01..31690d0 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -2000,6 +2000,18 @@ main_term_free(Term *term) } static void +_cb_tabcount_prev(void *data, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED) +{ + _cb_prev(data, NULL, NULL); +} + +static void +_cb_tabcount_next(void *data, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED) +{ + _cb_next(data, NULL, NULL); +} + +static void main_term_bg_config(Term *term) { if (term->config->translucent) @@ -2012,12 +2024,16 @@ main_term_bg_config(Term *term) edje_object_signal_emit(term->bg, "translucent,off", "terminology"); edje_object_signal_emit(term->base, "translucent,off", "terminology"); } - + termio_theme_set(term->term, term->bg); edje_object_signal_callback_add(term->bg, "popmedia,done", "terminology", _cb_popmedia_done, term); edje_object_signal_callback_add(term->bg, "tabcount,go", "terminology", _cb_tabcount_go, term); + edje_object_signal_callback_add(term->bg, "tabcount,prev", "terminology", + _cb_tabcount_prev, term); + edje_object_signal_callback_add(term->bg, "tabcount,next", "terminology", + _cb_tabcount_next, term); edje_object_part_swallow(term->base, "terminology.content", term->term); edje_object_part_swallow(term->bg, "terminology.content", term->base); if (term->popmedia) @@ -2165,6 +2181,10 @@ main_term_new(Win *wn, Config *config, const char *cmd, _cb_popmedia_done, term); edje_object_signal_callback_add(term->bg, "tabcount,go", "terminology", _cb_tabcount_go, term); + edje_object_signal_callback_add(term->bg, "tabcount,prev", "terminology", + _cb_tabcount_prev, term); + edje_object_signal_callback_add(term->bg, "tabcount,next", "terminology", + _cb_tabcount_next, term); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_fill_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); --