From 6bab762efb1b6a9f609650d3934bec09527360f8 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Mon, 20 Jan 2014 16:15:52 +0100 Subject: sound-theme: Add GTK3 support --- sound-theme/gvc-sound-theme-chooser.c | 4 ++++ sound-theme/gvc-sound-theme-chooser.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/sound-theme/gvc-sound-theme-chooser.c b/sound-theme/gvc-sound-theme-chooser.c index e423423..7cd3ece 100644 --- a/sound-theme/gvc-sound-theme-chooser.c +++ b/sound-theme/gvc-sound-theme-chooser.c @@ -54,7 +54,11 @@ static void gvc_sound_theme_chooser_class_init (GvcSoundThemeChooserClass *k static void gvc_sound_theme_chooser_init (GvcSoundThemeChooser *sound_theme_chooser); static void gvc_sound_theme_chooser_finalize (GObject *object); +#if GTK_CHECK_VERSION (3, 0, 0) +G_DEFINE_TYPE (GvcSoundThemeChooser, gvc_sound_theme_chooser, GTK_TYPE_BOX) +#else G_DEFINE_TYPE (GvcSoundThemeChooser, gvc_sound_theme_chooser, GTK_TYPE_VBOX) +#endif #define KEY_SOUNDS_SCHEMA "org.mate.sound" #define EVENT_SOUNDS_KEY "event-sounds" diff --git a/sound-theme/gvc-sound-theme-chooser.h b/sound-theme/gvc-sound-theme-chooser.h index 026dd7c..c7bfac0 100644 --- a/sound-theme/gvc-sound-theme-chooser.h +++ b/sound-theme/gvc-sound-theme-chooser.h @@ -36,13 +36,21 @@ typedef struct GvcSoundThemeChooserPrivate GvcSoundThemeChooserPrivate; typedef struct { +#if GTK_CHECK_VERSION (3, 0, 0) + GtkBox parent; +#else GtkVBox parent; +#endif GvcSoundThemeChooserPrivate *priv; } GvcSoundThemeChooser; typedef struct { +#if GTK_CHECK_VERSION (3, 0, 0) + GtkBoxClass parent_class; +#else GtkVBoxClass parent_class; +#endif } GvcSoundThemeChooserClass; GType gvc_sound_theme_chooser_get_type (void); -- cgit v1.2.1