aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-13 02:47:22 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-13 03:15:57 +0800
commita55f24dfb39129dd268ce79250834733433b1921 (patch)
treeba6fd23457c355af6faa4c5eab193a9906a8dd0d /mail
parent27ac2039018d174e3f906fa8b74f4af9c37f5d53 (diff)
downloadgsoc2013-evolution-a55f24dfb39129dd268ce79250834733433b1921.tar.gz
gsoc2013-evolution-a55f24dfb39129dd268ce79250834733433b1921.tar.zst
gsoc2013-evolution-a55f24dfb39129dd268ce79250834733433b1921.zip
Adapt to CamelSession API changes.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-ui-session.c25
-rw-r--r--mail/e-mail-ui-session.h4
2 files changed, 13 insertions, 16 deletions
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index c3dcfeba2b..d07bc1ee77 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -116,7 +116,7 @@ struct _user_message_msg {
CamelSessionAlertType type;
gchar *prompt;
- GSList *button_captions;
+ GList *button_captions;
EFlag *done;
gint result;
@@ -173,9 +173,9 @@ user_message_exec (struct _user_message_msg *m,
EShell *shell;
const gchar *error_type;
gint index;
- GSList *iter;
+ GList *iter;
- info_only = g_slist_length (m->button_captions) <= 1;
+ info_only = g_list_length (m->button_captions) <= 1;
if (!m->ismain && user_message_dialog != NULL && !info_only) {
g_queue_push_tail (&user_message_queue, mail_msg_ref (m));
@@ -284,7 +284,7 @@ user_message_exec (struct _user_message_msg *m,
} else {
gpointer user_data = m;
- if (g_slist_length (m->button_captions) <= 1)
+ if (g_list_length (m->button_captions) <= 1)
user_data = NULL;
g_signal_connect (
@@ -298,7 +298,7 @@ static void
user_message_free (struct _user_message_msg *m)
{
g_free (m->prompt);
- g_slist_free_full (m->button_captions, g_free);
+ g_list_free_full (m->button_captions, g_free);
e_flag_free (m->done);
}
@@ -622,24 +622,21 @@ gint
e_mail_ui_session_alert_user (CamelSession *session,
CamelSessionAlertType type,
const gchar *prompt,
- GSList *button_captions,
+ GList *button_captions,
GCancellable *cancellable)
{
struct _user_message_msg *m;
gint result = -1;
- GSList *iter;
m = mail_msg_new (&user_message_info);
m->ismain = mail_in_main_thread ();
m->type = type;
m->prompt = g_strdup (prompt);
m->done = e_flag_new ();
- m->button_captions = g_slist_copy (button_captions);
+ m->button_captions = g_list_copy_deep (
+ button_captions, (GCopyFunc) g_strdup, NULL);
- for (iter = m->button_captions; iter; iter = iter->next)
- iter->data = g_strdup (iter->data);
-
- if (g_slist_length (button_captions) > 1)
+ if (g_list_length (button_captions) > 1)
mail_msg_ref (m);
if (!cancellable)
@@ -650,7 +647,7 @@ e_mail_ui_session_alert_user (CamelSession *session,
else
mail_msg_main_loop_push (m);
- if (g_slist_length (button_captions) > 1) {
+ if (g_list_length (button_captions) > 1) {
e_flag_wait (m->done);
result = m->result;
mail_msg_unref (m);
@@ -665,7 +662,7 @@ e_mail_ui_session_trust_prompt (CamelSession *session,
const gchar *host,
const gchar *certificate,
guint32 certificate_errors,
- const GSList *issuers,
+ GList *issuers,
GCancellable *cancellable)
{
g_type_ensure (E_TYPE_MAIL_UI_SESSION);
diff --git a/mail/e-mail-ui-session.h b/mail/e-mail-ui-session.h
index 105a14adf8..efd4696023 100644
--- a/mail/e-mail-ui-session.h
+++ b/mail/e-mail-ui-session.h
@@ -87,13 +87,13 @@ void e_mail_ui_session_add_activity (EMailUISession *session,
gint e_mail_ui_session_alert_user (CamelSession *session,
CamelSessionAlertType type,
const gchar *prompt,
- GSList *button_captions,
+ GList *button_captions,
GCancellable *cancellable);
CamelCertTrust e_mail_ui_session_trust_prompt (CamelSession *session,
const gchar *host,
const gchar *certificate,
guint32 certificate_errors,
- const GSList *issuers,
+ GList *issuers,
GCancellable *cancellable);
G_END_DECLS