X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/fc6640a9a62f2914a020242ca41a42371650099a..db771541ff9b86b3ef5e204d5d5d659ccf66e7e6:/src/vik_compat.h diff --git a/src/vik_compat.h b/src/vik_compat.h index c8ccd8df..0a1b8996 100644 --- a/src/vik_compat.h +++ b/src/vik_compat.h @@ -23,6 +23,7 @@ #define __VIKING_COMPAT_H #include +#include G_BEGIN_DECLS @@ -31,6 +32,18 @@ G_BEGIN_DECLS GMutex * vik_mutex_new (); void vik_mutex_free (GMutex *mutex); +/* + * Since combo boxes are used in various places + * keep the code reasonably tidy and only have one ifdef to cater for the naming variances + */ +#if GTK_CHECK_VERSION (2, 24, 0) +#define vik_combo_box_text_new gtk_combo_box_text_new +#define vik_combo_box_text_append(X,Y) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(X),Y) +#else +#define vik_combo_box_text_new gtk_combo_box_new_text +#define vik_combo_box_text_append(X,Y) gtk_combo_box_append_text(GTK_COMBO_BOX(X),Y) +#endif + G_END_DECLS #endif