Fixed double "subject is empty" question.
authorColin Leroy <colin@colino.net>
Wed, 24 Apr 2002 08:44:27 +0000 (08:44 +0000)
committerColin Leroy <colin@colino.net>
Wed, 24 Apr 2002 08:44:27 +0000 (08:44 +0000)
ChangeLog.claws
configure.in
src/compose.c

index 3462659e3e32530230211b40c9a4a43d62680218..8742176c4bdefc07e0ef672ad6b5d9241060b98c 100644 (file)
@@ -1,8 +1,14 @@
+2002-04-24 [colin]     0.7.4claws97
+       
+       * src/compose.c
+               Fixed double "subject is empty" question.
+
 2002-04-23 [colin]     0.7.4claws96
        
        * src/mimeview.c
                Corrected issue when "automatically display images" was
                not set : first image remained after selecting second.
 2002-04-23 [colin]     0.7.4claws96
        
        * src/mimeview.c
                Corrected issue when "automatically display images" was
                not set : first image remained after selecting second.
+
 2002-04-23 [melvin]    0.7.4claws95
 
        * src/prefs_actions.c
 2002-04-23 [melvin]    0.7.4claws95
 
        * src/prefs_actions.c
index a2b33d483ef37efa8f9bae4a2858cfdf9ec9fc7f..2c7b4a547db8656b8a18a21d53e09a1ae446496c 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws96
+EXTRA_VERSION=claws97
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index f0b2b5191a9467f1c1a59422356cc4b3ce2a205b..8f2d3f21242a248027df5f50fe84c9fb573a2bb5 100644 (file)
@@ -201,7 +201,8 @@ static PrefsAccount *compose_current_mail_account(void);
 /* static gint compose_send                    (Compose        *compose); */
 static gboolean compose_check_for_valid_recipient
                                                (Compose        *compose);
 /* static gint compose_send                    (Compose        *compose); */
 static gboolean compose_check_for_valid_recipient
                                                (Compose        *compose);
-static gboolean compose_check_entries          (Compose        *compose);
+static gboolean compose_check_entries          (Compose        *compose,
+                                                gboolean       check_subject);
 static gint compose_write_to_file              (Compose        *compose,
                                                 const gchar    *file,
                                                 gboolean        is_draft);
 static gint compose_write_to_file              (Compose        *compose,
                                                 const gchar    *file,
                                                 gboolean        is_draft);
@@ -211,6 +212,10 @@ static gint compose_remove_reedit_target   (Compose        *compose);
 static gint compose_queue                      (Compose        *compose,
                                                 gint           *msgnum,
                                                 FolderItem     **item);
 static gint compose_queue                      (Compose        *compose,
                                                 gint           *msgnum,
                                                 FolderItem     **item);
+static gint compose_queue_sub                  (Compose        *compose,
+                                                gint           *msgnum,
+                                                FolderItem     **item,
+                                                gboolean       check_subject);
 static void compose_write_attach               (Compose        *compose,
                                                 FILE           *fp);
 static gint compose_write_headers              (Compose        *compose,
 static void compose_write_attach               (Compose        *compose,
                                                 FILE           *fp);
 static gint compose_write_headers              (Compose        *compose,
@@ -2629,7 +2634,7 @@ gboolean compose_check_for_valid_recipient(Compose *compose) {
        return recipient_found;
 }
 
        return recipient_found;
 }
 
-static gboolean compose_check_entries(Compose *compose)
+static gboolean compose_check_entries(Compose *compose, gboolean check_subject)
 {
        gchar *str;
 
 {
        gchar *str;
 
@@ -2639,7 +2644,7 @@ static gboolean compose_check_entries(Compose *compose)
        }
 
        str = gtk_entry_get_text(GTK_ENTRY(compose->subject_entry));
        }
 
        str = gtk_entry_get_text(GTK_ENTRY(compose->subject_entry));
-       if (*str == '\0') {
+       if (*str == '\0' && check_subject == TRUE) {
                AlertValue aval;
 
                aval = alertpanel(_("Send"),
                AlertValue aval;
 
                aval = alertpanel(_("Send"),
@@ -2658,7 +2663,7 @@ gint compose_send(Compose *compose)
        FolderItem *folder;
        gint val;
 
        FolderItem *folder;
        gint val;
 
-       if (compose_check_entries(compose) == FALSE)
+       if (compose_check_entries(compose, TRUE) == FALSE)
                return -1;
 
        val = compose_queue(compose, &msgnum, &folder);
                return -1;
 
        val = compose_queue(compose, &msgnum, &folder);
@@ -2689,7 +2694,7 @@ gint compose_send(Compose *compose)
 
        lock = TRUE;
 
 
        lock = TRUE;
 
-       if (compose_check_entries(compose) == FALSE) {
+       if (compose_check_entries(compose, TRUE) == FALSE) {
                lock = FALSE;
                return 1;
        }
                lock = FALSE;
                return 1;
        }
@@ -3211,8 +3216,11 @@ static gint compose_remove_reedit_target(Compose *compose)
        return 0;
 }
 
        return 0;
 }
 
-
 static gint compose_queue(Compose *compose, gint *msgnum, FolderItem **item)
 static gint compose_queue(Compose *compose, gint *msgnum, FolderItem **item)
+{
+       return compose_queue_sub (compose, msgnum, item, FALSE);
+}
+static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item, gboolean check_subject)
 {
        FolderItem *queue;
        gchar *tmp, *tmp2, *queue_path;
 {
        FolderItem *queue;
        gchar *tmp, *tmp2, *queue_path;
@@ -3230,7 +3238,7 @@ static gint compose_queue(Compose *compose, gint *msgnum, FolderItem **item)
 
         lock = TRUE;
        
 
         lock = TRUE;
        
-       if (compose_check_entries(compose) == FALSE) {
+       if (compose_check_entries(compose, check_subject) == FALSE) {
                 lock = FALSE;
                 return -1;
        }
                 lock = FALSE;
                 return -1;
        }
@@ -5939,7 +5947,7 @@ static void compose_send_later_cb(gpointer data, guint action,
        Compose *compose = (Compose *)data;
        gint val;
 
        Compose *compose = (Compose *)data;
        gint val;
 
-       val = compose_queue(compose, NULL, NULL);
+       val = compose_queue_sub(compose, NULL, NULL, TRUE);
        if (!val) gtk_widget_destroy(compose->window);
 }
 
        if (!val) gtk_widget_destroy(compose->window);
 }