[evolution] EMailShellView: Remove some unused utility functions.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EMailShellView: Remove some unused utility functions.
- Date: Thu, 12 May 2011 23:34:31 +0000 (UTC)
commit 7af2865b7f964df81f59f8569955b399cae6bd79
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu May 12 19:29:21 2011 -0400
EMailShellView: Remove some unused utility functions.
I guess I meant to move these to EMailReader but forgot to delete the
original versions.
modules/mail/e-mail-shell-view-private.c | 153 ------------------------------
modules/mail/e-mail-shell-view-private.h | 6 -
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 5b4c146..da82b16 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 e6b5285..b8c2571 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]