summaryrefslogtreecommitdiff
path: root/plugins/background
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-01 16:30:08 +0800
committerlukefromdc <[email protected]>2019-07-26 02:27:24 +0000
commitf7eb962919d338d2b64efb197eeb997ecf5770a2 (patch)
tree6829e0ec70acab31bffa7e7d6d20c2fd3638811d /plugins/background
parent089ff0c2edb81856d0c4849412beab864e7115de (diff)
downloadmate-settings-daemon-f7eb962919d338d2b64efb197eeb997ecf5770a2.tar.bz2
mate-settings-daemon-f7eb962919d338d2b64efb197eeb997ecf5770a2.tar.xz
plugins background: fix deprecated g_type_class_add_private
Diffstat (limited to 'plugins/background')
-rw-r--r--plugins/background/msd-background-manager.c8
-rw-r--r--plugins/background/msd-background-plugin.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/plugins/background/msd-background-manager.c b/plugins/background/msd-background-manager.c
index b00ed6a..8755b76 100644
--- a/plugins/background/msd-background-manager.c
+++ b/plugins/background/msd-background-manager.c
@@ -49,8 +49,6 @@
#define MATE_SESSION_MANAGER_DBUS_NAME "org.gnome.SessionManager"
#define MATE_SESSION_MANAGER_DBUS_PATH "/org/gnome/SessionManager"
-#define MSD_BACKGROUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_BACKGROUND_MANAGER, MsdBackgroundManagerPrivate))
-
struct MsdBackgroundManagerPrivate {
GSettings *settings;
MateBG *bg;
@@ -69,7 +67,7 @@ struct MsdBackgroundManagerPrivate {
guint proxy_signal_id;
};
-G_DEFINE_TYPE (MsdBackgroundManager, msd_background_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdBackgroundManager, msd_background_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -566,7 +564,7 @@ msd_background_manager_finalize (GObject *object)
static void
msd_background_manager_init (MsdBackgroundManager* manager)
{
- manager->priv = MSD_BACKGROUND_MANAGER_GET_PRIVATE(manager);
+ manager->priv = msd_background_manager_get_instance_private(manager);
}
static void
@@ -576,8 +574,6 @@ msd_background_manager_class_init (MsdBackgroundManagerClass *klass)
object_class->constructor = msd_background_manager_constructor;
object_class->finalize = msd_background_manager_finalize;
-
- g_type_class_add_private(klass, sizeof(MsdBackgroundManagerPrivate));
}
MsdBackgroundManager*
diff --git a/plugins/background/msd-background-plugin.c b/plugins/background/msd-background-plugin.c
index ee6b49c..7957230 100644
--- a/plugins/background/msd-background-plugin.c
+++ b/plugins/background/msd-background-plugin.c
@@ -31,14 +31,12 @@ struct MsdBackgroundPluginPrivate {
MsdBackgroundManager* manager;
};
-#define MSD_BACKGROUND_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE((object), MSD_TYPE_BACKGROUND_PLUGIN, MsdBackgroundPluginPrivate))
-
-MATE_SETTINGS_PLUGIN_REGISTER(MsdBackgroundPlugin, msd_background_plugin)
+MATE_SETTINGS_PLUGIN_REGISTER_WITH_PRIVATE (MsdBackgroundPlugin, msd_background_plugin)
static void
msd_background_plugin_init (MsdBackgroundPlugin* plugin)
{
- plugin->priv = MSD_BACKGROUND_PLUGIN_GET_PRIVATE(plugin);
+ plugin->priv = msd_background_plugin_get_instance_private (plugin);
g_debug("MsdBackgroundPlugin initializing");
@@ -103,8 +101,6 @@ msd_background_plugin_class_init (MsdBackgroundPluginClass* klass)
plugin_class->activate = impl_activate;
plugin_class->deactivate = impl_deactivate;
-
- g_type_class_add_private(klass, sizeof(MsdBackgroundPluginPrivate));
}
static void