[krb5-auth-dialog] update about dialog



commit c7c1ed3d1c730b9bb6202f025d0441f7f4d13c4c
Author: Guido Günther <agx sigxcpu org>
Date:   Fri May 22 15:04:20 2009 +0200

    update about dialog
---
 ChangeLog              |    4 ++++
 src/krb5-auth-applet.c |   48 +++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 025fb10..4a33edd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon May 25 19:11:58 CEST 2009 Guido Günther <agx sigxcpu org>
+
+	* src/krb5-auth-applet.c: update about dialog 
+
 Mon May 25 18:32:49 CEST 2009 Guido Günther <agx sigxcpu org>
 
 	* configure.ac: release 0.10
diff --git a/src/krb5-auth-applet.c b/src/krb5-auth-applet.c
index 5a8975c..b1d6579 100644
--- a/src/krb5-auth-applet.c
+++ b/src/krb5-auth-applet.c
@@ -550,19 +550,57 @@ ka_applet_cb_quit (GtkMenuItem* menuitem G_GNUC_UNUSED, gpointer user_data)
 
 
 static void
+ka_about_dialog_url_hook (GtkAboutDialog *about,
+			  const gchar *link,
+			  gpointer data G_GNUC_UNUSED)
+{
+	GError *error = NULL;
+
+	gtk_show_uri(gtk_window_get_screen (GTK_WINDOW (about)),
+		     link, gtk_get_current_event_time(), &error);
+
+	if (error) {
+		GtkWidget *message_dialog;
+
+		message_dialog = gtk_message_dialog_new (GTK_WINDOW (about),
+					GTK_DIALOG_DESTROY_WITH_PARENT,
+					GTK_MESSAGE_ERROR,
+					GTK_BUTTONS_CLOSE,
+					_("There was an error displaying %s:\n%s"),
+					link, 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);
+	  }
+}
+
+
+static void
 ka_applet_cb_about_dialog (GtkMenuItem* menuitem G_GNUC_UNUSED,
 			   gpointer user_data G_GNUC_UNUSED)
 {
 	const gchar* authors[] = {  "Christopher Aillon <caillon redhat com>",
-			            "Colin Walters <walters verbum org>",
-			            "Guido Günther <agx sigxpcu org>",
-			            NULL };
+				    "Colin Walters <walters verbum org>",
+				    "Guido Günther <agx sigxpcu org>",
+				    NULL };
+	gtk_about_dialog_set_url_hook (ka_about_dialog_url_hook, NULL, NULL);
 	gtk_show_about_dialog (NULL,
 			       "authors", authors,
 			       "version", VERSION,
 			       "copyright",
-	                       "Copyright (C) 2004,2005,2006 Red Hat, Inc.,\n"
-	                       "2008,2009 Guido Günther",
+			       "Copyright (C) 2004,2005,2006 Red Hat, Inc.,\n"
+			       "2008,2009 Guido Günther",
+			       "website-label", PACKAGE " website",
+			       "website", "https://honk.sigxcpu.org/piki/projects/krb5-auth-dialog/";,
+			       "license", "GNU General Public License Version 2",
+			       "translator-credits",
+			       "Jorge González <jorgegonz svn gnome org>\n"
+			       "Kjartan Maraas <kmaraas gnome org>\n"
+			       "Daniel Nylander <po danielnylander se>\n",
 			       NULL);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]