2006-09-27 [colin] 2.5.2cvs6
authorColin Leroy <colin@colino.net>
Wed, 27 Sep 2006 16:49:42 +0000 (16:49 +0000)
committerColin Leroy <colin@colino.net>
Wed, 27 Sep 2006 16:49:42 +0000 (16:49 +0000)
* src/compose.c
* src/compose.h
* src/mainwindow.c
* src/textview.c
* src/toolbar.c
o Allow passing an email address to
  compose_new_with_folderitem
o Update callers
o Use current folderitem when clicking
  on a TextView mailto: link
o Fix a possible leak in TextView

ChangeLog
PATCHSETS
configure.ac
src/compose.c
src/compose.h
src/mainwindow.c
src/textview.c
src/toolbar.c

index dc83900fe9bfcb172d8552e4ab2ca87e8e18a1df..a6dfb0ccd4434ef98cf5f320d7aa0f0fa1180fcf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-09-27 [colin]     2.5.2cvs6
+
+       * src/compose.c
+       * src/compose.h
+       * src/mainwindow.c
+       * src/textview.c
+       * src/toolbar.c
+               o Allow passing an email address to 
+                 compose_new_with_folderitem
+               o Update callers
+               o Use current folderitem when clicking
+                 on a TextView mailto: link
+               o Fix a possible leak in TextView
+
 2006-09-27 [colin]     2.5.2cvs5
 
        * src/html.c
index 000dc820c5d33c8c1869da185038d683060f4163..ae34d9510121184a05f4314166acebf0bf045dee 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.27.2.22 -r 1.27.2.23 src/addr_compl.c;  ) > 2.5.2cvs3.patchset
 ( cvs diff -u -r 1.100.2.42 -r 1.100.2.43 AUTHORS;  cvs diff -u -r 1.105.2.66 -r 1.105.2.67 src/prefs_account.c;  cvs diff -u -r 1.1.2.24 -r 1.1.2.25 src/gtk/authors.h;  ) > 2.5.2cvs4.patchset
 ( cvs diff -u -r 1.12.2.13 -r 1.12.2.14 src/html.c;  ) > 2.5.2cvs5.patchset
+( cvs diff -u -r 1.382.2.311 -r 1.382.2.312 src/compose.c;  cvs diff -u -r 1.50.2.26 -r 1.50.2.27 src/compose.h;  cvs diff -u -r 1.274.2.150 -r 1.274.2.151 src/mainwindow.c;  cvs diff -u -r 1.96.2.150 -r 1.96.2.151 src/textview.c;  cvs diff -u -r 1.43.2.52 -r 1.43.2.53 src/toolbar.c;  ) > 2.5.2cvs6.patchset
index 01355ddd6accb41f5a697e091fe3145300c94045..b7283c1ca76170754e6702f3d539118d636912cb 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f53bf68df680d504475ad45977d8fcc953ac6080..2aab7cad20edee7ae1d603052226203669cc0a50 100644 (file)
@@ -918,9 +918,9 @@ Compose *compose_new(PrefsAccount *account, const gchar *mailto,
        return compose_generic_new(account, mailto, NULL, attach_files, NULL);
 }
 
-Compose *compose_new_with_folderitem(PrefsAccount *account, FolderItem *item)
+Compose *compose_new_with_folderitem(PrefsAccount *account, FolderItem *item, const gchar *mailto)
 {
-       return compose_generic_new(account, NULL, item, NULL, NULL);
+       return compose_generic_new(account, mailto, item, NULL, NULL);
 }
 
 Compose *compose_new_with_list( PrefsAccount *account, GList *listAddress )
index 5f30d7ddcf724251f612a1a4fd35fc2cf1a98b1a..e04175045b0021ca924c32d5d7273a2bee3a8015 100644 (file)
@@ -232,7 +232,8 @@ Compose *compose_new                        (PrefsAccount   *account,
                                         GPtrArray      *attach_files);
 
 Compose *compose_new_with_folderitem   (PrefsAccount   *account,
-                                        FolderItem     *item);
+                                        FolderItem     *item,
+                                        const gchar    *mailto);
 
 Compose *compose_new_with_list         (PrefsAccount   *account,
                                         GList          *listAddress);
index a43a18438154b0c87c4620530dc7d058cc014ea8..ff06708847bf98035d6fbf5464a257e0366cb7ad 100644 (file)
@@ -3884,7 +3884,7 @@ static void account_compose_menu_cb(GtkMenuItem *menuitem, gpointer data)
        PrefsAccount *account = (PrefsAccount *)data;
        FolderItem *item = mainwin->summaryview->folder_item;   
 
