[gedit] io-error-info-bar: parse_gio_error(): take a GError param
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] io-error-info-bar: parse_gio_error(): take a GError param
- Date: Thu, 21 Jul 2022 16:18:25 +0000 (UTC)
commit ed6c6128c37a4609efb0d7cc926dd41857e19b53
Author: Sébastien Wilmet <swilmet informatique-libre be>
Date: Thu Jul 21 18:15:06 2022 +0200
io-error-info-bar: parse_gio_error(): take a GError param
Not just its code.
Will be useful to access the original error->message.
gedit/gedit-io-error-info-bar.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/gedit/gedit-io-error-info-bar.c b/gedit/gedit-io-error-info-bar.c
index 1edbe313a..f31bfe881 100644
--- a/gedit/gedit-io-error-info-bar.c
+++ b/gedit/gedit-io-error-info-bar.c
@@ -140,15 +140,17 @@ create_io_loading_error_info_bar (const gchar *primary_text,
}
static gboolean
-parse_gio_error (gint code,
- gchar **error_message,
- gchar **message_details,
- GFile *location,
- const gchar *uri_for_display)
+parse_gio_error (const GError *error,
+ gchar **error_message,
+ gchar **message_details,
+ GFile *location,
+ const gchar *uri_for_display)
{
gboolean ret = TRUE;
- switch (code)
+ g_assert (error->domain == G_IO_ERROR);
+
+ switch (error->code)
{
case G_IO_ERROR_NOT_FOUND:
case G_IO_ERROR_NOT_DIRECTORY:
@@ -285,7 +287,7 @@ parse_error (const GError *error,
if (error->domain == G_IO_ERROR)
{
- ret = parse_gio_error (error->code,
+ ret = parse_gio_error (error,
error_message,
message_details,
location,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]