aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-13 07:29:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-13 07:31:35 +0800
commit7af2865b7f964df81f59f8569955b399cae6bd79 (patch)
tree8d1af2d78ce896c7bd62289c939e6f504ae573c2 /modules/mail
parente270dfde642d4dd4f932895b599f43ab62e6f631 (diff)
downloadgsoc2013-evolution-7af2865b7f964df81f59f8569955b399cae6bd79.tar
gsoc2013-evolution-7af2865b7f964df81f59f8569955b399cae6bd79.tar.gz
gsoc2013-evolution-7af2865b7f964df81f59f8569955b399cae6bd79.tar.bz2
gsoc2013-evolution-7af2865b7f964df81f59f8569955b399cae6bd79.tar.lz
gsoc2013-evolution-7af2865b7f964df81f59f8569955b399cae6bd79.tar.xz
gsoc2013-evolution-7af2865b7f964df81f59f8569955b399cae6bd79.tar.zst
gsoc2013-evolution-7af2865b7f964df81f59f8569955b399cae6bd79.zip
EMailShellView: Remove some unused utility functions.
I guess I meant to move these to EMailReader but forgot to delete the original versions.
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-shell-view-private.c153
-rw-r--r--modules/mail/e-mail-shell-view-private.h6
2 files changed, 0 insertions, 159 deletions
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index 5b4c14655a..da82b164ad 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -913,159 +913,6 @@ e_mail_shell_view_restore_state (EMailShellView *mail_shell_view)
g_free (new_state_group);
}
-/* Helper for e_mail_shell_view_create_filter_from_selected() */
-static void
-mail_shell_view_create_filter_cb (CamelFolder *folder,
- const gchar *uid,
- CamelMimeMessage *message,
- gpointer user_data)
-{
- struct {
- EMailSession *session;
- const gchar *source;
- gint type;
- } *filter_data = user_data;
-
- if (message != NULL)
- filter_gui_add_from_message (
- filter_data->session, message,
- filter_data->source, filter_data->type);
-
- g_object_unref (filter_data->session);
- g_free (filter_data);
-}
-
-void
-e_mail_shell_view_create_filter_from_selected (EMailShellView *mail_shell_view,
- gint filter_type)
-{
- EMailShellContent *mail_shell_content;
- EShellBackend *shell_backend;
- EShellView *shell_view;
- EMailBackend *backend;
- EMailSession *session;
- EMailReader *reader;
- EMailView *mail_view;
- CamelFolder *folder;
- const gchar *filter_source;
- const gchar *message_uid;
- GPtrArray *uids;
-
- struct {
- EMailSession *session;
- const gchar *source;
- gint type;
- } *filter_data;
-
- g_return_if_fail (E_IS_MAIL_SHELL_VIEW (mail_shell_view));
-
- mail_shell_content = mail_shell_view->priv->mail_shell_content;
- mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
-
- shell_view = E_SHELL_VIEW (mail_shell_view);
- shell_backend = e_shell_view_get_shell_backend (shell_view);
-
- backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
-
- reader = E_MAIL_READER (mail_view);
- folder = e_mail_reader_get_folder (reader);
-
- uids = e_mail_reader_get_selected_uids (reader);
- g_return_if_fail (uids != NULL && uids->len == 1);
- message_uid = g_ptr_array_index (uids, 0);
-
- if (em_utils_folder_is_sent (folder))
- filter_source = E_FILTER_SOURCE_OUTGOING;
- else if (em_utils_folder_is_outbox (folder))
- filter_source = E_FILTER_SOURCE_OUTGOING;
- else
- filter_source = E_FILTER_SOURCE_INCOMING;
-
- filter_data = g_malloc (sizeof (*filter_data));
- filter_data->session = g_object_ref (session);
- filter_data->source = filter_source;
- filter_data->type = filter_type;
-
- mail_get_message (
- folder, message_uid,
- mail_shell_view_create_filter_cb,
- filter_data, mail_msg_unordered_push);
-
- em_utils_uids_free (uids);
-}
-
-/* Helper for e_mail_shell_view_create_vfolder_from_selected() */
-static void
-mail_shell_view_create_vfolder_cb (CamelFolder *folder,
- const gchar *uid,
- CamelMimeMessage *message,
- gpointer user_data)
-{
- struct {
- EMailSession *session;
- gint type;
- } *vfolder_data = user_data;
-
- if (message != NULL)
- vfolder_gui_add_from_message (
- vfolder_data->session, message,
- vfolder_data->type, folder);
-
- g_object_unref (vfolder_data->session);
- g_free (vfolder_data);
-}
-
-void
-e_mail_shell_view_create_vfolder_from_selected (EMailShellView *mail_shell_view,
- gint vfolder_type)
-{
- EMailShellContent *mail_shell_content;
- EShellBackend *shell_backend;
- EShellView *shell_view;
- EMailBackend *backend;
- EMailSession *session;
- EMailReader *reader;
- EMailView *mail_view;
- CamelFolder *folder;
- GPtrArray *uids;
- const gchar *message_uid;
-
- struct {
- EMailSession *session;
- gint type;
- } *vfolder_data;
-
- g_return_if_fail (E_IS_MAIL_SHELL_VIEW (mail_shell_view));
-
- mail_shell_content = mail_shell_view->priv->mail_shell_content;
- mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
-
- shell_view = E_SHELL_VIEW (mail_shell_view);
- shell_backend = e_shell_view_get_shell_backend (shell_view);
-
- backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
-
- reader = E_MAIL_READER (mail_view);
- folder = e_mail_reader_get_folder (reader);
-
- uids = e_mail_reader_get_selected_uids (reader);
- g_return_if_fail (uids != NULL && uids->len == 1);
- message_uid = g_ptr_array_index (uids, 0);
-
- vfolder_data = g_malloc (sizeof (*vfolder_data));
- vfolder_data->session = g_object_ref (session);
- vfolder_data->type = vfolder_type;
-
- mail_get_message (
- folder, message_uid,
- mail_shell_view_create_vfolder_cb,
- vfolder_data, mail_msg_unordered_push);
-
- em_utils_uids_free (uids);
-}
-
void
e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view)
{
diff --git a/modules/mail/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h
index e6b5285504..b8c25719a5 100644
--- a/modules/mail/e-mail-shell-view-private.h
+++ b/modules/mail/e-mail-shell-view-private.h
@@ -180,12 +180,6 @@ void e_mail_shell_view_actions_init
(EMailShellView *mail_shell_view);
void e_mail_shell_view_restore_state
(EMailShellView *mail_shell_view);
-void e_mail_shell_view_create_filter_from_selected
- (EMailShellView *mail_shell_view,
- gint filter_type);
-void e_mail_shell_view_create_vfolder_from_selected
- (EMailShellView *mail_shell_view,
- gint vfolder_type);
void e_mail_shell_view_update_popup_labels
(EMailShellView *mail_shell_view);
void e_mail_shell_view_update_search_filter