-       compose_new_with_folderitem(account, item);
+       compose_new_with_folderitem(account, item, NULL);
 }
 
 static void prefs_open_cb(GtkMenuItem *menuitem, gpointer data)
index 39da93e1d64b5fa3bc964c3eef951eddab91ae36..e00887087b5fc637eba70e22bf796d7f4406329c 100644 (file)
@@ -1182,6 +1182,7 @@ static void textview_make_clickable_parts(TextView *textview,
        } head = {NULL, NULL, 0,  NULL}, *last = &head;
 
        if (!g_utf8_validate(linebuf, -1, NULL)) {
+               g_free(mybuf);
                mybuf = g_malloc(strlen(linebuf)*2 +1);
                conv_localetodisp(mybuf, strlen(linebuf)*2 +1, linebuf);
        }
@@ -2409,16 +2410,16 @@ static gboolean textview_uri_button_pressed(GtkTextTag *tag, GObject *obj,
                                               bevent->button, bevent->time);
                        } else {
                                PrefsAccount *account = NULL;
-
+                               FolderItem   *folder_item = NULL;
                                if (textview->messageview && textview->messageview->msginfo &&
                                    textview->messageview->msginfo->folder) {
-                                       FolderItem   *folder_item;
+                                       
 
                                        folder_item = textview->messageview->msginfo->folder;
                                        if (folder_item->prefs && folder_item->prefs->enable_default_account)
                                                account = account_find_from_id(folder_item->prefs->default_account);
                                }
-                               compose_new(account, uri->uri + 7, NULL);
+                               compose_new_with_folderitem(account, folder_item, uri->uri + 7);
                        }
                        return TRUE;
                } else if (g_ascii_strncasecmp(uri->uri, "file:", 5)) {
index 925327b3943370315129c980b2219aaf9bc9bf7e..15d750b318c562e81972fce21c9445bf189c38aa 100644 (file)
@@ -997,7 +997,7 @@ static void toolbar_compose_cb(GtkWidget *widget, gpointer data)
        case TOOLBAR_MSGVIEW:
                msgview = (MessageView*)toolbar_item->parent;
                compose_new_with_folderitem(NULL, 
-                                           msgview->msginfo->folder);
+                                           msgview->msginfo->folder, NULL);
                break;  
        default:
                debug_print("toolbar event not supported\n");
@@ -2186,7 +2186,7 @@ void compose_mail_cb(gpointer data, guint action, GtkWidget *widget)
        if (item) {
                ac = account_find_from_item(item);
                if (ac && ac->protocol != A_NNTP) {
-                       compose_new_with_folderitem(ac, item);          /* CLAWS */
+                       compose_new_with_folderitem(ac, item, NULL);            /* CLAWS */
                        return;
                }
        }
@@ -2195,7 +2195,7 @@ void compose_mail_cb(gpointer data, guint action, GtkWidget *widget)
         * CLAWS - use current account
         */
        if (cur_account && (cur_account->protocol != A_NNTP)) {
-               compose_new_with_folderitem(cur_account, item);
+               compose_new_with_folderitem(cur_account, item, NULL);
                return;
        }
 
@@ -2206,7 +2206,7 @@ void compose_mail_cb(gpointer data, guint action, GtkWidget *widget)
        for (cur = list ; cur != NULL ; cur = g_list_next(cur)) {
                ac = (PrefsAccount *) cur->data;
                if (ac->protocol != A_NNTP) {
-                       compose_new_with_folderitem(ac, item);
+                       compose_new_with_folderitem(ac, item, NULL);
                        return;
                }
        }
@@ -2223,7 +2223,7 @@ void compose_news_cb(gpointer data, guint action, GtkWidget *widget)
                ac = mainwin->summaryview->folder_item->folder->account;
                if (ac && ac->protocol == A_NNTP) {
                        compose_new_with_folderitem(ac,
-                                   mainwin->summaryview->folder_item);
+                                   mainwin->summaryview->folder_item, NULL);
                        return;
                }
        }
@@ -2233,7 +2233,7 @@ void compose_news_cb(gpointer data, guint action, GtkWidget *widget)
                ac = (PrefsAccount *) cur->data;
                if (ac->protocol == A_NNTP) {
                        compose_new_with_folderitem(ac,
-                                   mainwin->summaryview->folder_item);
+                                   mainwin->summaryview->folder_item, NULL);
                        return;
                }
        }