From e2b0897d8088cb4c118f4564e9f6de2845de3176 Mon Sep 17 00:00:00 2001 From: ERDI Gergo Date: Wed, 7 Jan 2004 14:29:08 +0000 Subject: Emit a hover-url signal when the user mouses over a URL, ... 2004-01-04 ERDI Gergo * em-folder-view.c (emfv_on_url_cb): Emit a hover-url signal when the user mouses over a URL, ... (emfv_hover_url_impl): ... and use BonoboUI to change the status bar message... (em_folder_view_set_statusbar): ... unless we are asked not to, ... * mail-component.c (impl_createControls): ... like in the case of the mail component, ... (view_hover_url_cb): ... that uses the ActivityHandler to do the same Add these together, and #127536 is neatly solved. 2004-01-05 ERDI Gergo * e-task-bar.c (init): Create a separate label to the left of the progress messages... (e_task_bar_message): ...and allow components to set it... * e-activity-handler.c (e_activity_handler_message): ...through this new ActivityHandler method svn path=/trunk/; revision=24086 --- mail/em-format-html-display.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mail/em-format-html-display.c') diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index eaccf32e47..2c9b3c513e 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -106,6 +106,7 @@ struct _EMFormatHTMLDisplayPrivate { static int efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efh); static void efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd); +static void efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd); struct _attach_puri { EMFormatPURI puri; @@ -140,6 +141,7 @@ static void efhd_builtin_init(EMFormatHTMLDisplayClass *efhc); enum { EFHD_LINK_CLICKED, EFHD_POPUP_EVENT, + EFHD_ON_URL, EFHD_LAST_SIGNAL, }; @@ -290,6 +292,16 @@ efhd_class_init(GObjectClass *klass) GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE, G_TYPE_POINTER, G_TYPE_POINTER); + efhd_signals[EFHD_ON_URL] = + g_signal_new("on_url", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(EMFormatHTMLDisplayClass, on_url), + NULL, NULL, + gtk_marshal_VOID__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); + efhd_builtin_init((EMFormatHTMLDisplayClass *)klass); } @@ -324,6 +336,7 @@ EMFormatHTMLDisplay *em_format_html_display_new(void) g_signal_connect(efhd->formathtml.html, "iframe_created", G_CALLBACK(efhd_iframe_created), efhd); g_signal_connect(efhd->formathtml.html, "link_clicked", G_CALLBACK(efhd_html_link_clicked), efhd); + g_signal_connect(efhd->formathtml.html, "on_url", G_CALLBACK(efhd_html_on_url), efhd); g_signal_connect(efhd->formathtml.html, "button_press_event", G_CALLBACK(efhd_html_button_press_event), efhd); return efhd; @@ -592,6 +605,13 @@ efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efh g_signal_emit((GObject *)efhd, efhd_signals[EFHD_LINK_CLICKED], 0, url); } +static void +efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd) +{ + d(printf("on_url event '%s'\n", url)); + g_signal_emit((GObject *)efhd, efhd_signals[EFHD_ON_URL], 0, url); +} + static void efhd_complete(EMFormat *emf) { -- cgit v1.2.3