mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 02:36:07 +00:00
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
This commit is contained in:
parent
a501aaf40e
commit
3b226230fd
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue