diff options
author | Wu Xiaotian <[email protected]> | 2019-09-11 21:42:09 +0800 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-09-14 22:27:42 -0400 |
commit | 60894665c424ff487caf294b9cd5f72c753a4a4f (patch) | |
tree | 2cd7e05740bc0de95066854b7a44c0faed29d27b /applets/clock/calendar-window.c | |
parent | 82febf351bae5e8872bb6d8fb4649207f7182f0c (diff) | |
download | mate-panel-60894665c424ff487caf294b9cd5f72c753a4a4f.tar.bz2 mate-panel-60894665c424ff487caf294b9cd5f72c753a4a4f.tar.xz |
clock: avoid deprecated g_type_class_add_private
Diffstat (limited to 'applets/clock/calendar-window.c')
-rw-r--r-- | applets/clock/calendar-window.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c index e230088d..d47189d6 100644 --- a/applets/clock/calendar-window.c +++ b/applets/clock/calendar-window.c @@ -39,8 +39,6 @@ #include "clock-utils.h" #include "clock-typebuiltins.h" -#define CALENDAR_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CALENDAR_TYPE_WINDOW, CalendarWindowPrivate)) - #define KEY_LOCATIONS_EXPANDED "expand-locations" enum { @@ -64,7 +62,7 @@ struct _CalendarWindowPrivate { GSettings *settings; }; -G_DEFINE_TYPE (CalendarWindow, calendar_window, GTK_TYPE_WINDOW) +G_DEFINE_TYPE_WITH_PRIVATE (CalendarWindow, calendar_window, GTK_TYPE_WINDOW) enum { PROP_0, @@ -423,8 +421,6 @@ calendar_window_class_init (CalendarWindowClass *klass) gobject_class->dispose = calendar_window_dispose; - g_type_class_add_private (klass, sizeof (CalendarWindowPrivate)); - signals[EDIT_LOCATIONS] = g_signal_new ("edit-locations", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_FIRST, @@ -475,7 +471,7 @@ calendar_window_init (CalendarWindow *calwin) { GtkWindow *window; - calwin->priv = CALENDAR_WINDOW_GET_PRIVATE (calwin); + calwin->priv = calendar_window_get_instance_private (calwin); window = GTK_WINDOW (calwin); gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DOCK); |