2007-04-14 [wwp] 2.8.1cvs98
authorTristan Chabredier <wwp@claws-mail.org>
Sat, 14 Apr 2007 10:17:33 +0000 (10:17 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Sat, 14 Apr 2007 10:17:33 +0000 (10:17 +0000)
* src/gtk/combobox.c
* src/message_search.c
* src/summary_search.c
* src/prefs_display_header.c
Workaround a bug with GTK+ 2.6.x where gtk_combo_box_get_active_text()
returns NULL, get the text value directly from the GtkEntry child.

ChangeLog
PATCHSETS
configure.ac
src/gtk/combobox.c
src/message_search.c
src/prefs_display_header.c
src/summary_search.c

index fcdd32385169c80d5846b99ce1eb1e92e9d33267..36d2f0410135498c125745ea9f034594b131ba00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-14 [wwp]       2.8.1cvs98
+
+       * src/gtk/combobox.c
+       * src/message_search.c
+       * src/summary_search.c
+       * src/prefs_display_header.c
+               Workaround a bug with GTK+ 2.6.x where gtk_combo_box_get_active_text()
+               returns NULL, get the text value directly from the GtkEntry child.
+
 2007-04-13 [colin]     2.8.1cvs97
 
        * src/gtk/quicksearch.c
index 269c77ae0c0beb9b5417cefb1a74520be4c7108b..cea00308b9fe62b5b18ae7339395eb25d9443a54 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.56.2.49 -r 1.56.2.50 src/pop.c;  ) > 2.8.1cvs95.patchset
 ( cvs diff -u -r 1.3.12.24 -r 1.3.12.25 src/message_search.c;  cvs diff -u -r 1.16.2.24 -r 1.16.2.25 src/prefs_display_header.c;  cvs diff -u -r 1.15.2.45 -r 1.15.2.46 src/summary_search.c;  ) > 2.8.1cvs96.patchset
 ( cvs diff -u -r 1.1.2.65 -r 1.1.2.66 src/gtk/quicksearch.c;  ) > 2.8.1cvs97.patchset
+( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/gtk/combobox.c;  cvs diff -u -r 1.3.12.25 -r 1.3.12.26 src/message_search.c;  cvs diff -u -r 1.15.2.46 -r 1.15.2.47 src/summary_search.c;  cvs diff -u -r 1.16.2.25 -r 1.16.2.26 src/prefs_display_header.c;  ) > 2.8.1cvs98.patchset
index 1efa1df08bf413adc7e4ac0fdea3b659e4b10fa5..649ebfb34030cf302d849f19a479b13d673ad67a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=97
+EXTRA_VERSION=98
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5ded657abd2f86635f49eed1f6978be6e3423e78..4620ff95d6ab773cbda49602032641365dbfdfd2 100644 (file)
@@ -135,10 +135,12 @@ gboolean combobox_set_value_from_arrow_key(GtkComboBox *combobox,
        if (gtk_combo_box_get_active_iter(combobox, &iter)) {
                /* if current text is in list, get prev or next one */
 
-               if (keyval == GDK_Up)
-                       valid = gtkut_tree_model_text_iter_prev(model, &iter,
-                                               gtk_combo_box_get_active_text(combobox));
-               else
+               if (keyval == GDK_Up) {
+                       const gchar *text = gtk_combo_box_get_active_text(combobox);
+                       if (!text)
+                               text = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(combobox)));
+                       valid = gtkut_tree_model_text_iter_prev(model, &iter, text);
+               } else
                if (keyval == GDK_Down)
                        valid = gtk_tree_model_iter_next(model, &iter);
 
index afb8b4fe8ce7d9a367f46e979266d0948cfd0de8..26b8ebf0dfdb3599fec819f3e514a7576dd6f210 100644 (file)
@@ -278,6 +278,8 @@ static void message_search_execute(gboolean backward)
        const gchar *body_str;
 
        body_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.body_entry));
+       if (!body_str)
+               body_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.body_entry)));
        if (!body_str || *body_str == '\0') return;
 
        /* add to history */
index c14388cf342740cf22f217acb7ab443f76a96f47..ba7e7882dad13f6bb91105a2c6644af08ff57842 100644 (file)
@@ -561,6 +561,8 @@ static void prefs_display_header_list_view_set_row(gboolean hidden)
        GtkTreeModel *model;
 
        entry_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(dispheader.hdr_combo));
+       if (!entry_text)
+               entry_text = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(dispheader.hdr_combo)));
        if (!entry_text || entry_text[0] == '\0') {
                alertpanel_error(_("Header name is not set."));
                return;
index 22e135b9ddd6f741947706c08868198ca3634011..608db48fa8c488bc7f2a1e5c0205b2e3172c645c 100644 (file)
@@ -524,6 +524,8 @@ static void summary_search_execute(gboolean backward, gboolean search_all)
                        search_window.matcher_list = NULL;
                }
                adv_condition = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.adv_condition_entry));
+               if (!adv_condition)
+                       adv_condition = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.adv_condition_entry)));
                if (adv_condition && adv_condition[0] != '\0') {
 
                        /* add to history */
@@ -561,6 +563,15 @@ static void summary_search_execute(gboolean backward, gboolean search_all)
                subject_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.subject_entry));
                body_str    = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.body_entry));
 
+               if (!from_str)
+                       from_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.from_entry)));
+               if (!to_str)
+                       to_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.to_entry)));
+               if (!subject_str)
+                       subject_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.subject_entry)));
+               if (!body_str)
+                       body_str = gtk_entry_get_text(gtk_bin_get_child(GTK_BIN(search_window.body_entry)));
+
                if (!from_str || !to_str || !subject_str || !body_str) {
                        /* TODO: warn if no search criteria? (or make buttons enabled only when
                         * at least one search criteria has been set */