Forgot to rebase.

Merge branch 'master' of git+ssh://git.enlightenment.org/apps/ephoto
master
Stephen okra Houston 7 years ago
commit 2d61927ea7
  1. 2
      src/bin/ephoto_config.c
  2. 6
      src/bin/ephoto_file.c
  3. 17
      src/bin/ephoto_single_browser.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/>"

@ -478,6 +478,12 @@ _rename_confirm(void *data, Evas_Object *obj EINA_UNUSED,
_complete(ephoto, _("Error"),
_("There was an error renaming this file."));
}
else
{
if (ephoto->state == EPHOTO_STATE_SINGLE)
ephoto_single_browser_path_pending_set(ephoto->single_browser,
new_file_name);
}
evas_object_del(popup);
evas_object_freeze_events_set(ephoto->pager, EINA_FALSE);
elm_object_focus_set(ephoto->pager, EINA_TRUE);

@ -963,6 +963,15 @@ _delete_image(void *data, Evas_Object *obj EINA_UNUSED,
ephoto_file_delete(sb->ephoto, files, EINA_FILE_REG);
}
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)

Loading…
Cancel
Save