From 47bcca08ec0199050c571e19c5441b49f12c2bfe Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Tue, 1 Jun 2010 15:45:01 +0000 Subject: [PATCH] make page-up/down select item one page further unfocus gadget icon on hide SVN revision: 49374 --- src/modules/everything/evry_gadget.c | 1 + src/modules/everything/evry_view.c | 31 +++++++++++++++++++++++++++++++ src/modules/everything/evry_view_tabs.c | 21 ++++++++++++--------- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/src/modules/everything/evry_gadget.c b/src/modules/everything/evry_gadget.c index 582470b..258c805 100644 --- a/src/modules/everything/evry_gadget.c +++ b/src/modules/everything/evry_gadget.c @@ -128,6 +128,7 @@ static void _del_func(void *data, void *obj) e_object_delfn_del(E_OBJECT(inst->win->popup), inst->del_fn); inst->del_fn = NULL; inst->win = NULL; + edje_object_signal_emit(inst->o_button, "e,state,unfocused", "e"); } static void diff --git a/src/modules/everything/evry_view.c b/src/modules/everything/evry_view.c index 7dcf93f..00eaa4c 100644 --- a/src/modules/everything/evry_view.c +++ b/src/modules/everything/evry_view.c @@ -755,6 +755,8 @@ _child_region_get(Evas_Object *obj, Evas_Coord y, Evas_Coord h) if (ny > y) ny = y; } + if (ny < 0) ny = 0; + return ny; } @@ -1296,6 +1298,35 @@ _cb_key_down(Evry_View *view, const Ecore_Event_Key *ev) } goto end; } + else if ((!strcmp(key, "Prior") || (!strcmp(key, "Next")))) + { + int cur = 0; + int next = (!strcmp(key, "Next")); + if (sd->cur_item) + cur = sd->cur_item->y; + + EINA_LIST_FOREACH(sd->items, l, it) + { + if (next) + { + if (it->y >= cur + sd->h) break; + } + else + { + if (it->y >= cur - sd->h) break; + } + + if (!l->next) + break; + } + + if (it) + { + _pan_item_select(v->span, it, 0); + evry_item_select(s, it->item); + } + goto end; + } else if (!ev->modifiers && !strcmp(key, "Return")) { if (v->mode == VIEW_MODE_THUMB) diff --git a/src/modules/everything/evry_view_tabs.c b/src/modules/everything/evry_view_tabs.c index 07fa165..025ee3f 100644 --- a/src/modules/everything/evry_view_tabs.c +++ b/src/modules/everything/evry_view_tabs.c @@ -351,22 +351,25 @@ _tabs_key_down(Tab_View *v, const Ecore_Event_Key *ev) if (!v->state || !v->state->cur_plugins) return 0; - if (!strcmp(key, "Next")) + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) { - _plugin_next(v); - return 1; - } - else if (!strcmp(key, "Prior")) - { - _plugin_prev(v); - return -1; + if (!strcmp(key, "Next")) + { + _plugin_next(v); + return 1; + } + else if (!strcmp(key, "Prior")) + { + _plugin_prev(v); + return 1; + } } else if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) { if (!strcmp(key, "Left")) { _plugin_prev(v); - return -1; + return 1; } else if (!strcmp(key, "Right")) { -- 2.7.4