From e0610b2e0cea191f631dc825cdc8023cdcd9433d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 11 Jan 2009 14:20:50 +0000 Subject: Continue chipping away at EMFolderView and EMFolderBrowser. Migrate from gnome_url_show() to e_show_uri(). svn path=/branches/kill-bonobo/; revision=37038 --- addressbook/gui/component/e-book-shell-content.c | 2 +- addressbook/gui/widgets/eab-contact-display.c | 32 ++++++------------------ 2 files changed, 9 insertions(+), 25 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/component/e-book-shell-content.c b/addressbook/gui/component/e-book-shell-content.c index c9066c9ef1..52549f0122 100644 --- a/addressbook/gui/component/e-book-shell-content.c +++ b/addressbook/gui/component/e-book-shell-content.c @@ -188,7 +188,7 @@ book_shell_content_constructed (GObject *object) g_signal_connect_swapped ( priv->preview, "send-message", - book_shell_content_send_message_cb, object); + G_CALLBACK (book_shell_content_send_message_cb), object); /* Bind GObject properties to GConf keys. */ diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 0208c4fd0f..02aa5b81f0 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -27,13 +27,13 @@ #include "eab-contact-display.h" #include "eab-gui-util.h" +#include "e-util/e-util.h" #include "e-util/e-html-utils.h" #include "e-util/e-icon-factory.h" #include "e-util/e-plugin-ui.h" #include #include -#include #include #include @@ -158,18 +158,8 @@ static void action_open_link_cb (GtkAction *action, EABContactDisplay *display) { - GdkScreen *screen; - const gchar *uri; - GError *error = NULL; - - screen = gtk_widget_get_screen (GTK_WIDGET (display)); - uri = display->priv->selected_uri; - g_return_if_fail (uri != NULL); - - if (!gtk_show_uri (screen, uri, GDK_CURRENT_TIME, &error)) { - g_warning ("%s", error->message); - g_error_free (error); - } + /* XXX Pass a parent window. */ + e_show_uri (NULL, display->priv->selected_uri); } static void @@ -287,18 +277,16 @@ contact_display_on_url_requested (GtkHTML *html, static void contact_display_on_link_clicked (GtkHTML *html, - const gchar *url, + const gchar *uri, EABContactDisplay *display) { - GError *err = NULL; - #ifdef HANDLE_MAILTO_INTERNALLY - if (!strncmp (url, "internal-mailto:", strlen ("internal-mailto:"))) { + if (!strncmp (uri, "internal-mailto:", strlen ("internal-mailto:"))) { EDestination *destination; EContact *contact; gint email_num; - email_num = atoi (url + strlen ("internal-mailto:")); + email_num = atoi (uri + strlen ("internal-mailto:")); if (email_num == -1) return; @@ -312,12 +300,8 @@ contact_display_on_link_clicked (GtkHTML *html, } #endif - gnome_url_show (url, &err); - - if (err) { - g_warning ("gnome_url_show: %s", err->message); - g_error_free (err); - } + /* FIXME Pass a parent window. */ + e_show_uri (NULL, uri); } static void -- cgit v1.2.3