diff --git a/include/Desktop/compat.h b/include/Desktop/compat.h index 2f361dd..b89cda5 100644 --- a/include/Desktop/compat.h +++ b/include/Desktop/compat.h @@ -110,4 +110,8 @@ void gdk_window_clear(GdkWindow * window); GtkWidget * gtk_box_new(GtkOrientation orientation, gint spacing); # endif +# if !GTK_CHECK_VERSION(3, 0, 0) +GtkWidget * gtk_paned_new(GtkOrientation orientation); +# endif + #endif /* !LIBDESKTOP_DESKTOP_COMPAT_H */ diff --git a/src/compat.c b/src/compat.c index ec2ae92..83c2d5d 100644 --- a/src/compat.c +++ b/src/compat.c @@ -61,3 +61,19 @@ GtkWidget * gtk_box_new(GtkOrientation orientation, gint spacing) } } #endif + + +#if !GTK_CHECK_VERSION(3, 0, 0) +/* gtk_paned_new */ +GtkWidget * gtk_paned_new(GtkOrientation orientation) +{ + switch(orientation) + { + case GTK_ORIENTATION_HORIZONTAL: + return gtk_hpaned_new(); + case GTK_ORIENTATION_VERTICAL: + default: + return gtk_vpaned_new(); + } +} +#endif