diff options
author | Wu Xiaotian <[email protected]> | 2019-01-09 22:08:17 +0800 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-01-12 01:43:18 +0000 |
commit | 3eb0ff8e1f03d27d7fd5ea6c3f8e699a54d31a4c (patch) | |
tree | 6ec60c398e7c536658b67b08d43dbb63b62c8a13 /eel/eel-labeled-image.c | |
parent | 9fc6f1f3314f2511249af0a7ce04a255a57c0066 (diff) | |
download | caja-3eb0ff8e1f03d27d7fd5ea6c3f8e699a54d31a4c.tar.bz2 caja-3eb0ff8e1f03d27d7fd5ea6c3f8e699a54d31a4c.tar.xz |
[eel] Avoid deprecated g_type_class_add_private
With minimal changes to avoid deprecated g_type_class_add_private
Diffstat (limited to 'eel/eel-labeled-image.c')
-rw-r--r-- | eel/eel-labeled-image.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/eel/eel-labeled-image.c b/eel/eel-labeled-image.c index 1928d064..74faa4b5 100644 --- a/eel/eel-labeled-image.c +++ b/eel/eel-labeled-image.c @@ -66,7 +66,7 @@ enum }; /* Detail member struct */ -struct EelLabeledImageDetails +struct EelLabeledImagePrivate { GtkWidget *image; GtkWidget *label; @@ -104,16 +104,15 @@ static gboolean labeled_image_show_image (const EelLabeledImage static guint labeled_image_signals[LAST_SIGNAL] = { 0 }; -G_DEFINE_TYPE (EelLabeledImage, eel_labeled_image, GTK_TYPE_CONTAINER) +G_DEFINE_TYPE_WITH_CODE (EelLabeledImage, eel_labeled_image, GTK_TYPE_CONTAINER, + G_ADD_PRIVATE (EelLabeledImage)) static void eel_labeled_image_init (EelLabeledImage *labeled_image) { gtk_widget_set_has_window (GTK_WIDGET (labeled_image), FALSE); - labeled_image->details = G_TYPE_INSTANCE_GET_PRIVATE (labeled_image, - EEL_TYPE_LABELED_IMAGE, - EelLabeledImageDetails); + labeled_image->details = eel_labeled_image_get_instance_private (labeled_image); labeled_image->details->show_label = TRUE; labeled_image->details->show_image = TRUE; labeled_image->details->label_position = GTK_POS_BOTTOM; @@ -668,7 +667,6 @@ eel_labeled_image_class_init (EelLabeledImageClass *labeled_image_class) FALSE, G_PARAM_READWRITE)); - g_type_class_add_private (labeled_image_class, sizeof (EelLabeledImageDetails)); } /* Private EelLabeledImage methods */ |