2011-04-10 [colin] 3.7.9cvs10
authorColin Leroy <colin@colino.net>
Sun, 10 Apr 2011 17:19:05 +0000 (17:19 +0000)
committerColin Leroy <colin@colino.net>
Sun, 10 Apr 2011 17:19:05 +0000 (17:19 +0000)
* src/addr_compl.c
* src/addressbook.c
* src/compose.c
* src/editaddress.c
* src/editaddress_other_attributes_ldap.c
* src/main.c
* src/message_search.c
* src/prefs_display_header.c
* src/prefs_filtering_action.c
* src/prefs_matcher.c
* src/prefs_other.c
* src/prefs_toolbar.c
* src/summary_search.c
* src/gtk/colorlabel.c
* src/gtk/combobox.c
* src/gtk/gtkcmoptionmenu.c
* src/gtk/gtkshruler.c
* src/gtk/gtkshruler.h
* src/gtk/gtkutils.h
* src/gtk/inputdialog.c
* src/gtk/quicksearch.c
Revert the whole pile of crap introduced in
cvs9,8,7,4.

24 files changed:
ChangeLog
PATCHSETS
configure.ac
src/addr_compl.c
src/addressbook.c
src/compose.c
src/editaddress.c
src/editaddress_other_attributes_ldap.c
src/gtk/colorlabel.c
src/gtk/combobox.c
src/gtk/gtkcmoptionmenu.c
src/gtk/gtkshruler.c
src/gtk/gtkshruler.h
src/gtk/gtkutils.h
src/gtk/inputdialog.c
src/gtk/quicksearch.c
src/main.c
src/message_search.c
src/prefs_display_header.c
src/prefs_filtering_action.c
src/prefs_matcher.c
src/prefs_other.c
src/prefs_toolbar.c
src/summary_search.c

index 043aaec..177dd4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2011-04-10 [colin]     3.7.9cvs10
+
+       * src/addr_compl.c
+       * src/addressbook.c
+       * src/compose.c
+       * src/editaddress.c
+       * src/editaddress_other_attributes_ldap.c
+       * src/main.c
+       * src/message_search.c
+       * src/prefs_display_header.c
+       * src/prefs_filtering_action.c
+       * src/prefs_matcher.c
+       * src/prefs_other.c
+       * src/prefs_toolbar.c
+       * src/summary_search.c
+       * src/gtk/colorlabel.c
+       * src/gtk/combobox.c
+       * src/gtk/gtkcmoptionmenu.c
+       * src/gtk/gtkshruler.c
+       * src/gtk/gtkshruler.h
+       * src/gtk/gtkutils.h
+       * src/gtk/inputdialog.c
+       * src/gtk/quicksearch.c
+               Revert the whole pile of crap introduced in
+               cvs9,8,7,4.
+
 2011-04-10 [colin]     3.7.9cvs9
 
        * src/compose.c
index 482c551..81949a7 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.27.2.51 -r 1.27.2.52 src/addr_compl.c;  cvs diff -u -r 1.60.2.141 -r 1.60.2.142 src/addressbook.c;  cvs diff -u -r 1.382.2.572 -r 1.382.2.573 src/compose.c;  cvs diff -u -r 1.1.2.12 -r 1.1.2.13 src/editaddress_other_attributes_ldap.c;  cvs diff -u -r 1.3.12.36 -r 1.3.12.37 src/message_search.c;  cvs diff -u -r 1.16.2.40 -r 1.16.2.41 src/prefs_display_header.c;  cvs diff -u -r 1.1.4.66 -r 1.1.4.67 src/prefs_filtering_action.c;  cvs diff -u -r 1.1.2.39 -r 1.1.2.40 src/prefs_other.c;  cvs diff -u -r 1.30.2.64 -r 1.30.2.65 src/prefs_toolbar.c;  cvs diff -u -r 1.15.2.62 -r 1.15.2.63 src/summary_search.c;  cvs diff -u -r 1.2.2.31 -r 1.2.2.32 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.2.19 -r 1.1.2.20 src/gtk/combobox.c;  cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/gtk/gtkcmoptionmenu.c;  cvs diff -u -r 1.4.2.53 -r 1.4.2.54 src/gtk/gtkutils.h;  ) > 3.7.9cvs7.patchset
 ( cvs diff -u -r 1.382.2.573 -r 1.382.2.574 src/compose.c;  cvs diff -u -r 1.1.4.67 -r 1.1.4.68 src/prefs_filtering_action.c;  cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/gtk/combobox.c;  cvs diff -u -r 1.1.4.14 -r 1.1.4.15 src/gtk/gtkshruler.c;  cvs diff -u -r 1.1.4.7 -r 1.1.4.8 src/gtk/gtkshruler.h;  ) > 3.7.9cvs8.patchset
 ( cvs diff -u -r 1.382.2.574 -r 1.382.2.575 src/compose.c;  cvs diff -u -r 1.14.2.58 -r 1.14.2.59 src/editaddress.c;  cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/editaddress_other_attributes_ldap.c;  cvs diff -u -r 1.115.2.235 -r 1.115.2.236 src/main.c;  cvs diff -u -r 1.3.12.37 -r 1.3.12.38 src/message_search.c;  cvs diff -u -r 1.16.2.41 -r 1.16.2.42 src/prefs_display_header.c;  cvs diff -u -r 1.43.2.87 -r 1.43.2.88 src/prefs_matcher.c;  cvs diff -u -r 1.30.2.65 -r 1.30.2.66 src/prefs_toolbar.c;  cvs diff -u -r 1.15.2.63 -r 1.15.2.64 src/summary_search.c;  cvs diff -u -r 1.1.2.21 -r 1.1.2.22 src/gtk/combobox.c;  cvs diff -u -r 1.4.2.54 -r 1.4.2.55 src/gtk/gtkutils.h;  cvs diff -u -r 1.2.2.40 -r 1.2.2.41 src/gtk/inputdialog.c;  cvs diff -u -r 1.1.2.100 -r 1.1.2.101 src/gtk/quicksearch.c;  ) > 3.7.9cvs9.patchset
