[gedit] io-error-info-bar: no_backup_saving_error: show also error->message
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] io-error-info-bar: no_backup_saving_error: show also error->message
- Date: Tue, 24 Mar 2020 08:41:03 +0000 (UTC)
commit fa1758081e962e5cd41325dec9b3197bed61c51e
Author: Sébastien Wilmet <swilmet gnome org>
Date: Tue Mar 24 09:31:44 2020 +0100
io-error-info-bar: no_backup_saving_error: show also error->message
It may contain additional useful information, such as the path to the
backup file, why it failed to create the backup file (permission denied,
...), etc.
gedit/gedit-io-error-info-bar.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/gedit/gedit-io-error-info-bar.c b/gedit/gedit-io-error-info-bar.c
index fb7bf1fea..ef9849ef5 100644
--- a/gedit/gedit-io-error-info-bar.c
+++ b/gedit/gedit-io-error-info-bar.c
@@ -774,6 +774,15 @@ gedit_no_backup_saving_error_info_bar_new (GFile *location,
"occurs while saving, you could lose the old copy of the file. Save anyway?");
tepl_info_bar_add_secondary_message (info_bar, secondary_msg);
+ if (error->message != NULL)
+ {
+ gchar *error_msg;
+
+ error_msg = g_strdup_printf (_("Error message: %s"), error->message);
+ tepl_info_bar_add_secondary_message (info_bar, error_msg);
+ g_free (error_msg);
+ }
+
return GTK_WIDGET (info_bar);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]