From 0fd0e38981a3650e38a72a998ba68adff0d19618 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Wed, 24 Apr 2002 08:44:27 +0000 Subject: [PATCH] Fixed double "subject is empty" question. --- ChangeLog.claws | 6 ++++++ configure.in | 2 +- src/compose.c | 24 ++++++++++++++++-------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 3462659e3..8742176c4 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -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 [melvin] 0.7.4claws95 * src/prefs_actions.c diff --git a/configure.in b/configure.in index a2b33d483..2c7b4a547 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=7 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 diff --git a/src/compose.c b/src/compose.c index f0b2b5191..8f2d3f212 100644 --- a/src/compose.c +++ b/src/compose.c @@ -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 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); @@ -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_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, @@ -2629,7 +2634,7 @@ gboolean compose_check_for_valid_recipient(Compose *compose) { return recipient_found; } -static gboolean compose_check_entries(Compose *compose) +static gboolean compose_check_entries(Compose *compose, gboolean check_subject) { gchar *str; @@ -2639,7 +2644,7 @@ static gboolean compose_check_entries(Compose *compose) } str = gtk_entry_get_text(GTK_ENTRY(compose->subject_entry)); - if (*str == '\0') { + if (*str == '\0' && check_subject == TRUE) { AlertValue aval; aval = alertpanel(_("Send"), @@ -2658,7 +2663,7 @@ gint compose_send(Compose *compose) 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); @@ -2689,7 +2694,7 @@ gint compose_send(Compose *compose) lock = TRUE; - if (compose_check_entries(compose) == FALSE) { + if (compose_check_entries(compose, TRUE) == FALSE) { lock = FALSE; return 1; } @@ -3211,8 +3216,11 @@ static gint compose_remove_reedit_target(Compose *compose) return 0; } - 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; @@ -3230,7 +3238,7 @@ static gint compose_queue(Compose *compose, gint *msgnum, FolderItem **item) lock = TRUE; - if (compose_check_entries(compose) == FALSE) { + if (compose_check_entries(compose, check_subject) == FALSE) { lock = FALSE; return -1; } @@ -5939,7 +5947,7 @@ static void compose_send_later_cb(gpointer data, guint action, 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); } -- 2.25.1