aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-16 03:02:46 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-03-17 20:49:12 +0800
commitc9f01692ea5affd0a4c7ff1b5e3ce82329ca5e2e (patch)
treedbe01fae6c08ed940acfbd7ab9806694e27327fc /mail
parent7ec9a50ee085ea083e0424dbd7e117573cf4847a (diff)
downloadgsoc2013-evolution-c9f01692ea5affd0a4c7ff1b5e3ce82329ca5e2e.tar.gz
gsoc2013-evolution-c9f01692ea5affd0a4c7ff1b5e3ce82329ca5e2e.tar.zst
gsoc2013-evolution-c9f01692ea5affd0a4c7ff1b5e3ce82329ca5e2e.zip
Add e_msg_composer_ref_session().
Replaces e_msg_composer_get_session().
Diffstat (limited to 'mail')
-rw-r--r--mail/em-composer-utils.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 515f27885c..c9bdaabe79 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -694,7 +694,6 @@ composer_save_to_drafts_cleanup (CamelFolder *drafts_folder,
GCancellable *cancellable;
GError *error = NULL;
- session = e_msg_composer_get_session (context->composer);
alert_sink = e_activity_get_alert_sink (context->activity);
cancellable = e_activity_get_cancellable (context->activity);
@@ -720,12 +719,16 @@ composer_save_to_drafts_cleanup (CamelFolder *drafts_folder,
return;
}
+ session = e_msg_composer_ref_session (context->composer);
+
/* Mark the previously saved draft message for deletion.
* Note: This is just a nice-to-have; ignore failures. */
e_mail_session_handle_draft_headers (
E_MAIL_SESSION (session), context->message,
G_PRIORITY_DEFAULT, cancellable, (GAsyncReadyCallback)
composer_save_to_drafts_complete, context);
+
+ g_object_unref (session);
}
static void
@@ -2875,7 +2878,7 @@ composer_set_body (EMsgComposer *composer,
gboolean start_bottom, has_body_text = FALSE;
guint32 validity_found = 0;
- session = e_msg_composer_get_session (composer);
+ session = e_msg_composer_ref_session (composer);
settings = g_settings_new ("org.gnome.evolution.mail");
@@ -2943,6 +2946,8 @@ composer_set_body (EMsgComposer *composer,
}
g_object_unref (settings);
+
+ g_object_unref (session);
}
gchar *