[krb5-auth-dialog] prefs dialog launch error handling
- From: Guido Günther <guidog src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog] prefs dialog launch error handling
- Date: Tue, 15 Sep 2009 17:25:09 +0000 (UTC)
commit 5f2bb056c67528a3c0172131e8f6b7da12ed7fa6
Author: Guido Günther <agx sigxcpu org>
Date: Mon Sep 7 19:19:20 2009 +0200
prefs dialog launch error handling
src/krb5-auth-applet.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/src/krb5-auth-applet.c b/src/krb5-auth-applet.c
index 4778908..a1c99fe 100644
--- a/src/krb5-auth-applet.c
+++ b/src/krb5-auth-applet.c
@@ -553,9 +553,29 @@ static void
ka_applet_cb_preferences (GtkWidget* menuitem G_GNUC_UNUSED,
gpointer user_data G_GNUC_UNUSED)
{
+ GError *error = NULL;
+
g_spawn_command_line_async (BIN_DIR
G_DIR_SEPARATOR_S
- "krb5-auth-dialog-preferences", NULL);
+ "krb5-auth-dialog-preferences",
+ &error);
+ if (error) {
+ GtkWidget *message_dialog;
+
+ message_dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("There was an error launching the preferences dialog: %s"),
+ error->message);
+ gtk_window_set_resizable (GTK_WINDOW (message_dialog), FALSE);
+
+ g_signal_connect (message_dialog, "response",
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
+ gtk_widget_show (message_dialog);
+ g_error_free (error);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]