[evolution/wip/webkit-composer] EComposerPrivate: Move is_from_draft variable to private
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer] EComposerPrivate: Move is_from_draft variable to private
- Date: Thu, 20 Mar 2014 08:16:24 +0000 (UTC)
commit 022e6433953b1150d2b78aff63efb52479b355f6
Author: Tomas Popela <tpopela redhat com>
Date: Thu Mar 20 09:09:04 2014 +0100
EComposerPrivate: Move is_from_draft variable to private
composer/e-composer-private.c | 1 +
composer/e-composer-private.h | 1 +
composer/e-msg-composer.c | 23 ++++++++++-------------
3 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 1278003..c3bb2fb 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -131,6 +131,7 @@ e_composer_private_constructed (EMsgComposer *composer)
priv->charset = e_composer_get_default_charset ();
+ priv->is_from_draft = FALSE;
priv->is_from_message = FALSE;
priv->is_from_new_message = FALSE;
priv->set_signature_from_message = FALSE;
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 0de5207..9e4df60 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -92,6 +92,7 @@ struct _EMsgComposerPrivate {
CamelMimeMessage *redirect;
+ gboolean is_from_draft;
gboolean is_from_message;
gboolean is_from_new_message;
gboolean set_signature_from_message;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 28b44f0..7daf24c 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -132,8 +132,7 @@ static void handle_multipart (EMsgComposer *composer,
CamelMultipart *multipart,
gboolean keep_signature,
GCancellable *cancellable,
- gint depth,
- gboolean from_drafts);
+ gint depth);
static void handle_multipart_alternative (EMsgComposer *composer,
CamelMultipart *multipart,
gboolean keep_signature,
@@ -2668,7 +2667,7 @@ handle_multipart_signed (EMsgComposer *composer,
} else {
/* There must be attachments... */
handle_multipart (
- composer, multipart, keep_signature, cancellable, depth, FALSE);
+ composer, multipart, keep_signature, cancellable, depth);
}
} else if (camel_content_type_is (content_type, "text", "*")) {
@@ -2760,7 +2759,7 @@ handle_multipart_encrypted (EMsgComposer *composer,
} else {
/* There must be attachments... */
handle_multipart (
- composer, content_multipart, keep_signature, cancellable, depth, FALSE);
+ composer, content_multipart, keep_signature, cancellable, depth);
}
} else if (camel_content_type_is (content_type, "text", "*")) {
@@ -2827,7 +2826,7 @@ handle_multipart_alternative (EMsgComposer *composer,
/* Depth doesn't matter so long as we
* don't pass 0. */
handle_multipart (
- composer, mp, keep_signature, cancellable, depth + 1, FALSE);
+ composer, mp, keep_signature, cancellable, depth + 1);
}
} else if (camel_content_type_is (content_type, "text", "html")) {
@@ -2868,8 +2867,7 @@ handle_multipart (EMsgComposer *composer,
CamelMultipart *multipart,
gboolean keep_signature,
GCancellable *cancellable,
- gint depth,
- gboolean from_drafts)
+ gint depth)
{
gint i, nparts;
@@ -2915,7 +2913,7 @@ handle_multipart (EMsgComposer *composer,
/* Depth doesn't matter so long as we
* don't pass 0. */
handle_multipart (
- composer, mp, keep_signature, cancellable, depth + 1, from_drafts);
+ composer, mp, keep_signature, cancellable, depth + 1);
}
} else if (depth == 0 && i == 0) {
@@ -2926,7 +2924,7 @@ handle_multipart (EMsgComposer *composer,
* this must be the body. */
/* If we are opening message from Drafts */
- if (from_drafts) {
+ if (composer->priv->is_from_draft) {
/* Extract the body */
CamelDataWrapper *dw;
@@ -3094,7 +3092,6 @@ e_msg_composer_new_with_message (EShell *shell,
struct _camel_header_raw *xev;
gchar *identity_uid;
gint len, i;
- gboolean from_drafts = FALSE;
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
@@ -3238,7 +3235,7 @@ e_msg_composer_new_with_message (EShell *shell,
CAMEL_MEDIUM (message), "X-Evolution-Composer-Mode");
if (composer_mode && *composer_mode)
- from_drafts = TRUE;
+ composer->priv->is_from_draft = TRUE;
if (format != NULL) {
gchar **flags;
@@ -3346,7 +3343,7 @@ e_msg_composer_new_with_message (EShell *shell,
} else {
/* There must be attachments... */
handle_multipart (
- composer, multipart, keep_signature, cancellable, 0, from_drafts);
+ composer, multipart, keep_signature, cancellable, 0);
}
} else {
CamelMimePart *mime_part;
@@ -3368,7 +3365,7 @@ e_msg_composer_new_with_message (EShell *shell,
}
/* If we are opening message from Drafts */
- if (from_drafts) {
+ if (composer->priv->is_from_draft) {
/* Extract the body */
CamelDataWrapper *dw;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]