Complete the fix for bug #2132
[claws.git] / src / gtk / quicksearch.c
index c485c9dcc146287c393da516fb88495b9fb0d0cb..92bb496008fddb2b0bf22368f3a53979147ae94b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Colin Leroy <colin@colino.net> 
+ * Copyright (C) 1999-2013 Colin Leroy <colin@colino.net> 
  * and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
@@ -208,14 +208,23 @@ static void quicksearch_set_popdown_strings(QuickSearch *quicksearch)
 {
        GtkWidget *search_string_entry = quicksearch->search_string_entry;
 
+#if !GTK_CHECK_VERSION(2, 24, 0)
        combobox_unset_popdown_strings(GTK_COMBO_BOX(search_string_entry));
-
        if (prefs_common.summary_quicksearch_type == ADVANCED_SEARCH_EXTENDED)
                combobox_set_popdown_strings(GTK_COMBO_BOX(search_string_entry),
                        quicksearch->extended_search_strings);  
        else
                combobox_set_popdown_strings(GTK_COMBO_BOX(search_string_entry),
                        quicksearch->normal_search_strings);
+#else
+       combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry));        
+       if (prefs_common.summary_quicksearch_type == ADVANCED_SEARCH_EXTENDED)
+               combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry),
+                       quicksearch->extended_search_strings);  
+       else
+               combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry),
+                       quicksearch->normal_search_strings);
+#endif
 }
 
 static void update_extended_buttons (QuickSearch *quicksearch)
@@ -433,6 +442,8 @@ static gchar *search_descr_strings[] = {
        "a",     N_("all messages"),
        "ag #",  N_("messages whose age is greater than # days"),
        "al #",  N_("messages whose age is less than # days"),
+       "agh #",  N_("messages whose age is greater than # hours"),
+       "alh #",  N_("messages whose age is less than # hours"),
        "b S",   N_("messages which contain S in the message body"),
        "B S",   N_("messages which contain S in the whole message"),
        "c S",   N_("messages carbon-copied to S"),
@@ -483,6 +494,7 @@ static gchar *search_descr_strings[] = {
 static DescriptionWindow search_descr = {
        NULL,
        NULL,
+       FALSE,
        2,
        N_("Extended Search"),
        N_("Extended Search allows the user to define criteria that messages must "
@@ -793,7 +805,7 @@ QuickSearch *quicksearch_new()
        quicksearch->extended_search_strings = NULL;
 
        quicksearch_set_button(GTK_BUTTON(quicksearch->search_description), GTK_STOCK_INFO, _("_Information"));
-       quicksearch_set_button(GTK_BUTTON(quicksearch->search_condition_expression), GTK_STOCK_EDIT, _("_Edit"));
+       quicksearch_set_button(GTK_BUTTON(quicksearch->search_condition_expression), GTK_STOCK_EDIT, _("E_dit"));
        quicksearch_set_button(GTK_BUTTON(quicksearch->clear_search), GTK_STOCK_CLEAR, _("C_lear"));
        
        update_extended_buttons(quicksearch);
@@ -808,7 +820,7 @@ void quicksearch_relayout(QuickSearch *quicksearch)
        case WIDE_LAYOUT:
        case WIDE_MSGLIST_LAYOUT:
                quicksearch_set_button(GTK_BUTTON(quicksearch->search_description), GTK_STOCK_INFO, _("_Information"));
-               quicksearch_set_button(GTK_BUTTON(quicksearch->search_condition_expression), GTK_STOCK_EDIT, _("_Edit"));
+               quicksearch_set_button(GTK_BUTTON(quicksearch->search_condition_expression), GTK_STOCK_EDIT, _("E_dit"));
                quicksearch_set_button(GTK_BUTTON(quicksearch->clear_search), GTK_STOCK_CLEAR, _("C_lear"));
                break;
        case SMALL_LAYOUT: