diff options
author | Wu Xiaotian <[email protected]> | 2019-01-26 21:46:37 +0800 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-01-29 20:18:27 +0000 |
commit | 46950f4bbedb593a4dc792b88c15977953904e2b (patch) | |
tree | 90c8630dc5a99483a3f6cea539ea4a2dc640c7c9 /libmate-desktop/mate-colorbutton.c | |
parent | 6d30b651e3f2ac1ac668c741e19d2fc1cde62b3e (diff) | |
download | mate-desktop-46950f4bbedb593a4dc792b88c15977953904e2b.tar.bz2 mate-desktop-46950f4bbedb593a4dc792b88c15977953904e2b.tar.xz |
Avoid deprecated g_type_class_add_private
Changed MateBgCrossfade, MateColorbutton and MateDesktopThumbnail
Diffstat (limited to 'libmate-desktop/mate-colorbutton.c')
-rw-r--r-- | libmate-desktop/mate-colorbutton.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libmate-desktop/mate-colorbutton.c b/libmate-desktop/mate-colorbutton.c index 8d3da3e..c4eee8b 100644 --- a/libmate-desktop/mate-colorbutton.c +++ b/libmate-desktop/mate-colorbutton.c @@ -44,8 +44,6 @@ #define CHECK_DARK (1.0 / 3.0) #define CHECK_LIGHT (2.0 / 3.0) -#define MATE_COLOR_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MATE_TYPE_COLOR_BUTTON, MateColorButtonPrivate)) - struct _MateColorButtonPrivate { GtkWidget *draw_area; /* Widget where we draw the color sample */ @@ -120,7 +118,7 @@ static guint color_button_signals[LAST_SIGNAL] = { 0 }; static const GtkTargetEntry drop_types[] = { { "application/x-color", 0, 0 } }; -G_DEFINE_TYPE (MateColorButton, mate_color_button, GTK_TYPE_BUTTON) +G_DEFINE_TYPE_WITH_PRIVATE (MateColorButton, mate_color_button, GTK_TYPE_BUTTON) static void mate_color_button_class_init (MateColorButtonClass *klass) @@ -222,8 +220,6 @@ mate_color_button_class_init (MateColorButtonClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - - g_type_class_add_private (gobject_class, sizeof (MateColorButtonPrivate)); } static gboolean @@ -414,7 +410,7 @@ mate_color_button_init (MateColorButton *color_button) _mate_desktop_init_i18n (); /* Create the widgets */ - color_button->priv = MATE_COLOR_BUTTON_GET_PRIVATE (color_button); + color_button->priv = mate_color_button_get_instance_private (color_button); alignment = gtk_alignment_new (0.5, 0.5, 0.5, 1.0); gtk_container_set_border_width (GTK_CONTAINER (alignment), 1); |