diff options
| author | David Zeuthen <davidz@redhat.com> | 2009-04-08 12:04:17 -0400 |
|---|---|---|
| committer | David Zeuthen <davidz@redhat.com> | 2009-04-08 12:04:17 -0400 |
| commit | 53cf4a6635586e68c7a45030b381bc98d4f9eb1c (patch) | |
| tree | 097d3792ed978cc91716084e70f19428aef62940 | |
| parent | ed1a3320c5bbfa4377bb5d3650f8589b2e60a850 (diff) | |
| download | gnome-disk-utility-53cf4a6635586e68c7a45030b381bc98d4f9eb1c.tar.gz gnome-disk-utility-53cf4a6635586e68c7a45030b381bc98d4f9eb1c.tar.xz gnome-disk-utility-53cf4a6635586e68c7a45030b381bc98d4f9eb1c.zip | |
for now, prepend the D-Bus error name to the error string from the daemon
This is hidden behind a GtkExpander so it's not exactly a big deal. As
noted we can removed this once we port to PolicyKit 1.0.
| -rw-r--r-- | src/gdu/gdu-error.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gdu/gdu-error.c b/src/gdu/gdu-error.c index 956c61c..992c4d8 100644 --- a/src/gdu/gdu-error.c +++ b/src/gdu/gdu-error.c @@ -57,6 +57,7 @@ _gdu_error_fixup (GError *error) { const char *name; gboolean matched; + gchar *s; if (error == NULL) return; @@ -89,6 +90,14 @@ _gdu_error_fixup (GError *error) if (matched) error->domain = GDU_ERROR; + + /* Always prepend the D-Bus exception name to the message; we need this in + * gdu_error_check_polkit_not_authorized() to determine if it's a PolicyKit + * exception... when we port to polkit 1.0 this can go away. + */ + s = g_strdup_printf ("%s: %s", name, error->message); + g_free (error->message); + error->message = s; } /** |
