okra pushed a commit to branch master.

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

commit b73233d8fb42e497e6120a5929527094afa7f552
Author: Stephen Houston <stephen@lenovo.fedora>
Date:   Wed Apr 13 20:02:23 2016 -0500

    Ephoto: Add renme and delete to single browser.
---
 src/bin/ephoto_config.c         |  2 ++
 src/bin/ephoto_single_browser.c | 17 ++++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 44b70da..3853d94 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -361,6 +361,8 @@ _config_bindings(Evas_Object *parent)
            "<b>Left Arrow:</b> Navigate Previous<br/>"
            "<b>Right Arrow:</b> Navigate Next<br/>"
            "<b>End:</b> Navigate Last<br/>"
+           "<b>Ctrl+Delete:</b> Delete Image<br/>"
+           "<b>F2</b> Rename Image<br/>"
            "<b>Escape:</b> Return to Thumbnail Browser<br/><br/>"
            "<b><hilight>Slideshow Bindings</hilight></b><br/>"
            "<b>Space:</b> Play/Pause Slideshow<br/>"
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index ffed484..dc101e2 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -964,6 +964,15 @@ _delete_image(void *data, Evas_Object *obj EINA_UNUSED,
 }
 
 static void
+_rename_image(void *data, Evas_Object *obj EINA_UNUSED,
+    void *event_info EINA_UNUSED)
+{
+   Ephoto_Single_Browser *sb = data;
+   
+   ephoto_file_rename(sb->ephoto, sb->entry->path);
+}
+
+static void
 _go_first(void *data, Evas_Object *obj EINA_UNUSED,
     void *event_info EINA_UNUSED)
 {
@@ -1377,6 +1386,8 @@ _add_edit_menu_items(Ephoto_Single_Browser *sb, 
Evas_Object *menu)
        _save_image_as, sb);
    elm_menu_item_add(menu, menu_it, "document-send", _("Upload"), 
_upload_image,
        sb);
+   elm_menu_item_add(menu, menu_it, "edit", _("Rename"),
+            _rename_image, sb);
    elm_menu_item_add(menu, menu_it, "edit-delete", _("Delete"),
             _delete_image, sb);
    menu_it =
@@ -1427,7 +1438,7 @@ _add_edit_menu_items(Ephoto_Single_Browser *sb, 
Evas_Object *menu)
        elm_menu_item_add(menu, NULL, "document-properties", _("View"), NULL,
        NULL);  
    menu_itt =
-       elm_menu_item_add(menu, menu_it, "go-first", _("Go"), NULL, NULL);
+       elm_menu_item_add(menu, menu_it, "go-next", _("Go"), NULL, NULL);
    elm_menu_item_add(menu, menu_itt, "go-first", _("First"), _go_first, sb);
    elm_menu_item_add(menu, menu_itt, "go-previous", _("Previous"), _go_prev, 
sb);
    elm_menu_item_add(menu, menu_itt, "go-next", _("Next"), _go_next, sb);
@@ -1543,6 +1554,10 @@ _ephoto_main_key_down(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNU
      {
         _ephoto_show_settings(sb, NULL, NULL);
      }
+   else if (!strcmp(k, "F2"))
+     {
+        _rename_image(sb, NULL, NULL);
+     }
    else if (!strcmp(k, "F5") && !sb->editing)
      {
        if (sb->entry)

-- 


Reply via email to