From 183729a6e097be1959bf66507f2bc140cc17cd75 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 30 Apr 2008 11:24:14 +0000 Subject: ** Fix for bug #528288 2008-04-30 Milan Crha ** 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 --- widgets/misc/ChangeLog | 7 +++++++ widgets/misc/e-filter-bar.c | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'widgets/misc') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 46d95c292c..4b91f93784 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2008-04-30 Milan Crha + + ** 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 ** Fix for bug #529893 diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index be77dbdb39..20d85d8f63 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -592,8 +592,11 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp 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 property_id, GValue *value, GParamSpec *psp } 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; -- cgit v1.2.3