summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-09-06 11:50:45 +0200
committerVictor Kareh <[email protected]>2019-10-02 06:48:58 -0400
commit79c4651c507f37e5b391e059447ba248a5f94e0b (patch)
treee7aed1846e743c8c5dbcc49b36706e3226827954 /src
parent7218385434bb070a7d49e72f858245ff6ca2935e (diff)
downloadmate-screensaver-79c4651c507f37e5b391e059447ba248a5f94e0b.tar.bz2
mate-screensaver-79c4651c507f37e5b391e059447ba248a5f94e0b.tar.xz
gs-theme-manager: avoid 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r--src/gs-theme-manager.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gs-theme-manager.c b/src/gs-theme-manager.c
index ad2f03d..2e92979 100644
--- a/src/gs-theme-manager.c
+++ b/src/gs-theme-manager.c
@@ -40,8 +40,6 @@ static void gs_theme_manager_class_init (GSThemeManagerClass *klass);
static void gs_theme_manager_init (GSThemeManager *theme_manager);
static void gs_theme_manager_finalize (GObject *object);
-#define GS_THEME_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_THEME_MANAGER, GSThemeManagerPrivate))
-
struct _GSThemeInfo
{
char *name;
@@ -55,7 +53,7 @@ struct GSThemeManagerPrivate
MateMenuTree *menu_tree;
};
-G_DEFINE_TYPE (GSThemeManager, gs_theme_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GSThemeManager, gs_theme_manager, G_TYPE_OBJECT)
static gpointer theme_manager_object = NULL;
@@ -372,8 +370,6 @@ gs_theme_manager_class_init (GSThemeManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gs_theme_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (GSThemeManagerPrivate));
}
static MateMenuTree *
@@ -400,7 +396,7 @@ get_themes_tree (void)
static void
gs_theme_manager_init (GSThemeManager *theme_manager)
{
- theme_manager->priv = GS_THEME_MANAGER_GET_PRIVATE (theme_manager);
+ theme_manager->priv = gs_theme_manager_get_instance_private (theme_manager);
theme_manager->priv->menu_tree = get_themes_tree ();
}