summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applets/clock/clock-face.c4
-rw-r--r--applets/clock/clock.c4
-rw-r--r--mate-panel/applet.c4
-rw-r--r--mate-panel/panel-frame.c4
-rw-r--r--mate-panel/panel-toplevel.c8
5 files changed, 24 insertions, 0 deletions
diff --git a/applets/clock/clock-face.c b/applets/clock/clock-face.c
index 333af62f..25c0b182 100644
--- a/applets/clock/clock-face.c
+++ b/applets/clock/clock-face.c
@@ -267,7 +267,11 @@ clock_face_size_request (GtkWidget *this,
GtkRequisition req;
/* Tie our size to the height of the size_widget */
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (GTK_WIDGET (priv->size_widget), &req, NULL);
+#else
gtk_widget_size_request (GTK_WIDGET (priv->size_widget), &req);
+#endif
/* Pad out our height by a little bit - this improves
the balance */
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 78b92c07..0722e4ad 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -840,7 +840,11 @@ position_calendar_popup (ClockData *cd)
&x, &y);
gtk_window_get_size (GTK_WINDOW (cd->calendar_popup), &w, &h);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (cd->calendar_popup, &req, NULL);
+#else
gtk_widget_size_request (cd->calendar_popup, &req);
+#endif
w = req.width;
h = req.height;
diff --git a/mate-panel/applet.c b/mate-panel/applet.c
index 24c028de..ce637d29 100644
--- a/mate-panel/applet.c
+++ b/mate-panel/applet.c
@@ -610,7 +610,11 @@ mate_panel_applet_position_menu (GtkMenu *menu,
screen = gtk_widget_get_screen (applet);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL);
+#else
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+#endif
gdk_window_get_origin (gtk_widget_get_window (applet), &menu_x, &menu_y);
gtk_widget_get_pointer (applet, &pointer_x, &pointer_y);
diff --git a/mate-panel/panel-frame.c b/mate-panel/panel-frame.c
index 7311e945..d5a369b6 100644
--- a/mate-panel/panel-frame.c
+++ b/mate-panel/panel-frame.c
@@ -53,7 +53,11 @@ panel_frame_size_request (GtkWidget *widget,
child = gtk_bin_get_child (bin);
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
requisition->width += border_width;
requisition->height += border_width;
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index 0ea04bfd..3c21135b 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -2985,7 +2985,11 @@ panel_toplevel_check_resize (GtkContainer *container)
requisition.width = -1;
requisition.height = -1;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (widget, &requisition, NULL);
+#else
gtk_widget_size_request (widget, &requisition);
+#endif
gtk_widget_get_allocation (widget, &widget_allocation);
if (widget_allocation.width != requisition.width ||
@@ -3016,7 +3020,11 @@ panel_toplevel_size_request (GtkWidget *widget,
child = gtk_bin_get_child (bin);
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 = toplevel->priv->geometry;