From 8da37ea812d5b784dade3dc0f05df54fdc60fc7a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 20 Oct 2010 15:06:38 -0400 Subject: Bug 632641 - Handle combo box text API going away --- filter/e-filter-option.c | 8 ++++++-- filter/e-filter-rule.c | 20 ++++++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'filter') diff --git a/filter/e-filter-option.c b/filter/e-filter-option.c index e8a4dcc4ae..16783cd433 100644 --- a/filter/e-filter-option.c +++ b/filter/e-filter-option.c @@ -36,6 +36,9 @@ #include "e-filter-option.h" #include "e-filter-part.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + G_DEFINE_TYPE ( EFilterOption, e_filter_option, @@ -355,11 +358,12 @@ filter_option_get_widget (EFilterElement *element) g_list_free (old_ops); } - combobox = gtk_combo_box_new_text (); + combobox = gtk_combo_box_text_new (); l = option->options; while (l) { op = l->data; - gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(op->title)); + gtk_combo_box_text_append_text ( + GTK_COMBO_BOX_TEXT (combobox), _(op->title)); if (op == option->current) current = index; diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c index bfcff8c8b9..4dc2d8356f 100644 --- a/filter/e-filter-rule.c +++ b/filter/e-filter-rule.c @@ -35,6 +35,9 @@ #include "e-filter-rule.h" #include "e-rule-context.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define E_FILTER_RULE_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_FILTER_RULE, EFilterRulePrivate)) @@ -149,11 +152,12 @@ get_rule_part_widget (ERuleContext *context, data->partwidget = p; data->container = hbox; - combobox = gtk_combo_box_new_text (); + combobox = gtk_combo_box_text_new (); /* sigh, this is a little ugly */ while ((part = e_rule_context_next_part (context, part))) { - gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(part->title)); + gtk_combo_box_text_append_text ( + GTK_COMBO_BOX_TEXT (combobox), _(part->title)); if (!strcmp (newpart->title, part->title)) current = index; @@ -720,10 +724,12 @@ filter_rule_get_widget (EFilterRule *rule, }; label = gtk_label_new_with_mnemonic (_("_Find items:")); - combobox = gtk_combo_box_new_text (); + combobox = gtk_combo_box_text_new (); for (i=0;i<2;i++) { - gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(thread_types[i])); + gtk_combo_box_text_append_text ( + GTK_COMBO_BOX_TEXT (combobox), + _(thread_types[i])); } gtk_label_set_mnemonic_widget ((GtkLabel *)label, combobox); @@ -754,10 +760,12 @@ filter_rule_get_widget (EFilterRule *rule, }; label = gtk_label_new_with_mnemonic (_("I_nclude threads")); - combobox = gtk_combo_box_new_text (); + combobox = gtk_combo_box_text_new (); for (i=0;i<5;i++) { - gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(thread_types[i])); + gtk_combo_box_text_append_text ( + GTK_COMBO_BOX_TEXT (combobox), + _(thread_types[i])); } gtk_label_set_mnemonic_widget ((GtkLabel *)label, combobox); -- cgit v1.2.3