Index: mail/em-folder-browser.c
===================================================================
--- mail/em-folder-browser.c	(revision 35426)
+++ mail/em-folder-browser.c	(working copy)
@@ -530,7 +530,7 @@ emfb_init(GObject *o)
 
 	gtk_box_pack_start_defaults((GtkBox *)emfb, emfb->vpane);
 
-	gtk_paned_add1((GtkPaned *)emfb->vpane, (GtkWidget *)emfb->view.list);
+	gtk_paned_pack1 (GTK_PANED (emfb->vpane), GTK_WIDGET (emfb->view.list), FALSE, FALSE);
 	gtk_widget_show((GtkWidget *)emfb->view.list);
 
 	/* currently: just use a scrolledwindow for preview widget */
@@ -544,7 +544,7 @@ emfb_init(GObject *o)
 	gtk_widget_show((GtkWidget *)emfb->view.preview->formathtml.html);
 	gtk_box_pack_start ((GtkBox *)p->preview, p->scroll, TRUE, TRUE, 0);
 	gtk_box_pack_start ((GtkBox *)p->preview, em_format_html_get_search_dialog (emfb->view.preview), FALSE, FALSE, 0);
-	gtk_paned_add2((GtkPaned *)emfb->vpane, p->preview);
+	gtk_paned_pack2 (GTK_PANED (emfb->vpane), p->preview, TRUE, FALSE);
 	gtk_widget_show(p->preview);
 
 	g_signal_connect (((EMFolderView *) emfb)->list->tree, "key_press", G_CALLBACK(emfb_list_key_press), emfb);
@@ -754,6 +754,8 @@ void em_folder_browser_show_wide(EMFolde
 	gtk_widget_reparent((GtkWidget *)emfb->view.list, w);
 	gtk_widget_reparent((GtkWidget *)emfb->priv->preview, w);
 	gtk_widget_destroy(emfb->vpane);
+	gtk_container_child_set (GTK_CONTAINER (w), GTK_WIDGET (emfb->view.list),     "resize", FALSE, "shrink", FALSE, NULL);
+	gtk_container_child_set (GTK_CONTAINER (w), GTK_WIDGET (emfb->priv->preview), "resize", TRUE,  "shrink", FALSE, NULL);
 	gtk_container_resize_children ((GtkContainer *)w);
 	emfb->vpane = w;
 	gtk_widget_show(w);
@@ -868,6 +870,7 @@ get_view_query (ESearchBar *esb, CamelFo
 
 	switch (id & VIEW_ITEMS_MASK) {
 	case VIEW_ALL_MESSAGES:
+		/* one space indicates no filtering */
 		view_sexp = " ";
 		break;
 
@@ -929,7 +932,8 @@ get_view_query (ESearchBar *esb, CamelFo
 		break;
 
 	case VIEW_CUSTOMIZE:
-		view_sexp = " ";
+		/* one space indicates no filtering, so here use two */
+		view_sexp = "  ";
 		break;
 	}
 
Index: mail/ChangeLog
===================================================================
--- mail/ChangeLog	(revision 35426)
+++ mail/ChangeLog	(working copy)
@@ -1,3 +1,14 @@
+2008-04-28  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #528288
+
+	* em-folder-browser.c: (emfb_init), (em_folder_browser_show_wide):
+	Ensure minimum size for preview and message list.
+	* em-folder-browser.c: (get_view_query):
+	Distinguish between no filter and custom filter.
+	* message-list.c: (regen_list_done):
+	Set info message to tree when no message shown in a list.
+
 2008-04-28  Srinivasa Ragavan  <sragavan@novell.com>
 
 	* mail/em-utils.c: Avoid crash while detecting mime types.
Index: mail/message-list.c
===================================================================
--- mail/message-list.c	(revision 35426)
+++ mail/message-list.c	(working copy)
@@ -4085,6 +4085,15 @@ regen_list_done (struct _regen_list_msg 
 		}
 	}
 
+	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);
 }
 
@@ -4172,6 +4181,10 @@ mail_regen_list (MessageList *ml, const 
 	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);
Index: widgets/table/ChangeLog
===================================================================
--- widgets/table/ChangeLog	(revision 35426)
+++ widgets/table/ChangeLog	(working copy)
@@ -1,3 +1,13 @@
+2008-04-28  Milan Crha  <mcrha@redhat.com>
+
+	** Part of fix for bug #528288
+
+	* e-tree.h: (e_tree_set_info_message):
+	* 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.
+
 2008-04-25  Danny Baumann  <dannybaumann@web.de>
 
 	** Fix for bug #529893
Index: widgets/table/e-tree.c
===================================================================
--- widgets/table/e-tree.c	(revision 35426)
+++ widgets/table/e-tree.c	(working copy)
@@ -36,7 +36,9 @@
 #include "e-util/e-util.h"
 #include "e-util/e-util-marshal.h"
 #include "misc/e-canvas.h"
+#include "misc/e-canvas-utils.h"
 #include "misc/e-canvas-background.h"
+#include "text/e-text.h"
 
 #include "e-table-column-specification.h"
 #include "e-table-header-item.h"