+( cvs diff -u -r 1.27.2.52 -r 1.27.2.53 src/addr_compl.c;  cvs diff -u -r 1.60.2.142 -r 1.60.2.143 src/addressbook.c;  cvs diff -u -r 1.382.2.575 -r 1.382.2.576 src/compose.c;  cvs diff -u -r 1.14.2.59 -r 1.14.2.60 src/editaddress.c;  cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/editaddress_other_attributes_ldap.c;  cvs diff -u -r 1.115.2.236 -r 1.115.2.237 src/main.c;  cvs diff -u -r 1.3.12.38 -r 1.3.12.39 src/message_search.c;  cvs diff -u -r 1.16.2.42 -r 1.16.2.43 src/prefs_display_header.c;  cvs diff -u -r 1.1.4.68 -r 1.1.4.69 src/prefs_filtering_action.c;  cvs diff -u -r 1.43.2.88 -r 1.43.2.89 src/prefs_matcher.c;  cvs diff -u -r 1.1.2.40 -r 1.1.2.41 src/prefs_other.c;  cvs diff -u -r 1.30.2.66 -r 1.30.2.67 src/prefs_toolbar.c;  cvs diff -u -r 1.15.2.64 -r 1.15.2.65 src/summary_search.c;  cvs diff -u -r 1.2.2.32 -r 1.2.2.33 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/gtk/combobox.c;  cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/gtk/gtkcmoptionmenu.c;  cvs diff -u -r 1.1.4.15 -r 1.1.4.16 src/gtk/gtkshruler.c;  cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/gtk/gtkshruler.h;  cvs diff -u -r 1.4.2.55 -r 1.4.2.56 src/gtk/gtkutils.h;  cvs diff -u -r 1.2.2.41 -r 1.2.2.42 src/gtk/inputdialog.c;  cvs diff -u -r 1.1.2.101 -r 1.1.2.102 src/gtk/quicksearch.c;  ) > 3.7.9cvs10.patchset
index 2c4171b..5878a39 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=9
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -155,9 +155,9 @@ fi
 
 CFLAGS="$CFLAGS -Wall -Wno-pointer-sign"
 
-if test $USE_MAINTAINER_MODE = yes; then
-       CFLAGS="-g -Wall -Wno-pointer-sign -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES"
-fi
+#if test $USE_MAINTAINER_MODE = yes; then
+#      CFLAGS="-g -Wall -Wno-pointer-sign -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES"
+#fi
 
 pthread_name=
 case "$target" in
