diff options
author | raveit65 <[email protected]> | 2016-05-31 14:54:15 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-05-31 14:54:15 +0200 |
commit | 956b94160dc0340d8aac765d96ac5c3de0b18f53 (patch) | |
tree | b54ec68d085272cd39a336b356ac40a5965c1a5f /src/gpm-backlight.c | |
parent | bf7af908d6cc1f4d6517c01d27f417fe09743416 (diff) | |
download | mate-power-manager-956b94160dc0340d8aac765d96ac5c3de0b18f53.tar.bz2 mate-power-manager-956b94160dc0340d8aac765d96ac5c3de0b18f53.tar.xz |
GTK+3: do not use deprecated gtk_widget_size_request
Diffstat (limited to 'src/gpm-backlight.c')
-rw-r--r-- | src/gpm-backlight.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c index 93e4567..dbb6fe8 100644 --- a/src/gpm-backlight.c +++ b/src/gpm-backlight.c @@ -38,6 +38,7 @@ #endif /* HAVE_UNISTD_H */ #include <glib/gi18n.h> +#include <gtk/gtk.h> #include <dbus/dbus-glib.h> #include <libupower-glib/upower.h> @@ -54,6 +55,10 @@ #include "gpm-stock-icons.h" #include "egg-console-kit.h" +#if !GTK_CHECK_VERSION(3,0,0) +#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y) +#endif + #define GPM_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_BACKLIGHT, GpmBacklightPrivate)) struct GpmBacklightPrivate @@ -216,7 +221,7 @@ gpm_backlight_dialog_show (GpmBacklight *backlight) * know its true size, yet, so we need to jump through hoops */ gtk_window_get_default_size (GTK_WINDOW (backlight->priv->popup), &orig_w, &orig_h); - gtk_widget_size_request (backlight->priv->popup, &win_req); + gtk_widget_get_preferred_size (backlight->priv->popup, NULL, &win_req); if (win_req.width > orig_w) { orig_w = win_req.width; |