git-svn-id: file:///svn/pkg-evolution/unstable/evolution@1455 ed03ce00-e4f4-0310-9448-ee38221cb277
This commit is contained in:
Yves-Alexis Perez
2009-12-15 15:02:31 +00:00
parent 0f3083e156
commit 2f7f570c4e
4 changed files with 6 additions and 258 deletions

8
debian/changelog vendored
View File

@ -1,8 +1,12 @@
evolution (2.28.2-1) UNRELEASED; urgency=low
evolution (2.28.2-1) unstable; urgency=low
* New upstream release.
* debian/patches:
- 02_empty-line_signature dropped, included upstream.
- 03_GNOME-Bug-599792-Anjal-composer-s-Send-button-doesn-t-work too.
- 04_GNOME-Bug-596027-In-Anjal-although-invalid-mail-address-wa.patch too.
-- Yves-Alexis Perez <corsac@debian.org> Mon, 14 Dec 2009 21:22:36 +0100
-- Yves-Alexis Perez <corsac@debian.org> Tue, 15 Dec 2009 08:55:42 +0100
evolution (2.28.1-3) unstable; urgency=low

View File

@ -1,32 +0,0 @@
From 64892e739d1ca8b13dfa0bfb86607f2f694e5671 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 03 Nov 2009 18:49:22 +0000
Subject: Bug #599124 - Signature always includes an empty line in front of text
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 9e3418a..7bf67a4 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1303,7 +1303,7 @@ get_signature_html (EMsgComposer *composer)
*/
html = g_strdup_printf ("<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature\" value=\"1\">-->"
"<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature_name\" value=\"uid:%s\">-->"
- "<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD><BR>"
+ "<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD>"
"%s%s%s%s"
"%s</TD></TR></TABLE>",
encoded_uid ? encoded_uid : "",
@@ -3867,8 +3867,8 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
g_free (html_text);
} else if (is_top_signature (composer)) {
/* insert paragraph after the signature ClueFlow things */
- gtkhtml_editor_run_command (editor, "cursor-forward");
- gtkhtml_editor_run_command (editor, "insert-paragraph");
+ if (gtkhtml_editor_run_command (editor, "cursor-forward"))
+ gtkhtml_editor_run_command (editor, "insert-paragraph");
}
gtkhtml_editor_undo_end (editor);
--
cgit v0.8.2

View File

