[Xfce4-commits] <xfce4-session:master> Send the full error to the error dialog.
Nick Schermer
noreply at xfce.org
Thu Jan 28 19:52:25 CET 2010
Updating branch refs/heads/master
to 8f30d3dbd24aa678d0331b8369abf4a2fcdc0e3d (commit)
from c59e0733a7fcf79778b6f51d4846981070dbd88c (commit)
commit 8f30d3dbd24aa678d0331b8369abf4a2fcdc0e3d
Author: Nick Schermer <nick at xfce.org>
Date: Thu Jan 28 19:06:22 2010 +0100
Send the full error to the error dialog.
engines/balou/config.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/engines/balou/config.c b/engines/balou/config.c
index 19d3fa4..4349fcc 100644
--- a/engines/balou/config.c
+++ b/engines/balou/config.c
@@ -366,6 +366,8 @@ config_remove_theme (GtkWidget *item,
gchar *name;
gchar* argv[4];
gint status;
+ GError *error = NULL;
+ gchar *error_msg = NULL;
iter = (GtkTreeIter *) g_object_get_data (G_OBJECT (menu), "iter");
if (G_UNLIKELY (iter == NULL))
@@ -389,12 +391,18 @@ config_remove_theme (GtkWidget *item,
argv[3] = NULL;
result = g_spawn_sync (NULL, argv, NULL, 0, NULL, NULL,
- NULL, NULL, &status, NULL);
+ NULL, &error_msg, &status, NULL);
if (!result || status != 0)
{
- xfce_dialog_show_error (NULL, NULL, _("Unable to remove splash theme \"%s\" from directory "
- "%s."), name, directory);
+ if (!error && error_msg)
+ g_set_error_literal (&error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, error_msg);
+
+ xfce_dialog_show_error (NULL, error,
+ _("Unable to remove splash theme \"%s\" from directory %s."),
+ name, directory);
+ if (error)
+ g_error_free (error);
}
else
{
@@ -403,6 +411,7 @@ config_remove_theme (GtkWidget *item,
g_free (directory);
g_free (name);
+ g_free (error_msg);
}
#endif
More information about the Xfce4-commits
mailing list