aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-browser.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-22 01:06:45 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-22 01:06:45 +0800
commit84c2e3735ce6e4df88142e86446f9179b6e341e4 (patch)
tree7e6d2043810d0c37ee2581f0783095aefdec1e1b /mail/em-folder-browser.c
parentaaa180af5abef44bb3e3d3c3c5968ca191a3dbda (diff)
parent2914345f9672559fed0ad88d2841ea4801d8d244 (diff)
downloadgsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.tar
gsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.tar.gz
gsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.tar.bz2
gsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.tar.lz
gsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.tar.xz
gsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.tar.zst
gsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.zip
Merge branch 'master' into kill-bonobo
Conflicts: addressbook/gui/component/addressbook-view.c addressbook/gui/component/component-factory.c addressbook/gui/component/eab-composer-util.h addressbook/gui/widgets/Makefile.am addressbook/gui/widgets/e-addressbook-model.c addressbook/gui/widgets/e-addressbook-view.c addressbook/gui/widgets/e-addressbook-view.h addressbook/gui/widgets/eab-gui-util.c addressbook/gui/widgets/eab-gui-util.h addressbook/gui/widgets/eab-menu.h addressbook/gui/widgets/eab-popup.h calendar/gui/calendar-component.c calendar/gui/e-cal-event.h calendar/gui/e-calendar-table.c calendar/gui/e-calendar-view.c calendar/gui/e-calendar-view.h calendar/gui/e-memo-table.c calendar/gui/memos-component.c calendar/gui/tasks-component.c composer/e-composer-header-table.c composer/e-composer-private.h composer/e-msg-composer.c composer/e-msg-composer.h composer/evolution-composer.ui configure.ac data/icons/Makefile.am em-format/em-format.c em-format/em-format.h mail/Makefile.am mail/e-mail-shell-migrate.c mail/e-searching-tokenizer.c mail/e-searching-tokenizer.h mail/em-composer-utils.c mail/em-composer-utils.h mail/em-folder-browser.c mail/em-folder-tree-model.c mail/em-folder-view.c mail/em-format-html-display.c mail/em-format-html-display.h mail/em-mailer-prefs.c mail/em-message-browser.c plugins/vcard-inline/Makefile.am plugins/vcard-inline/org-gnome-vcard-inline.eplug.xml plugins/vcard-inline/vcard-inline.c shell/e-component-registry.h shell/e-shell-window.c shell/es-menu.h widgets/misc/e-filter-bar.c widgets/misc/e-filter-bar.h widgets/misc/e-search-bar.c widgets/misc/e-search-bar.h
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r--mail/em-folder-browser.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index de4d48a77f..989206ae36 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -72,6 +72,7 @@
#include "e-util/e-error.h"
#include "e-util/e-util-private.h"
#include "e-util/e-util-labels.h"
+#include "e-mail-search-bar.h"
#include "em-utils.h"
#include "em-composer-utils.h"
#include "em-format-html-display.h"
@@ -99,6 +100,7 @@ CamelStore *vfolder_store; /* the 1 static vfolder store */
struct _EMFolderBrowserPrivate {
GtkWidget *preview; /* container for message display */
GtkWidget *scroll;
+ GtkWidget *search_bar;
GtkWidget *subscribe_editor;
@@ -156,7 +158,6 @@ static const EMFolderViewEnable emfb_enable_map[] = {
{ "FolderRename", EM_POPUP_SELECT_FOLDER },
{ "FolderRefresh", EM_POPUP_SELECT_FOLDER },
{ "ChangeFolderProperties", EM_POPUP_SELECT_FOLDER },
- { "MailPost", EM_POPUP_SELECT_FOLDER },
{ "MessageMarkAllAsRead", EM_POPUP_SELECT_FOLDER },
{ "ViewHideSelected", EM_POPUP_SELECT_MANY },
{ "ViewThreadsCollapseAll", EM_FOLDER_VIEW_SELECT_THREADED},
@@ -209,7 +210,6 @@ static ESearchBarItem emfb_search_scope_items[] = {
E_FILTERBAR_CURRENT_FOLDER,
E_FILTERBAR_CURRENT_ACCOUNT,
E_FILTERBAR_ALL_ACCOUNTS,
- E_FILTERBAR_CURRENT_MESSAGE,
{ NULL, -1, 0 }
};
@@ -241,6 +241,7 @@ emfb_init(GObject *o)
EMFolderBrowser *emfb = (EMFolderBrowser *)o;
RuleContext *search_context = mail_component_peek_search_context (mail_component_peek ());
struct _EMFolderBrowserPrivate *p;
+ GtkWidget *html;
EMEvent *eme;
EMEventTargetFolderBrowser *target;
@@ -325,6 +326,10 @@ emfb_init(GObject *o)
// gtk_paned_pack2 (GTK_PANED (emfb->vpane), p->preview, TRUE, FALSE);
// gtk_widget_show(p->preview);
+ g_signal_connect_swapped (
+ p->search_bar, "changed",
+ G_CALLBACK (em_format_redraw), emfb->view.preview);
+
/** @HookPoint-EMFolderBrower: Folder Browser
* @Id: emfb.created
* @Class: org.gnome.evolution.mail.events:1.0
@@ -386,7 +391,6 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
if ((emfb->view.preview_active ^ state) == 0
|| emfb->view.list == NULL) {
if (state && emfb->priv->scope_restricted && emfb->view.list->cursor_uid && *(emfb->view.list->cursor_uid)) {
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
emfb->priv->scope_restricted = FALSE;
}
@@ -408,7 +412,6 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
if (emfb->view.list->cursor_uid) {
char *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1);
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
emfb->priv->scope_restricted = FALSE;
strcpy(uid, emfb->view.list->cursor_uid);
em_folder_view_set_message(&emfb->view, uid, FALSE);
@@ -424,7 +427,6 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
emfb->view.displayed_uid = NULL;
gtk_widget_hide(emfb->priv->preview);
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
emfb->priv->scope_restricted = TRUE;
/*
mail_display_set_message (emfb->mail_display, NULL, NULL, NULL);
@@ -618,18 +620,6 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
id = e_search_bar_get_search_scope (esb);
switch (id) {
- case E_FILTERBAR_CURRENT_MESSAGE_ID:
- word = e_search_bar_get_text (esb);
- if ( word && *word ) {
- gtk_widget_set_sensitive (esb->option_button, FALSE);
- em_format_html_display_search_with (emfb->view.preview, word);
- } else {
- em_format_html_display_search_close (emfb->view.preview);
- }
- g_free (word);
- return;
- break;
-
case E_FILTERBAR_CURRENT_FOLDER_ID:
g_object_get (esb, "query", &search_word, NULL);
break;
@@ -825,10 +815,8 @@ emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *e
return;
if (uid && *uid && emfb->priv->scope_restricted && emfb->view.preview_active) {
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
emfb->priv->scope_restricted = FALSE;
} else if ( !(uid && *uid) && !emfb->priv->scope_restricted) {
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
emfb->priv->scope_restricted = TRUE;
}