summaryrefslogtreecommitdiff
path: root/mateweather/mateweather-applet.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-12-17 16:06:25 +0100
committerWolfgang Ulbrich <[email protected]>2015-12-17 16:06:25 +0100
commit74f608e462c9ac492426a3f408b9002b4b733e2a (patch)
treedf739093efc7d0f1fc635c636a768c1bbe5de363 /mateweather/mateweather-applet.c
parent2c985fd3b3a1690a5734bfc923a72bd4ee7381bd (diff)
downloadmate-applets-74f608e462c9ac492426a3f408b9002b4b733e2a.tar.bz2
mate-applets-74f608e462c9ac492426a3f408b9002b4b733e2a.tar.xz
GTK3: wheather: fix deprecated gtk_widget_size_request + GtkMisc
Diffstat (limited to 'mateweather/mateweather-applet.c')
-rw-r--r--mateweather/mateweather-applet.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mateweather/mateweather-applet.c b/mateweather/mateweather-applet.c
index 7a404025..a3fdfd73 100644
--- a/mateweather/mateweather-applet.c
+++ b/mateweather/mateweather-applet.c
@@ -152,7 +152,11 @@ static void place_widgets (MateWeatherApplet *gw_applet)
gw_applet->image = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_BUTTON);
if (icon_name != NULL) {
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_get_preferred_size (gw_applet->image, &req, NULL);
+#else
gtk_widget_size_request(gw_applet->image, &req);
+#endif
if (horizontal)
total_size += req.height;
else
@@ -168,7 +172,11 @@ static void place_widgets (MateWeatherApplet *gw_applet)
gtk_label_set_text(GTK_LABEL(gw_applet->label), temp);
/* Check the label size to determine box layout */
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_get_preferred_size (gw_applet->label, &req, NULL);
+#else
gtk_widget_size_request(gw_applet->label, &req);
+#endif
if (horizontal)
total_size += req.height;
else