mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
Drop the CALLS_DISPOSE_OBJECT() macro
Replace it by g_clear_object() as it does the same thing.
This commit is contained in:
parent
700966ccfe
commit
52f7f2da6f
10 changed files with 18 additions and 26 deletions
|
@ -116,8 +116,8 @@ dispose (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
|
||||
CallsCallData *self = CALLS_CALL_DATA (object);
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->call);
|
||||
CALLS_DISPOSE_OBJECT (self->party);
|
||||
g_clear_object (&self->call);
|
||||
g_clear_object (&self->party);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -279,7 +279,7 @@ dispose (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_BOX);
|
||||
CallsCallDisplay *self = CALLS_CALL_DISPLAY (object);
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->call);
|
||||
g_clear_object (&self->call);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -134,9 +134,9 @@ dispose (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
|
||||
CallsCallHolder *self = CALLS_CALL_HOLDER (object);
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->selector_item);
|
||||
CALLS_DISPOSE_OBJECT (self->display);
|
||||
CALLS_DISPOSE_OBJECT (self->data);
|
||||
g_clear_object (&self->selector_item);
|
||||
g_clear_object (&self->display);
|
||||
g_clear_object (&self->data);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ dispose (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_EVENT_BOX);
|
||||
CallsCallSelectorItem *self = CALLS_CALL_SELECTOR_ITEM (object);
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->holder);
|
||||
g_clear_object (&self->holder);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -688,8 +688,8 @@ dispose (GObject *object)
|
|||
remove_origins (self);
|
||||
}
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->call_holders);
|
||||
CALLS_DISPOSE_OBJECT (self->provider);
|
||||
g_clear_object (&self->call_holders);
|
||||
g_clear_object (&self->provider);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ dispose (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
|
||||
CallsOfonoCall *self = CALLS_OFONO_CALL (object);
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->voice_call);
|
||||
g_clear_object (&self->voice_call);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -130,9 +130,9 @@ dispose (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
|
||||
CallsOfonoObject *self = CALLS_OFONO_OBJECT (object);
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->selector_item);
|
||||
CALLS_DISPOSE_OBJECT (self->display);
|
||||
CALLS_DISPOSE_OBJECT (self->data);
|
||||
g_clear_object (&self->selector_item);
|
||||
g_clear_object (&self->display);
|
||||
g_clear_object (&self->data);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -476,7 +476,7 @@ constructed (GObject *object)
|
|||
(GAsyncReadyCallback)voice_new_cb,
|
||||
self);
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->modem);
|
||||
g_clear_object (&self->modem);
|
||||
|
||||
parent_class->constructed (object);
|
||||
}
|
||||
|
@ -489,8 +489,8 @@ dispose (GObject *object)
|
|||
CallsOfonoOrigin *self = CALLS_OFONO_ORIGIN (object);
|
||||
|
||||
remove_calls (self, NULL);
|
||||
CALLS_DISPOSE_OBJECT (self->modem);
|
||||
CALLS_DISPOSE_OBJECT (self->connection);
|
||||
g_clear_object (&self->modem);
|
||||
g_clear_object (&self->connection);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -442,8 +442,8 @@ dispose (GObject *object)
|
|||
|
||||
// FIXME
|
||||
|
||||
CALLS_DISPOSE_OBJECT (self->manager);
|
||||
CALLS_DISPOSE_OBJECT (self->connection);
|
||||
g_clear_object (&self->manager);
|
||||
g_clear_object (&self->connection);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
|
|
@ -71,14 +71,6 @@ G_BEGIN_DECLS
|
|||
|
||||
|
||||
|
||||
#define CALLS_DISPOSE_OBJECT(obj_ptr) \
|
||||
if (obj_ptr) \
|
||||
{ \
|
||||
g_object_unref (G_OBJECT (obj_ptr)); \
|
||||
obj_ptr = NULL; \
|
||||
}
|
||||
|
||||
|
||||
#define CALLS_SET_OBJECT_PROPERTY(obj_ptr,new_value) \
|
||||
if (obj_ptr) \
|
||||
{ \
|
||||
|
|
Loading…
Reference in a new issue