@@ -139,6 +141,9 @@ struct ETreePriv {
 	int table_cell_change_id;
 	int table_rows_delete_id;
 
+	GnomeCanvasItem *info_text;
+	guint info_text_resize_id;
+
 	GnomeCanvas *header_canvas, *table_canvas;
 
 	GnomeCanvasItem *header_item, *root;
@@ -421,6 +426,11 @@ et_dispose (GObject *object)
 			g_object_weak_unref (G_OBJECT(et->priv->last_drop_context), context_destroyed, et);
 		et->priv->last_drop_context = NULL;
 
+		if (et->priv->info_text)
+			gtk_object_destroy (GTK_OBJECT (et->priv->info_text));
+		et->priv->info_text = NULL;
+		et->priv->info_text_resize_id = 0;
+
 		gtk_widget_destroy (GTK_WIDGET (et->priv->table_canvas));
 
 		g_free(et->priv);
@@ -597,6 +607,9 @@ e_tree_init (ETree *e_tree)
 #endif
 	e_tree->priv->spec                   = NULL;
 
+	e_tree->priv->info_text              = NULL;
+	e_tree->priv->info_text_resize_id    = 0;
+
 	e_tree->priv->header_canvas          = NULL;
 	e_tree->priv->table_canvas           = NULL;
 
@@ -3363,3 +3376,61 @@ e_tree_class_init (ETreeClass *class)
 	gal_a11y_e_tree_init ();
 }
 
+static void
+tree_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *tree)
+{
+	double width;
+
+	g_return_if_fail (tree != NULL);
+	g_return_if_fail (tree->priv != NULL);
+	g_return_if_fail (tree->priv->info_text != NULL);
+
+	gnome_canvas_get_scroll_region (GNOME_CANVAS (tree->priv->table_canvas), NULL, NULL, &width, NULL);
+
+	width -= 60.0;
+
+	g_object_set (tree->priv->info_text, "width", width, "clip_width", width, NULL);
+}
+
+/**
+ * e_tree_set_info_message:
+ * @tree: #ETree instance
+ * @info_message: Message to set. Can be NULL. 
+ *
+ * Creates an info message in table area, or removes old.
+ **/
+void
+e_tree_set_info_message (ETree *tree, const char *info_message)
+{
+	g_return_if_fail (tree != NULL);
+	g_return_if_fail (tree->priv != NULL);
+
+	if (!tree->priv->info_text && (!info_message || !*info_message))
+		return;
+
+	if (!info_message || !*info_message) {
+		g_signal_handler_disconnect (tree, tree->priv->info_text_resize_id);
+		gtk_object_destroy (GTK_OBJECT (tree->priv->info_text));
+		tree->priv->info_text = NULL;
+		return;
+	}
+
+	if (!tree->priv->info_text) {
+		tree->priv->info_text = gnome_canvas_item_new (GNOME_CANVAS_GROUP (gnome_canvas_root (tree->priv->table_canvas)),
+						e_text_get_type (),
+						"anchor", GTK_ANCHOR_NW,
+						"line_wrap", TRUE,
+						"clip", TRUE,
+						"justification", GTK_JUSTIFY_LEFT,
+						"text", info_message,
+						"draw_background", FALSE,
+						"width", (double) GTK_WIDGET (tree->priv->table_canvas)->allocation.width - 60.0,
+						"clip_width", (double) GTK_WIDGET (tree->priv->table_canvas)->allocation.width - 60.0,
+						NULL);
+
+		e_canvas_item_move_absolute (tree->priv->info_text, 30, 30);
+
+		tree->priv->info_text_resize_id = g_signal_connect (tree, "size_allocate", G_CALLBACK (tree_size_allocate), tree);
+	} else
+		gnome_canvas_item_set (tree->priv->info_text, "text", info_message, NULL);
+}
Index: widgets/table/e-tree.h
===================================================================
--- widgets/table/e-tree.h	(revision 35426)
+++ widgets/table/e-tree.h	(working copy)
@@ -309,6 +309,8 @@ ETableItem *	e_tree_get_item(ETree * et)
 
 GnomeCanvasItem * e_tree_get_header_item(ETree * et);
 
+void e_tree_set_info_message (ETree *tree, const char *info_message);
+
 G_END_DECLS
 
 #endif /* _E_TREE_H_ */
Index: widgets/misc/ChangeLog
===================================================================
--- widgets/misc/ChangeLog	(revision 35426)
+++ widgets/misc/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2008-04-28  Milan Crha  <mcrha@redhat.com>
+
+	** Part of fix for bug #528288
+
+	* e-filter-bar.c: (get_property): Do not return any query
+	with empty text from search bar.
+
 2008-04-25  Danny Baumann  <dannybaumann@web.de>
 
 	** Fix for bug #529893
Index: widgets/misc/e-filter-bar.c
===================================================================
--- widgets/misc/e-filter-bar.c	(revision 35426)
+++ widgets/misc/e-filter-bar.c	(working copy)
@@ -592,8 +592,11 @@ get_property (GObject *object, guint pro
 	ESearchBar *esb = E_SEARCH_BAR (object);
 
 	switch (property_id) {
-	case PROP_QUERY:
-		if (efb->current_query) {
+	case PROP_QUERY: {
+		char *text = e_search_bar_get_text (E_SEARCH_BAR (efb));
+
+		/* empty search text means searching turned off */
+		if (efb->current_query && text && *text) {
 			GString *out = g_string_new ("");
 
 			filter_rule_build_code (efb->current_query, out);
@@ -602,7 +605,9 @@ get_property (GObject *object, guint pro
 		} else {
 			g_value_set_string (value, NULL);
 		}
-		break;
+
+		g_free (text);
+		break; }
 	case PROP_STATE: {
 		/* FIXME: we should have ESearchBar save its own state to the xmlDocPtr */
 		xmlChar *xmlbuf;
