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-wrap-table.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-wrap-table.c')
-rw-r--r-- | eel/eel-wrap-table.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/eel/eel-wrap-table.c b/eel/eel-wrap-table.c index be7cf9a7..52e1e2ab 100644 --- a/eel/eel-wrap-table.c +++ b/eel/eel-wrap-table.c @@ -42,7 +42,7 @@ enum }; /* Detail member struct */ -struct EelWrapTableDetails +struct EelWrapTablePrivate { guint x_spacing; guint y_spacing; @@ -70,16 +70,15 @@ static gboolean wrap_table_child_focus_in (GtkWidget *w static void wrap_table_layout (EelWrapTable *wrap_table); -G_DEFINE_TYPE (EelWrapTable, eel_wrap_table, GTK_TYPE_CONTAINER) +G_DEFINE_TYPE_WITH_CODE (EelWrapTable, eel_wrap_table, GTK_TYPE_CONTAINER, + G_ADD_PRIVATE (EelWrapTable)) static void eel_wrap_table_init (EelWrapTable *wrap_table) { gtk_widget_set_has_window (GTK_WIDGET (wrap_table), FALSE); - wrap_table->details = G_TYPE_INSTANCE_GET_PRIVATE (wrap_table, - EEL_TYPE_WRAP_TABLE, - EelWrapTableDetails); + wrap_table->details = eel_wrap_table_get_instance_private (wrap_table); wrap_table->details->x_justification = EEL_JUSTIFICATION_BEGINNING; wrap_table->details->y_justification = EEL_JUSTIFICATION_END; wrap_table->details->cols = 1; @@ -485,7 +484,6 @@ eel_wrap_table_class_init (EelWrapTableClass *wrap_table_class) g_param_spec_boolean ("homogeneous", NULL, NULL, FALSE, G_PARAM_READWRITE)); - g_type_class_add_private (wrap_table_class, sizeof (EelWrapTableDetails)); } /* Private EelWrapTable methods */ |