user-panel: Strip remote dbus error before showing error

* GDBus transfers dbus error codes in the error->message so strip that
   out before display

https://bugzilla.gnome.org/show_bug.cgi?id=680889
This commit is contained in:
Stef Walter 2012-07-31 09:08:04 +02:00
parent e707b83dc5
commit fb6833e57a

View file

@ -113,8 +113,11 @@ show_error_dialog (UmAccountDialog *self,
GTK_BUTTONS_CLOSE, GTK_BUTTONS_CLOSE,
"%s", message); "%s", message);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), if (error != NULL) {
"%s", error->message); g_dbus_error_strip_remote_error (error);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", error->message);
}
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
gtk_window_present (GTK_WINDOW (dialog)); gtk_window_present (GTK_WINDOW (dialog));