index 03b9581..d27fd0b 100644 (file)
@@ -850,7 +850,7 @@ static void addrcompl_resize_window( CompletionWindow *cw ) {
        /* Get current geometry of window */
        gdk_window_get_geometry( cw->window->window, &x, &y, &width, &height, &depth );
 
-       gtk_widget_hide( cw->window );
+       gtk_widget_hide_all( cw->window );
        gtk_widget_show_all( cw->window );
        gtk_widget_size_request( cw->list_view, &r );
 
index e1e74fe..07c99e7 100644 (file)
@@ -1491,8 +1491,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                        item = node->data;
                        node = g_list_next( node );
                        aio = ( AddrItemObject * ) item->addressItem;
-                       if(aio->type == ADDR_ITEM_PERSON ||
-                          aio->type == ADDR_ITEM_EMAIL ) {
+                       if( aio->type == ADDR_ITEM_PERSON || aio->type == ADDR_ITEM_EMAIL ) {
                                group_delete = FALSE;
                                break;
                        }
index cfa629e..7ae586d 100644 (file)
@@ -350,13 +350,10 @@ static void compose_add_field_list        ( Compose *compose,
                                          GList *listAddress );
 
 /* callback functions */
-#if !GTK_CHECK_VERSION(2,24,0)
+
 static gboolean compose_edit_size_alloc (GtkEditable   *widget,
                                         GtkAllocation  *allocation,
-                                        GtkSHRuler *shruler);
-static void compose_toggle_ruler_cb    (GtkToggleAction *action,
-                                        gpointer        data);
-#endif
+                                        GtkSHRuler     *shruler);
 static void account_activated          (GtkComboBox *optmenu,
                                         gpointer        data);
 static void attach_selected            (GtkTreeView    *tree_view, 
@@ -440,6 +437,8 @@ static void compose_toggle_autowrap_cb      (GtkToggleAction *action,
 static void compose_toggle_autoindent_cb(GtkToggleAction *action,
                                         gpointer        data);
 
+static void compose_toggle_ruler_cb    (GtkToggleAction *action,
+                                        gpointer        data);
 static void compose_toggle_sign_cb     (GtkToggleAction *action,
                                         gpointer        data);
 static void compose_toggle_encrypt_cb  (GtkToggleAction *action,
@@ -669,9 +668,7 @@ static GtkToggleActionEntry compose_toggle_entries[] =
        {"Options/Encrypt",             NULL, N_("_Encrypt"), NULL, NULL, G_CALLBACK(compose_toggle_encrypt_cb) }, /* Toggle */
        {"Options/RequestRetRcpt",      NULL, N_("_Request Return Receipt"), NULL, NULL, G_CALLBACK(compose_toggle_return_receipt_cb) }, /* TOGGLE */
        {"Options/RemoveReferences",    NULL, N_("Remo_ve references"), NULL, NULL, G_CALLBACK(compose_toggle_remove_refs_cb) }, /* TOGGLE */
-#if !GTK_CHECK_VERSION(2,24,0)
        {"Tools/ShowRuler",             NULL, N_("Show _ruler"), NULL, NULL, G_CALLBACK(compose_toggle_ruler_cb) }, /* Toggle */
-#endif
 };
 
 static GtkRadioActionEntry compose_radio_rm_entries[] =
@@ -4717,8 +4714,7 @@ static void compose_select_account(Compose *compose, PrefsAccount *account,
        }
        
        header_entry = (ComposeHeaderEntry *) compose->header_list->data;
-       header = gtk_combo_box_text_get_active_text(
-                       GTK_COMBO_BOX_TEXT(header_entry->combo));
+       header = gtk_combo_box_get_active_text(GTK_COMBO_BOX(header_entry->combo));
        
        if (header && !strlen(gtk_entry_get_text(GTK_ENTRY(header_entry->entry)))) {
                if (account->protocol == A_NNTP) {
@@ -6492,7 +6488,7 @@ static void compose_create_header_entry(Compose *compose)
 
        /* Combo box */
        model = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_INT, G_TYPE_BOOLEAN);
-       combo = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(model));
+       combo = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(model), 0);
        COMBOBOX_ADD(model, prefs_common_translated_header_name("To:"),
                        COMPOSE_TO);
        COMBOBOX_ADD(model, prefs_common_translated_header_name("Cc:"),
@@ -6845,7 +6841,7 @@ static GtkWidget *compose_create_others(Compose *compose)
        g_signal_connect(G_OBJECT(savemsg_checkbtn), "toggled",
                         G_CALLBACK(compose_savemsg_checkbtn_cb), compose);
 
-       savemsg_combo = gtk_combo_box_new_with_entry();
+       savemsg_combo = gtk_combo_box_entry_new_text();
        compose->savemsg_checkbtn = savemsg_checkbtn;
        compose->savemsg_combo = savemsg_combo;
        gtk_widget_show(savemsg_combo);
@@ -7054,10 +7050,8 @@ static Compose *compose_create(PrefsAccount *account,
        GtkWidget *paned;
 
        GtkWidget *edit_vbox;
-#if !GTK_CHECK_VERSION(2,24,0)
        GtkWidget *ruler_hbox;
        GtkWidget *ruler;
-#endif
        GtkWidget *scrolledwin;
        GtkWidget *text;
        GtkTextBuffer *buffer;
@@ -7415,7 +7409,6 @@ static Compose *compose_create(PrefsAccount *account,
 
        gtk_box_pack_start(GTK_BOX(edit_vbox), subject_hbox, FALSE, FALSE, 0);
 
-#if !GTK_CHECK_VERSION(2,24,0)
        /* ruler */
        ruler_hbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_start(GTK_BOX(edit_vbox), ruler_hbox, FALSE, FALSE, 0);
@@ -7424,7 +7417,7 @@ static Compose *compose_create(PrefsAccount *account,
        gtk_ruler_set_range(GTK_RULER(ruler), 0.0, 100.0, 1.0, 100.0);
        gtk_box_pack_start(GTK_BOX(ruler_hbox), ruler, TRUE, TRUE,
                           BORDER_WIDTH);
-#endif
+
        /* text widget */
        scrolledwin = gtk_scrolled_window_new(NULL, NULL);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
@@ -7448,11 +7441,9 @@ static Compose *compose_create(PrefsAccount *account,
        
        gtk_container_add(GTK_CONTAINER(scrolledwin), text);
 
-#if !GTK_CHECK_VERSION(2,24,0)
        g_signal_connect_after(G_OBJECT(text), "size_allocate",
                               G_CALLBACK(compose_edit_size_alloc),
                               ruler);
-#endif
        g_signal_connect(G_OBJECT(buffer), "changed",
                         G_CALLBACK(compose_changed_cb), compose);
        g_signal_connect(G_OBJECT(text), "grab_focus",
@@ -7546,10 +7537,8 @@ static Compose *compose_create(PrefsAccount *account,
 
        compose->notebook      = notebook;
        compose->edit_vbox     = edit_vbox;
-#if !GTK_CHECK_VERSION(2,24,0)
        compose->ruler_hbox    = ruler_hbox;
        compose->ruler         = ruler;
-#endif
        compose->scrolledwin   = scrolledwin;
        compose->text          = text;
 
@@ -7668,12 +7657,11 @@ static Compose *compose_create(PrefsAccount *account,
 
        compose_list = g_list_append(compose_list, compose);
 
-#if !GTK_CHECK_VERSION(2,24,0)
        if (!prefs_common.show_ruler)
                gtk_widget_hide(ruler_hbox);
-       
+               
        cm_toggle_menu_set_active_full(compose->ui_manager, "Menu/Tools/ShowRuler", prefs_common.show_ruler);
-#endif
+
        /* Priority */
        compose->priority = PRIORITY_NORMAL;
        compose_update_priority_menu_item(compose);
@@ -8695,7 +8683,7 @@ static void compose_attach_property_create(gboolean *cancelled)
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, (0 + 1), 
                         GTK_FILL, 0, 0, 0); 
        gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); 
-       mimetype_entry = gtk_combo_box_new_with_entry();
+       mimetype_entry = gtk_combo_box_entry_new_text(); 
        gtk_table_attach(GTK_TABLE(table), mimetype_entry, 1, 2, 0, (0 + 1), 
                         GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
                         
@@ -8717,9 +8705,7 @@ static void compose_attach_property_create(gboolean *cancelled)
 
        for (mime_type_list = strlist; mime_type_list != NULL; 
                mime_type_list = mime_type_list->next) {
-               gtk_combo_box_text_append_text(
-                       GTK_COMBO_BOX_TEXT(mimetype_entry),
-                       mime_type_list->data);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(mimetype_entry), mime_type_list->data);
                g_free(mime_type_list->data);
        }
        g_list_free(strlist);
@@ -9116,7 +9102,6 @@ static void compose_undo_state_changed(UndoMain *undostruct, gint undo_state,
  * includes "non-client" (windows-izm) in calculation, so this calculation
  * may not be accurate.
  */
-#if !GTK_CHECK_VERSION(2,24,0)
 static gboolean compose_edit_size_alloc(GtkEditable *widget,
                                        GtkAllocation *allocation,
                                        GtkSHRuler *shruler)
@@ -9138,7 +9123,7 @@ static gboolean compose_edit_size_alloc(GtkEditable *widget,
 
        return TRUE;
 }
-#endif
+
 typedef struct {
        gchar                   *header;
        gchar                   *entry;
@@ -10552,7 +10537,6 @@ static void activate_privacy_system(Compose *compose, PrefsAccount *account, gbo
        compose_update_privacy_system_menu_item(compose, warn);
 }
 
-#if !GTK_CHECK_VERSION(2,24,0)
 static void compose_toggle_ruler_cb(GtkToggleAction *action, gpointer data)
 {
        Compose *compose = (Compose *)data;
@@ -10566,7 +10550,7 @@ static void compose_toggle_ruler_cb(GtkToggleAction *action, gpointer data)
                prefs_common.show_ruler = FALSE;
        }
 }
-#endif
+
 static void compose_attach_drag_received_cb (GtkWidget         *widget,
                                             GdkDragContext     *context,
                                             gint                x,
index a8c1f9f..2322406 100644 (file)
@@ -1327,7 +1327,7 @@ static void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl )
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
        gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 
-       entry_name = gtk_combo_box_new_with_entry();
+       entry_name = gtk_combo_box_entry_new_text ();
        gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
        /* Next row */
index 9e26167..ce0a13a 100644 (file)
@@ -352,15 +352,14 @@ void addressbook_edit_person_page_attrib_ldap(PersonEditDlg *dialog, gint pageNu
 
        gchar **attribute = (gchar **) ATTRIBUTE;
 
-       combo_box = gtk_combo_box_text_new();
+       combo_box = gtk_combo_box_new_text();
 
        while (*attribute) {
                if (!strcmp(*attribute, "jpegPhoto")) {
                        attribute++;
                        continue;
                }
-               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box),
-                               *attribute++);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), *attribute++);
        }
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), 0);
 
index 75807e0..22233c6 100644 (file)
@@ -356,7 +356,7 @@ static void refresh_menu (GtkWidget *menushell, gpointer data)
 {
        GtkMenu *menu = (GtkMenu *)data;
        GtkWidget *widget = gtk_menu_get_attach_widget(menu);
-       gtk_widget_hide(widget);
+       gtk_widget_hide_all(widget);
        gtk_widget_unrealize(widget);
        gtk_widget_show_all(widget);
        gtk_widget_queue_draw(widget);
index 52d9e3f..2306b98 100644 (file)
@@ -45,15 +45,15 @@ GtkWidget *combobox_text_new(const gboolean with_entry, const gchar *text, ...)
                return NULL;
        
        if (with_entry)
-               combo = gtk_combo_box_new_with_entry();
+               combo = gtk_combo_box_entry_new_text();
        else
-               combo = gtk_combo_box_text_new();
+               combo = gtk_combo_box_new_text();
        gtk_widget_show(combo);
 
-       gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), text);
+       gtk_combo_box_append_text(GTK_COMBO_BOX(combo), text);
        va_start(args, text);
        while ((string = va_arg(args, gchar*)) != NULL)
-               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), string);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(combo), string);
        va_end(args);
                
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
@@ -160,7 +160,7 @@ void combobox_unset_popdown_strings(GtkComboBox *combobox)
        model = gtk_combo_box_get_model(combobox);
        count = gtk_tree_model_iter_n_children(model, NULL);
        for (i = 0; i < count; i++)
