[gdm: 5/10] gdm-launch-environment: Replace deprecated g_type_class_add_private()
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm: 5/10] gdm-launch-environment: Replace deprecated g_type_class_add_private()
- Date: Tue, 13 Aug 2019 20:34:45 +0000 (UTC)
commit 09f2c309b4d2ffa8759d000c366a62dd63b40d9c
Author: Robert Mader <robert mader posteo de>
Date: Thu Mar 14 00:08:53 2019 +0100
gdm-launch-environment: Replace deprecated g_type_class_add_private()
daemon/gdm-launch-environment.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index 5e1427b0..feccf057 100644
--- a/daemon/gdm-launch-environment.c
+++ b/daemon/gdm-launch-environment.c
@@ -57,8 +57,6 @@
extern char **environ;
-#define GDM_LAUNCH_ENVIRONMENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o),
GDM_TYPE_LAUNCH_ENVIRONMENT, GdmLaunchEnvironmentPrivate))
-
struct GdmLaunchEnvironmentPrivate
{
GdmSession *session;
@@ -113,7 +111,7 @@ static void gdm_launch_environment_class_init (GdmLaunchEnvironmentClass
static void gdm_launch_environment_init (GdmLaunchEnvironment *launch_environment);
static void gdm_launch_environment_finalize (GObject *object);
-G_DEFINE_TYPE (GdmLaunchEnvironment, gdm_launch_environment, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GdmLaunchEnvironment, gdm_launch_environment, G_TYPE_OBJECT)
static GHashTable *
build_launch_environment (GdmLaunchEnvironment *launch_environment,
@@ -706,8 +704,6 @@ gdm_launch_environment_class_init (GdmLaunchEnvironmentClass *klass)
object_class->set_property = gdm_launch_environment_set_property;
object_class->finalize = gdm_launch_environment_finalize;
- g_type_class_add_private (klass, sizeof (GdmLaunchEnvironmentPrivate));
-
g_object_class_install_property (object_class,
PROP_VERIFICATION_MODE,
g_param_spec_enum ("verification-mode",
@@ -863,7 +859,7 @@ static void
gdm_launch_environment_init (GdmLaunchEnvironment *launch_environment)
{
- launch_environment->priv = GDM_LAUNCH_ENVIRONMENT_GET_PRIVATE (launch_environment);
+ launch_environment->priv = gdm_launch_environment_get_instance_private (launch_environment);
launch_environment->priv->command = NULL;
launch_environment->priv->session = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]