X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/fc6640a9a62f2914a020242ca41a42371650099a..19167d1050f10767918e393e403955c43cf6704e:/src/vik_compat.h diff --git a/src/vik_compat.h b/src/vik_compat.h index c8ccd8df..46ed7ba3 100644 --- a/src/vik_compat.h +++ b/src/vik_compat.h @@ -23,14 +23,31 @@ #define __VIKING_COMPAT_H #include +#include G_BEGIN_DECLS +#if !GLIB_CHECK_VERSION(2,26,0) +typedef struct stat GStatBuf; +#endif + // Hide ifdef complexities of function variants here 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