-               gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(combobox), 0);
+               gtk_combo_box_remove_text(combobox, 0);
 }
 
 void combobox_set_popdown_strings(GtkComboBox *combobox,
@@ -171,8 +171,7 @@ void combobox_set_popdown_strings(GtkComboBox *combobox,
        cm_return_if_fail(combobox != NULL);
 
        for (cur = list; cur != NULL; cur = g_list_next(cur))
-               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combobox),
-                                               (const gchar*) cur->data);
+               gtk_combo_box_append_text(combobox, (const gchar*) cur->data);
 }
 
 gboolean combobox_set_value_from_arrow_key(GtkComboBox *combobox,
@@ -205,8 +204,7 @@ gboolean combobox_set_value_from_arrow_key(GtkComboBox *combobox,
                /* if current text is in list, get prev or next one */
 
                if (keyval == GDK_Up) {
-                       gchar *text = gtk_combo_box_text_get_active_text(
-                                       GTK_COMBO_BOX_TEXT(combobox));
+                       gchar *text = gtk_combo_box_get_active_text(combobox);
                        if (!text)
                                text = gtk_editable_get_chars(GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(combobox))),0,-1);
                        valid = gtkut_tree_model_text_iter_prev(model, &iter, text);
index ff974f6..dd6d8e2 100644 (file)
@@ -968,7 +968,7 @@ gtk_cmoption_menu_hide_all (GtkWidget *widget)
   container = GTK_CONTAINER (widget);
 
   gtk_widget_hide (widget);
-  gtk_container_foreach (container, (GtkCallback) gtk_widget_hide, NULL);
+  gtk_container_foreach (container, (GtkCallback) gtk_widget_hide_all, NULL);
 }
 
 static gboolean
