Added back support for versions of GTK pre 2.24

Some functions in combo_box_with_model_and_entry() are only
available to GTK 2.24 and newer. This patch adds only one #if branch,
but probably adds support to a number of outdated distributions,
such as Debian 6.0.4 and Ubuntu 10.04.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2013-02-28 00:54:32 +02:00 committed by Dirk Hohndel
parent 9e8aaad133
commit a31af7419f

View file

@ -439,8 +439,13 @@ GtkWidget *combo_box_with_model_and_entry(GtkListStore *model)
GtkWidget *widget;
GtkEntryCompletion *completion;
#if GTK_CHECK_VERSION(2,24,0)
widget = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(model));
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(widget), 0);
#else
widget = gtk_combo_box_entry_new_with_model(GTK_TREE_MODEL(model), 0);
gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(widget), 0);
#endif
completion = gtk_entry_completion_new();
gtk_entry_completion_set_text_column(completion, 0);