Add compatibility code for GtkPaned
This commit is contained in:
parent
b45612b029
commit
8dc664681d
|
@ -110,4 +110,8 @@ void gdk_window_clear(GdkWindow * window);
|
||||||
GtkWidget * gtk_box_new(GtkOrientation orientation, gint spacing);
|
GtkWidget * gtk_box_new(GtkOrientation orientation, gint spacing);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# if !GTK_CHECK_VERSION(3, 0, 0)
|
||||||
|
GtkWidget * gtk_paned_new(GtkOrientation orientation);
|
||||||
|
# endif
|
||||||
|
|
||||||
#endif /* !LIBDESKTOP_DESKTOP_COMPAT_H */
|
#endif /* !LIBDESKTOP_DESKTOP_COMPAT_H */
|
||||||
|
|
16
src/compat.c
16
src/compat.c
|
@ -61,3 +61,19 @@ GtkWidget * gtk_box_new(GtkOrientation orientation, gint spacing)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user