index a208a9c..e7aadb2 100644 (file)
@@ -30,9 +30,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <gtk/gtk.h>
-
-#if !GTK_CHECK_VERSION(2,24,0)
-
 #include "gtkshruler.h"
 #include "utils.h"
 #include "gtkutils.h"
@@ -182,4 +179,3 @@ gtk_shruler_draw_ticks(GtkRuler *ruler)
 
        cairo_destroy(cr);
 }
-#endif
index cbe655d..d3a25ba 100644 (file)
@@ -22,8 +22,6 @@
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
 
-#if !GTK_CHECK_VERSION(2,24,0)
-
 
 #ifdef __cplusplus
 extern "C" {
@@ -57,5 +55,4 @@ GtkWidget* gtk_shruler_new      (void);
 #endif /* __cplusplus */
 
 
-#endif /* GTK 2.24.0 */
 #endif /* __GTK_SHRULER_H__ */
index a1ff057..b4a44b8 100644 (file)
@@ -233,19 +233,6 @@ claws_input_add    (gint         source,
        gtk_tooltips_set_tip(GTK_TOOLTIPS(tips), widget,        \
                            tip, NULL);                         \
 }
-#endif
 
-#if !GTK_CHECK_VERSION(2,24,0)
-#define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
-#define gtk_combo_box_text_new gtk_combo_box_new_text
-#define gtk_combo_box_text_append_text gtk_combo_box_append_text
-#define gtk_combo_box_text_insert_text gtk_combo_box_insert_text
-#define gtk_combo_box_text_prepend_text gtk_combo_box_prepend_text
-#define gtk_combo_box_text_get_active_text gtk_combo_box_get_active_text
-#define gtk_combo_box_text_remove gtk_combo_box_remove_text
-#define gtk_combo_box_new_with_entry gtk_combo_box_entry_new_text
-#define gtk_combo_box_new_with_model_and_entry(x) \
-               gtk_combo_box_entry_new_with_model((x), 0)
 #endif
-
 #endif /* __GTKUTILS_H__ */
index 272dd57..4b0c463 100644 (file)
@@ -374,7 +374,7 @@ static void input_dialog_create(gboolean is_password)
        g_signal_connect(G_OBJECT(entry), "activate",
                         G_CALLBACK(entry_activated), NULL);
 
-       combo = gtk_combo_box_new_with_entry();
+       combo = gtk_combo_box_entry_new_text();
        gtk_box_pack_start(GTK_BOX(vbox), combo, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((combo)))), "activate",
                         G_CALLBACK(combo_activated), NULL);
index 3a90e66..248c4a2 100644 (file)
@@ -784,7 +784,7 @@ QuickSearch *quicksearch_new()
 
        gtk_widget_show(search_type);
 
-       search_string_entry = gtk_combo_box_new_with_entry ();
+       search_string_entry = gtk_combo_box_entry_new_text ();
        gtk_combo_box_set_active(GTK_COMBO_BOX(search_string_entry), -1);
 
        vbox = gtk_vbox_new(TRUE, 0);
