okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=edd58aa3a6e0759acc499f441988240444dad6dd

commit edd58aa3a6e0759acc499f441988240444dad6dd
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Mon Nov 7 14:02:09 2016 -0600

    Ephoto: Go the next image when space bar is pressed.
    
    This fixes T4783
---
 src/bin/ephoto_config.c         |  1 +
 src/bin/ephoto_single_browser.c |  2 ++
 src/bin/ephoto_thumb_browser.c  | 26 +++++++++-----------------
 3 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 1615d33..92d08c1 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -409,6 +409,7 @@ _config_bindings(Evas_Object *parent)
            "<b>Home:</b> Navigate First<br/>"
            "<b>Left Arrow:</b> Navigate Previous<br/>"
            "<b>Right Arrow:</b> Navigate Next<br/>"
+           "<b>Space:</b> Navigate Next<br />"
            "<b>End:</b> Navigate Last<br/>"
            "<b>Ctrl+Delete:</b> Delete Image<br/>"
            "<b>F2</b> Rename Image<br/>"
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index ee52a66..59f6fca 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -1984,6 +1984,8 @@ _ephoto_main_key_down(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNU
       _prev_entry(sb);
    else if (!strcmp(k, "Right") && !sb->editing)
       _next_entry(sb);
+   else if (!strcmp(k, "space") && !sb->editing)
+      _next_entry(sb);
    else if (!strcmp(k, "Home") && !sb->editing)
       _first_entry(sb);
    else if (!strcmp(k, "End") && !sb->editing)
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 77c618f..0932c53 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -1531,9 +1531,7 @@ static Eina_Bool
 _ephoto_thumb_populate_start(void *data, int type EINA_UNUSED,
     void *event EINA_UNUSED)
 {
-   Ephoto *ephoto = data;
-   Ephoto_Thumb_Browser *tb =
-       evas_object_data_get(ephoto->thumb_browser, "thumb_browser");
+   Ephoto_Thumb_Browser *tb = data;
 
    if (tb->dirs_only)
      return ECORE_CALLBACK_PASS_ON;
@@ -1545,7 +1543,7 @@ _ephoto_thumb_populate_start(void *data, int type 
EINA_UNUSED,
    if (tb->searching)
      _ephoto_thumb_search_cancel(tb->search, NULL, NULL);
    _todo_items_free(tb);
-   ephoto_thumb_browser_clear(ephoto);
+   ephoto_thumb_browser_clear(tb->ephoto);
    tb->totimages = 0;
    tb->totsize = 0;
 
@@ -1556,9 +1554,7 @@ static Eina_Bool
 _ephoto_thumb_populate_end(void *data, int type EINA_UNUSED,
     void *event EINA_UNUSED)
 {
-   Ephoto *ephoto = data;
-   Ephoto_Thumb_Browser *tb =
-       evas_object_data_get(ephoto->thumb_browser, "thumb_browser");
+   Ephoto_Thumb_Browser *tb = data;
 
    if (tb->dirs_only)
      return ECORE_CALLBACK_PASS_ON;
@@ -1596,9 +1592,7 @@ static Eina_Bool
 _ephoto_thumb_populate_error(void *data, int type EINA_UNUSED,
     void *event EINA_UNUSED)
 {
-   Ephoto *ephoto = data;
-   Ephoto_Thumb_Browser *tb =
-       evas_object_data_get(ephoto->thumb_browser, "thumb_browser");
+   Ephoto_Thumb_Browser *tb = data;
 
    if (tb->dirs_only)
      return ECORE_CALLBACK_PASS_ON;
@@ -1612,9 +1606,7 @@ _ephoto_thumb_populate_error(void *data, int type 
EINA_UNUSED,
 static Eina_Bool
 _ephoto_thumb_entry_create(void *data, int type EINA_UNUSED, void *event)
 {
-   Ephoto *ephoto = data;
-   Ephoto_Thumb_Browser *tb =
-       evas_object_data_get(ephoto->thumb_browser, "thumb_browser");
+   Ephoto_Thumb_Browser *tb = data;
    Ephoto_Event_Entry_Create *ev = event;
    Ephoto_Entry *e;
 
@@ -2198,22 +2190,22 @@ ephoto_thumb_browser_add(Ephoto *ephoto, Evas_Object 
*parent)
    tb->handlers =
        eina_list_append(tb->handlers,
        ecore_event_handler_add(EPHOTO_EVENT_POPULATE_START,
-          _ephoto_thumb_populate_start, ephoto));
+          _ephoto_thumb_populate_start, tb));
 
    tb->handlers =
        eina_list_append(tb->handlers,
        ecore_event_handler_add(EPHOTO_EVENT_POPULATE_END,
-          _ephoto_thumb_populate_end, ephoto));
+          _ephoto_thumb_populate_end, tb));
 
    tb->handlers =
        eina_list_append(tb->handlers,
        ecore_event_handler_add(EPHOTO_EVENT_POPULATE_ERROR,
-          _ephoto_thumb_populate_error, ephoto));
+          _ephoto_thumb_populate_error, tb));
 
    tb->handlers =
        eina_list_append(tb->handlers,
        ecore_event_handler_add(EPHOTO_EVENT_ENTRY_CREATE,
-          _ephoto_thumb_entry_create, ephoto));
+          _ephoto_thumb_entry_create, tb));
 
    return tb->main;
 

-- 


Reply via email to