Skip to content
Permalink
Browse files

caja-menu: avoid deprecated 'g_type_class_add_private'

  • Loading branch information...
yetist authored and lukefromdc committed Jan 21, 2019
1 parent 10efec8 commit a9211bd0f251b891ef506ed0af8b574ae8e3fee9
Showing with 3 additions and 5 deletions.
  1. +3 −5 libcaja-extension/caja-menu.c
@@ -38,13 +38,13 @@
* #CajaMenuItem objects, using caja_menu_item_set_submenu().
*/

#define CAJA_MENU_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAJA_TYPE_MENU, CajaMenuPrivate))
G_DEFINE_TYPE (CajaMenu, caja_menu, G_TYPE_OBJECT);

struct _CajaMenuPrivate {
GList *item_list;
};

G_DEFINE_TYPE_WITH_PRIVATE (CajaMenu, caja_menu, G_TYPE_OBJECT);

void
caja_menu_append_item (CajaMenu *menu, CajaMenuItem *item)
{
@@ -104,7 +104,7 @@ caja_menu_finalize (GObject *object)
static void
caja_menu_init (CajaMenu *menu)
{
menu->priv = CAJA_MENU_GET_PRIVATE (menu);
menu->priv = caja_menu_get_instance_private (menu);

menu->priv->item_list = NULL;
}
@@ -114,8 +114,6 @@ caja_menu_class_init (CajaMenuClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);

g_type_class_add_private (klass, sizeof (CajaMenuPrivate));

object_class->finalize = caja_menu_finalize;
}

0 comments on commit a9211bd

Please sign in to comment.
You can’t perform that action at this time.