X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fcompat.h;fp=src%2Fcompat.h;h=2e8b4e653ea44c28afd7a10564eb31e844388ded;hp=0000000000000000000000000000000000000000;hb=5c17e7d79895982036139dcffb5c17cefb1d4d9f;hpb=76a55b4ceb4d3326a7345c0ee13416fdaeb75070 diff --git a/src/compat.h b/src/compat.h new file mode 100644 index 0000000..2e8b4e6 --- /dev/null +++ b/src/compat.h @@ -0,0 +1,10 @@ +#include + +#if ! GTK_CHECK_VERSION(3,0,0) +static inline GtkWidget *gtk_box_new(GtkOrientation orientation, gint spacing) +{ + return orientation == GTK_ORIENTATION_HORIZONTAL + ? gtk_hbox_new(0, spacing) + : gtk_vbox_new(0, spacing); +} +#endif