From 2ce33ca53bc8b56f4cab9160197df44cc36082d4 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Thu, 11 Feb 2016 07:42:40 +0100 Subject: GTK+-3 clock: don't subclass deprecated GtkAlignment taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=c7ea765 --- applets/clock/clock-location-tile.c | 4 ++++ applets/clock/clock-location-tile.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c index 73c9ca87..f759596c 100644 --- a/applets/clock/clock-location-tile.c +++ b/applets/clock/clock-location-tile.c @@ -22,7 +22,11 @@ #define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) #endif +#if GTK_CHECK_VERSION (3, 0, 0) +G_DEFINE_TYPE (ClockLocationTile, clock_location_tile, GTK_TYPE_BIN) +#else G_DEFINE_TYPE (ClockLocationTile, clock_location_tile, GTK_TYPE_ALIGNMENT) +#endif enum { TILE_PRESSED, diff --git a/applets/clock/clock-location-tile.h b/applets/clock/clock-location-tile.h index 00ccb5a8..28dea2bf 100644 --- a/applets/clock/clock-location-tile.h +++ b/applets/clock/clock-location-tile.h @@ -21,12 +21,20 @@ extern "C" { typedef struct { +#if GTK_CHECK_VERSION (3, 0, 0) + GtkBin parent; +#else GtkAlignment parent; +#endif } ClockLocationTile; typedef struct { +#if GTK_CHECK_VERSION (3, 0, 0) + GtkBinClass parent_class; +#else GtkAlignmentClass parent_class; +#endif void (* tile_pressed) (ClockLocationTile *tile); int (* need_clock_format) (ClockLocationTile *tile); -- cgit v1.2.1