index 706f11f..61509ca 100644 (file)
@@ -1077,6 +1077,7 @@ int main(int argc, char *argv[])
 
 #ifdef CRASH_DIALOG
        if (cmd.crash) {
+               gtk_set_locale();
                gtk_init(&argc, &argv);
                crash_main(cmd.crash_params);
 #ifdef G_OS_WIN32
@@ -1113,6 +1114,7 @@ int main(int argc, char *argv[])
        if (!g_thread_supported())
                g_thread_init(NULL);
 
+       gtk_set_locale();
        gtk_init(&argc, &argv);
 
 #ifdef G_OS_WIN32
index 1814c53..855dec0 100644 (file)
@@ -186,7 +186,7 @@ static void message_search_create(void)
        gtk_widget_show (body_label);
        gtk_box_pack_start (GTK_BOX (hbox1), body_label, FALSE, FALSE, 0);
 
-       body_entry = gtk_combo_box_new_with_entry();
+       body_entry = gtk_combo_box_entry_new_text ();
        gtk_combo_box_set_active(GTK_COMBO_BOX(body_entry), -1);
        if (prefs_common.message_search_history)
                combobox_set_popdown_strings(GTK_COMBO_BOX(body_entry),
@@ -275,7 +275,7 @@ static void message_search_execute(gboolean backward)
        gboolean all_searched = FALSE;
        gchar *body_str;
 
-       body_str = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(search_window.body_entry));
+       body_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.body_entry));
        if (!body_str)
                body_str = gtk_editable_get_chars(
                                GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.body_entry))),0,-1);
index 64ad76a..383118b 100644 (file)
@@ -274,9 +274,9 @@ static void prefs_display_header_create(void)
        gtk_widget_show (hdr_label);
        gtk_box_pack_start (GTK_BOX (hbox1), hdr_label, FALSE, FALSE, 0);
 
-       hdr_combo = gtk_combo_box_new_with_entry();
+       hdr_combo = gtk_combo_box_entry_new_text();
        for(i=0; i < 9 ; i++)
-               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(hdr_combo),
+               gtk_combo_box_append_text(GTK_COMBO_BOX (hdr_combo),
                        (*defaults[i] == '-') ? defaults[i]+1 : defaults[i]);
        gtk_combo_box_set_active(GTK_COMBO_BOX(hdr_combo), 0);
        gtk_widget_show (hdr_combo);
@@ -578,8 +578,7 @@ static void prefs_display_header_list_view_set_row(gboolean hidden)
        gchar *entry_text;
        GtkTreeModel *model;
 
-       entry_text = gtk_combo_box_text_get_active_text(
-               GTK_COMBO_BOX_TEXT(dispheader.hdr_combo));
+       entry_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(dispheader.hdr_combo));
        if (!entry_text)
                entry_text = gtk_editable_get_chars(
                                GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(dispheader.hdr_combo))),0,-1);
index 3e4af51..000516e 100644 (file)
@@ -467,16 +467,14 @@ static void prefs_filtering_action_create(void)
        gtk_table_attach(GTK_TABLE(table), hbox1, 1, 2, 1, 2, 
                         GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
 
-       account_combo = gtk_combo_box_text_new ();
+       account_combo = gtk_combo_box_new_text ();
        gtk_size_group_add_widget(size_action, account_combo);
 
        for (accounts = account_get_list() ; accounts != NULL;
             accounts = accounts->next) {
                PrefsAccount *ac = (PrefsAccount *)accounts->data;
                gchar *name = g_strdup(ac->account_name);
-               gtk_combo_box_text_append_text(
-                       GTK_COMBO_BOX_TEXT(account_combo),
-                       (gpointer) name);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(account_combo), (gpointer) name);
                g_free(name);
        }
 
@@ -512,15 +510,14 @@ static void prefs_filtering_action_create(void)
        prefs_filtering_action_check_widget_width(color_optmenu);
        gtk_box_pack_start(GTK_BOX(hbox1), color_optmenu, FALSE, FALSE, 0);
 
-       tags_combo = gtk_combo_box_text_new ();
+       tags_combo = gtk_combo_box_new_text ();
        gtk_size_group_add_widget(size_action, tags_combo);
 
        for (tmp = tags = tags_get_list() ; tmp != NULL;
             tmp = tmp->next) {
                gchar *name = g_strdup(tags_get_tag(GPOINTER_TO_INT(tmp->data)));
 
-               gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(tags_combo),
-                       (gpointer) name);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(tags_combo), (gpointer) name);
                g_free(name);
        }
 
@@ -935,8 +932,7 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
                break;
        case ACTION_SET_TAG:
        case ACTION_UNSET_TAG:
-               destination = gtk_combo_box_text_get_active_text(
-                       GTK_COMBO_BOX_TEXT(filtering_action.tags_combo));
+               destination = gtk_combo_box_get_active_text(GTK_COMBO_BOX(filtering_action.tags_combo));
                if (!destination || *destination == '\0') {
                        if (alert)
                                 alertpanel_error(_("Tag name is empty."));
@@ -1268,7 +1264,7 @@ static void prefs_filtering_action_enable_widget(GtkWidget* widget, const gboole
 
        if(enable == TRUE)
        {
-               if(GTK_IS_COMBO_BOX(widget))
+               if(GTK_IS_COMBO_BOX(widget) || GTK_IS_COMBO_BOX_ENTRY(widget))
                        gtk_combo_box_set_active(GTK_COMBO_BOX(widget), 0);
                else if(GTK_IS_SPIN_BUTTON(widget))
                        gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), 0);
index 79e4bc0..dedd70c 100644 (file)
@@ -630,7 +630,7 @@ static void prefs_matcher_create(void)
        gtk_box_pack_start(GTK_BOX(upper_hbox), criteria_label2, FALSE, FALSE, 0);
 
        /* headers combo box entry */
-       headers_combo = gtk_combo_box_new_with_model_and_entry(matcher.model_headers);
+       headers_combo = gtk_combo_box_entry_new_with_model(matcher.model_headers, 0);
        gtk_widget_set_size_request(headers_combo, 100, -1);
        gtk_box_pack_start(GTK_BOX(upper_hbox), headers_combo, TRUE, TRUE, 0);
        header_entry = gtk_bin_get_child(GTK_BIN((headers_combo)));
index 6a10846..aee7ef2 100644 (file)
@@ -397,8 +397,7 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                {"<Actions>/Menu/Edit/Advanced/DelForwWord",            "<alt>D"},
        };
 
