mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-05 21:02:42 +02:00
Issue #13553: pop an error dialog up only for specific GIO error.
This fixes46d9a09698
. There was a reason why this was not implemented as an assert-type error nor as a user-facing error: network problems happen. We cannot pop an error up every time: * The computer is offline! 😱 GIMP is not made to be run as a connected software and working on GIMP with a non-connected computer is a perfectly valid way of using GIMP. * gimp.org is down (it's rare, but it happens and it should not have any impact to creators with GIMP). * You are behind some kind of proxy or other complicated network configuration which GIO is not able to pass through. * And any other reason which could make your GIMP not able to read the remote json file… Instead let's check the more particular domain and error code, though even this I hesitated between doing this change or simply reverting commit46d9a09698
. Indeed it's still quite a generic G_IO_ERROR_NOT_SUPPORTED error, so I do hope we cannot get it in other normal conditions where reading a remote link may fail. The last thing we want is GIMP popping up errors which are neither bugs in our code, nor environment issues for which anyone can do anything about.
This commit is contained in:
@@ -415,17 +415,25 @@ gimp_check_updates_callback (GObject *source,
|
||||
gchar *uri = g_file_get_uri (G_FILE (source));
|
||||
|
||||
#ifndef GIMP_CONSOLE_COMPILATION
|
||||
if (error->domain == G_IO_ERROR &&
|
||||
error->code == G_IO_ERROR_NOT_SUPPORTED)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
g_message ("%s: loading of %s failed: %s\n\n%s",
|
||||
G_STRFUNC, uri, error->message,
|
||||
_("Perhaps you are missing GIO backends and need "
|
||||
"to install GVFS?"));
|
||||
g_message ("%s: loading of %s failed: %s\n\n%s",
|
||||
G_STRFUNC, uri, error->message,
|
||||
_("Perhaps you are missing GIO backends and need "
|
||||
"to install GVFS?"));
|
||||
#else
|
||||
g_message ("%s: loading of %s failed: %s\n\n%s",
|
||||
G_STRFUNC, uri, error->message,
|
||||
_("Perhaps you are missing GIO backends."));
|
||||
g_message ("%s: loading of %s failed: %s\n\n%s",
|
||||
G_STRFUNC, uri, error->message,
|
||||
_("Perhaps you are missing GIO backends."));
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printerr ("%s: loading of %s failed: %s\n", G_STRFUNC,
|
||||
uri, error->message);
|
||||
}
|
||||
#else
|
||||
g_printerr ("%s: loading of %s failed: %s\n", G_STRFUNC,
|
||||
uri, error->message);
|
||||
|
Reference in New Issue
Block a user