diff options
author | Wu Xiaotian <[email protected]> | 2019-01-26 12:35:44 +0800 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-01-31 19:37:54 +0000 |
commit | e99050ad48b89cb8e1a5eaafbb9fdf2ffd418485 (patch) | |
tree | 42ebc76b8668815a60a946ad2b9b4cc6b30c9e51 /src/caja-x-content-bar.c | |
parent | 7920f9788dc8a142472c358d693bb7532c46b609 (diff) | |
download | caja-e99050ad48b89cb8e1a5eaafbb9fdf2ffd418485.tar.bz2 caja-e99050ad48b89cb8e1a5eaafbb9fdf2ffd418485.tar.xz |
Avoid deprecated g_type_class_add_private under src
Changed CajaSidePane, CajaSpatialWindow, CajaViewAsAction and CajaXContentBar
Diffstat (limited to 'src/caja-x-content-bar.c')
-rw-r--r-- | src/caja-x-content-bar.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/caja-x-content-bar.c b/src/caja-x-content-bar.c index e38c75d8..73a58b70 100644 --- a/src/caja-x-content-bar.c +++ b/src/caja-x-content-bar.c @@ -32,9 +32,7 @@ #include <libcaja-private/caja-autorun.h> #include <libcaja-private/caja-icon-info.h> -#define CAJA_X_CONTENT_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAJA_TYPE_X_CONTENT_BAR, CajaXContentBarPrivate)) - -struct CajaXContentBarPrivate +struct _CajaXContentBarPrivate { GtkWidget *label; GtkWidget *button; @@ -50,7 +48,7 @@ enum PROP_X_CONTENT_TYPE, }; -G_DEFINE_TYPE (CajaXContentBar, caja_x_content_bar, GTK_TYPE_BOX) +G_DEFINE_TYPE_WITH_PRIVATE (CajaXContentBar, caja_x_content_bar, GTK_TYPE_BOX) void caja_x_content_bar_set_x_content_type (CajaXContentBar *bar, const char *x_content_type) @@ -256,8 +254,6 @@ caja_x_content_bar_class_init (CajaXContentBarClass *klass) object_class->set_property = caja_x_content_bar_set_property; object_class->finalize = caja_x_content_bar_finalize; - g_type_class_add_private (klass, sizeof (CajaXContentBarPrivate)); - g_object_class_install_property (object_class, PROP_MOUNT, g_param_spec_object ( @@ -299,7 +295,7 @@ caja_x_content_bar_init (CajaXContentBar *bar) { GtkWidget *hbox; - bar->priv = CAJA_X_CONTENT_BAR_GET_PRIVATE (bar); + bar->priv = caja_x_content_bar_get_instance_private (bar); hbox = GTK_WIDGET (bar); |