aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-05-31 00:46:49 +0800
committerMilan Crha <mcrha@redhat.com>2012-05-31 00:46:49 +0800
commitc88d3170304e1892b221d0581a3cd3c767de4281 (patch)
treebe7750049e7dca9b187bea5347556d2007ba5509 /modules/mail/e-mail-shell-view.c
parentb9d8defa321ea315ca15e59c9df33845563d5042 (diff)
downloadgsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.gz
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.bz2
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.lz
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.xz
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.zst
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.zip
Adapt to vFolder changes from evolution-data-server
Diffstat (limited to 'modules/mail/e-mail-shell-view.c')
-rw-r--r--modules/mail/e-mail-shell-view.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index 1f459eb6d7..1a08251508 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -69,7 +69,7 @@ search_results_exec (SearchResultsMsg *msg,
g_list_foreach (copied_list, (GFunc) g_object_ref, NULL);
camel_vee_folder_set_folders (
- CAMEL_VEE_FOLDER (msg->folder), copied_list);
+ CAMEL_VEE_FOLDER (msg->folder), copied_list, cancellable);
g_list_foreach (copied_list, (GFunc) g_object_unref, NULL);
g_list_free (copied_list);
@@ -528,7 +528,7 @@ all_accounts:
/* Skip the search if we already have the results. */
if (search_folder != NULL)
- if (g_strcmp0 (query, search_folder->expression) == 0)
+ if (g_strcmp0 (query, camel_vee_folder_get_expression (search_folder)) == 0)
goto execute;
/* Disable the scope combo while search is in progress. */
@@ -558,7 +558,7 @@ all_accounts:
search_folder = (CamelVeeFolder *) camel_vee_folder_new (
CAMEL_STORE (service), _("All Account Search"),
- CAMEL_STORE_VEE_FOLDER_AUTO);
+ 0);
priv->search_account_all = search_folder;
cache = e_mail_session_get_folder_cache (session);
@@ -632,7 +632,7 @@ current_account:
/* Skip the search if we already have the results. */
if (search_folder != NULL)
- if (g_strcmp0 (query, search_folder->expression) == 0)
+ if (g_strcmp0 (query, camel_vee_folder_get_expression (search_folder)) == 0)
goto execute;
/* Disable the scope combo while search is in progress. */
@@ -719,7 +719,7 @@ current_account:
search_folder = (CamelVeeFolder *) camel_vee_folder_new (
CAMEL_STORE (service), _("Account Search"),
- CAMEL_STORE_VEE_FOLDER_AUTO);
+ 0);
priv->search_account_current = search_folder;
camel_vee_folder_set_expression (search_folder, query);
@@ -832,6 +832,7 @@ mail_shell_view_update_actions (EShellView *shell_view)
gboolean folder_has_unread_rec = FALSE;
gboolean folder_tree_and_message_list_agree = TRUE;
gboolean store_is_subscribable;
+ gboolean store_is_vstore = FALSE;
gboolean any_store_is_subscribable = FALSE;
/* Chain up to parent's update_actions() method. */
@@ -880,6 +881,8 @@ mail_shell_view_update_actions (EShellView *shell_view)
service = CAMEL_SERVICE (store);
uid = camel_service_get_uid (service);
account = e_get_account_by_uid (uid);
+
+ store_is_vstore = g_strcmp0 (uid, E_MAIL_SESSION_VFOLDER_UID) == 0;
} else
account = NULL;
@@ -1020,6 +1023,9 @@ mail_shell_view_update_actions (EShellView *shell_view)
sensitive = any_store_is_subscribable;
gtk_action_set_sensitive (action, sensitive);
+ action = ACTION (MAIL_VFOLDER_UNMATCHED_ENABLE);
+ gtk_action_set_visible (action, folder_is_store && store_is_vstore);
+
e_mail_shell_view_update_popup_labels (mail_shell_view);
}