From 4cbbdedf522a6ac10df93a128bbf25f67173d66e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 18 Dec 2009 18:23:48 -0500 Subject: Refactor the EShell search API. Move the search interface to a new widget: EShellSearchbar The current search rule is now stored in EShellView, and the search context in EShellViewClass similar to GalViewCollection (since it's class-specific, not instance-specific). Also add a couple new signals to EShellView: "clear-search" and "custom-search" ("custom" refers to an advanced search or a saved search -- something more complex than a quick search). Still working out a few kinks. The search entry is clearly trying to be too many things. We need a different way of indicating that you're looking at search results. Perhaps a search results banner similar to Nautilus. --- modules/mail/e-mail-shell-content.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'modules/mail/e-mail-shell-content.c') diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index f9b0b7da80..a1d8a40d82 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -31,7 +31,6 @@ #include "widgets/menus/gal-view-instance.h" #include "widgets/misc/e-paned.h" -#include "em-search-context.h" #include "em-utils.h" #include "mail-config.h" #include "mail-ops.h" @@ -610,7 +609,6 @@ mail_shell_content_class_init (EMailShellContentClass *class) object_class->constructed = mail_shell_content_constructed; shell_content_class = E_SHELL_CONTENT_CLASS (class); - shell_content_class->new_search_context = em_search_context_new; shell_content_class->check_state = mail_shell_content_check_state; g_object_class_install_property ( @@ -758,6 +756,21 @@ e_mail_shell_content_set_preview_visible (EMailShellContent *mail_shell_content, g_object_notify (G_OBJECT (mail_shell_content), "preview-visible"); } +EShellSearchbar * +e_mail_shell_content_get_searchbar (EMailShellContent *mail_shell_content) +{ + EShellContent *shell_content; + GtkWidget *widget; + + g_return_val_if_fail ( + E_IS_MAIL_SHELL_CONTENT (mail_shell_content), NULL); + + shell_content = E_SHELL_CONTENT (mail_shell_content); + widget = e_shell_content_get_searchbar (shell_content); + + return E_SHELL_SEARCHBAR (widget); +} + gboolean e_mail_shell_content_get_show_deleted (EMailShellContent *mail_shell_content) { -- cgit v1.2.3