mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
9e8aaad133
commit
a31af7419f
1 changed files with 5 additions and 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);
|
||||
|
|
Loading…
Add table
Reference in a new issue