From 92602052864e026e179557271e73e7e1640828c1 Mon Sep 17 00:00:00 2001 From: Matthew Loper Date: Sun, 20 Feb 2000 02:27:15 +0000 Subject: When a link is clicked, indicate the link with a dialog. * tests/ui-tests/message-browser.c (on_link_clicked): When a link is clicked, indicate the link with a dialog. svn path=/trunk/; revision=1864 --- tests/ui-tests/message-browser.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'tests/ui-tests') diff --git a/tests/ui-tests/message-browser.c b/tests/ui-tests/message-browser.c index 597721b901..85b93b4778 100644 --- a/tests/ui-tests/message-browser.c +++ b/tests/ui-tests/message-browser.c @@ -207,16 +207,9 @@ filename_to_camel_msg (gchar* filename) message = camel_mime_message_new_with_session ( (CamelSession *)NULL); - /* not the right way any more */ - /* camel_data_wrapper_construct_from_stream ( */ - /* CAMEL_DATA_WRAPPER (message), input_stream); */ - camel_data_wrapper_set_input_stream ( CAMEL_DATA_WRAPPER (message), input_stream); - /* not the right way any more */ - /* camel_stream_close (input_stream); */ - return message; } @@ -256,15 +249,23 @@ mime_message_header_to_html (CamelMimeMessage *msg, gchar** header_string) *header_string = g_strndup ( CAMEL_STREAM_MEM (header_stream)->buffer->data, CAMEL_STREAM_MEM (header_stream)->buffer->len); - -// printf ("\n\n>>>\n%s\n", *header_string); } static void on_link_clicked (GtkHTML *html, const gchar *url, gpointer data) { - gnome_message_box_new (url, GNOME_MESSAGE_BOX_INFO, "Okay"); + GtkWidget* message_box; + gchar* message = g_strdup_printf ("You have clicked on this link:\n%s", + url); + + message_box = gnome_message_box_new (message, + GNOME_MESSAGE_BOX_INFO, + "Okay", NULL); + + gnome_dialog_set_default (GNOME_DIALOG (message_box), 1); + gnome_dialog_run (message_box); + g_free (message); } -- cgit