diff options
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r-- | src/ephy-main.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c index 3bb38481e..49bc8f998 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -29,12 +29,14 @@ #include <libgnomeui/gnome-ui-init.h> #include <libgnomeui/gnome-app-helper.h> +#include <gtk/gtkaboutdialog.h> #include <gtk/gtkmain.h> #include <gtk/gtkmessagedialog.h> #include <libgnome/gnome-program.h> #include <bonobo/bonobo-main.h> #include <glib/gi18n.h> #include <libgnomevfs/gnome-vfs-init.h> +#include <libgnomevfs/gnome-vfs-utils.h> #include <libxml/xmlversion.h> static gboolean open_in_existing = FALSE; @@ -70,6 +72,23 @@ static struct poptOption popt_options[] = }; static void +handle_url (GtkAboutDialog *about, + const char *link, + gpointer data) +{ + ephy_shell_new_tab (ephy_shell, NULL, NULL, link, + EPHY_NEW_TAB_OPEN_PAGE); +} + +static void +handle_email (GtkAboutDialog *about, + const char *link, + gpointer data) +{ + gnome_vfs_url_show (link); +} + +static void shell_weak_notify (gpointer data, GObject *where_the_object_was) { @@ -166,6 +185,10 @@ main (int argc, char *argv[]) eel_gconf_monitor_add ("/apps/epiphany/lockdown"); eel_gconf_monitor_add ("/desktop/gnome/lockdown"); + /* Extensions may want these, so don't initialize in window-cmds */ + gtk_about_dialog_set_url_hook (handle_url, NULL, NULL); + gtk_about_dialog_set_email_hook (handle_email, NULL, NULL); + bonobo_activate (); ephy_shell = ephy_shell_new (); |