From dba401f22f4aa533d74bb5429e807fbc3c42ec00 Mon Sep 17 00:00:00 2001 From: infirit Date: Sun, 23 Nov 2014 11:23:52 +0100 Subject: Gtk3: Silence GtkBox deprecation warnings --- applets/clock/calendar-window.c | 6 ++++++ applets/clock/clock-location.c | 6 ++++++ applets/clock/clock.c | 4 ++++ 3 files changed, 16 insertions(+) (limited to 'applets/clock') diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c index fe61ce58..2a6de2f1 100644 --- a/applets/clock/calendar-window.c +++ b/applets/clock/calendar-window.c @@ -31,6 +31,7 @@ #include #include +#include #define MATE_DESKTOP_USE_UNSTABLE_API #include @@ -45,6 +46,11 @@ #define KEY_LOCATIONS_EXPANDED "expand-locations" +#if GTK_CHECK_VERSION (3, 0, 0) +#define gtk_vbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_VERTICAL, Y) +#define gtk_hbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL, Y) +#endif + enum { EDIT_LOCATIONS, LAST_SIGNAL diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c index ca785889..bcebb538 100644 --- a/applets/clock/clock-location.c +++ b/applets/clock/clock-location.c @@ -15,6 +15,7 @@ #include #include +#include #ifdef HAVE_NETWORK_MANAGER #include @@ -27,6 +28,11 @@ #include "set-timezone.h" #include "system-timezone.h" +#if GTK_CHECK_VERSION (3, 0, 0) +#define gtk_vbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_VERTICAL, Y) +#define gtk_hbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL, Y) +#endif + G_DEFINE_TYPE (ClockLocation, clock_location, G_TYPE_OBJECT) typedef struct { diff --git a/applets/clock/clock.c b/applets/clock/clock.c index 586f857d..4d897656 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -85,6 +85,10 @@ #define KEY_TEMPERATURE_UNIT "temperature-unit" #define KEY_SPEED_UNIT "speed-unit" +#if GTK_CHECK_VERSION (3, 0, 0) +#define gtk_vbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_VERTICAL, Y) +#endif + enum { COL_CITY_NAME = 0, COL_CITY_TZ, -- cgit v1.2.1