summaryrefslogtreecommitdiff
path: root/applets/clock/calendar-window.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-26 14:38:46 +0200
committerStefano Karapetsas <[email protected]>2013-10-26 14:38:46 +0200
commit57c9c407461f47ec09f0a2a631601450a0209af6 (patch)
treebdc9160d2ac9c28d400dc80acd6a1bb4c2617bd4 /applets/clock/calendar-window.c
parent85ee20fe919a4824c538d9140f49db2320635d33 (diff)
downloadmate-panel-57c9c407461f47ec09f0a2a631601450a0209af6.tar.bz2
mate-panel-57c9c407461f47ec09f0a2a631601450a0209af6.tar.xz
clock: Add GTK3 support
Diffstat (limited to 'applets/clock/calendar-window.c')
-rw-r--r--applets/clock/calendar-window.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c
index 665ea150..fe61ce58 100644
--- a/applets/clock/calendar-window.c
+++ b/applets/clock/calendar-window.c
@@ -33,7 +33,7 @@
#include <gio/gio.h>
#define MATE_DESKTOP_USE_UNSTABLE_API
-#include <libmate/mate-desktop-utils.h>
+#include <libmate-desktop/mate-desktop-utils.h>
#include "calendar-window.h"
@@ -359,7 +359,11 @@ calendar_window_set_property (GObject *object,
}
static void
+#if GTK_CHECK_VERSION (3, 0, 0)
+calendar_window_dispose (GObject *object)
+#else
calendar_window_destroy (GtkObject *object)
+#endif
{
CalendarWindow *calwin;
@@ -369,20 +373,30 @@ calendar_window_destroy (GtkObject *object)
g_object_unref (calwin->priv->settings);
calwin->priv->settings = NULL;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ G_OBJECT_CLASS (calendar_window_parent_class)->dispose (object);
+#else
GTK_OBJECT_CLASS (calendar_window_parent_class)->destroy (object);
+#endif
}
static void
calendar_window_class_init (CalendarWindowClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+#if !GTK_CHECK_VERSION (3, 0, 0)
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
+#endif
gobject_class->constructor = calendar_window_constructor;
gobject_class->get_property = calendar_window_get_property;
- gobject_class->set_property = calendar_window_set_property;
+ gobject_class->set_property = calendar_window_set_property;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gobject_class->dispose = calendar_window_dispose;
+#else
gtkobject_class->destroy = calendar_window_destroy;
+#endif
g_type_class_add_private (klass, sizeof (CalendarWindowPrivate));