aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/em-composer-utils.c9
-rw-r--r--mail/em-composer-utils.h2
3 files changed, 18 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 6818a4ca26..dde995a83f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+2008-04-08 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes bug #523413
+
+ * em-composer-utils.c (save_draft_done):
+ Check the composer window's visibility to determine whether to
+ destroy the window. See the corresponding composer/ChangeLog
+ entry to get the full story.
+
+ * em-composer-utils.c (em_utils_composer_save_draft_cb):
+ Remove the 'quit' parameter.
+
2008-04-07 Takao Fujiwara <takao.fujiwara@sun.com>
reviewed by: Milan Crha
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 089b3bfea7..f5a3a2ced0 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -459,7 +459,6 @@ struct _save_draft_info {
struct emcs_t *emcs;
EMsgComposer *composer;
CamelMessageInfo *info;
- int quit;
};
static void
@@ -511,7 +510,10 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
emcs->drafts_uid = g_strdup (appended_uid);
}
- if (sdi->quit)
+ /* This is kind of a hack, but the composer's CLOSE action
+ * hides the window before emitting the "save-draft" signal.
+ * We use that to determine whether to destroy the composer. */
+ if (!GTK_WIDGET_VISIBLE (sdi->composer))
gtk_widget_destroy (GTK_WIDGET (sdi->composer));
done:
@@ -534,7 +536,7 @@ save_draft_folder (char *uri, CamelFolder *folder, gpointer data)
}
void
-em_utils_composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer user_data)
+em_utils_composer_save_draft_cb (EMsgComposer *composer, gpointer user_data)
{
const char *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
CamelFolder *drafts_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
@@ -559,7 +561,6 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer user
sdi->emcs = user_data;
if (sdi->emcs)
emcs_ref(sdi->emcs);
- sdi->quit = quit;
if (account && account->drafts_folder_uri &&
strcmp (account->drafts_folder_uri, default_drafts_folder_uri) != 0) {
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index bd7c9f404e..4af2c26f48 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -42,7 +42,7 @@ void em_composer_utils_setup_callbacks (struct _EMsgComposer *composer, struct _
#define em_composer_utils_setup_default_callbacks(composer) em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, NULL, NULL)
void em_utils_composer_send_cb(struct _EMsgComposer *composer, gpointer user_data);
-void em_utils_composer_save_draft_cb(struct _EMsgComposer *composer, int quit, gpointer user_data);
+void em_utils_composer_save_draft_cb(struct _EMsgComposer *composer, gpointer user_data);
void em_utils_compose_new_message (const char *fromuri);