#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
-#if !GTK_CHECK_VERSION(3, 0, 0)
#include "gtkcmoptionmenu.h"
-#endif
#include "utils.h"
#include "combobox.h"
#include "menu.h"
{
GtkWidget *hbox_search;
GtkWidget *search_type;
-#if !GTK_CHECK_VERSION(3, 0, 0)
GtkWidget *search_type_opt;
-#endif
GtkWidget *search_string_entry;
GtkWidget *search_condition_expression;
GtkWidget *search_description;
static void quicksearch_set_type(QuickSearch *quicksearch, gint type)
{
-#if !GTK_CHECK_VERSION(3, 0, 0)
gint index;
quicksearch->request.type = type;
index = menu_find_option_menu_index(GTK_CMOPTION_MENU(quicksearch->search_type_opt),
GINT_TO_POINTER(type),
NULL);
gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(quicksearch->search_type_opt), index);
-#endif
}
static gchar *quicksearch_get_text(QuickSearch * quicksearch)
"c S", N_("messages carbon-copied to S"),
"C S", N_("message is either To: or Cc: to S"),
"D", N_("deleted messages"), /** how I can filter deleted messages **/
+ "da \"YYYY-MM-dd HH:mm:ss\"", N_("messages whose date is after requested date "
+ "(time is optional)"),
+ "db \"YYYY-MM-dd HH:mm:ss\"", N_("messages whose date is before requested date "
+ "(time is optional)"),
"e S", N_("messages which contain S in the Sender field"),
"E S", N_("true if execute \"S\" succeeds"),
"f S", N_("messages originating from user S"),
mainwindow_get_mainwindow()->summaryview->quicksearch != NULL,
FALSE);
- /* re-use the current quicksearch value if it's a condition expression,
- otherwise ignore it silently */
+ /* re-use the current quicksearch value, expanding it so it also works
+ * with extended symbols */
cond_str = quicksearch_get_text(mainwindow_get_mainwindow()->summaryview->quicksearch);
if (*cond_str != '\0') {
- matchers = matcher_parser_get_cond((gchar*)cond_str, NULL);
+ gchar *newstr = advsearch_expand_search_string(cond_str);
+
+ if (newstr && newstr[0] != '\0')
+ matchers = matcher_parser_get_cond(newstr, FALSE);
+ g_free(newstr);
}
prefs_matcher_open(matchers, search_condition_expr_done);
QuickSearch *quicksearch;
GtkWidget *hbox_search;
-#if !GTK_CHECK_VERSION(3, 0, 0)
GtkWidget *search_type_opt;
-#endif
GtkWidget *search_type;
GtkWidget *search_string_entry;
GtkWidget *search_hbox;
/* quick search */
hbox_search = gtk_hbox_new(FALSE, 0);
-#if !GTK_CHECK_VERSION(3, 0, 0)
search_type_opt = gtk_cmoption_menu_new();
gtk_widget_show(search_type_opt);
gtk_box_pack_start(GTK_BOX(hbox_search), search_type_opt, FALSE, FALSE, 0);
-#endif
search_type = gtk_menu_new();
MENUITEM_ADD (search_type, menuitem,
G_CALLBACK(searchtype_autorun_changed),
quicksearch);
-#if !GTK_CHECK_VERSION(3, 0, 0)
gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(search_type_opt), search_type);
quicksearch->search_type_opt = search_type_opt;
-#endif
quicksearch_set_type(quicksearch, prefs_common.summary_quicksearch_type);
gtk_widget_show(search_type);