aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-19 07:23:48 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-19 11:38:00 +0800
commit4cbbdedf522a6ac10df93a128bbf25f67173d66e (patch)
treefab7bf95e0927e4fa98c58a659e310afff7153ee /modules/mail/e-mail-shell-view-private.c
parenta1efb837566cdac798cd8777dd34e06e9782cf61 (diff)
downloadgsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.gz
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.bz2
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.lz
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.xz
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.zst
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.zip
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.
Diffstat (limited to 'modules/mail/e-mail-shell-view-private.c')
-rw-r--r--modules/mail/e-mail-shell-view-private.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index c152b84817..f1e9805752 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -646,7 +646,7 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
/* Populate built-in rules for search entry popup menu.
* Keep the assertions, please. If the conditions aren't
* met we're going to crash anyway, just more mysteriously. */
- context = e_shell_content_get_search_context (shell_content);
+ context = E_SHELL_VIEW_GET_CLASS (shell_view)->search_context;
source = E_FILTER_SOURCE_DEMAND;
while ((rule = e_rule_context_next_rule (context, rule, source))) {
g_assert (ii < MAIL_NUM_SEARCH_RULES);
@@ -696,8 +696,8 @@ e_mail_shell_view_private_finalize (EMailShellView *mail_shell_view)
void
e_mail_shell_view_restore_state (EMailShellView *mail_shell_view)
{
- EShellView *shell_view;
- EShellContent *shell_content;
+ EMailShellContent *mail_shell_content;
+ EShellSearchbar *searchbar;
EMailReader *reader;
const gchar *folder_uri;
gchar *group_name;
@@ -706,17 +706,17 @@ e_mail_shell_view_restore_state (EMailShellView *mail_shell_view)
g_return_if_fail (E_IS_MAIL_SHELL_VIEW (mail_shell_view));
- shell_view = E_SHELL_VIEW (mail_shell_view);
- shell_content = e_shell_view_get_shell_content (shell_view);
+ mail_shell_content = mail_shell_view->priv->mail_shell_content;
+ searchbar = e_mail_shell_content_get_searchbar (mail_shell_content);
- reader = E_MAIL_READER (shell_content);
+ reader = E_MAIL_READER (mail_shell_content);
folder_uri = e_mail_reader_get_folder_uri (reader);
if (folder_uri == NULL)
return;
group_name = g_strdup_printf ("Folder %s", folder_uri);
- e_shell_content_restore_state (shell_content, group_name);
+ e_shell_searchbar_restore_state (searchbar, group_name);
g_free (group_name);
}