Index: libgnomeui/gnome-ui-init.c
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-ui-init.c,v
retrieving revision 1.204
diff -p -u -u -p -r1.204 gnome-ui-init.c
--- libgnomeui/gnome-ui-init.c	4 Apr 2006 13:41:29 -0000	1.204
+++ libgnomeui/gnome-ui-init.c	5 Apr 2006 13:26:44 -0000
@@ -54,6 +54,7 @@
 #include "gnome-gconf-ui.h"
 #include "gnome-ui-init.h"
 #include "gnome-stock-icons.h"
+#include "gnome-url.h"
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
@@ -70,6 +71,7 @@
 #include <gtk/gtktogglebutton.h>
 #include <gtk/gtkcheckmenuitem.h>
 #include <gtk/gtkmessagedialog.h>
+#include <gtk/gtkaboutdialog.h>
 
 /*****************************************************************************
  * libgnomeui
@@ -231,6 +233,55 @@ static GQuark quark_gnome_program_privat
 static GQuark quark_gnome_program_class_libgnomeui = 0;
 
 static void
+show_url (GtkWidget *parent,
+	  const char *url)
+{
+	GdkScreen *screen;
+	GError *error = NULL;
+
+	screen = gtk_widget_get_screen (parent);
+
+	if (!gnome_url_show_on_screen (url, screen, &error))
+	{
+		GtkWidget *dialog;
+
+		dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
+						 GTK_DIALOG_DESTROY_WITH_PARENT,
+						 GTK_MESSAGE_ERROR,
+						 GTK_BUTTONS_OK,
+						 "%s", _("Could not open link"));
+		gtk_message_dialog_format_secondary_text
+			(GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
+		g_error_free (error);
+
+		g_signal_connect (dialog, "response",
+				  G_CALLBACK (gtk_widget_destroy), NULL);
+		gtk_widget_show (dialog);
+	}
+}
+
+static void
+about_url_hook (GtkAboutDialog *about,
+		const char *link,
+		gpointer data)
+{
+	show_url (GTK_WIDGET (about), link);
+}
+
+static void
+about_email_hook (GtkAboutDialog *about,
+		  const char *email,
+		  gpointer data)
+{
+	char *address;
+
+	/* FIXME: escaping? */
+	address = g_strdup_printf ("mailto:%s", email);
+	show_url (GTK_WIDGET (about), address);
+	g_free (address);
+}
+
+static void
 libgnomeui_private_free (GnomeProgramPrivate_libgnomeui *priv)
 {
 	g_free (priv->display);
@@ -332,6 +383,9 @@ libgnomeui_class_init (GnomeProgramClass
                 g_param_spec_string (LIBGNOMEUI_PARAM_DEFAULT_ICON, NULL, NULL, NULL,
                                      (G_PARAM_READABLE | G_PARAM_WRITABLE |
                                       G_PARAM_CONSTRUCT_ONLY)));
+
+	gtk_about_dialog_set_url_hook (about_url_hook, NULL, NULL);
+	gtk_about_dialog_set_email_hook (about_email_hook, NULL, NULL);
 }
 
 static void
