diff options
author | Adam Hooper <adamh@src.gnome.org> | 2004-12-18 04:02:42 +0800 |
---|---|---|
committer | Adam Hooper <adamh@src.gnome.org> | 2004-12-18 04:02:42 +0800 |
commit | 13c8b7335b1aacf79bb4f1e735f6b88bd8dd6e08 (patch) | |
tree | b32cf7a8687fd4a5be92a564629891c19b264080 /src/ephy-main.c | |
parent | 9bf71295e9a4e5cdfe9dc4380343616c49b161c6 (diff) | |
download | gsoc2013-epiphany-13c8b7335b1aacf79bb4f1e735f6b88bd8dd6e08.tar gsoc2013-epiphany-13c8b7335b1aacf79bb4f1e735f6b88bd8dd6e08.tar.gz gsoc2013-epiphany-13c8b7335b1aacf79bb4f1e735f6b88bd8dd6e08.tar.bz2 gsoc2013-epiphany-13c8b7335b1aacf79bb4f1e735f6b88bd8dd6e08.tar.lz gsoc2013-epiphany-13c8b7335b1aacf79bb4f1e735f6b88bd8dd6e08.tar.xz gsoc2013-epiphany-13c8b7335b1aacf79bb4f1e735f6b88bd8dd6e08.tar.zst gsoc2013-epiphany-13c8b7335b1aacf79bb4f1e735f6b88bd8dd6e08.zip |
Use gtk_show_about_dialog(), and handle urls and mailto.
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 (); |