aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-06 00:19:33 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-06 00:19:33 +0800
commit8fd93c9042bb30e53ce88303f8a0789a6ca688eb (patch)
tree543fc3e3548d9b296cb4ddcda597cf4f64f306bd /mail
parent1f10f3ec681c3ed755ce4e02a4ca0117b9243b2b (diff)
downloadgsoc2013-evolution-8fd93c9042bb30e53ce88303f8a0789a6ca688eb.tar
gsoc2013-evolution-8fd93c9042bb30e53ce88303f8a0789a6ca688eb.tar.gz
gsoc2013-evolution-8fd93c9042bb30e53ce88303f8a0789a6ca688eb.tar.bz2
gsoc2013-evolution-8fd93c9042bb30e53ce88303f8a0789a6ca688eb.tar.lz
gsoc2013-evolution-8fd93c9042bb30e53ce88303f8a0789a6ca688eb.tar.xz
gsoc2013-evolution-8fd93c9042bb30e53ce88303f8a0789a6ca688eb.tar.zst
gsoc2013-evolution-8fd93c9042bb30e53ce88303f8a0789a6ca688eb.zip
First successful build
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-backend.c3
-rw-r--r--mail/e-mail-reader.c44
-rw-r--r--mail/e-mail-session.c11
-rw-r--r--mail/e-mail-store.c2
-rw-r--r--mail/em-folder-tree-model.c142
-rw-r--r--mail/em-folder-tree-model.h4
-rw-r--r--mail/message-list.c2
7 files changed, 9 insertions, 199 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 56f2dc67b3..5768934b1a 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -272,7 +272,6 @@ mail_backend_prepare_for_quit_cb (EShell *shell,
EMailBackend *backend)
{
EAccountList *account_list;
- EMailSession *session;
gboolean delete_junk;
gboolean empty_trash;
@@ -281,8 +280,6 @@ mail_backend_prepare_for_quit_cb (EShell *shell,
gboolean empty_trash;
} sync_data;
- session = e_mail_backend_get_session (backend);
-
delete_junk = e_mail_backend_delete_junk_policy_decision (backend);
empty_trash = e_mail_backend_empty_trash_policy_decision (backend);
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 76502314ab..920994242a 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -632,10 +632,7 @@ action_mail_forward_quoted_cb (GtkAction *action,
CamelFolder *folder;
GtkWindow *window;
GPtrArray *uids;
-<<<<<<< HEAD
-=======
gboolean close_reader;
->>>>>>> master
folder = e_mail_reader_get_folder (reader);
window = e_mail_reader_get_window (reader);
@@ -650,14 +647,8 @@ action_mail_forward_quoted_cb (GtkAction *action,
if (em_utils_ask_open_many (window, uids->len))
em_utils_forward_messages (
reader, folder, uids,
-<<<<<<< HEAD
- E_MAIL_FORWARD_STYLE_QUOTED);
-
- g_ptr_array_unref (uids);
-=======
E_MAIL_FORWARD_STYLE_QUOTED,
close_reader ? GTK_WIDGET (reader) : NULL);
->>>>>>> master
g_ptr_array_unref (uids);
}
@@ -750,11 +741,7 @@ action_mail_mark_unread_cb (GtkAction *action,
/* Notify the tree model that the user has marked messages as
* unread so it doesn't mistake the event as new mail arriving. */
-<<<<<<< HEAD
- model = em_folder_tree_model_get_default (e_mail_reader_get_backend (reader));
-=======
model = em_folder_tree_model_get_default ();
->>>>>>> master
folder = e_mail_reader_get_folder (reader);
em_folder_tree_model_user_marked_unread (model, folder, n_marked);
}
@@ -774,17 +761,10 @@ action_mail_message_edit_cb (GtkAction *action,
/* XXX Either e_mail_reader_get_selected_uids()
* or MessageList should do this itself. */
g_ptr_array_set_free_func (uids, (GDestroyNotify) g_free);
-<<<<<<< HEAD
-
- replace = em_utils_folder_is_drafts (folder);
- em_utils_edit_messages (reader, folder, uids, replace);
-
-=======
replace = em_utils_folder_is_drafts (folder);
em_utils_edit_messages (reader, folder, uids, replace);
->>>>>>> master
g_ptr_array_unref (uids);
}
@@ -835,11 +815,7 @@ action_mail_move_cb (GtkAction *action,
uids = e_mail_reader_get_selected_uids (reader);
window = e_mail_reader_get_window (reader);
-<<<<<<< HEAD
- model = em_folder_tree_model_get_default (backend);
-=======
model = em_folder_tree_model_get_default ();
->>>>>>> master
dialog = em_folder_selector_new (
window, backend, model,
@@ -1159,19 +1135,11 @@ action_mail_reply_all_check (CamelFolder *folder,
gint recip_count = 0;
EMailReplyType type = E_MAIL_REPLY_TO_ALL;
GError *error = NULL;
-<<<<<<< HEAD
-
- alert_sink = e_activity_get_alert_sink (closure->activity);
-
- message = camel_folder_get_message_finish (folder, result, &error);
-
-=======
alert_sink = e_activity_get_alert_sink (closure->activity);
message = camel_folder_get_message_finish (folder, result, &error);
->>>>>>> master
if (e_activity_handle_cancellation (closure->activity, error)) {
g_warn_if_fail (message == NULL);
mail_reader_closure_free (closure);
@@ -1352,17 +1320,6 @@ action_mail_reply_sender_check (CamelFolder *folder,
GError *error = NULL;
alert_sink = e_activity_get_alert_sink (closure->activity);
-<<<<<<< HEAD
-
- message = camel_folder_get_message_finish (folder, result, &error);
-
- if (e_activity_handle_cancellation (closure->activity, error)) {
- g_warn_if_fail (message == NULL);
- mail_reader_closure_free (closure);
- g_error_free (error);
- return;
-
-=======
message = camel_folder_get_message_finish (folder, result, &error);
@@ -1372,7 +1329,6 @@ action_mail_reply_sender_check (CamelFolder *folder,
g_error_free (error);
return;
->>>>>>> master
} else if (error != NULL) {
g_warn_if_fail (message == NULL);
e_alert_submit (
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 109e49826d..45c8e0209c 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -52,7 +52,6 @@
#include "e-util/e-util.h"
#include "e-util/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
-#include "e-util/e-extensible.h"
#include "e-util/e-util-private.h"
#include "e-util/gconf-bridge.h"
@@ -633,16 +632,6 @@ mail_session_finalize (GObject *object)
g_free (mail_data_dir);
g_free (mail_config_dir);
- if (proxy_settings) {
- g_signal_handlers_disconnect_by_func (proxy_settings, proxy_gsettings_changed_cb, CAMEL_SESSION (object));
- g_object_unref (proxy_settings);
- }
-
- if (proxy_socks_settings) {
- g_signal_handlers_disconnect_by_func (proxy_socks_settings, proxy_gsettings_changed_cb, CAMEL_SESSION (object));
- g_object_unref (proxy_socks_settings);
- }
-
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (e_mail_session_parent_class)->finalize (object);
}
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index f93856a8f4..e59e7b2abd 100644
--- a/mail/e-mail-store.c
+++ b/mail/e-mail-store.c
@@ -428,7 +428,7 @@ e_mail_store_remove (EMailBackend *backend,
folder_cache = e_mail_session_get_folder_cache (session);
mail_folder_cache_note_store_remove (folder_cache, store);
- default_model = em_folder_tree_model_get_default (NULL);
+ default_model = em_folder_tree_model_get_default ();
em_folder_tree_model_remove_store (default_model, store);
mail_disconnect_store (store);
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index cc674cd792..1e7840710f 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -426,11 +426,6 @@ folder_tree_model_set_property (GObject *object,
EM_FOLDER_TREE_MODEL (object),
g_value_get_object (value));
return;
- case PROP_BACKEND:
- em_folder_tree_model_set_backend (
- EM_FOLDER_TREE_MODEL (object),
- g_value_get_object (value));
- return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -456,74 +451,11 @@ folder_tree_model_get_property (GObject *object,
em_folder_tree_model_get_backend (
EM_FOLDER_TREE_MODEL (object)));
return;
- case PROP_BACKEND:
- g_value_set_object (
- value,
- em_folder_tree_model_get_backend (
- EM_FOLDER_TREE_MODEL (object)));
- return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
-
-static void
-folder_tree_model_constructed (GObject *object)
-{
- EShell *shell;
- EShellSettings *shell_settings;
- EMFolderTreeModel *model;
-
- GType col_types[] = {
- G_TYPE_STRING, /* display name */
- G_TYPE_POINTER, /* store object */
- G_TYPE_STRING, /* full name */
- G_TYPE_STRING, /* icon name */
- G_TYPE_STRING, /* uri */
- G_TYPE_UINT, /* unread count */
- G_TYPE_UINT, /* flags */
- G_TYPE_BOOLEAN, /* is a store node */
- G_TYPE_BOOLEAN, /* is a folder node */
- G_TYPE_BOOLEAN, /* has not-yet-loaded subfolders */
- G_TYPE_UINT, /* last known unread count */
- G_TYPE_BOOLEAN, /* folder is a draft folder */
- G_TYPE_UINT /* user's sortorder */
- };
-
- model = EM_FOLDER_TREE_MODEL (object);
- shell = e_shell_backend_get_shell (E_SHELL_BACKEND (model->priv->backend));
- shell_settings = e_shell_get_shell_settings (shell);
-
- gtk_tree_store_set_column_types (
- GTK_TREE_STORE (model), NUM_COLUMNS, col_types);
- gtk_tree_sortable_set_default_sort_func (
- GTK_TREE_SORTABLE (model),
- folder_tree_model_sort, shell, NULL);
- gtk_tree_sortable_set_sort_column_id (
- GTK_TREE_SORTABLE (model),
- GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID,
- GTK_SORT_ASCENDING);
-
- model->priv->accounts = e_get_account_list ();
- model->priv->account_changed_id = g_signal_connect (
- model->priv->accounts, "account-changed",
- G_CALLBACK (account_changed_cb), model);
- model->priv->account_removed_id = g_signal_connect (
- model->priv->accounts, "account-removed",
- G_CALLBACK (account_removed_cb), model);
- model->priv->account_added_id = g_signal_connect (
- model->priv->accounts, "account-added",
- G_CALLBACK (account_added_cb), model);
-
- g_signal_connect_swapped (model->priv->backend, "account-sort-order-changed", G_CALLBACK (account_sort_order_changed_cb), model);
- g_signal_connect_swapped (shell_settings, "notify::mail-sort-accounts-alpha", G_CALLBACK (account_sort_order_changed_cb), model);
- g_signal_connect_swapped (shell_settings, "notify::mail-enable-local-folders", G_CALLBACK (enable_local_folders_changed_cb), model);
- g_signal_connect_swapped (shell_settings, "notify::mail-enable-search-folders", G_CALLBACK (enable_search_folders_changed_cb), model);
-
- G_OBJECT_CLASS (parent_class)->constructed (object);
-}
-
static void
folder_tree_model_dispose (GObject *object)
{
@@ -560,24 +492,6 @@ folder_tree_model_dispose (GObject *object)
priv->backend = NULL;
}
- if (priv->backend) {
- EShell *shell;
- EShellSettings *shell_settings;
- EMFolderTreeModel *model;
-
- model = EM_FOLDER_TREE_MODEL (object);
- shell = e_shell_backend_get_shell (E_SHELL_BACKEND (priv->backend));
- shell_settings = e_shell_get_shell_settings (shell);
-
- g_signal_handlers_disconnect_by_func (priv->backend, G_CALLBACK (account_sort_order_changed_cb), model);
- g_signal_handlers_disconnect_by_func (shell_settings, G_CALLBACK (account_sort_order_changed_cb), model);
- g_signal_handlers_disconnect_by_func (shell_settings, G_CALLBACK (enable_local_folders_changed_cb), model);
- g_signal_handlers_disconnect_by_func (shell_settings, G_CALLBACK (enable_search_folders_changed_cb), model);
-
- g_object_unref (priv->backend);
- priv->backend = NULL;
- }
-
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -662,7 +576,6 @@ em_folder_tree_model_class_init (EMFolderTreeModelClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->set_property = folder_tree_model_set_property;
object_class->get_property = folder_tree_model_get_property;
- object_class->constructed = folder_tree_model_constructed;
object_class->dispose = folder_tree_model_dispose;
object_class->finalize = folder_tree_model_finalize;
object_class->constructed = folder_tree_model_constructed;
@@ -687,16 +600,6 @@ em_folder_tree_model_class_init (EMFolderTreeModelClass *class)
GTK_TYPE_TREE_SELECTION,
G_PARAM_READWRITE));
- g_object_class_install_property (
- object_class,
- PROP_BACKEND,
- g_param_spec_object (
- "backend",
- NULL,
- NULL,
- E_TYPE_MAIL_BACKEND,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
signals[LOADING_ROW] = g_signal_new (
"loading-row",
G_OBJECT_CLASS_TYPE (object_class),
@@ -797,26 +700,18 @@ em_folder_tree_model_init (EMFolderTreeModel *model)
}
EMFolderTreeModel *
-em_folder_tree_model_new (EMailBackend *mail_backend)
+em_folder_tree_model_new (void)
{
- return g_object_new (EM_TYPE_FOLDER_TREE_MODEL, "backend", mail_backend, NULL);
+ return g_object_new (EM_TYPE_FOLDER_TREE_MODEL, NULL);
}
EMFolderTreeModel *
-em_folder_tree_model_get_default (EMailBackend *mail_backend)
+em_folder_tree_model_get_default (void)
{
static EMFolderTreeModel *default_folder_tree_model;
- if (G_UNLIKELY (default_folder_tree_model == NULL)) {
- if (!mail_backend) {
- EShell *shell;
-
- shell = e_shell_get_default ();
- mail_backend = E_MAIL_BACKEND (e_shell_get_backend_by_name (shell, "mail"));
- }
-
- default_folder_tree_model = em_folder_tree_model_new (mail_backend);
- }
+ if (G_UNLIKELY (default_folder_tree_model == NULL))
+ default_folder_tree_model = em_folder_tree_model_new ();
return default_folder_tree_model;
}
@@ -919,33 +814,6 @@ em_folder_tree_model_set_backend (EMFolderTreeModel *model,
g_object_notify (G_OBJECT (model), "backend");
}
-EMailBackend *
-em_folder_tree_model_get_backend (EMFolderTreeModel *model)
-{
- g_return_val_if_fail (EM_IS_FOLDER_TREE_MODEL (model), NULL);
-
- return model->priv->backend;
-}
-
-void
-em_folder_tree_model_set_backend (EMFolderTreeModel *model,
- EMailBackend *backend)
-{
- g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
-
- if (backend != NULL) {
- g_return_if_fail (E_IS_MAIL_BACKEND (backend));
- g_object_ref (backend);
- }
-
- if (model->priv->backend != NULL)
- g_object_unref (model->priv->backend);
-
- model->priv->backend = backend;
-
- g_object_notify (G_OBJECT (model), "backend");
-}
-
void
em_folder_tree_model_set_folder_info (EMFolderTreeModel *model,
GtkTreeIter *iter,
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 0188753942..0ed007aa96 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -111,9 +111,9 @@ struct _EMFolderTreeModelClass {
GType em_folder_tree_model_get_type (void);
EMFolderTreeModel *
- em_folder_tree_model_new (EMailBackend *mail_backend);
+ em_folder_tree_model_new (void);
EMFolderTreeModel *
- em_folder_tree_model_get_default (EMailBackend *mail_backend);
+ em_folder_tree_model_get_default (void);
GtkTreeSelection *
em_folder_tree_model_get_selection
(EMFolderTreeModel *model);
diff --git a/mail/message-list.c b/mail/message-list.c
index 603fc71d89..1e903a3f48 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4191,7 +4191,7 @@ on_click (ETree *tree,
if (col == COL_MESSAGE_STATUS && (flags & CAMEL_MESSAGE_SEEN)) {
EMFolderTreeModel *model;
- model = em_folder_tree_model_get_default (list->priv->backend);
+ model = em_folder_tree_model_get_default ();
em_folder_tree_model_user_marked_unread (
model, list->folder, 1);
}