diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-27 16:40:01 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-28 13:17:44 -0800 |
commit | 77ece3fccb1a08ef8eea10a9f548bc6a4a3c889e (patch) | |
tree | 71dd23e661b88cf690779193a8579a3c6aaa944b /display-gtk.h | |
parent | 32e497b5744ef690e91b4a9f22a63109dde4c7df (diff) | |
download | subsurface-77ece3fccb1a08ef8eea10a9f548bc6a4a3c889e.tar.gz |
Clean up gtk combo box handling
This cleans up our handling of combo boxes and all the duplicated
completion logic, and simplifies the code.
In particular, we get rid of the deprecated GtkComboBoxEntry. While it
made some things easier, it made other things harder. Just using
GtkComboBox and setting that up correctly ends up being simpler, and
also makes the logic work with gtk-3.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display-gtk.h')
-rw-r--r-- | display-gtk.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/display-gtk.h b/display-gtk.h index df29ff1d8..cd8496d2a 100644 --- a/display-gtk.h +++ b/display-gtk.h @@ -72,6 +72,12 @@ extern GtkWidget *weightsystem_list_widget(int w_idx); extern GtkWidget *dive_list_create(void); extern void dive_list_destroy(void); +/* Helper functions for gtk combo boxes */ +extern GtkEntry *get_entry(GtkComboBox *); +extern const char *get_active_text(GtkComboBox *); +extern void set_active_text(GtkComboBox *, const char *); +extern GtkWidget *combo_box_with_model_and_entry(GtkListStore *); + extern gboolean icon_click_cb(GtkWidget *w, GdkEventButton *event, gpointer data); unsigned int amount_selected; |