@ -1,100 +0,0 @@
From 08150f6b0dc3d820f116613d3b1e461bba309c6c Mon Sep 17 00:00:00 2001
Message-Id: <08150f6b0dc3d820f116613d3b1e461bba309c6c.1259034563.git.yanli@infradead.org>
In-Reply-To: <50ffa65a7aee41c5fa319f64dd3bd3ffdd2be0b3.1259034563.git.yanli@infradead.org>
References: <50ffa65a7aee41c5fa319f64dd3bd3ffdd2be0b3.1259034563.git.yanli@infradead.org>
From: Yan Li <yanli@infradead.org>
Date: Thu, 5 Nov 2009 15:16:41 +0800
Subject: [PATCH] Bug #599792 - Anjal composer's Send button doesn't work after pressed Save Drafts button
This is due to an old hack that hiding a composer means we're closing
it so save_draft_done() destroys the composer after saved draft. But
in Anjal, the composer widget is always hidden (since the editor is
reparented to the tab), and will be wrongly destroyed by
save_draft_done() when you clicked "Save Draft" button.
This patch improved the old hack, by adding a new API
e_msg_composer_request_close() that can be used to request closing a
composer (so the old hack is no longer needed). Internally,
composer->priv->application_exiting is used to store this exiting
status.
So by this we no longer use a composer's visibility to check whether
we're to close it. When you no longer need a composer after saved
draft, call e_msg_composer_request_close() before sending the
save-draft signal.
Signed-off-by: Yan Li <yanli@infradead.org>
---
composer/e-composer-actions.c | 2 ++
composer/e-msg-composer.c | 8 ++++++++
composer/e-msg-composer.h | 1 +
mail/em-composer-utils.c | 5 +----
4 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index 9ec3399..74b0a85 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -91,6 +92,7 @@ action_close_cb (GtkAction *action,
switch (response) {
case GTK_RESPONSE_YES:
gtk_widget_hide (widget);
+ e_msg_composer_request_close (composer);
gtk_action_activate (ACTION (SAVE_DRAFT));
break;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 828a14e..64f565d 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -3928,6 +3928,14 @@ e_msg_composer_is_exiting (EMsgComposer *composer)
return composer->priv->application_exiting;
}
+void
+e_msg_composer_request_close (EMsgComposer *composer)
+{
+ g_return_val_if_fail (composer != NULL, FALSE);
+
+ composer->priv->application_exiting = TRUE;
+}
+
gboolean
e_msg_composer_request_close_all (void)
{
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index e1eeede..93db807 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -137,6 +137,7 @@ void e_msg_composer_add_message_attachments
CamelMimeMessage *message,
gboolean just_inlines);
+void e_msg_composer_request_close (EMsgComposer *composer);
gboolean e_msg_composer_request_close_all(void);
EMsgComposer * e_msg_composer_load_from_file (const gchar *filename);
void e_msg_composer_check_autosave (GtkWindow *parent);
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 1800d4c..fe7c34a 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -535,10 +535,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
emcs->drafts_uid = g_strdup (appended_uid);
}
- /* 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))
+ if (e_msg_composer_is_exiting (sdi->composer))
gtk_widget_destroy (GTK_WIDGET (sdi->composer));
done:
--
1.6.5.2

View File

@ -1,124 +0,0 @@
From 50ffa65a7aee41c5fa319f64dd3bd3ffdd2be0b3 Mon Sep 17 00:00:00 2001
Message-Id: <50ffa65a7aee41c5fa319f64dd3bd3ffdd2be0b3.1259034563.git.yanli@infradead.org>
From: Yan Li <yanli@infradead.org>
Date: Thu, 5 Nov 2009 11:50:34 +0800
Subject: [PATCH] Bug #596027: In Anjal, although invalid mail address warning popup, mail's tab closed automatically
A new field "mail_sent" is added to the Composer to indicate whether the
mail is sent successfully or not. This is needed by Anjal to know
whether it can destroy the composer or not.
(backported from df1f9b3b33de886c5b9a63b0ee6e722bfea4b2e0 of master)
Signed-off-by: Yan Li <yanli@infradead.org>
---
composer/e-composer-private.c | 4 ++++
composer/e-composer-private.h | 11 +++++++++++
composer/e-msg-composer.c | 14 ++++++++++++++
composer/e-msg-composer.h | 3 +++
mail/em-composer-utils.c | 3 +++
5 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 9a506fa..e2260c4 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -1,3 +1,5 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -274,6 +276,8 @@ e_composer_private_init (EMsgComposer *composer)
G_OBJECT (header), "visible",
G_OBJECT (action), "active");
}
+
+ priv->mail_sent = FALSE;
}
void
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 49d9ae6..8803cf9 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -1,3 +1,5 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -115,7 +117,16 @@ struct _EMsgComposerPrivate {
guint notify_id;
+ /* This send option is available only for Novell GroupWise and
+ Microsoft Exchange accounts */
gboolean send_invoked;
+
+ /* The mail composed has been sent. This bit will be set when
+ the mail passed sanity checking and is sent out, which
+ indicates that the composer can be destroyed. This bit can
+ be set/get by using API
+ e_msg_composer_{set,get}_mail_sent(). */
+ gboolean mail_sent;
};
void e_composer_private_init (EMsgComposer *composer);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index f18659e..828a14e 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4186,3 +4186,17 @@ e_save_spell_languages (GList *spell_languages)
g_error_free (error);
}
}
+
+void e_msg_composer_set_mail_sent (EMsgComposer *composer, gboolean mail_sent)
+{
+ g_return_val_if_fail (composer != NULL, FALSE);
+
+ composer->priv->mail_sent = mail_sent;
+}
+
+gboolean e_msg_composer_get_mail_sent (EMsgComposer *composer)
+{
+ g_return_val_if_fail (composer != NULL, FALSE);
+
+ return composer->priv->mail_sent;
+}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 434f330..e1eeede 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -158,6 +158,9 @@ gboolean e_msg_composer_is_exiting (EMsgComposer *composer);
GList * e_load_spell_languages (void);
void e_save_spell_languages (GList *spell_languages);
+void e_msg_composer_set_mail_sent (EMsgComposer *composer, gboolean mail_sent);
+gboolean e_msg_composer_get_mail_sent (EMsgComposer *composer);
+
G_END_DECLS
#endif /* E_MSG_COMPOSER_H */
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 1484a1f..1800d4c 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1,3 +1,5 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -440,6 +442,7 @@ em_utils_composer_send_cb (EMsgComposer *composer, gpointer user_data)
camel_object_ref (mail_folder);
/* mail the message */
+ e_msg_composer_set_mail_sent (composer, TRUE);
info = camel_message_info_new(NULL);
camel_message_info_set_flags(info, CAMEL_MESSAGE_SEEN, ~0);
--
1.6.5.2