# HG changeset patch # User Ryan Fan # Date 1228538110 0 # Node ID 8b429520f6c64252522b6d06094ad3a94f2e3dba # Parent 9fb7910c1176bef3293a5f3ad7ebf6413adc2a55 Patch to fix compatibility with ancient GTK+ (2.4 and earlier). Fixes #7582. committer: John Bailey diff -r 9fb7910c1176 -r 8b429520f6c6 pidgin/gtkutils.c --- a/pidgin/gtkutils.c Sat Dec 06 01:38:48 2008 +0000 +++ b/pidgin/gtkutils.c Sat Dec 06 04:35:10 2008 +0000 @@ -3276,7 +3276,13 @@ static void combo_box_changed_cb(GtkComboBox *combo_box, GtkEntry *entry) { +#if GTK_CHECK_VERSION(2, 6, 0) char *text = gtk_combo_box_get_active_text(combo_box); +#else + GtkWidget *widget = gtk_bin_get_child(GTK_BIN(combo_box)); + char *text = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); +#endif + gtk_entry_set_text(entry, text ? text : ""); g_free(text); }