forked from AuroraMiddleware/gtk
Merge branch 'gtk-4-improve-error-message' into 'master'
gtkplacessidebar: Improve error message when unlocking volume fails See merge request GNOME/gtk!267
This commit is contained in:
commit
ff6c4ed07e
@ -2368,7 +2368,13 @@ volume_mount_cb (GObject *source_object,
|
|||||||
error->code != G_IO_ERROR_ALREADY_MOUNTED)
|
error->code != G_IO_ERROR_ALREADY_MOUNTED)
|
||||||
{
|
{
|
||||||
name = g_volume_get_name (G_VOLUME (source_object));
|
name = g_volume_get_name (G_VOLUME (source_object));
|
||||||
primary = g_strdup_printf (_("Unable to access “%s”"), name);
|
if (g_str_has_prefix (error->message, "Error unlocking"))
|
||||||
|
/* Translators: This means that unlocking an encrypted storage
|
||||||
|
* device failed. %s is the name of the device.
|
||||||
|
*/
|
||||||
|
primary = g_strdup_printf (_("Error unlocking “%s”"), name);
|
||||||
|
else
|
||||||
|
primary = g_strdup_printf (_("Unable to access “%s”"), name);
|
||||||
g_free (name);
|
g_free (name);
|
||||||
emit_show_error_message (sidebar, primary, error->message);
|
emit_show_error_message (sidebar, primary, error->message);
|
||||||
g_free (primary);
|
g_free (primary);
|
||||||
|
Loading…
Reference in New Issue
Block a user