[Xfce4-commits] [apps/xfce4-screensaver] 222/425: GTK3: don't use deprecated gtk_widget_size_request
noreply at xfce.org
noreply at xfce.org
Mon Oct 15 01:51:09 CEST 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screensaver.
commit 1ddc241afa5cff81bac8876869974cb43f9cbf2e
Author: Wolfgang Ulbrich <chat-to-me at raveit.de>
Date: Thu Dec 10 20:38:45 2015 +0100
GTK3: don't use deprecated gtk_widget_size_request
---
savers/gs-theme-window.c | 4 ++++
src/gs-window-x11.c | 4 ++++
src/mate-screensaver-preferences.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/savers/gs-theme-window.c b/savers/gs-theme-window.c
index 089a7f2..70ac063 100644
--- a/savers/gs-theme-window.c
+++ b/savers/gs-theme-window.c
@@ -200,7 +200,11 @@ gs_theme_window_real_realize (GtkWidget *widget)
exit (1);
}
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_get_preferred_size (widget, &requisition, NULL);
+#else
gtk_widget_size_request (widget, &requisition);
+#endif
allocation.x = x;
allocation.y = y;
allocation.width = width;
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index ee7b197..20acf82 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -2460,7 +2460,11 @@ gs_window_real_size_request (GtkWidget *widget,
if (child && gtk_widget_get_visible (child))
{
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_get_preferred_size (child, requisition, NULL);
+#else
gtk_widget_size_request (child, requisition);
+#endif
}
old_geometry = window->priv->geometry;
diff --git a/src/mate-screensaver-preferences.c b/src/mate-screensaver-preferences.c
index b719f38..19db7d5 100644
--- a/src/mate-screensaver-preferences.c
+++ b/src/mate-screensaver-preferences.c
@@ -1212,7 +1212,11 @@ constrain_list_size (GtkWidget *widget,
/* constrain height to be the tree height up to a max */
max_height = (gdk_screen_get_height (gtk_widget_get_screen (widget))) / 4;
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_get_preferred_size (to_size, &req, NULL);
+#else
gtk_widget_size_request (to_size, &req);
+#endif
requisition->height = MIN (req.height, max_height);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list