diff options
author | Abanoub Ghadban <abanoub.gdb@gmail.com> | 2021-06-05 13:11:36 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2021-07-09 09:52:40 +0200 |
commit | 3b226230fdd760eabe2f752eccf0e8daa6655feb (patch) | |
tree | 7a44eaa98d9eed75ac0166253204cf7cebc97860 | |
parent | a501aaf40e1f65b8301e6ba783159ff90f982e53 (diff) | |
download | nautilus-3b226230fdd760eabe2f752eccf0e8daa6655feb.tar.gz |
window-slot: Add file name to file not found dialog
Nautilus can show "Unable to find the requested file. Please check the
spelling and try again." error when starting. The message doesn't indicate
what file was not found. Let's add the file name to that dialog to make it
obvious.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1793
-rw-r--r-- | src/nautilus-window-slot.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c index 0310a3be0..0ae084795 100644 --- a/src/nautilus-window-slot.c +++ b/src/nautilus-window-slot.c @@ -1583,6 +1583,7 @@ nautilus_window_slot_display_view_selection_failure (NautilusWindow *window, char *error_message; char *detail_message; char *scheme_string; + char *file_path; /* Some sort of failure occurred. How 'bout we tell the user? */ @@ -1605,7 +1606,17 @@ nautilus_window_slot_display_view_selection_failure (NautilusWindow *window, { case G_IO_ERROR_NOT_FOUND: { - detail_message = g_strdup (_("Unable to find the requested file. Please check the spelling and try again.")); + file_path = g_file_get_path (location); + if (file_path != NULL) + { + detail_message = g_strdup_printf (_("Unable to find ā%sā. Please check the spelling and try again."), + file_path); + } + else + { + detail_message = g_strdup (_("Unable to find the requested file. Please check the spelling and try again.")); + } + g_free (file_path); } break; |