-       text = gtk_combo_box_text_get_active_text(
-               GTK_COMBO_BOX_TEXT(keybind.combo));
+       text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(keybind.combo));
 
        if (!strcmp(text, _("Default"))) {
                menurc = default_menurc;
index b83be45..ee4003e 100644 (file)
@@ -370,9 +370,7 @@ static void prefs_toolbar_set_displayed(ToolbarPage *prefs_toolbar)
 
 static void add_item_to_plugin_combo(gpointer key, gpointer data, gpointer combo_box)
 {
-       gtk_combo_box_text_append_text(
-               GTK_COMBO_BOX_TEXT(combo_box),
-               (const gchar*)key);
+       gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), (const gchar*)key);
 }
 
 static void prefs_toolbar_populate(ToolbarPage *prefs_toolbar)
@@ -391,8 +389,8 @@ static void prefs_toolbar_populate(ToolbarPage *prefs_toolbar)
                        act = (gchar *)cur->data;
                        get_action_name(act, &act_name);
                        
-                       gtk_combo_box_text_append_text(
-                               GTK_COMBO_BOX_TEXT(prefs_toolbar->item_action_combo),
+                       gtk_combo_box_append_text(
+                               GTK_COMBO_BOX(prefs_toolbar->item_action_combo),
                                act_name);
 
                        g_free(act_name);
@@ -514,8 +512,8 @@ static void prefs_toolbar_register(GtkButton *button, ToolbarPage *prefs_toolbar
                }
                                
                if (item_type == ITEM_FUNCTION) {
-                       event = gtk_combo_box_text_get_active_text(
-                               GTK_COMBO_BOX_TEXT(prefs_toolbar->item_func_combo));
+                       event = gtk_combo_box_get_active_text(GTK_COMBO_BOX(
+                                               prefs_toolbar->item_func_combo));
                                                
                        if (is_duplicate(prefs_toolbar, event)) {
                                alertpanel_error(ERROR_MSG);
@@ -600,8 +598,8 @@ static void prefs_toolbar_substitute(GtkButton *button, ToolbarPage *prefs_toolb
                                                  -1);
                
                if (item_type == ITEM_FUNCTION) {
-                       icon_event = gtk_combo_box_text_get_active_text(
-                               GTK_COMBO_BOX_TEXT(prefs_toolbar->item_func_combo));
+                       icon_event = gtk_combo_box_get_active_text(GTK_COMBO_BOX(
+                                               prefs_toolbar->item_func_combo));
                                                
                        if (is_duplicate(prefs_toolbar, icon_event)
                        && g_utf8_collate(icon_event, set_event) != 0){
@@ -794,7 +792,7 @@ static void item_type_changed(GtkComboBox *item_type_combo,
 static void action_selection_changed(GtkComboBox *action_combo,
                                ToolbarPage *prefs_toolbar)
 {
-       gchar *text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(
+       gchar *text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(
                           prefs_toolbar->item_action_combo));
 
        if(text != NULL) { /* action */
@@ -806,7 +804,7 @@ static void action_selection_changed(GtkComboBox *action_combo,
 static void plugin_selection_changed(GtkComboBox *action_combo,
                 ToolbarPage *prefs_toolbar)
 {
-       gchar *text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(prefs_toolbar->item_plugin_combo));
+       gchar *text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(prefs_toolbar->item_plugin_combo));
 
        if (text != NULL) { /* action */
                gtk_entry_set_text(GTK_ENTRY(prefs_toolbar->item_text_entry), text);
@@ -817,7 +815,7 @@ static void plugin_selection_changed(GtkComboBox *action_combo,
 static void func_selection_changed(GtkComboBox *action_combo,
                                ToolbarPage *prefs_toolbar)
 {
-       gchar *text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(
+       gchar *text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(
                           prefs_toolbar->item_func_combo));
 
        if(text != NULL) { /* action */
@@ -925,21 +923,21 @@ static void prefs_toolbar_create(ToolbarPage *prefs_toolbar)
                          (GtkAttachOptions) (GTK_FILL),
                          (GtkAttachOptions) (0), 0, 0);
 
-       item_action_combo = gtk_combo_box_text_new();
+       item_action_combo = gtk_combo_box_new_text();
        gtk_widget_set_size_request(item_action_combo, 200, -1);
        gtk_table_attach (GTK_TABLE (table), item_action_combo, 1, 3, 1, 2,
                          (GtkAttachOptions) (GTK_FILL),
                          (GtkAttachOptions) (0), 0, 0);
                          
        /* available internal functions */
-       item_func_combo = gtk_combo_box_text_new();
+       item_func_combo = gtk_combo_box_new_text();
        gtk_widget_set_size_request(item_func_combo, 200, -1);
        gtk_table_attach (GTK_TABLE (table), item_func_combo, 1, 3, 1, 2,
                          (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                          (GtkAttachOptions) (0), 0, 0);
        
        /* plugin-registered items */
-       item_plugin_combo = gtk_combo_box_text_new();
+       item_plugin_combo = gtk_combo_box_new_text();
        gtk_widget_set_size_request(item_plugin_combo, 200, -1);
        gtk_table_attach(GTK_TABLE(table), item_plugin_combo, 1, 3, 1, 2,
                         (GtkAttachOptions) (GTK_FILL),
index 78eec9c..f3c17af 100644 (file)
@@ -264,7 +264,7 @@ static void summary_search_create(void)
        gtk_table_set_row_spacings (GTK_TABLE (table1), 8);
        gtk_table_set_col_spacings (GTK_TABLE (table1), 8);
 
-       from_entry = gtk_combo_box_new_with_entry ();
+       from_entry = gtk_combo_box_entry_new_text ();
        gtk_combo_box_set_active(GTK_COMBO_BOX(from_entry), -1);
        if (prefs_common.summary_search_from_history)
                combobox_set_popdown_strings(GTK_COMBO_BOX(from_entry),
@@ -279,7 +279,7 @@ static void summary_search_create(void)
        g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((from_entry)))),
                         "focus_out_event", G_CALLBACK(from_entry_focus_evt_out), NULL);
 
-       to_entry = gtk_combo_box_new_with_entry ();
+       to_entry = gtk_combo_box_entry_new_text ();
        gtk_combo_box_set_active(GTK_COMBO_BOX(to_entry), -1);
        if (prefs_common.summary_search_to_history)
                combobox_set_popdown_strings(GTK_COMBO_BOX(to_entry),
@@ -294,7 +294,7 @@ static void summary_search_create(void)
        g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((to_entry)))),
                         "focus_out_event", G_CALLBACK(to_entry_focus_evt_out), NULL);
 
-       subject_entry = gtk_combo_box_new_with_entry ();
+       subject_entry = gtk_combo_box_entry_new_text ();
        gtk_combo_box_set_active(GTK_COMBO_BOX(subject_entry), -1);
        if (prefs_common.summary_search_subject_history)
                combobox_set_popdown_strings(GTK_COMBO_BOX(subject_entry),
@@ -309,7 +309,7 @@ static void summary_search_create(void)
        g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((subject_entry)))),
                         "focus_out_event", G_CALLBACK(subject_entry_focus_evt_out), NULL);
 
-       body_entry = gtk_combo_box_new_with_entry ();
+       body_entry = gtk_combo_box_entry_new_text ();
        gtk_combo_box_set_active(GTK_COMBO_BOX(body_entry), -1);
        if (prefs_common.summary_search_body_history)
                combobox_set_popdown_strings(GTK_COMBO_BOX(body_entry),
@@ -324,7 +324,7 @@ static void summary_search_create(void)
        g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((body_entry)))),
                         "focus_out_event", G_CALLBACK(body_entry_focus_evt_out), NULL);
 
-       adv_condition_entry = gtk_combo_box_new_with_entry ();
+       adv_condition_entry = gtk_combo_box_entry_new_text ();
        gtk_combo_box_set_active(GTK_COMBO_BOX(adv_condition_entry), -1);
        if (prefs_common.summary_search_adv_condition_history)
                combobox_set_popdown_strings(GTK_COMBO_BOX(adv_condition_entry),
@@ -520,8 +520,7 @@ static void summary_search_execute(gboolean backward, gboolean search_all)
                search_window.matcher_list = NULL;
        }
        if (adv_search) {
-               adv_condition = gtk_combo_box_text_get_active_text(
-                       GTK_COMBO_BOX_TEXT(search_window.adv_condition_entry));
+               adv_condition = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.adv_condition_entry));
                if (!adv_condition)
                        adv_condition = gtk_editable_get_chars(
                                        GTK_EDITABLE(gtk_bin_get_child(GTK_BIN(search_window.adv_condition_entry))),0,-1);
@@ -551,10 +550,10 @@ static void summary_search_execute(gboolean backward, gboolean search_all)
                case_sens = gtk_toggle_button_get_active
                        (GTK_TOGGLE_BUTTON(search_window.case_checkbtn));
 
-               from_str    = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(search_window.from_entry));
-               to_str      = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(search_window.to_entry));
-               subject_str = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(search_window.subject_entry));
-               body_str    = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(search_window.body_entry));
+               from_str    = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.from_entry));
+               to_str      = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.to_entry));
+               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_editable_get_chars(
@@ -820,7 +819,7 @@ static void adv_condition_btn_clicked(GtkButton *button, gpointer data)
 
        /* re-use the current search value if it's a condition expression,
           otherwise ignore it silently */
-       cond_str = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(search_window.adv_condition_entry));
+       cond_str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(search_window.adv_condition_entry));
        if (cond_str && *cond_str != '\0') {
                matchers = matcher_parser_get_cond((gchar*)cond_str, NULL);
        }