[gnome-flashback] automount-manager: avoid deprecated g_type_class_add_private
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] automount-manager: avoid deprecated g_type_class_add_private
- Date: Wed, 12 Sep 2018 11:56:08 +0000 (UTC)
commit 4ebbe53fc8f47ddf1a1cd06e2307b504a8a0d092
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Sep 9 00:09:54 2018 +0300
automount-manager: avoid deprecated g_type_class_add_private
gnome-flashback/libautomount-manager/gsd-automount-manager.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gnome-flashback/libautomount-manager/gsd-automount-manager.c
b/gnome-flashback/libautomount-manager/gsd-automount-manager.c
index 7252842..38a64cf 100644
--- a/gnome-flashback/libautomount-manager/gsd-automount-manager.c
+++ b/gnome-flashback/libautomount-manager/gsd-automount-manager.c
@@ -30,8 +30,6 @@
#include "gsd-automount-manager.h"
#include "gsd-autorun.h"
-#define GSD_AUTOMOUNT_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_AUTOMOUNT_MANAGER,
GsdAutomountManagerPrivate))
-
#define GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager"
#define GNOME_SESSION_DBUS_OBJECT "/org/gnome/SessionManager"
#define GNOME_SESSION_DBUS_INTERFACE "org.gnome.SessionManager"
@@ -52,7 +50,7 @@ struct GsdAutomountManagerPrivate
GList *volume_queue;
};
-G_DEFINE_TYPE (GsdAutomountManager, gsd_automount_manager, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GsdAutomountManager, gsd_automount_manager, G_TYPE_OBJECT)
static GDBusProxy *
get_session_proxy (void)
@@ -542,7 +540,7 @@ gsd_automount_manager_finalize (GObject *object)
static void
gsd_automount_manager_init (GsdAutomountManager *manager)
{
- manager->priv = GSD_AUTOMOUNT_MANAGER_GET_PRIVATE (manager);
+ manager->priv = gsd_automount_manager_get_instance_private (manager);
g_debug ("Starting automounting manager");
@@ -556,8 +554,6 @@ gsd_automount_manager_class_init (GsdAutomountManagerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gsd_automount_manager_finalize;
-
- g_type_class_add_private (klass, sizeof (GsdAutomountManagerPrivate));
}
GsdAutomountManager *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]