aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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
parentbe98f84cbdf8536fe980e3b4216085003fcbce1e (diff)
downloadgsoc2013-evolution-183729a6e097be1959bf66507f2bc140cc17cd75.tar
gsoc2013-evolution-183729a6e097be1959bf66507f2bc140cc17cd75.tar.gz
gsoc2013-evolution-183729a6e097be1959bf66507f2bc140cc17cd75.tar.bz2
gsoc2013-evolution-183729a6e097be1959bf66507f2bc140cc17cd75.tar.lz
gsoc2013-evolution-183729a6e097be1959bf66507f2bc140cc17cd75.tar.xz
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')
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/em-folder-browser.c10
-rw-r--r--mail/message-list.c13
3 files changed, 31 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 220ad054de..11a39b674c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,16 @@
2008-04-30 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-30 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #530245
* searchtypes.xml: Let searches work with labels again.
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index d9b790837d..b2c4eb4c08 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -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(EMFolderBrowser *emfb, gboolean state)
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, CamelFolder *folder, const char *folder_uri)
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, CamelFolder *folder, const char *folder_uri)
break;
case VIEW_CUSTOMIZE:
- view_sexp = " ";
+ /* one space indicates no filtering, so here use two */
+ view_sexp = " ";
break;
}
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);