From 4a08257b83512cc32b73d732ccc53266a22b917c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 20 Oct 2010 16:10:15 -0400 Subject: Deal with GtkComboBoxEntry removal in gtk+-3.0. --- addressbook/gui/contact-editor/e-contact-editor-fullname.c | 13 ++++++++----- addressbook/gui/contact-editor/e-contact-editor.c | 10 +++++----- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index ea0bb6b206..c26b6e5e96 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -28,6 +28,9 @@ #include "e-contact-editor-fullname.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + static void fill_in_info (EContactEditorFullname *editor); static void extract_info (EContactEditorFullname *editor); @@ -89,7 +92,7 @@ e_contact_editor_fullname_set_property (GObject *object, gtk_editable_set_editable (GTK_EDITABLE (w), e_contact_editor_fullname->editable); } - else if (GTK_IS_COMBO_BOX_ENTRY (w)) { + else if (GTK_IS_COMBO_BOX (w)) { gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (w))), e_contact_editor_fullname->editable); gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable); @@ -232,9 +235,9 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam GTK_WINDOW (e_contact_editor_fullname), "contact-new"); widget = e_builder_get_widget (builder, "comboentry-title"); - gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (widget), 0); + gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (widget), 0); widget = e_builder_get_widget (builder, "comboentry-suffix"); - gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (widget), 0); + gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (widget), 0); } GtkWidget* @@ -258,7 +261,7 @@ fill_in_field (EContactEditorFullname *editor, if (GTK_IS_ENTRY (widget)) entry = GTK_ENTRY (widget); - else if (GTK_IS_COMBO_BOX_ENTRY (widget)) + else if (GTK_IS_COMBO_BOX (widget)) entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))); if (entry) { @@ -291,7 +294,7 @@ extract_field (EContactEditorFullname *editor, if (GTK_IS_ENTRY (widget)) entry = GTK_ENTRY (widget); - else if (GTK_IS_COMBO_BOX_ENTRY (widget)) + else if (GTK_IS_COMBO_BOX (widget)) entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))); if (entry) diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index c597246700..e67305bb80 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -534,7 +534,7 @@ file_as_set_style (EContactEditor *editor, gint style) GtkEntry *company_w = GTK_ENTRY (e_builder_get_widget (editor->builder, "entry-company")); const gchar *company; - if (!(combo_file_as && GTK_IS_COMBO_BOX_ENTRY (combo_file_as))) + if (!(combo_file_as && GTK_IS_COMBO_BOX (combo_file_as))) return; company = gtk_entry_get_text (GTK_ENTRY (company_w)); @@ -2259,7 +2259,7 @@ init_simple_field (EContactEditor *editor, GtkWidget *widget) changed_object = G_OBJECT (widget); g_signal_connect_swapped (widget, "activate", G_CALLBACK (entry_activated), editor); } - else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + else if (GTK_IS_COMBO_BOX (widget)) { changed_object = G_OBJECT (/*gtk_bin_get_child (GTK_BIN*/ (widget)/*)*/); g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (widget)), "activate", G_CALLBACK (entry_activated), editor); } @@ -2301,7 +2301,7 @@ fill_in_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) gtk_entry_set_text (GTK_ENTRY (widget), STRING_MAKE_NON_NULL (text)); g_free (text); } - else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + else if (GTK_IS_COMBO_BOX (widget)) { gchar *text = e_contact_get (contact, field_id); gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))), STRING_MAKE_NON_NULL (text)); g_free (text); @@ -2371,7 +2371,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) const gchar *text = gtk_entry_get_text (GTK_ENTRY (widget)); e_contact_set (contact, field_id, (gchar *) text); } - else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + else if (GTK_IS_COMBO_BOX (widget)) { gchar *text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (widget)); e_contact_set (contact, field_id, text); @@ -2531,7 +2531,7 @@ init_simple (EContactEditor *editor) widget = e_builder_get_widget (editor->builder, "entry-fullname"); g_signal_connect (widget, "changed", G_CALLBACK (name_entry_changed), editor); widget = e_builder_get_widget (editor->builder, "combo-file-as"); - gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (widget), 0); + gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (widget), 0); g_signal_connect (widget, "changed", G_CALLBACK (file_as_combo_changed), editor); widget = e_builder_get_widget (editor->builder, "entry-company"); g_signal_connect (widget, "changed", G_CALLBACK (company_entry_changed), editor); -- cgit