diff options
author | Andre Miranda <andreldm@xfce.org> | 2019-04-14 12:43:48 -0300 |
---|---|---|
committer | Andre Miranda <andreldm@xfce.org> | 2019-04-14 12:43:48 -0300 |
commit | a8b984a99406f8e2c4905688c6067aee44c2e091 (patch) | |
tree | 5bf73aff1a9a15aad714df445cb279d6082cb72a /thunarx | |
parent | 368f7908e3a2cd88f4fd1db5d39af7cd07726356 (diff) | |
download | thunar-a8b984a99406f8e2c4905688c6067aee44c2e091.tar.gz |
Fix g_type_class_add_private is deprecated
Diffstat (limited to 'thunarx')
-rw-r--r-- | thunarx/thunarx-menu-item.c | 7 | ||||
-rw-r--r-- | thunarx/thunarx-menu.c | 7 | ||||
-rw-r--r-- | thunarx/thunarx-property-page.c | 7 | ||||
-rw-r--r-- | thunarx/thunarx-renamer.c | 5 |
4 files changed, 7 insertions, 19 deletions
diff --git a/thunarx/thunarx-menu-item.c b/thunarx/thunarx-menu-item.c index 7622b89f..98b39382 100644 --- a/thunarx/thunarx-menu-item.c +++ b/thunarx/thunarx-menu-item.c @@ -93,7 +93,7 @@ static guint signals[LAST_SIGNAL]; -G_DEFINE_TYPE (ThunarxMenuItem, thunarx_menu_item, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (ThunarxMenuItem, thunarx_menu_item, G_TYPE_OBJECT) @@ -102,9 +102,6 @@ thunarx_menu_item_class_init (ThunarxMenuItemClass *klass) { GObjectClass *gobject_class; - /* add our private data to the class type */ - g_type_class_add_private (klass, sizeof (ThunarxMenuItemPrivate)); - gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = thunarx_menu_item_finalize; gobject_class->get_property = thunarx_menu_item_get_property; @@ -177,7 +174,7 @@ thunarx_menu_item_class_init (ThunarxMenuItemClass *klass) static void thunarx_menu_item_init (ThunarxMenuItem *item) { - item->priv = THUNARX_MENU_ITEM_GET_PRIVATE (item); + item->priv = thunarx_menu_item_get_instance_private (item); item->priv->sensitive = TRUE; item->priv->priority = FALSE; item->priv->menu = NULL; diff --git a/thunarx/thunarx-menu.c b/thunarx/thunarx-menu.c index b3fcf208..016a3d40 100644 --- a/thunarx/thunarx-menu.c +++ b/thunarx/thunarx-menu.c @@ -53,7 +53,7 @@ struct _ThunarxMenuPrivate -G_DEFINE_TYPE (ThunarxMenu, thunarx_menu, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (ThunarxMenu, thunarx_menu, G_TYPE_OBJECT) @@ -62,9 +62,6 @@ thunarx_menu_class_init (ThunarxMenuClass *klass) { GObjectClass *gobject_class; - /* add our private data to the class type */ - g_type_class_add_private (klass, sizeof (ThunarxMenuPrivate)); - gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = thunarx_menu_finalize; } @@ -74,7 +71,7 @@ thunarx_menu_class_init (ThunarxMenuClass *klass) static void thunarx_menu_init (ThunarxMenu *menu) { - menu->priv = THUNARX_MENU_GET_PRIVATE (menu); + menu->priv = thunarx_menu_get_instance_private (menu); menu->priv->items = NULL; } diff --git a/thunarx/thunarx-property-page.c b/thunarx/thunarx-property-page.c index 97bf5fc3..cdb3c3cf 100644 --- a/thunarx/thunarx-property-page.c +++ b/thunarx/thunarx-property-page.c @@ -85,7 +85,7 @@ struct _ThunarxPropertyPagePrivate -G_DEFINE_TYPE (ThunarxPropertyPage, thunarx_property_page, GTK_TYPE_BIN) +G_DEFINE_TYPE_WITH_PRIVATE (ThunarxPropertyPage, thunarx_property_page, GTK_TYPE_BIN) @@ -95,9 +95,6 @@ thunarx_property_page_class_init (ThunarxPropertyPageClass *klass) GtkWidgetClass *gtkwidget_class; GObjectClass *gobject_class; - /* add our private data to the class type */ - g_type_class_add_private (klass, sizeof (ThunarxPropertyPagePrivate)); - gobject_class = G_OBJECT_CLASS (klass); gobject_class->get_property = thunarx_property_page_get_property; gobject_class->set_property = thunarx_property_page_set_property; @@ -137,7 +134,7 @@ thunarx_property_page_class_init (ThunarxPropertyPageClass *klass) static void thunarx_property_page_init (ThunarxPropertyPage *property_page) { - property_page->priv = THUNARX_PROPERTY_PAGE_GET_PRIVATE (property_page); + property_page->priv = thunarx_property_page_get_instance_private (property_page); } diff --git a/thunarx/thunarx-renamer.c b/thunarx/thunarx-renamer.c index 715dbd39..f5c38d9b 100644 --- a/thunarx/thunarx-renamer.c +++ b/thunarx/thunarx-renamer.c @@ -114,7 +114,7 @@ static guint renamer_signals[LAST_SIGNAL]; -G_DEFINE_ABSTRACT_TYPE (ThunarxRenamer, thunarx_renamer, GTK_TYPE_BOX) +G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (ThunarxRenamer, thunarx_renamer, GTK_TYPE_BOX) @@ -123,9 +123,6 @@ thunarx_renamer_class_init (ThunarxRenamerClass *klass) { GObjectClass *gobject_class; - /* add private data */ - g_type_class_add_private (klass, sizeof (ThunarxRenamerPrivate)); - gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = thunarx_renamer_finalize; gobject_class->constructor = thunarx_renamer_constructor; |