Additional fix for Gtk+ < 2.24

This commit is contained in:
Pierre Pronchery 2012-03-15 00:52:47 +00:00
parent b4788f5312
commit 831fb5eb77

View File

@ -276,12 +276,12 @@ Editor * editor_new(void)
#if GTK_CHECK_VERSION(2, 24, 0)
editor->fi_text = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(
editor->fi_store));
editor->fi_entry = gtk_bin_get_child(GTK_BIN(editor->fi_text));
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(editor->fi_text), 0);
#else
/* XXX the combo box is useless here */
editor->fi_text = gtk_combo_box_new_with_entry();
editor->fi_text = gtk_entry_new();
editor->fi_entry = editor->fi_text;
#endif
editor->fi_entry = gtk_bin_get_child(GTK_BIN(editor->fi_text));
g_signal_connect_swapped(editor->fi_entry, "activate", G_CALLBACK(
_editor_on_find_clicked), editor);
gtk_box_pack_start(GTK_BOX(hbox), editor->fi_text, FALSE, TRUE, 0);