]> git.street.me.uk Git - andy/viking.git/blobdiff - src/uibuilder.h
[QA] Improve create zoom menu to use G_N_ELEMENTS to know array bounds.
[andy/viking.git] / src / uibuilder.h
index 24191d83e4dfcc3346f66c57d1e0abf0fece8059..9c147267dc2b7ac5f18b35dfc31dbefab09386d3 100644 (file)
@@ -157,6 +157,18 @@ VikLayerParamData *a_uibuilder_run_dialog ( const gchar *dialog_name, GtkWindow
 /* frees data from last (if ness) */
 void a_uibuilder_free_paramdatas ( VikLayerParamData *paramdatas, VikLayerParam *params, guint16 params_count );
 
+/*
+ * 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