summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-26 15:39:26 +0800
committerlukefromdc <[email protected]>2019-07-01 02:49:05 +0000
commit86362cdd37c71ad4d6b9a1c506838b201953fd29 (patch)
tree28891d3efc939497959e119a32997a6202ba767d
parent1200e03df1bf07561893d9197cb05cbe94e9ea5f (diff)
downloadmate-settings-daemon-86362cdd37c71ad4d6b9a1c506838b201953fd29.tar.bz2
mate-settings-daemon-86362cdd37c71ad4d6b9a1c506838b201953fd29.tar.xz
fix deprecated g_type_class_add_private
-rw-r--r--mate-settings-daemon/mate-settings-manager.c8
-rw-r--r--mate-settings-daemon/mate-settings-plugin-info.c4
2 files changed, 3 insertions, 9 deletions
diff --git a/mate-settings-daemon/mate-settings-manager.c b/mate-settings-daemon/mate-settings-manager.c
index 88758bf..3aceb67 100644
--- a/mate-settings-daemon/mate-settings-manager.c
+++ b/mate-settings-daemon/mate-settings-manager.c
@@ -44,8 +44,6 @@
#define PLUGIN_EXT ".mate-settings-plugin"
-#define MATE_SETTINGS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MATE_TYPE_SETTINGS_MANAGER, MateSettingsManagerPrivate))
-
struct MateSettingsManagerPrivate
{
DBusGConnection *connection;
@@ -66,7 +64,7 @@ static void mate_settings_manager_class_init (MateSettingsManagerClass *kla
static void mate_settings_manager_init (MateSettingsManager *settings_manager);
static void mate_settings_manager_finalize (GObject *object);
-G_DEFINE_TYPE (MateSettingsManager, mate_settings_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MateSettingsManager, mate_settings_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -429,8 +427,6 @@ mate_settings_manager_class_init (MateSettingsManagerClass *klass)
G_TYPE_NONE,
1, G_TYPE_STRING);
- g_type_class_add_private (klass, sizeof (MateSettingsManagerPrivate));
-
dbus_g_object_type_install_info (MATE_TYPE_SETTINGS_MANAGER, &dbus_glib_mate_settings_manager_object_info);
}
@@ -440,7 +436,7 @@ mate_settings_manager_init (MateSettingsManager *manager)
char *schema;
GSettings *settings;
- manager->priv = MATE_SETTINGS_MANAGER_GET_PRIVATE (manager);
+ manager->priv = mate_settings_manager_get_instance_private (manager);
schema = g_strdup_printf ("%s.plugins", DEFAULT_SETTINGS_PREFIX);
if (is_schema (schema)) {
diff --git a/mate-settings-daemon/mate-settings-plugin-info.c b/mate-settings-daemon/mate-settings-plugin-info.c
index 79373e6..81c77fd 100644
--- a/mate-settings-daemon/mate-settings-plugin-info.c
+++ b/mate-settings-daemon/mate-settings-plugin-info.c
@@ -78,7 +78,7 @@ enum {
static guint signals [LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (MateSettingsPluginInfo, mate_settings_plugin_info, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MateSettingsPluginInfo, mate_settings_plugin_info, G_TYPE_OBJECT)
static void
mate_settings_plugin_info_finalize (GObject *object)
@@ -143,8 +143,6 @@ mate_settings_plugin_info_class_init (MateSettingsPluginInfoClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
-
- g_type_class_add_private (klass, sizeof (MateSettingsPluginInfoPrivate));
}
static void