make clicking on mailto url in texview use the default account of the currently selec...
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 26 Dec 2001 11:02:33 +0000 (11:02 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 26 Dec 2001 11:02:33 +0000 (11:02 +0000)
ChangeLog.claws
configure.in
src/compose.c
src/textview.c

index e0972ef..2abe698 100644 (file)
@@ -1,3 +1,11 @@
+2001-12-26 [alfons]    0.6.6claws22
+       
+       * src/textview.c
+               make reply-on-click work with the account of the selected folder
+       * src/compose.c
+               put a fixme here to remind me to fix finding correct default
+               account for nested folders
+
 2001-12-25 [alfons]    0.6.6claws21
 
        * src/summaryview.c
index f5396ff..fd268bc 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws21
+EXTRA_VERSION=claws22
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 9e68c1f..c9e6091 100644 (file)
@@ -684,6 +684,9 @@ static void compose_generic_reply(MsgInfo *msginfo, gboolean quote,
        
        /* select the account for the whole folder (IMAP / NNTP) */
        if (!account)
+               /* FIXME: this is not right, because folder may be nested. we should
+                * ascend the tree until we find a parent with proper account 
+                * information */
                account = msginfo->folder->folder->account;
 
        /* select account by to: and cc: header if enabled */
index fcfc9c4..0d11147 100644 (file)
@@ -49,6 +49,7 @@
 #include "compose.h"
 #include "addressbook.h"
 #include "displayheader.h"
+#include "account.h"
 
 #define FONT_LOAD(font, s) \
 { \
@@ -1492,8 +1493,18 @@ static gint textview_button_released(GtkWidget *widget, GdkEventButton *event,
                                                g_free(fromaddress);
                                                g_free(fromname);
                                        } else {
+                                               PrefsAccount *account = NULL;
+                                               FolderItem   *folder_item;
+
+                                               if (textview->messageview && textview->messageview->mainwin 
+                                               &&  textview->messageview->mainwin->summaryview 
+                                               &&  textview->messageview->mainwin->summaryview->folder_item) {
+                                                       folder_item = textview->messageview->mainwin->summaryview->folder_item;
+                                                       if (folder_item->prefs && folder_item->prefs->enable_default_account)
+                                                               account = account_find_from_id(folder_item->prefs->default_account);
+                                               }
                                                compose_new_with_recipient
-                                                       (NULL, uri->uri + 7);
+                                                       (account, uri->uri + 7);
                                        }
                                } else {
                                        open_uri(uri->uri,