aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-20 17:01:59 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-20 17:01:59 +0800
commit39fad64046d17eea54f65d15cc393115ba2cf597 (patch)
treeb9c5d74916781d4faf1f60eff7e7849efed480f6
parentb865316e7e456d71244a242a084aa2a421096eac (diff)
downloadgsoc2013-evolution-39fad64046d17eea54f65d15cc393115ba2cf597.tar.gz
gsoc2013-evolution-39fad64046d17eea54f65d15cc393115ba2cf597.tar.zst
gsoc2013-evolution-39fad64046d17eea54f65d15cc393115ba2cf597.zip
** Fix for bug #480514
2007-11-20 Milan Crha <mcrha@redhat.com> ** Fix for bug #480514 * em-folder-browser.c: (get_view_query), (emfb_search_search_activated): Let work "Last 5 Days' Messages" and "Recent messages" filters in Sent folder too. svn path=/trunk/; revision=34556
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-folder-browser.c14
2 files changed, 18 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 843dcf29da..e32c4959fc 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2007-11-20 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #480514
+
+ * em-folder-browser.c: (get_view_query),
+ (emfb_search_search_activated): Let work "Last 5 Days' Messages" and
+ "Recent messages" filters in Sent folder too.
+
+2007-11-20 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #493783
* em-format-html.c: (efh_format_timeout): Do not erase old content
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 9bbb62e30f..8f479a15e1 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -789,7 +789,7 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char
}
static char *
-get_view_query (ESearchBar *esb)
+get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri)
{
char *view_sexp = NULL;
gint id;
@@ -812,10 +812,16 @@ get_view_query (ESearchBar *esb)
view_sexp = "(match-all (system-flag \"Seen\"))";
break;
case VIEW_RECENT_MESSAGES:
- view_sexp = "(match-all (> (get-received-date) (- (get-current-date) 86400)))";
+ if (!em_utils_folder_is_sent (folder, folder_uri))
+ view_sexp = "(match-all (> (get-received-date) (- (get-current-date) 86400)))";
+ else
+ view_sexp = "(match-all (> (get-sent-date) (- (get-current-date) 86400)))";
break;
case VIEW_LAST_FIVE_DAYS:
- view_sexp = " (match-all (> (get-received-date) (- (get-current-date) 432000)))";
+ if (!em_utils_folder_is_sent (folder, folder_uri))
+ view_sexp = " (match-all (> (get-received-date) (- (get-current-date) 432000)))";
+ else
+ view_sexp = " (match-all (> (get-sent-date) (- (get-current-date) 432000)))";
break;
case VIEW_WITH_ATTACHMENTS:
view_sexp = "(match-all (system-flag \"Attachments\"))";
@@ -1129,7 +1135,7 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
camel_object_state_write (emfv->folder);
/* Merge the view and search expresion*/
- view_sexp = get_view_query (esb);
+ view_sexp = get_view_query (esb, emfv->folder, emfv->folder_uri);
g_object_get (esb, "query", &search_word, NULL);
if (search_word && *search_word)