summaryrefslogtreecommitdiff
path: root/battstat/battstat_applet.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-26 14:59:01 +0100
committerinfirit <[email protected]>2014-11-26 18:13:43 +0100
commit7aebf38bbbe79c3a82fc4723f3fa4b01e230b0f1 (patch)
tree8bc45fd0079293b4a328d779d4d9ff23356f9900 /battstat/battstat_applet.c
parentd2d685818a85b773c49802c494a0c386917b5ee6 (diff)
downloadmate-applets-7aebf38bbbe79c3a82fc4723f3fa4b01e230b0f1.tar.bz2
mate-applets-7aebf38bbbe79c3a82fc4723f3fa4b01e230b0f1.tar.xz
Gtk3: don't use deprecated gtk_widget_size_request
Taken from gnome-panel commit: c05c6b07ec493d174062a06caf185d324fd6e0c4 From: Alberts Muktupāvels <[email protected]>
Diffstat (limited to 'battstat/battstat_applet.c')
-rw-r--r--battstat/battstat_applet.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c
index cd57e085..16216a9b 100644
--- a/battstat/battstat_applet.c
+++ b/battstat/battstat_applet.c
@@ -528,7 +528,11 @@ battery_low_update_text( ProgressData *battstat, BatteryStatus *info )
battstat->battery_low_dialog == NULL )
return;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (GTK_WIDGET (battstat->battery_low_label), NULL, &size);
+#else
gtk_widget_size_request( GTK_WIDGET( battstat->battery_low_label ), &size );
+#endif
/* If the label has never been set before, the width will be 0. If it
has been set before (width > 0) then we want to keep the size of