summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-01 16:26:21 +0800
committerraveit65 <[email protected]>2019-08-02 23:28:55 +0200
commit5d01782cd1530e98977cdfeed559a30bda94f727 (patch)
tree6567a123eca384295d4857c1d250ac1f7b410536
parentace9111b8f3ecdc3c1d94dae4350e12b5b48ec02 (diff)
downloadmate-settings-daemon-5d01782cd1530e98977cdfeed559a30bda94f727.tar.bz2
mate-settings-daemon-5d01782cd1530e98977cdfeed559a30bda94f727.tar.xz
plugins a11y-settings: fix deprecated g_type_class_add_private
-rw-r--r--plugins/a11y-settings/msd-a11y-settings-manager.c8
-rw-r--r--plugins/a11y-settings/msd-a11y-settings-plugin.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/plugins/a11y-settings/msd-a11y-settings-manager.c b/plugins/a11y-settings/msd-a11y-settings-manager.c
index d116efa..e03216f 100644
--- a/plugins/a11y-settings/msd-a11y-settings-manager.c
+++ b/plugins/a11y-settings/msd-a11y-settings-manager.c
@@ -37,8 +37,6 @@
#include "mate-settings-profile.h"
#include "msd-a11y-settings-manager.h"
-#define MSD_A11Y_SETTINGS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_A11Y_SETTINGS_MANAGER, MsdA11ySettingsManagerPrivate))
-
struct MsdA11ySettingsManagerPrivate
{
GSettings *interface_settings;
@@ -53,7 +51,7 @@ static void msd_a11y_settings_manager_class_init (MsdA11ySettingsManagerCla
static void msd_a11y_settings_manager_init (MsdA11ySettingsManager *a11y_settings_manager);
static void msd_a11y_settings_manager_finalize (GObject *object);
-G_DEFINE_TYPE (MsdA11ySettingsManager, msd_a11y_settings_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdA11ySettingsManager, msd_a11y_settings_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -149,14 +147,12 @@ msd_a11y_settings_manager_class_init (MsdA11ySettingsManagerClass *klass)
object_class->constructor = msd_a11y_settings_manager_constructor;
object_class->dispose = msd_a11y_settings_manager_dispose;
object_class->finalize = msd_a11y_settings_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (MsdA11ySettingsManagerPrivate));
}
static void
msd_a11y_settings_manager_init (MsdA11ySettingsManager *manager)
{
- manager->priv = MSD_A11Y_SETTINGS_MANAGER_GET_PRIVATE (manager);
+ manager->priv = msd_a11y_settings_manager_get_instance_private (manager);
}
diff --git a/plugins/a11y-settings/msd-a11y-settings-plugin.c b/plugins/a11y-settings/msd-a11y-settings-plugin.c
index 9d206c8..6759c6f 100644
--- a/plugins/a11y-settings/msd-a11y-settings-plugin.c
+++ b/plugins/a11y-settings/msd-a11y-settings-plugin.c
@@ -31,14 +31,12 @@ struct MsdA11ySettingsPluginPrivate {
MsdA11ySettingsManager *manager;
};
-#define MSD_A11Y_SETTINGS_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_A11Y_SETTINGS_PLUGIN, MsdA11ySettingsPluginPrivate))
-
-MATE_SETTINGS_PLUGIN_REGISTER (MsdA11ySettingsPlugin, msd_a11y_settings_plugin)
+MATE_SETTINGS_PLUGIN_REGISTER_WITH_PRIVATE (MsdA11ySettingsPlugin, msd_a11y_settings_plugin)
static void
msd_a11y_settings_plugin_init (MsdA11ySettingsPlugin *plugin)
{
- plugin->priv = MSD_A11Y_SETTINGS_PLUGIN_GET_PRIVATE (plugin);
+ plugin->priv = msd_a11y_settings_plugin_get_instance_private (plugin);
g_debug ("MsdA11ySettingsPlugin initializing");
@@ -99,8 +97,6 @@ msd_a11y_settings_plugin_class_init (MsdA11ySettingsPluginClass *klass)
plugin_class->activate = impl_activate;
plugin_class->deactivate = impl_deactivate;
-
- g_type_class_add_private (klass, sizeof (MsdA11ySettingsPluginPrivate));
}
static void