aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-04-30 19:24:14 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-04-30 19:24:14 +0800
commit183729a6e097be1959bf66507f2bc140cc17cd75 (patch)
tree6ff50e9e7b2cb7797e3e32f9796b2259395eaf54 /mail/message-list.c
parentbe98f84cbdf8536fe980e3b4216085003fcbce1e (diff)
downloadgsoc2013-evolution-183729a6e097be1959bf66507f2bc140cc17cd75.tar.gz
gsoc2013-evolution-183729a6e097be1959bf66507f2bc140cc17cd75.tar.zst
gsoc2013-evolution-183729a6e097be1959bf66507f2bc140cc17cd75.zip
** Fix for bug #528288
2008-04-30 Milan Crha <mcrha@redhat.com> ** Fix for bug #528288 * widgets/misc/e-filter-bar.c: (get_property): Do not return any query with empty text from search bar. * widgets/table/e-tree.h: (e_tree_set_info_message): * widgets/table/e-tree.c: (struct ETreePriv), (et_dispose), (e_tree_init), (tree_size_allocate), (e_tree_set_info_message): Allow setting info message into the tree. It doesn't check whether the tree is empty or not, so take care of that. * mail/em-folder-browser.c: (emfb_init), (em_folder_browser_show_wide): Ensure minimum size for preview and message list. * mail/em-folder-browser.c: (get_view_query): Distinguish between no filter and custom filter. * mail/message-list.c: (regen_list_done): Set info message to tree when no message shown in a list. svn path=/trunk/; revision=35459
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index b811941978..677e0db6e7 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4095,6 +4095,15 @@ regen_list_done (struct _regen_list_msg *m)
}
}
+ if (message_list_length (m->ml) <= 0) {
+ /* space is used to indicate no search too */
+ if (m->ml->search && strcmp (m->ml->search, " ") != 0)
+ e_tree_set_info_message (m->ml->tree, _("No message satisfies your search criteria. Either clear search with Search->Clear menu item or change it."));
+ else
+ e_tree_set_info_message (m->ml->tree, _("There is currently no message in this folder."));
+ } else
+ e_tree_set_info_message (m->ml->tree, NULL);
+
g_signal_emit (m->ml, message_list_signals[MESSAGE_LIST_BUILT], 0);
}
@@ -4182,6 +4191,10 @@ mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, Came
struct _regen_list_msg *m;
GConfClient *gconf;
+ /* report empty search as NULL, not as one/two-space string */
+ if (search && (strcmp (search, " ") == 0 || strcmp (search, " ") == 0))
+ search = NULL;
+
if (ml->folder == NULL) {
if (ml->search != search) {
g_free(ml->search);