summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-01 15:52:13 +0800
committerraveit65 <[email protected]>2019-08-02 23:28:31 +0200
commitace9111b8f3ecdc3c1d94dae4350e12b5b48ec02 (patch)
treef6d183cd2df8e710fd7c11f3221f89bad3055a7b /plugins
parent468d84f415c325e342b61fd102cd24202d37c1f3 (diff)
downloadmate-settings-daemon-ace9111b8f3ecdc3c1d94dae4350e12b5b48ec02.tar.bz2
mate-settings-daemon-ace9111b8f3ecdc3c1d94dae4350e12b5b48ec02.tar.xz
plugins a11y-keyboard: fix deprecated g_type_class_add_private
Diffstat (limited to 'plugins')
-rw-r--r--plugins/a11y-keyboard/msd-a11y-keyboard-manager.c8
-rw-r--r--plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c8
-rw-r--r--plugins/a11y-keyboard/msd-a11y-preferences-dialog.c8
3 files changed, 6 insertions, 18 deletions
diff --git a/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c
index 8d26108..0c6d3e6 100644
--- a/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c
+++ b/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c
@@ -54,8 +54,6 @@
#define CONFIG_SCHEMA "org.mate.accessibility-keyboard"
#define NOTIFICATION_TIMEOUT 30
-#define MSD_A11Y_KEYBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_A11Y_KEYBOARD_MANAGER, MsdA11yKeyboardManagerPrivate))
-
struct MsdA11yKeyboardManagerPrivate
{
int xkbEventBase;
@@ -80,7 +78,7 @@ static void msd_a11y_keyboard_manager_finalize (GObject *obje
static void msd_a11y_keyboard_manager_ensure_status_icon (MsdA11yKeyboardManager *manager);
static void set_server_from_settings (MsdA11yKeyboardManager *manager);
-G_DEFINE_TYPE (MsdA11yKeyboardManager, msd_a11y_keyboard_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdA11yKeyboardManager, msd_a11y_keyboard_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@@ -1123,8 +1121,6 @@ msd_a11y_keyboard_manager_class_init (MsdA11yKeyboardManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = msd_a11y_keyboard_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (MsdA11yKeyboardManagerPrivate));
}
static void
@@ -1181,7 +1177,7 @@ msd_a11y_keyboard_manager_ensure_status_icon (MsdA11yKeyboardManager *manager)
static void
msd_a11y_keyboard_manager_init (MsdA11yKeyboardManager *manager)
{
- manager->priv = MSD_A11Y_KEYBOARD_MANAGER_GET_PRIVATE (manager);
+ manager->priv = msd_a11y_keyboard_manager_get_instance_private (manager);
}
static void
diff --git a/plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c b/plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c
index 57ac653..ef84510 100644
--- a/plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c
+++ b/plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c
@@ -31,14 +31,12 @@ struct MsdA11yKeyboardPluginPrivate {
MsdA11yKeyboardManager *manager;
};
-#define MSD_A11Y_KEYBOARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_A11Y_KEYBOARD_PLUGIN, MsdA11yKeyboardPluginPrivate))
-
-MATE_SETTINGS_PLUGIN_REGISTER (MsdA11yKeyboardPlugin, msd_a11y_keyboard_plugin)
+MATE_SETTINGS_PLUGIN_REGISTER_WITH_PRIVATE (MsdA11yKeyboardPlugin, msd_a11y_keyboard_plugin)
static void
msd_a11y_keyboard_plugin_init (MsdA11yKeyboardPlugin *plugin)
{
- plugin->priv = MSD_A11Y_KEYBOARD_PLUGIN_GET_PRIVATE (plugin);
+ plugin->priv = msd_a11y_keyboard_plugin_get_instance_private (plugin);
g_debug ("MsdA11yKeyboardPlugin initializing");
@@ -99,8 +97,6 @@ msd_a11y_keyboard_plugin_class_init (MsdA11yKeyboardPluginClass *klass)
plugin_class->activate = impl_activate;
plugin_class->deactivate = impl_deactivate;
-
- g_type_class_add_private (klass, sizeof (MsdA11yKeyboardPluginPrivate));
}
static void
diff --git a/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c b/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c
index 185b8c9..7ee79f9 100644
--- a/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c
+++ b/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c
@@ -42,8 +42,6 @@
#define SM_DBUS_INTERFACE "org.gnome.SessionManager"
-#define MSD_A11Y_PREFERENCES_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_A11Y_PREFERENCES_DIALOG, MsdA11yPreferencesDialogPrivate))
-
#define GTKBUILDER_UI_FILE "msd-a11y-preferences-dialog.ui"
#define KEY_A11Y_SCHEMA "org.mate.accessibility-keyboard"
@@ -115,7 +113,7 @@ static void msd_a11y_preferences_dialog_class_init (MsdA11yPreferencesDialo
static void msd_a11y_preferences_dialog_init (MsdA11yPreferencesDialog *a11y_preferences_dialog);
static void msd_a11y_preferences_dialog_finalize (GObject *object);
-G_DEFINE_TYPE (MsdA11yPreferencesDialog, msd_a11y_preferences_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE_WITH_PRIVATE (MsdA11yPreferencesDialog, msd_a11y_preferences_dialog, GTK_TYPE_DIALOG)
static void
msd_a11y_preferences_dialog_class_init (MsdA11yPreferencesDialogClass *klass)
@@ -123,8 +121,6 @@ msd_a11y_preferences_dialog_class_init (MsdA11yPreferencesDialogClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = msd_a11y_preferences_dialog_finalize;
-
- g_type_class_add_private (klass, sizeof (MsdA11yPreferencesDialogPrivate));
}
static void
@@ -740,7 +736,7 @@ msd_a11y_preferences_dialog_init (MsdA11yPreferencesDialog *dialog)
GError *error = NULL;
GtkBuilder *builder;
- dialog->priv = MSD_A11Y_PREFERENCES_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = msd_a11y_preferences_dialog_get_instance_private (dialog);
dialog->priv->settings_a11y = g_settings_new (KEY_A11Y_SCHEMA);
dialog->priv->settings_at = g_settings_new (KEY_AT_SCHEMA);