diff options
author | Wu Xiaotian <[email protected]> | 2019-01-26 12:09:19 +0800 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-01-31 19:31:11 +0000 |
commit | e5129f93e489c1716d815452075f57a64b5fa149 (patch) | |
tree | d26410755ae7da93ff634d31f5e8c47b00bb346e /libcaja-private/caja-desktop-link.c | |
parent | e226dda6fa442b3a372427d72df9bb9cb7715225 (diff) | |
download | caja-e5129f93e489c1716d815452075f57a64b5fa149.tar.bz2 caja-e5129f93e489c1716d815452075f57a64b5fa149.tar.xz |
Avoid deprecated g_type_class_add_private under libcaja-private
Changed CajaDesktopLink, CajaDirectoryAsync and CajaDirectory
Diffstat (limited to 'libcaja-private/caja-desktop-link.c')
-rw-r--r-- | libcaja-private/caja-desktop-link.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libcaja-private/caja-desktop-link.c b/libcaja-private/caja-desktop-link.c index d695af6d..360c75cc 100644 --- a/libcaja-private/caja-desktop-link.c +++ b/libcaja-private/caja-desktop-link.c @@ -36,7 +36,7 @@ #include <libcaja-private/caja-global-preferences.h> #include <string.h> -struct CajaDesktopLinkDetails +struct _CajaDesktopLinkPrivate { CajaDesktopLinkType type; char *filename; @@ -53,7 +53,7 @@ struct CajaDesktopLinkDetails GMount *mount; }; -G_DEFINE_TYPE(CajaDesktopLink, caja_desktop_link, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (CajaDesktopLink, caja_desktop_link, G_TYPE_OBJECT) static void create_icon_file (CajaDesktopLink *link) @@ -446,9 +446,7 @@ caja_desktop_link_rename (CajaDesktopLink *link, static void caja_desktop_link_init (CajaDesktopLink *link) { - link->details = G_TYPE_INSTANCE_GET_PRIVATE (link, - CAJA_TYPE_DESKTOP_LINK, - CajaDesktopLinkDetails); + link->details = caja_desktop_link_get_instance_private (link); } static void @@ -529,6 +527,4 @@ caja_desktop_link_class_init (CajaDesktopLinkClass *klass) object_class = G_OBJECT_CLASS (klass); object_class->finalize = desktop_link_finalize; - - g_type_class_add_private (object_class, sizeof(CajaDesktopLinkDetails)); } |