summaryrefslogtreecommitdiff
path: root/applets/clock
diff options
context:
space:
mode:
Diffstat (limited to 'applets/clock')
-rw-r--r--applets/clock/clock-face.c4
-rw-r--r--applets/clock/clock.c4
2 files changed, 8 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;