summaryrefslogtreecommitdiff
path: root/backends/oss/oss-switch-option.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-30 17:49:52 +0800
committerraveit65 <[email protected]>2019-07-02 13:41:11 +0200
commitceedb3408e9f12f1b36ad98218fee69960eb47e8 (patch)
treed9917bc70002c55b0ce310c6c800603bbf8c5b3d /backends/oss/oss-switch-option.c
parentead1fde223a89a5157e936d23b3bbc5d77260167 (diff)
downloadlibmatemixer-ceedb3408e9f12f1b36ad98218fee69960eb47e8.tar.bz2
libmatemixer-ceedb3408e9f12f1b36ad98218fee69960eb47e8.tar.xz
oss: avoid deprecated g_type_class_add_private
Diffstat (limited to 'backends/oss/oss-switch-option.c')
-rw-r--r--backends/oss/oss-switch-option.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/backends/oss/oss-switch-option.c b/backends/oss/oss-switch-option.c
index 544f321..cc3134c 100644
--- a/backends/oss/oss-switch-option.c
+++ b/backends/oss/oss-switch-option.c
@@ -29,20 +29,17 @@ struct _OssSwitchOptionPrivate
static void oss_switch_option_class_init (OssSwitchOptionClass *klass);
static void oss_switch_option_init (OssSwitchOption *option);
-G_DEFINE_TYPE (OssSwitchOption, oss_switch_option, MATE_MIXER_TYPE_SWITCH_OPTION)
+G_DEFINE_TYPE_WITH_PRIVATE (OssSwitchOption, oss_switch_option, MATE_MIXER_TYPE_SWITCH_OPTION)
static void
oss_switch_option_class_init (OssSwitchOptionClass *klass)
{
- g_type_class_add_private (G_OBJECT_CLASS (klass), sizeof (OssSwitchOptionPrivate));
}
static void
oss_switch_option_init (OssSwitchOption *option)
{
- option->priv = G_TYPE_INSTANCE_GET_PRIVATE (option,
- OSS_TYPE_SWITCH_OPTION,
- OssSwitchOptionPrivate);
+ option->priv = oss_switch_option_get_instance_private (option);
}
OssSwitchOption *