aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-12 04:42:27 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-12 04:42:27 +0800
commitf61cf3675624a3fae5544561bef44ccc04cbe697 (patch)
tree3808dc788bd03e0cd8b62b1ffc463f774f193c9a /mail
parent7e4c61d7b8a5d1793f9845dc29815aeaab23ed0c (diff)
downloadgsoc2013-evolution-f61cf3675624a3fae5544561bef44ccc04cbe697.tar.gz
gsoc2013-evolution-f61cf3675624a3fae5544561bef44ccc04cbe697.tar.zst
gsoc2013-evolution-f61cf3675624a3fae5544561bef44ccc04cbe697.zip
Disable Search capability menu/entry if folder doesn't support it.
2000-07-11 Jeffrey Stedfast <fejj@helixcode.com> * folder-browser.c (folder_browser_load_folder): Disable Search capability menu/entry if folder doesn't support it. * message-list.c (message_list_regenerate): Don't perform a search if the folder doesn't support it. svn path=/trunk/; revision=4097
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/folder-browser.c4
-rw-r--r--mail/message-list.c10
3 files changed, 16 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 5ad82a8c6d..5a6afafd49 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * folder-browser.c (folder_browser_load_folder): Disable
+ Search capability menu/entry if folder doesn't support it.
+
+ * message-list.c (message_list_regenerate): Don't perform
+ a search if the folder doesn't support it.
+
2000-07-11 Dan Winship <danw@helixcode.com>
* mail-ops.c (real_send_mail): Set the post_send_data flag rather
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 7694ab27ae..d8c5b4a39b 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -181,6 +181,9 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
if (fb->folder)
gtk_object_unref (GTK_OBJECT (fb->folder));
fb->folder = new_folder;
+
+ gtk_widget_set_sensitive (GTK_WIDGET (fb->search_entry), camel_folder_has_search_capability (fb->folder));
+ gtk_widget_set_sensitive (GTK_WIDGET (fb->search_menu), camel_folder_has_search_capability (fb->folder));
message_list_set_folder (fb->message_list, new_folder);
@@ -406,7 +409,6 @@ folder_browser_gui_init (FolderBrowser *fb)
gtk_widget_show (GTK_WIDGET (fb->mail_display));
gtk_widget_show (GTK_WIDGET (fb));
-
}
static void
diff --git a/mail/message-list.c b/mail/message-list.c
index 97347dd87c..73ac39d608 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -810,10 +810,10 @@ message_list_regenerate (MessageList *message_list, const char *search)
g_hash_table_destroy (message_list->uid_rowmap);
}
message_list->uid_rowmap = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (search) {
+
+ if (search && camel_folder_has_search_capability (message_list->folder)) {
CamelException ex;
-
+
camel_exception_init (&ex);
uids = camel_folder_search_by_expression (message_list->folder,
search, &ex);
@@ -826,9 +826,9 @@ message_list_regenerate (MessageList *message_list, const char *search)
message_list->search = g_strdup (search);
} else
uids = camel_folder_get_uids (message_list->folder, NULL);
-
+
/* FIXME: free the old tree data */
-
+
/* Clear the old contents, build the new */
if (message_list->tree_root)
e_tree_model_node_remove(etm, message_list->tree_root);