aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c13
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c19
-rw-r--r--calendar/gui/dialogs/event-page.c10
-rw-r--r--calendar/gui/dialogs/memo-page.c7
-rw-r--r--calendar/gui/dialogs/recurrence-page.c4
-rw-r--r--calendar/gui/dialogs/task-page.c4
-rw-r--r--e-util/e-datetime-format.c15
-rw-r--r--e-util/e-plugin-util.c13
-rw-r--r--e-util/gtk-compat.h9
-rw-r--r--filter/e-filter-option.c8
-rw-r--r--filter/e-filter-rule.c20
-rw-r--r--mail/e-mail-attachment-bar.c11
-rw-r--r--mail/e-mail-tag-editor.c6
-rw-r--r--mail/em-filter-editor.c6
-rw-r--r--mail/em-filter-rule.c5
-rw-r--r--mail/em-filter-source-element.c5
-rw-r--r--mail/em-subscription-editor.c8
-rw-r--r--modules/mail/em-mailer-prefs.c18
-rw-r--r--plugins/calendar-file/calendar-file.c11
-rw-r--r--plugins/calendar-weather/calendar-weather.c13
-rw-r--r--plugins/email-custom-header/email-custom-header.c15
-rw-r--r--plugins/google-account-setup/google-contacts-source.c13
-rw-r--r--plugins/publish-calendar/url-editor-dialog.c5
-rw-r--r--smime/gui/e-cert-selector.c5
-rw-r--r--widgets/misc/e-attachment-paned.c11
-rw-r--r--widgets/misc/e-dateedit.c6
26 files changed, 177 insertions, 83 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;
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index bcbaf7cc3a..753b9ca75f 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -1109,7 +1109,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (!priv->user_org) {
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer))));
- gtk_combo_box_append_text (GTK_COMBO_BOX (priv->organizer), string);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->organizer), string);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0);
gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE);
} else {
@@ -3012,16 +3012,16 @@ init_widgets (EventPage *epage)
}
if (combo_label) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (priv->alarm_time_combo), combo_label);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->alarm_time_combo), combo_label);
g_free (combo_label);
priv->alarm_map = alarm_map_with_user_time;
} else {
priv->alarm_map = alarm_map_without_user_time;
}
- gtk_combo_box_append_text (GTK_COMBO_BOX (priv->alarm_time_combo), _("Customize"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->alarm_time_combo), _("Customize"));
/* Translators: "None" for "No alarm set" */
- gtk_combo_box_prepend_text (GTK_COMBO_BOX (priv->alarm_time_combo), C_("cal-alarms", "None"));
+ gtk_combo_box_text_prepend_text (GTK_COMBO_BOX_TEXT (priv->alarm_time_combo), C_("cal-alarms", "None"));
g_signal_connect_swapped (
priv->alarm_time_combo, "changed",
@@ -3184,7 +3184,7 @@ event_page_construct (EventPage *epage, EMeetingStore *model)
GList *l;
for (l = priv->address_strings; l; l = l->next)
- gtk_combo_box_append_text (GTK_COMBO_BOX (priv->organizer), l->data);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->organizer), l->data);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0);
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index b7e3095e3f..454060c7ea 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -54,6 +54,9 @@
#include "e-send-options-utils.h"
#include "memo-page.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define MEMO_PAGE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), TYPE_MEMO_PAGE, MemoPagePrivate))
@@ -271,7 +274,7 @@ memo_page_fill_widgets (CompEditorPage *page,
gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->org_combo))), string);
} else {
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo))));
- gtk_combo_box_append_text (GTK_COMBO_BOX (priv->org_combo), string);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->org_combo), string);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->org_combo), 0);
gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->org_combo))), FALSE);
}
@@ -1191,7 +1194,7 @@ memo_page_construct (MemoPage *mpage)
GList *l;
for (l = priv->address_strings; l; l = l->next)
- gtk_combo_box_append_text (GTK_COMBO_BOX (priv->org_combo), l->data);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->org_combo), l->data);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->org_combo), 0);
} else
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index bf6092d340..b14d834a3f 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -1120,10 +1120,10 @@ make_recur_month_combobox (void)
GtkWidget *combo;
gint i;
- combo = gtk_combo_box_new_text ();
+ combo = gtk_combo_box_text_new ();
for (i = 0; i < G_N_ELEMENTS (options); i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _(options[i]));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _(options[i]));
}
return combo;
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 0596d0d12c..22cab43ff1 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -734,7 +734,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (!priv->user_org) {
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer))));
- gtk_combo_box_append_text (GTK_COMBO_BOX (priv->organizer), string);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->organizer), string);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0);
gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE);
} else {
@@ -2086,7 +2086,7 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
GList *l;
for (l = priv->address_strings; l; l = l->next)
- gtk_combo_box_append_text (GTK_COMBO_BOX (priv->organizer), l->data);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (priv->organizer), l->data);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0);
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c
index 11e7fb2707..05630d2ec7 100644
--- a/e-util/e-datetime-format.c
+++ b/e-util/e-datetime-format.c
@@ -25,6 +25,9 @@
#include "e-datetime-format.h"
#include "e-util.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define KEYS_FILENAME "datetime-formats.ini"
#define KEYS_GROUPNAME "formats"
@@ -358,16 +361,19 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind)
for (i = 0; items[i]; i++) {
if (i == 0) {
- gtk_combo_box_append_text ((GtkComboBox *) combo, _(items[i]));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combo), _(items[i]));
} else {
- gtk_combo_box_append_text ((GtkComboBox *) combo, items[i]);
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combo), items[i]);
if (!idx && fmt && g_str_equal (fmt, items[i]))
idx = i;
}
}
if (idx == 0 && fmt && !g_str_equal (fmt, get_default_format (kind, key))) {
- gtk_combo_box_append_text ((GtkComboBox *) combo, fmt);
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combo), fmt);
idx = i;
}
@@ -421,7 +427,8 @@ format_combo_changed_cb (GtkWidget *combo, gpointer user_data)
} else {
gchar *text;
- text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo));
+ text = gtk_combo_box_text_get_active_text (
+ GTK_COMBO_BOX_TEXT (combo));
set_format_internal (key, text, keyfile);
g_free (text);
}
diff --git a/e-util/e-plugin-util.c b/e-util/e-plugin-util.c
index c49ec3691a..8ff3b28778 100644
--- a/e-util/e-plugin-util.c
+++ b/e-util/e-plugin-util.c
@@ -25,6 +25,9 @@
#include "e-plugin-util.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
/* name of a property on a widget with corresponding property name for an ESource */
#define EPU_SP_NAME "e-source-property-name"
@@ -418,12 +421,12 @@ e_plugin_util_add_refresh (GtkWidget *parent, const gchar *label, ESource *sourc
gtk_widget_show (spin);
gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0);
- combo = gtk_combo_box_new_text ();
+ combo = gtk_combo_box_text_new ();
gtk_widget_show (combo);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("minutes"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("hours"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("days"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("weeks"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("minutes"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("hours"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("days"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("weeks"));
gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, TRUE, 0);
value_num = value ? atoi (value) : 30;
diff --git a/e-util/gtk-compat.h b/e-util/gtk-compat.h
index 786cc04721..cc27e0e7ec 100644
--- a/e-util/gtk-compat.h
+++ b/e-util/gtk-compat.h
@@ -5,6 +5,15 @@
/* Provide a GTK+ compatibility layer. */
+#if !GTK_CHECK_VERSION (2,23,0)
+#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_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 GTK_COMBO_BOX
+#define GtkComboBoxText GtkComboBox
+#endif
+
#if GTK_CHECK_VERSION (2,90,5)
/* Recreate GdkRegion until we drop GTK2 compatibility. */
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);
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index 0de674149b..8ba46cdccf 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -29,6 +29,9 @@
#include "e-attachment-icon-view.h"
#include "e-attachment-tree-view.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_MAIL_ATTACHMENT_BAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_MAIL_ATTACHMENT_BAR, EMailAttachmentBarPrivate))
@@ -621,10 +624,12 @@ mail_attachment_bar_init (EMailAttachmentBar *bar)
container = widget;
- widget = gtk_combo_box_new_text ();
+ widget = gtk_combo_box_text_new ();
gtk_size_group_add_widget (size_group, widget);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Icon View"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("List View"));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (widget), _("Icon View"));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (widget), _("List View"));
gtk_container_add (GTK_CONTAINER (container), widget);
bar->priv->combo_box = g_object_ref (widget);
gtk_widget_show (widget);
diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c
index ab7fdd22c4..c55ed05f7b 100644
--- a/mail/e-mail-tag-editor.c
+++ b/mail/e-mail-tag-editor.c
@@ -33,6 +33,9 @@
#include "e-util/e-util.h"
#include "widgets/misc/e-dateedit.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_MAIL_TAG_EDITOR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_MAIL_TAG_EDITOR, EMailTagEditorPrivate))
@@ -160,7 +163,8 @@ mail_tag_editor_get_tag_list (EMailTagEditor *editor)
time_t date;
gchar *text;
- text = gtk_combo_box_get_active_text (editor->priv->combo_entry);
+ text = gtk_combo_box_text_get_active_text (
+ GTK_COMBO_BOX_TEXT (editor->priv->combo_entry));
camel_tag_set (&tag_list, "follow-up", text);
g_free (text);
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index 705d972b2f..ca351e8e4a 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -35,6 +35,9 @@
#include "em-filter-editor.h"
#include "em-filter-rule.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static gpointer parent_class;
static EFilterRule *
@@ -175,7 +178,8 @@ em_filter_editor_construct (EMFilterEditor *fe,
gtk_list_store_clear (GTK_LIST_STORE (model));
for (i = 0; source_names[i].source; i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), source_names[i].name);
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combobox), source_names[i].name);
sources = g_slist_append (sources, g_strdup (source_names[i].source));
}
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index 316f1ad201..b46ce0dadc 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -383,9 +383,10 @@ get_rule_part_widget (EMFilterContext *f, EFilterPart *newpart, EFilterRule *fr)
data->partwidget = p;
data->container = hbox;
- combobox = gtk_combo_box_new_text ();
+ combobox = gtk_combo_box_text_new ();
while ((part = em_filter_context_next_action (f, 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;
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index 1d56cc1fd2..ab4c049183 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -259,7 +259,7 @@ get_widget (EFilterElement *fe)
if (fs->priv->sources == NULL)
em_filter_source_element_get_sources (fs);
- combobox = gtk_combo_box_new_text ();
+ combobox = gtk_combo_box_text_new ();
index = 0;
current_index = -1;
@@ -278,7 +278,8 @@ get_widget (EFilterElement *fe)
else
label = g_strdup_printf("%s <%s>", info->name, info->address);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), label);
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combobox), label);
g_free (label);
if (fs->priv->current_url && !strcmp (info->url, fs->priv->current_url))
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index 6a4112db42..0388e7e6b5 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -800,18 +800,18 @@ subscription_editor_add_account (EMSubscriptionEditor *editor,
StoreData *data;
CamelStore *store;
CamelSession *session;
- GtkComboBox *combo_box;
GtkListStore *list_store;
GtkTreeStore *tree_store;
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
GtkCellRenderer *renderer;
+ GtkComboBoxText *combo_box;
GtkWidget *container;
GtkWidget *widget;
const gchar *url;
- combo_box = GTK_COMBO_BOX (editor->priv->combo_box);
- gtk_combo_box_append_text (combo_box, account->name);
+ combo_box = GTK_COMBO_BOX_TEXT (editor->priv->combo_box);
+ gtk_combo_box_text_append_text (combo_box, account->name);
session = em_subscription_editor_get_session (editor);
url = e_account_get_string (account, E_ACCOUNT_SOURCE_URL);
@@ -1153,7 +1153,7 @@ em_subscription_editor_init (EMSubscriptionEditor *editor)
container = widget;
- widget = gtk_combo_box_new_text ();
+ widget = gtk_combo_box_text_new ();
gtk_table_attach (
GTK_TABLE (container), widget,
1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index ff8f238b4a..2c4a2ebd06 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -50,6 +50,9 @@
#include "em-junk.h"
#include "em-config.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
enum {
HEADER_LIST_NAME_COLUMN, /* displayable name of the header (may be a translation) */
HEADER_LIST_ENABLED_COLUMN, /* is the header enabled? */
@@ -553,8 +556,9 @@ emmp_empty_trash_init (EMMailerPrefs *prefs,
for (ii = 0; ii < G_N_ELEMENTS (empty_trash_frequency); ii++) {
if (days >= empty_trash_frequency[ii].days)
hist = ii;
- gtk_combo_box_append_text (
- combo_box, gettext (empty_trash_frequency[ii].label));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combo_box),
+ gettext (empty_trash_frequency[ii].label));
}
g_signal_connect (
@@ -597,8 +601,9 @@ emmp_empty_junk_init (EMMailerPrefs *prefs,
for (ii = 0; ii < G_N_ELEMENTS (empty_trash_frequency); ii++) {
if (days >= empty_trash_frequency[ii].days)
hist = ii;
- gtk_combo_box_append_text (
- combo_box, gettext (empty_trash_frequency[ii].label));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combo_box),
+ gettext (empty_trash_frequency[ii].label));
}
g_signal_connect (
@@ -660,9 +665,12 @@ emmp_free (EConfig *ec, GSList *items, gpointer data)
static void
junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
{
- gchar *def_plugin = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo));
+ gchar *def_plugin;
const GList *plugins = mail_session_get_junk_plugins (prefs->session);
+ def_plugin = gtk_combo_box_text_get_active_text (
+ GTK_COMBO_BOX_TEXT (combo));
+
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL);
while (plugins) {
EMJunkInterface *iface = plugins->data;
diff --git a/plugins/calendar-file/calendar-file.c b/plugins/calendar-file/calendar-file.c
index 7ab2a13259..b554843d65 100644
--- a/plugins/calendar-file/calendar-file.c
+++ b/plugins/calendar-file/calendar-file.c
@@ -27,6 +27,9 @@
#include <glib/gi18n.h>
#include <string.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
gint e_plugin_lib_enable (EPlugin *ep, gint enable);
gint
@@ -192,10 +195,10 @@ e_calendar_file_customs (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_misc_set_alignment (GTK_MISC (w1), 0.0, 0.5);
gtk_box_pack_start ((GtkBox *)box2, w1, FALSE, TRUE, 2);
- w2 = gtk_combo_box_new_text ();
- gtk_combo_box_append_text ((GtkComboBox *)w2, _("On open"));
- gtk_combo_box_append_text ((GtkComboBox *)w2, _("On file change"));
- gtk_combo_box_append_text ((GtkComboBox *)w2, _("Periodically"));
+ w2 = gtk_combo_box_text_new ();
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("On open"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("On file change"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("Periodically"));
gtk_label_set_mnemonic_widget (GTK_LABEL (w1), w2);
gtk_box_pack_start ((GtkBox *)box2, w2, FALSE, TRUE, 2);
diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c
index 970bdf4f8b..3dda9ebd4a 100644
--- a/plugins/calendar-weather/calendar-weather.c
+++ b/plugins/calendar-weather/calendar-weather.c
@@ -37,6 +37,9 @@
#include <libgweather/gweather-xml.h>
#undef GWEATHER_I_KNOW_THIS_IS_UNSTABLE
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
GtkWidget *e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data);
GtkWidget *e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data);
GtkWidget *e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data);
@@ -450,10 +453,14 @@ e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
- combobox = gtk_combo_box_new_text ();
+ combobox = gtk_combo_box_text_new ();
gtk_widget_show (combobox);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Metric (Celsius, cm, etc)"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Imperial (Fahrenheit, inches, etc)"));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combobox),
+ _("Metric (Celsius, cm, etc)"));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (combobox),
+ _("Imperial (Fahrenheit, inches, etc)"));
set_units (source, combobox);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combobox);
g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (units_changed), t);
diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c
index f202935c3e..b28d648522 100644
--- a/plugins/email-custom-header/email-custom-header.c
+++ b/plugins/email-custom-header/email-custom-header.c
@@ -35,6 +35,9 @@
#include "e-util/e-util.h"
#include "email-custom-header.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define d(x)
#define GCONF_KEY_CUSTOM_HEADER "/apps/evolution/eplugin/email_custom_header/customHeader"
@@ -347,7 +350,7 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch)
gtk_misc_set_alignment (GTK_MISC (priv->header_type_name_label), 0, 0.5);
gtk_widget_show (priv->header_type_name_label);
- sub_combo_box.header_value_combo_box = gtk_combo_box_new_text ();
+ sub_combo_box.header_value_combo_box = gtk_combo_box_text_new ();
g_array_append_val (priv->combo_box_header_value, sub_combo_box);
}
@@ -370,13 +373,17 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch)
break;
}
}
- gtk_combo_box_append_text (GTK_COMBO_BOX (sub_combo_box_ptr->header_value_combo_box),
- str);
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (
+ sub_combo_box_ptr->header_value_combo_box), str);
}
/* Translators: "None" as an email custom header option in a dialog invoked by Insert->Custom Header from Composer,
indicating the header will not be added to a mail message */
- gtk_combo_box_append_text (GTK_COMBO_BOX (sub_combo_box_ptr->header_value_combo_box), C_("email-custom-header", "None"));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (
+ sub_combo_box_ptr->header_value_combo_box),
+ C_("email-custom-header", "None"));
gtk_widget_show (sub_combo_box_ptr->header_value_combo_box);
}
}
diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c
index e55333064a..5f4bf3fc57 100644
--- a/plugins/google-account-setup/google-contacts-source.c
+++ b/plugins/google-account-setup/google-contacts-source.c
@@ -37,6 +37,9 @@
#include "google-contacts-source.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
void
ensure_google_contacts_source_group (void)
{
@@ -330,11 +333,11 @@ plugin_google_contacts (EPlugin *epl,
gtk_spin_button_set_value (GTK_SPIN_BUTTON (interval_sb), time);
gtk_box_pack_start (GTK_BOX (hbox), interval_sb, FALSE, FALSE, 0);
- interval_combo = gtk_combo_box_new_text ();
- gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("minutes"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("hours"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("days"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("weeks"));
+ interval_combo = gtk_combo_box_text_new ();
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (interval_combo), _("minutes"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (interval_combo), _("hours"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (interval_combo), _("days"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (interval_combo), _("weeks"));
gtk_combo_box_set_active (GTK_COMBO_BOX (interval_combo), type);
gtk_box_pack_start (GTK_BOX (hbox), interval_combo, FALSE, FALSE, 0);
diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c
index b6bc9422a7..89bec64276 100644
--- a/plugins/publish-calendar/url-editor-dialog.c
+++ b/plugins/publish-calendar/url-editor-dialog.c
@@ -29,6 +29,9 @@
#include <e-util/e-util.h>
#include <e-util/e-util-private.h>
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
static GtkDialogClass *parent_class = NULL;
static void
@@ -572,7 +575,7 @@ url_editor_dialog_run (UrlEditorDialog *dialog)
for (p = l; p; p = g_slist_next (p))
dialog->uri->events = g_slist_append (dialog->uri->events, g_strdup (e_source_peek_uid (p->data)));
}
- gtk_widget_hide_all (GTK_WIDGET (dialog));
+ gtk_widget_hide (GTK_WIDGET (dialog));
return response == GTK_RESPONSE_OK;
}
diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c
index 064b31f90e..5bbf3afc40 100644
--- a/smime/gui/e-cert-selector.c
+++ b/smime/gui/e-cert-selector.c
@@ -37,6 +37,9 @@
#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
struct _ECertSelectorPrivate {
CERTCertList *certlist;
@@ -184,7 +187,7 @@ e_cert_selector_new (gint type, const gchar *currentid)
node = CERT_LIST_HEAD (certlist);
while (!CERT_LIST_END (node, certlist)) {
if (node->cert->nickname || node->cert->emailAddr) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (p->combobox), node->cert->nickname?node->cert->nickname:node->cert->emailAddr);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (p->combobox), node->cert->nickname?node->cert->nickname:node->cert->emailAddr);
if (currentid != NULL
&& ((node->cert->nickname != NULL && strcmp (node->cert->nickname, currentid) == 0)
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index d1b61e0857..d632795f66 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -30,6 +30,9 @@
#include "e-attachment-icon-view.h"
#include "e-attachment-tree-view.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_ATTACHMENT_PANED_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_ATTACHMENT_PANED, EAttachmentPanedPrivate))
@@ -612,10 +615,12 @@ e_attachment_paned_init (EAttachmentPaned *paned)
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- widget = gtk_combo_box_new_text ();
+ widget = gtk_combo_box_text_new ();
gtk_size_group_add_widget (size_group, widget);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Icon View"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("List View"));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (widget), _("Icon View"));
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (widget), _("List View"));
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
paned->priv->combo_box = g_object_ref (widget);
gtk_widget_show (widget);
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 4954ccff2e..01b70e4afc 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1572,14 +1572,14 @@ static void
rebuild_time_popup (EDateEdit *dedit)
{
EDateEditPrivate *priv;
- GtkComboBox *combo;
+ GtkComboBoxText *combo;
gchar buffer[40];
struct tm tmp_tm;
gint hour, min;
priv = dedit->priv;
- combo = GTK_COMBO_BOX (priv->time_combo);
+ combo = GTK_COMBO_BOX_TEXT (priv->time_combo);
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (combo)));
@@ -1624,7 +1624,7 @@ rebuild_time_popup (EDateEdit *dedit)
if (!priv->use_24_hour_format && buffer[0] == '0')
buffer[0] = ' ';
- gtk_combo_box_append_text (combo, buffer);
+ gtk_combo_box_text_append_text (combo, buffer);
}
}
}