From 88c4247cdf33fb9c512965c17b5b1a1219207198 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 28 Aug 2013 16:42:47 +0100 Subject: [PATCH 02/16] mcd_master_create_manager: unvirtualize There's no point in this being virtual: there are no subclasses, and it isn't API any more. --- src/mcd-master.c | 15 +++------------ src/mcd-master.h | 8 -------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/mcd-master.c b/src/mcd-master.c index ed515fc..603b777 100644 --- a/src/mcd-master.c +++ b/src/mcd-master.c @@ -402,14 +402,6 @@ mcd_master_constructor (GType type, guint n_params, return (GObject *) master; } -static McdManager * -mcd_master_create_manager (McdMaster *master, const gchar *unique_name) -{ - McdMasterPrivate *priv = master->priv; - - return mcd_manager_new (unique_name, priv->dispatcher, priv->dbus_daemon); -} - static void mcd_master_class_init (McdMasterClass * klass) { @@ -422,8 +414,6 @@ mcd_master_class_init (McdMasterClass * klass) object_class->set_property = _mcd_master_set_property; object_class->dispose = _mcd_master_dispose; - klass->create_manager = mcd_master_create_manager; - /* Properties */ g_object_class_install_property (object_class, PROP_DISPATCHER, @@ -509,8 +499,9 @@ _mcd_master_lookup_manager (McdMaster *master, return manager; } - manager = MCD_MASTER_GET_CLASS (master)->create_manager - (master, unique_name); + manager = mcd_manager_new (unique_name, + master->priv->dispatcher, + master->priv->dbus_daemon); if (G_UNLIKELY (!manager)) g_warning ("Manager %s not created", unique_name); else diff --git a/src/mcd-master.h b/src/mcd-master.h index 5bb38b7..e9a0a6b 100644 --- a/src/mcd-master.h +++ b/src/mcd-master.h @@ -54,14 +54,6 @@ struct _McdMaster struct _McdMasterClass { McdOperationClass parent_class; - McdManager *(*create_manager) (McdMaster *master, - const gchar *unique_name); - void (*_mc_reserved1) (void); - void (*_mc_reserved2) (void); - void (*_mc_reserved3) (void); - void (*_mc_reserved4) (void); - void (*_mc_reserved5) (void); - void (*_mc_reserved6) (void); }; GType mcd_master_get_type (void); -- 1.8.4.rc3