Add compatibility code for GtkPaned

This commit is contained in:
Pierre Pronchery 2015-11-03 00:42:03 +01:00
parent b45612b029
commit 8dc664681d
2 changed files with 20 additions and 0 deletions

View File

@ -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 */

View File

@ -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