diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-02-28 00:54:32 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-27 15:04:06 -0800 |
commit | a31af7419f6c2d8c31d691508a5122fff751e010 (patch) | |
tree | e656a8e116699f9e76258a439bcd8c461020b06f /gtk-gui.c | |
parent | 9e8aaad133736dfc35d8a5163befd7e7196a3b19 (diff) | |
download | subsurface-a31af7419f6c2d8c31d691508a5122fff751e010.tar.gz |
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>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r-- | gtk-gui.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |