From 74f608e462c9ac492426a3f408b9002b4b733e2a Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Thu, 17 Dec 2015 16:06:25 +0100 Subject: GTK3: wheather: fix deprecated gtk_widget_size_request + GtkMisc --- mateweather/mateweather-applet.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mateweather/mateweather-applet.c') 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 -- cgit v1.2.1