From a31af7419f6c2d8c31d691508a5122fff751e010 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Thu, 28 Feb 2013 00:54:32 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- gtk-gui.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk-gui.c b/gtk-gui.c index 8f36a133b..adff9e068 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -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); -- cgit v1.2.3-70-g09d2