aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-browser.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r--mail/em-folder-browser.c266
1 files changed, 0 insertions, 266 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 572b51239b..97945cad56 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -58,13 +58,6 @@
#include <camel/camel-vee-store.h>
#include <camel/camel-operation.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <bonobo/bonobo-ui-util.h>
-
/* for efilterbar stuff */
#include <libedataserver/e-sexp.h>
#include "mail-vfolder.h"
@@ -485,146 +478,6 @@ emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb)
}
}
-//static void
-//emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data)
-//{
-// EMFolderBrowser *emfb = data;
-// GList *partl;
-// struct _camel_search_words *words;
-// int i;
-// GSList *strings = NULL;
-//
-// /* we scan the parts of a rule, and set all the types we know about to the query string */
-// partl = rule->parts;
-// while (partl) {
-// FilterPart *part = partl->data;
-//
-// if (!strcmp(part->name, "subject")) {
-// FilterInput *input = (FilterInput *)filter_part_find_element(part, "subject");
-// if (input)
-// filter_input_set_value(input, query);
-// } else if (!strcmp(part->name, "body")) {
-// FilterInput *input = (FilterInput *)filter_part_find_element(part, "word");
-// if (input)
-// filter_input_set_value(input, query);
-//
-// words = camel_search_words_split((unsigned char *)query);
-// for (i=0;i<words->len;i++)
-// strings = g_slist_prepend(strings, g_strdup(words->words[i]->word));
-// camel_search_words_free (words);
-// } else if(!strcmp(part->name, "sender")) {
-// FilterInput *input = (FilterInput *)filter_part_find_element(part, "sender");
-// if (input)
-// filter_input_set_value(input, query);
-// } else if(!strcmp(part->name, "to")) {
-// FilterInput *input = (FilterInput *)filter_part_find_element(part, "recipient");
-// if (input)
-// filter_input_set_value(input, query);
-// }
-//
-// partl = partl->next;
-// }
-//
-// em_format_html_display_set_search(emfb->view.preview,
-// EM_FORMAT_HTML_DISPLAY_SEARCH_SECONDARY|EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE,
-// strings);
-// while (strings) {
-// GSList *n = strings->next;
-// g_free(strings->data);
-// g_slist_free_1(strings);
-// strings = n;
-// }
-//}
-
-//static char *
-//get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri)
-//{
-// char *view_sexp = NULL;
-// gint id;
-// GtkWidget *menu_item;
-// char *tag;
-// gboolean duplicate = TRUE;
-//
-// /* Get the current selected view */
-// id = e_search_bar_get_viewitem_id (esb);
-// menu_item = e_search_bar_get_selected_viewitem (esb);
-//
-// switch (id & VIEW_ITEMS_MASK) {
-// case VIEW_ALL_MESSAGES:
-// /* one space indicates no filtering */
-// view_sexp = " ";
-// break;
-//
-// case VIEW_UNREAD_MESSAGES:
-// view_sexp = "(match-all (not (system-flag \"Seen\")))";
-// break;
-// case VIEW_READ_MESSAGES:
-// view_sexp = "(match-all (system-flag \"Seen\" ))";
-// break;
-// case VIEW_RECENT_MESSAGES:
-// if (!em_utils_folder_is_sent (folder, folder_uri))
-// view_sexp = "(match-all (> (get-received-date) (- (get-current-date) 86400)))";
-// else
-// view_sexp = "(match-all (> (get-sent-date) (- (get-current-date) 86400)))";
-// break;
-// case VIEW_LAST_FIVE_DAYS:
-// if (!em_utils_folder_is_sent (folder, folder_uri))
-// view_sexp = " (match-all (> (get-received-date) (- (get-current-date) 432000)))";
-// else
-// view_sexp = " (match-all (> (get-sent-date) (- (get-current-date) 432000)))";
-// break;
-// case VIEW_WITH_ATTACHMENTS:
-// view_sexp = "(match-all (system-flag \"Attachments\" ))";
-// break;
-// case VIEW_NOT_JUNK:
-// view_sexp = "(match-all (not (system-flag \"junk\")))";
-// break;
-// case VIEW_NO_LABEL: {
-// GSList *l;
-// GString *s = g_string_new ("(and");
-//
-// for (l = mail_config_get_labels (); l; l = l->next) {
-// EUtilLabel *label = (EUtilLabel *)l->data;
-//
-// if (label && label->tag) {
-// const gchar *tag = label->tag;
-//
-// if (strncmp (tag, "$Label", 6) == 0)
-// tag += 6;
-//
-// g_string_append_printf (s, " (match-all (not (or (= (user-tag \"label\") \"%s\") (user-flag \"$Label%s\") (user-flag \"%s\"))))", tag, tag, tag);
-// }
-// }
-//
-// g_string_append (s, ")");
-//
-// duplicate = FALSE;
-// view_sexp = g_string_free (s, FALSE);
-// } break;
-// case VIEW_LABEL:
-// tag = (char *)g_object_get_data (G_OBJECT (menu_item), "LabelTag");
-// view_sexp = g_strdup_printf ("(match-all (or (= (user-tag \"label\") \"%s\") (user-flag \"$Label%s\") (user-flag \"%s\")))", tag, tag, tag);
-// duplicate = FALSE;
-// break;
-// case VIEW_MESSAGES_MARKED_AS_IMPORTANT:
-// view_sexp = "(match-all (system-flag \"Flagged\" ))";
-// break;
-// case VIEW_ANY_FIELD_CONTAINS:
-// break;
-//
-// case VIEW_CUSTOMIZE:
-// /* one space indicates no filtering, so here use two */
-// view_sexp = " ";
-// break;
-// }
-//
-// if (duplicate)
-// view_sexp = g_strdup (view_sexp);
-//
-// return view_sexp;
-//}
-
-
struct _setup_msg {
MailMsg base;
@@ -1081,125 +934,6 @@ emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_E
em_folder_view_set_hide_deleted(emfv, state[0] != '0');
}
-//static void
-//emfb_list_scrolled (MessageList *ml, EMFolderBrowser *emfb)
-//{
-// EMFolderView *emfv = (EMFolderView *) emfb;
-// double position;
-// char *state;
-//
-// position = message_list_get_scrollbar_position (ml);
-// state = g_strdup_printf ("%f", position);
-//
-// if (camel_object_meta_set (emfv->folder, "evolution:list_scroll_position", state))
-// camel_object_state_write (emfv->folder);
-//
-// g_free (state);
-//}
-
-//static gboolean
-//scroll_idle_cb (EMFolderBrowser *emfb)
-//{
-// EMFolderView *emfv = (EMFolderView *) emfb;
-// double position;
-// char *state;
-//
-// if ((state = camel_object_meta_get (emfv->folder, "evolution:list_scroll_position"))) {
-// position = strtod (state, NULL);
-// g_free (state);
-// } else {
-// position = emfb->priv->default_scroll_position;
-// }
-//
-// message_list_set_scrollbar_position (emfv->list, position);
-//
-// emfb->priv->list_scrolled_id = g_signal_connect (emfv->list, "message_list_scrolled", G_CALLBACK (emfb_list_scrolled), emfb);
-//
-// emfb->priv->idle_scroll_id = 0;
-//
-// return FALSE;
-//}
-
-//static void
-//emfb_gui_folder_changed(CamelFolder *folder, void *dummy, EMFolderBrowser *emfb)
-//{
-// if (emfb->priv->select_uid) {
-// CamelMessageInfo *mi;
-//
-// mi = camel_folder_get_message_info(emfb->view.folder, emfb->priv->select_uid);
-// if (mi) {
-// camel_folder_free_message_info(emfb->view.folder, mi);
-// em_folder_view_set_message(&emfb->view, emfb->priv->select_uid, FALSE);
-// g_free (emfb->priv->select_uid);
-// emfb->priv->select_uid = NULL;
-// }
-// }
-//
-// g_object_unref(emfb);
-//}
-
-//static void
-//emfb_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolderBrowser *emfb)
-//{
-// g_object_ref(emfb);
-// mail_async_event_emit(emfb->view.async, MAIL_ASYNC_GUI, (MailAsyncFunc)emfb_gui_folder_changed, folder, NULL, emfb);
-//}
-
-//static void
-//emfb_etree_unfreeze (GtkWidget *widget, GdkEvent *event, EMFolderView *emfv)
-//{
-//
-// ETableItem *item = e_tree_get_item (emfv->list->tree);
-//
-// g_object_set_data (G_OBJECT (((GnomeCanvasItem *) item)->canvas), "freeze-cursor", 0);
-//}
-
-
-/* TODO: This should probably be handled by message-list, by storing/queueing
- up the select operation if its busy rebuilding the message-list */
-//static void
-//emfb_list_built (MessageList *ml, EMFolderBrowser *emfb)
-//{
-// EMFolderView *emfv = (EMFolderView *) emfb;
-// double position = 0.0f;
-//
-// g_signal_handler_disconnect (ml, emfb->priv->list_built_id);
-// emfb->priv->list_built_id = 0;
-//
-// if (emfv->list->cursor_uid == NULL) {
-// if (emfb->priv->select_uid) {
-// CamelMessageInfo *mi;
-//
-// /* If the message isn't in the folder yet, keep select_uid around, it could be caught by
-// folder_changed, at some later date */
-// mi = camel_folder_get_message_info(emfv->folder, emfb->priv->select_uid);
-// if (mi) {
-// camel_folder_free_message_info(emfv->folder, mi);
-// em_folder_view_set_message(emfv, emfb->priv->select_uid, TRUE);
-// g_free (emfb->priv->select_uid);
-// emfb->priv->select_uid = NULL;
-// }
-//
-// /* change the default to the current position */
-// position = message_list_get_scrollbar_position (ml);
-// } else {
-// /* NOTE: not all users want this, so we need a preference for it perhaps? see bug #52887 */
-// /* FIXME: if the 1st message in the list is unread, this will actually select the second unread msg */
-// /*message_list_select (ml, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN, TRUE);*/
-// }
-// }
-//
-// emfb->priv->default_scroll_position = position;
-//
-// /* FIXME: this is a gross workaround for an etable bug that I can't fix - bug #55303 */
-// /* this needs to be a lower priority than anything in e-table-item/e-canvas, since
-// * e_canvas_item_region_show_relay() uses a timeout, we have to use a timeout of the
-// * same interval but a lower priority. */
-// emfb->priv->idle_scroll_id = g_timeout_add_full (G_PRIORITY_LOW, 250, (GSourceFunc) scroll_idle_cb, emfb, NULL);
-// /* FIXME: This is another ugly hack done to hide a bug that above hack leaves. */
-// g_signal_connect (((GtkScrolledWindow *) ml)->vscrollbar, "button-press-event", G_CALLBACK (emfb_etree_unfreeze), emfb);
-//}
-
static void
emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
{