display url in statusbar
authorPaul Mangan <paul@claws-mail.org>
Mon, 6 May 2002 10:20:19 +0000 (10:20 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 6 May 2002 10:20:19 +0000 (10:20 +0000)
AUTHORS
ChangeLog.claws
configure.in
src/messageview.c
src/textview.c

diff --git a/AUTHORS b/AUTHORS
index c31516e..9dced55 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -142,3 +142,4 @@ contributors (beside the above; based on Changelog)
        Stefaan Eeckels
        Pascal Jermini
        Thorsten Thielen
+       Thorsten Maerz
index 0ee3533..f331b4c 100644 (file)
@@ -1,3 +1,10 @@
+2002-05-06 [paul]      0.7.5claws10
+
+       * src/messageview.c
+         src/textview.c
+               display url in statusbar on single-click
+               patch submitted by Thorsten Maerz <torte@netztorte.de>
+
 2002-05-06 [match]     0.7.5claws9
 
        * src/addritem.[ch]
index 7af1ee9..ad4432b 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws9
+EXTRA_VERSION=claws10
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 4c5e5f6..1ecfef8 100644 (file)
@@ -375,6 +375,9 @@ void messageview_show(MessageView *messageview, MsgInfo *msginfo,
 
        g_return_if_fail(msginfo != NULL);
 
+       gtk_statusbar_pop(GTK_STATUSBAR(messageview->mainwin->statusbar),
+                         messageview->mainwin->folderview_cid);
+
 #if USE_GPGME
        if ((fp = procmsg_open_message_decrypted(msginfo, &mimeinfo)) == NULL)
                return;
index fd84a10..baa9f1c 100644 (file)
@@ -984,8 +984,8 @@ static void textview_write_link(TextView *textview, const gchar *url,
     uri = g_new(RemoteURI, 1);
     uri->uri = g_strdup(url);
     uri->start = gtk_stext_get_point(text);
-    gtk_stext_insert(text, textview->msgfont, link_color, NULL, buf,
-                   strlen(buf));
+    gtk_stext_insert(text, textview->msgfont, link_color, NULL, str,
+                   strlen(str));
     uri->end = gtk_stext_get_point(text);
     textview->uri_list = g_slist_append(textview->uri_list, uri);
 }
@@ -1656,7 +1656,7 @@ static gint textview_button_released(GtkWidget *widget, GdkEventButton *event,
                gtk_editable_get_position(GTK_EDITABLE(textview->text));
 
        if (event && 
-           ((event->button == 1 && textview->last_buttonpress == GDK_2BUTTON_PRESS)
+           ((event->button == 1)
             || event->button == 2 || event->button == 3)) {
                GSList *cur;
 
@@ -1667,11 +1667,22 @@ static gint textview_button_released(GtkWidget *widget, GdkEventButton *event,
                        textview->cur_pos--;
                }
 
+               gtk_statusbar_pop(GTK_STATUSBAR(textview->messageview->mainwin->statusbar),
+                                 textview->messageview->mainwin->folderview_cid);
+
                for (cur = textview->uri_list; cur != NULL; cur = cur->next) {
                        RemoteURI *uri = (RemoteURI *)cur->data;
 
                        if (textview->cur_pos >= uri->start &&
                            textview->cur_pos <  uri->end) {
+                               /* single click: display url in statusbar */
+                               if (event->button == 1 
+                                   && (textview->last_buttonpress != GDK_2BUTTON_PRESS)) {
+                                       gtk_statusbar_push(
+                                               GTK_STATUSBAR(textview->messageview->mainwin->statusbar),
+                                               textview->messageview->mainwin->folderview_cid, uri->uri);
+                                       gtkut_widget_wait_for_draw(textview->messageview->mainwin->hbox_stat);
+                               } else
                                if (!g_strncasecmp(uri->uri, "mailto:", 7)) {
                                        if (event->button == 3) {
                                                gchar *fromname, *fromaddress;