pidgin/gtkutils.c

changeset 24859
8bcb3e2fc210
parent 24672
3e12ba88e3b9
child 24860
c1b734a8f4fc
child 25132
3e760a7a5981
equal deleted inserted replaced
24858:13177815fd88 24859:8bcb3e2fc210
3274 #endif 3274 #endif
3275 3275
3276 static void 3276 static void
3277 combo_box_changed_cb(GtkComboBox *combo_box, GtkEntry *entry) 3277 combo_box_changed_cb(GtkComboBox *combo_box, GtkEntry *entry)
3278 { 3278 {
3279 #if GTK_CHECK_VERSION(2, 6, 0)
3279 char *text = gtk_combo_box_get_active_text(combo_box); 3280 char *text = gtk_combo_box_get_active_text(combo_box);
3281 #else
3282 GtkWidget *widget = gtk_bin_get_child(GTK_BIN(combo_box));
3283 char *text = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
3284 #endif
3285
3280 gtk_entry_set_text(entry, text ? text : ""); 3286 gtk_entry_set_text(entry, text ? text : "");
3281 g_free(text); 3287 g_free(text);
3282 } 3288 }
3283 3289
3284 static gboolean 3290 static gboolean

mercurial