pidgin/gtkutils.c

changeset 24860
c1b734a8f4fc
parent 24859
8bcb3e2fc210
child 25119
d78a152554c4
child 25140
7c494d2bc5e4
child 25152
128b99dfb286
equal deleted inserted replaced
24859:8bcb3e2fc210 24860:c1b734a8f4fc
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)
3280 char *text = gtk_combo_box_get_active_text(combo_box); 3279 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
3286 gtk_entry_set_text(entry, text ? text : ""); 3280 gtk_entry_set_text(entry, text ? text : "");
3287 g_free(text); 3281 g_free(text);
3288 } 3282 }
3289 3283
3290 static gboolean 3284 static gboolean

mercurial