aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-10-21 03:06:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-21 03:08:16 +0800
commit8da37ea812d5b784dade3dc0f05df54fdc60fc7a (patch)
tree04bf6d75a584f2f8af8c4b061e38bf8220a0bf15 /addressbook/gui
parent4142c97c7b59de8d859a217d7b76667b339e33c0 (diff)
downloadgsoc2013-evolution-8da37ea812d5b784dade3dc0f05df54fdc60fc7a.tar
gsoc2013-evolution-8da37ea812d5b784dade3dc0f05df54fdc60fc7a.tar.gz
gsoc2013-evolution-8da37ea812d5b784dade3dc0f05df54fdc60fc7a.tar.bz2
gsoc2013-evolution-8da37ea812d5b784dade3dc0f05df54fdc60fc7a.tar.lz
gsoc2013-evolution-8da37ea812d5b784dade3dc0f05df54fdc60fc7a.tar.xz
gsoc2013-evolution-8da37ea812d5b784dade3dc0f05df54fdc60fc7a.tar.zst
gsoc2013-evolution-8da37ea812d5b784dade3dc0f05df54fdc60fc7a.zip
Bug 632641 - Handle combo box text API going away
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c13
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c19
2 files changed, 19 insertions, 13 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index fcf173e494..c597246700 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -53,6 +53,9 @@
#include "e-contact-editor-fullname.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define EMAIL_SLOTS 4
#define PHONE_SLOTS 8
#define IM_SLOTS 4
@@ -537,7 +540,7 @@ file_as_set_style (EContactEditor *editor, gint style)
company = gtk_entry_get_text (GTK_ENTRY (company_w));
if (style == -1) {
- string = gtk_combo_box_get_active_text (combo_file_as);
+ string = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combo_file_as));
strings = g_list_append (strings, string);
}
@@ -558,7 +561,7 @@ file_as_set_style (EContactEditor *editor, gint style)
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (combo_file_as)));
for (l = strings; l; l = l->next) {
- gtk_combo_box_append_text (combo_file_as, l->data);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_file_as), l->data);
}
}
@@ -592,7 +595,7 @@ name_entry_changed (GtkWidget *widget, EContactEditor *editor)
static void
file_as_combo_changed (GtkWidget *widget, EContactEditor *editor)
{
- gchar *string = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget));
+ gchar *string = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (widget));
if (string && *string) {
gchar *title;
@@ -731,7 +734,7 @@ init_email_record_location (EContactEditor *editor, gint record)
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (location_combo_box)));
for (i = 0; i < G_N_ELEMENTS (common_location); i++) {
- gtk_combo_box_append_text (location_combo_box, _(common_location[i].pretty_name));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (location_combo_box), _(common_location[i].pretty_name));
}
g_signal_connect_swapped (location_combo_box, "changed", G_CALLBACK (gtk_widget_grab_focus), email_entry);
@@ -2369,7 +2372,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
e_contact_set (contact, field_id, (gchar *) text);
}
else if (GTK_IS_COMBO_BOX_ENTRY (widget)) {
- gchar *text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget));
+ gchar *text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (widget));
e_contact_set (contact, field_id, text);
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index 9932134469..b97fb8e1f3 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -34,6 +34,9 @@
#include "e-util/e-util-private.h"
#include <glib/gi18n.h>
+/* backend-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
typedef struct dropdown_data dropdown_data;
typedef enum {
E_CONTACT_MERGING_ADD,
@@ -198,7 +201,7 @@ static void
dropdown_changed (GtkWidget *dropdown, dropdown_data *data)
{
gchar *str;
- str = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dropdown));
+ str = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (dropdown));
if (g_ascii_strcasecmp(str, ""))
e_contact_set (data->match, data->field, str);
@@ -297,12 +300,12 @@ mergeit (EContactMergingLookup *lookup)
gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
- dropdown = gtk_combo_box_new_text ();
- gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
+ dropdown = gtk_combo_box_text_new ();
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dropdown), string);
data = g_new0 (dropdown_data, 1);
- gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), "");
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dropdown), "");
gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);
data->field = use_field;
@@ -338,14 +341,14 @@ mergeit (EContactMergingLookup *lookup)
gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
data = g_new0 (dropdown_data, 1);
- dropdown = gtk_combo_box_new_text ();
- gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
+ dropdown = gtk_combo_box_text_new ();
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dropdown), string);
e_contact_set (lookup->match, field, string);
if (string1 && *string1)
- gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string1);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dropdown), string1);
else
- gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), "");
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dropdown), "");
gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);
data->field = field;