[evolution] Bug 679649 - Remove "Recent Messages" from Quick Search Bar



commit c14ebe73581fba5afa527c188507d1d50b2ebdd7
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jul 9 19:53:52 2012 -0400

    Bug 679649 - Remove "Recent Messages" from Quick Search Bar
    
    The story on this is a question [1] was recently posed to the mailing
    list about what's the different between "Recent Messages" and "Last 5
    Days' Messages" as listed in the Show: combo box, and even I could not
    answer before looking up the query expression for "Recent Messages" in
    the source code (messages received in the past 24 hours, it turns out).
    
    I can't defend why we need both options, and "Last 5 Days' Messages"
    is less ambiguous and overlaps the results for "Recent Messages", so
    "Last 5 Days' Messages" seems sufficient to me.  There are  numerous
    ways to re-create the "Recent Messages" query if it's still desired:
    saved search, search folder, or just sort messages by date received.
    
    [1] https://mail.gnome.org/archives/evolution-list/2012-July/msg00044.html

 modules/mail/e-mail-shell-view-actions.c |    7 -------
 modules/mail/e-mail-shell-view-actions.h |    2 --
 modules/mail/e-mail-shell-view-private.h |    9 ++++-----
 modules/mail/e-mail-shell-view.c         |   17 -----------------
 4 files changed, 4 insertions(+), 31 deletions(-)
---
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index e6cd01d..f51286b 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -1660,13 +1660,6 @@ static GtkRadioActionEntry mail_filter_entries[] = {
 	  NULL,  /* XXX Add a tooltip! */
 	  MAIL_FILTER_READ_MESSAGES },
 
-	{ "mail-filter-recent-messages",
-	  NULL,
-	  N_("Recent Messages"),
-	  NULL,
-	  NULL,  /* XXX Add a tooltip! */
-	  MAIL_FILTER_RECENT_MESSAGES },
-
 	{ "mail-filter-unread-messages",
 	  "mail-unread",
 	  N_("Unread Messages"),
diff --git a/modules/mail/e-mail-shell-view-actions.h b/modules/mail/e-mail-shell-view-actions.h
index db1a7a3..d3197dd 100644
--- a/modules/mail/e-mail-shell-view-actions.h
+++ b/modules/mail/e-mail-shell-view-actions.h
@@ -231,8 +231,6 @@
 	E_SHELL_WINDOW_ACTION ((window), "mail-filter-no-label")
 #define E_SHELL_WINDOW_ACTION_MAIL_FILTER_READ_MESSAGES(window) \
 	E_SHELL_WINDOW_ACTION ((window), "mail-filter-read-messages")
-#define E_SHELL_WINDOW_ACTION_MAIL_FILTER_RECENT_MESSAGES(window) \
-	E_SHELL_WINDOW_ACTION ((window), "mail-filter-recent-messages")
 #define E_SHELL_WINDOW_ACTION_MAIL_FILTER_UNREAD_MESSAGES(window) \
 	E_SHELL_WINDOW_ACTION ((window), "mail-filter-unread-messages")
 #define E_SHELL_WINDOW_ACTION_MAIL_SCOPE_ALL_ACCOUNTS(window) \
diff --git a/modules/mail/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h
index 4a7f342..0e9feb2 100644
--- a/modules/mail/e-mail-shell-view-private.h
+++ b/modules/mail/e-mail-shell-view-private.h
@@ -105,11 +105,10 @@ enum {
 	MAIL_FILTER_NO_LABEL			= -1,
 	/* Labels go here */
 	MAIL_FILTER_READ_MESSAGES		= 5000,
-	MAIL_FILTER_RECENT_MESSAGES		= 5001,
-	MAIL_FILTER_LAST_5_DAYS_MESSAGES	= 5002,
-	MAIL_FILTER_MESSAGES_WITH_ATTACHMENTS	= 5003,
-	MAIL_FILTER_IMPORTANT_MESSAGES		= 5004,
-	MAIL_FILTER_MESSAGES_NOT_JUNK		= 5005
+	MAIL_FILTER_LAST_5_DAYS_MESSAGES	= 5001,
+	MAIL_FILTER_MESSAGES_WITH_ATTACHMENTS	= 5002,
+	MAIL_FILTER_IMPORTANT_MESSAGES		= 5003,
+	MAIL_FILTER_MESSAGES_NOT_JUNK		= 5004
 };
 
 /* Search items are displayed in ascending order. */
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index ad85799..1db444e 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -450,23 +450,6 @@ filter:
 			query = temp;
 			break;
 
-		case MAIL_FILTER_RECENT_MESSAGES:
-			if (em_utils_folder_is_sent (registry, folder))
-				temp = g_strdup_printf (
-					"(and %s (match-all "
-					"(> (get-sent-date) "
-					"(- (get-current-date) 86400))))",
-					query);
-			else
-				temp = g_strdup_printf (
-					"(and %s (match-all "
-					"(> (get-received-date) "
-					"(- (get-current-date) 86400))))",
-					query);
-			g_free (query);
-			query = temp;
-			break;
-
 		case MAIL_FILTER_LAST_5_DAYS_MESSAGES:
 			if (em_utils_folder_is_sent (registry, folder))
 				temp = g_strdup_printf (



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]