summaryrefslogtreecommitdiff
path: root/libslab/app-resizer.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-15 16:34:24 +0300
committermonsta <[email protected]>2016-01-15 16:34:24 +0300
commitc04a7d200ae5719ee1ce78aab692007b37003b0b (patch)
tree692fe3506a0bfabaf0779668db854ac1ef6a75b4 /libslab/app-resizer.c
parent25ae262342f5f0011bd43a824ab41803f4233049 (diff)
downloadmate-control-center-c04a7d200ae5719ee1ce78aab692007b37003b0b.tar.bz2
mate-control-center-c04a7d200ae5719ee1ce78aab692007b37003b0b.tar.xz
[GTK+3] libslab: use function from GtkScrollable instead of GtkLayout
Diffstat (limited to 'libslab/app-resizer.c')
-rw-r--r--libslab/app-resizer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libslab/app-resizer.c b/libslab/app-resizer.c
index 8c0aead7..1ffeb7e5 100644
--- a/libslab/app-resizer.c
+++ b/libslab/app-resizer.c
@@ -305,7 +305,14 @@ app_resizer_new (GtkVBox * child, gint initial_num_columns, gboolean homogeneous
void
app_resizer_set_vadjustment_value (GtkWidget * widget, gdouble value)
{
- GtkAdjustment *adjust = gtk_layout_get_vadjustment (GTK_LAYOUT (widget));
+ GtkAdjustment *adjust;
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+ adjust = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (widget));
+#else
+ adjust = gtk_layout_get_vadjustment (GTK_LAYOUT (widget));
+#endif
+
gdouble upper = gtk_adjustment_get_upper (adjust);
gdouble page_size = gtk_adjustment_get_page_size (adjust);
if (value > upper - page_size)