/pidgin/main: a24713d9bbb3: Fix GTK+3 compile.
Elliott Sales de Andrade
qulogic at pidgin.im
Wed Aug 15 00:51:52 EDT 2012
Changeset: a24713d9bbb3af8f6263195b83de54b5202073b5
Author: Elliott Sales de Andrade <qulogic at pidgin.im>
Date: 2012-08-14 23:26 -0400
Branch: default
URL: http://hg.pidgin.im/pidgin/main/rev/a24713d9bbb3
Description:
Fix GTK+3 compile.
diffstat:
pidgin/gtk3compat.h | 1 +
pidgin/gtkaccount.c | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diffs (50 lines):
diff --git a/pidgin/gtk3compat.h b/pidgin/gtk3compat.h
--- a/pidgin/gtk3compat.h
+++ b/pidgin/gtk3compat.h
@@ -36,6 +36,7 @@
#define GtkComboBoxText GtkComboBox
#define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
#define gtk_combo_box_text_new gtk_combo_box_new_text
+#define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
#define gtk_combo_box_text_append_text gtk_combo_box_append_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
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -917,12 +917,13 @@ add_protocol_options(AccountPrefsDialog
if (str_hints)
{
const GSList *hint_it = str_hints;
- entry = gtk_combo_box_entry_new_text();
+ entry = gtk_combo_box_text_new_with_entry();
while (hint_it)
{
const gchar *hint = hint_it->data;
- hint_it = g_list_next(hint_it);
- gtk_combo_box_append_text(GTK_COMBO_BOX(entry), hint);
+ hint_it = g_slist_next(hint_it);
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(entry),
+ hint);
}
}
else
@@ -941,7 +942,8 @@ add_protocol_options(AccountPrefsDialog
}
if (str_value != NULL && str_hints)
- gtk_entry_set_text(GTK_ENTRY(GTK_BIN(entry)->child), str_value);
+ gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry))),
+ str_value);
else
gtk_entry_set_text(GTK_ENTRY(entry), str_value);
@@ -1474,7 +1476,7 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
switch (opt_entry->type) {
case PURPLE_PREF_STRING:
if (GTK_IS_COMBO_BOX(opt_entry->widget))
- value = gtk_combo_box_get_active_text(GTK_COMBO_BOX(opt_entry->widget));
+ value = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(opt_entry->widget));
else
value = gtk_entry_get_text(GTK_ENTRY(opt_entry->widget));
purple_account_set_string(account, opt_entry->setting, value);
More information about the Commits
mailing list