mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
32e497b574
commit
77ece3fccb
6 changed files with 84 additions and 99 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue