diff options
author | Pablo Barciela <[email protected]> | 2019-07-19 20:34:46 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-07-23 03:33:45 +0000 |
commit | debe2b70aa15f55476e29fba33104372d9323085 (patch) | |
tree | 5c4660a85d5fdf5509d4d89213717cbf881ed295 | |
parent | 5c658f0127fdddb6f5083cdd279e3d3a3aaa6936 (diff) | |
download | pluma-debe2b70aa15f55476e29fba33104372d9323085.tar.bz2 pluma-debe2b70aa15f55476e29fba33104372d9323085.tar.xz |
pluma-message-bus: avoid 'g_type_class_add_private'
-rw-r--r-- | pluma/pluma-message-bus.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pluma/pluma-message-bus.c b/pluma/pluma-message-bus.c index 28639c26..621a1d03 100644 --- a/pluma/pluma-message-bus.c +++ b/pluma/pluma-message-bus.c @@ -90,8 +90,6 @@ * </example> */ -#define PLUMA_MESSAGE_BUS_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), PLUMA_TYPE_MESSAGE_BUS, PlumaMessageBusPrivate)) - typedef struct { gchar *object_path; @@ -143,7 +141,7 @@ static guint message_bus_signals[LAST_SIGNAL] = { 0 }; static void pluma_message_bus_dispatch_real (PlumaMessageBus *bus, PlumaMessage *message); -G_DEFINE_TYPE(PlumaMessageBus, pluma_message_bus, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (PlumaMessageBus, pluma_message_bus, G_TYPE_OBJECT) static void listener_free (Listener *listener) @@ -260,8 +258,6 @@ pluma_message_bus_class_init (PlumaMessageBusClass *klass) G_TYPE_NONE, 1, PLUMA_TYPE_MESSAGE_TYPE); - - g_type_class_add_private (object_class, sizeof(PlumaMessageBusPrivate)); } static Message * @@ -497,7 +493,7 @@ process_by_match (PlumaMessageBus *bus, static void pluma_message_bus_init (PlumaMessageBus *self) { - self->priv = PLUMA_MESSAGE_BUS_GET_PRIVATE (self); + self->priv = pluma_message_bus_get_instance_private (self); self->priv->messages = g_hash_table_new_full (g_str_hash, g_str_equal, |