2004-12-02 [colin] 0.9.12cvs179.1
authorColin Leroy <colin@colino.net>
Thu, 2 Dec 2004 07:58:45 +0000 (07:58 +0000)
committerColin Leroy <colin@colino.net>
Thu, 2 Dec 2004 07:58:45 +0000 (07:58 +0000)
* src/compose.c
Sync with HEAD (non-duplicated reedition)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/compose.c

index 9ff6092df82a6a115cb5d221c17f88d258ca2c76..1bf6f13eedf274f20c457656c92b8d495de1d3b7 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-02 [colin]     0.9.12cvs179.1
+
+       * src/compose.c
+               Sync with HEAD (non-duplicated reedition)
+
 2004-12-02 [colin]     0.9.12cvs178.1
 
        * src/compose.c
index 35e823f6f7d4f5ab6f9e7f06fd6e1f813c701ef8..e2babcf69856a407df77c20155d0309fa42e300f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.6.10.1 -r 1.6.10.2 src/addrharvest.c; ) > 0.9.12cvs177.2.patchset
 ( cvs diff -u -r 1.6.10.2 -r 1.6.10.3 src/addrharvest.c; ) > 0.9.12cvs177.3.patchset
 ( cvs diff -u -r 1.382.2.75 -r 1.382.2.76 src/compose.c; ) > 0.9.12cvs178.1.patchset
+( cvs diff -u -r 1.382.2.76 -r 1.382.2.77 src/compose.c; ) > 0.9.12cvs179.1.patchset
index f2c574087bfe0422d020f9b334ad2054e169444e..0ddb09e1b1a9ea1836963e2dee23783e12291bb2 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=178
+EXTRA_VERSION=179
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=.1
 
index bb8539192c27513dce0c209e5da6414d2ac257dd..4ab30fb1774d56bc3f880de0401912a798e50bd5 100644 (file)
@@ -665,6 +665,29 @@ static GtkTargetEntry compose_mime_types[] =
        {"text/uri-list", 0, 0}
 };
 
+static gboolean compose_put_existing_to_front(MsgInfo *info)
+{
+       GList *compose_list = compose_get_compose_list();
+       GList *elem = NULL;
+       
+       if (compose_list) {
+               for (elem = compose_list; elem != NULL && elem->data != NULL; 
+                    elem = elem->next) {
+                       Compose *c = (Compose*)elem->data;
+
+                       if (!c->targetinfo || !c->targetinfo->msgid ||
+                           !info->msgid)
+                               continue;
+
+                       if (!strcmp(c->targetinfo->msgid, info->msgid)) {
+                               gtkut_window_popup(c->window);
+                               return TRUE;
+                       }
+               }
+       }
+       return FALSE;
+}
+
 Compose *compose_new(PrefsAccount *account, const gchar *mailto,
                     GPtrArray *attach_files)
 {
@@ -1202,6 +1225,9 @@ void compose_reedit(MsgInfo *msginfo)
        g_return_if_fail(msginfo != NULL);
        g_return_if_fail(msginfo->folder != NULL);
 
+       if (compose_put_existing_to_front(msginfo)) 
+               return;
+
         if (msginfo->folder->stype == F_QUEUE || msginfo->folder->stype == F_DRAFT) {
                gchar queueheader_buf[BUFFSIZE];
                gint id, param;