make page-up/down select item one page further
authorHannes Janetzek <hannes.janetzek@gmail.com>
Tue, 1 Jun 2010 15:45:01 +0000 (15:45 +0000)
committerHannes Janetzek <hannes.janetzek@gmail.com>
Tue, 1 Jun 2010 15:45:01 +0000 (15:45 +0000)
unfocus gadget icon on hide

SVN revision: 49374

src/modules/everything/evry_gadget.c
src/modules/everything/evry_view.c
src/modules/everything/evry_view_tabs.c

index 582470b..258c805 100644 (file)
@@ -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
index 7dcf93f..00eaa4c 100644 (file)
@@ -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)
index 07fa165..025ee3f 100644 (file)
@@ -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"))
          {