summaryrefslogtreecommitdiff
path: root/eel/eel-image-table.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-01-09 22:08:17 +0800
committerlukefromdc <[email protected]>2019-01-12 01:43:18 +0000
commit3eb0ff8e1f03d27d7fd5ea6c3f8e699a54d31a4c (patch)
tree6ec60c398e7c536658b67b08d43dbb63b62c8a13 /eel/eel-image-table.c
parent9fc6f1f3314f2511249af0a7ce04a255a57c0066 (diff)
downloadcaja-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-image-table.c')
-rw-r--r--eel/eel-image-table.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/eel/eel-image-table.c b/eel/eel-image-table.c
index 31cec4dd..f7da635c 100644
--- a/eel/eel-image-table.c
+++ b/eel/eel-image-table.c
@@ -40,7 +40,7 @@ enum
};
/* Detail member struct */
-struct EelImageTableDetails
+struct EelImageTablePrivate
{
GtkWidget *child_under_pointer;
GtkWidget *child_being_pressed;
@@ -85,16 +85,15 @@ static int ancestor_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer event_data);
-G_DEFINE_TYPE (EelImageTable, eel_image_table, EEL_TYPE_WRAP_TABLE)
+G_DEFINE_TYPE_WITH_CODE (EelImageTable, eel_image_table, EEL_TYPE_WRAP_TABLE,
+ G_ADD_PRIVATE (EelImageTable))
static void
eel_image_table_init (EelImageTable *image_table)
{
gtk_widget_set_has_window (GTK_WIDGET (image_table), FALSE);
- image_table->details = G_TYPE_INSTANCE_GET_PRIVATE (image_table,
- EEL_TYPE_IMAGE_TABLE,
- EelImageTableDetails);
+ image_table->details = eel_image_table_get_instance_private (image_table);
}
/* GObjectClass methods */
@@ -292,7 +291,6 @@ eel_image_table_class_init (EelImageTableClass *image_table_class)
GTK_TYPE_WIDGET,
G_TYPE_POINTER);
- g_type_class_add_private (image_table_class, sizeof (EelImageTableDetails));
}
static void