mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 12:25:31 +00:00
Drop the CALLS_SET_OBJECT_PROPERTY() macro
Replace it by g_set_object() as it does the same thing.
This commit is contained in:
parent
3ebf58548c
commit
90f3933e95
6 changed files with 9 additions and 18 deletions
|
@ -72,11 +72,11 @@ set_property (GObject *object,
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_CALL:
|
case PROP_CALL:
|
||||||
CALLS_SET_OBJECT_PROPERTY (self->call, CALLS_CALL (g_value_get_object (value)));
|
g_set_object (&self->call, CALLS_CALL (g_value_get_object (value)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PARTY:
|
case PROP_PARTY:
|
||||||
CALLS_SET_OBJECT_PROPERTY (self->party, CALLS_PARTY (g_value_get_object (value)));
|
g_set_object (&self->party, CALLS_PARTY (g_value_get_object (value)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -140,7 +140,7 @@ static void
|
||||||
set_call_holder (CallsCallSelectorItem *self, CallsCallHolder *holder)
|
set_call_holder (CallsCallSelectorItem *self, CallsCallHolder *holder)
|
||||||
{
|
{
|
||||||
set_call_data (self, calls_call_holder_get_data (holder));
|
set_call_data (self, calls_call_holder_get_data (holder));
|
||||||
CALLS_SET_OBJECT_PROPERTY (self->holder, holder);
|
g_set_object (&self->holder, holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -199,8 +199,8 @@ set_property (GObject *object,
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_VOICE_CALL:
|
case PROP_VOICE_CALL:
|
||||||
CALLS_SET_OBJECT_PROPERTY
|
g_set_object
|
||||||
(self->voice_call, GDBO_VOICE_CALL (g_value_get_object (value)));
|
(&self->voice_call, GDBO_VOICE_CALL (g_value_get_object (value)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PROPERTIES:
|
case PROP_PROPERTIES:
|
||||||
|
|
|
@ -134,8 +134,8 @@ set_property (GObject *object,
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_MODEM:
|
case PROP_MODEM:
|
||||||
CALLS_SET_OBJECT_PROPERTY
|
g_set_object
|
||||||
(self->modem, GDBO_MODEM (g_value_get_object (value)));
|
(&self->modem, GDBO_MODEM (g_value_get_object (value)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -111,8 +111,8 @@ set_property (GObject *object,
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_CONNECTION:
|
case PROP_CONNECTION:
|
||||||
CALLS_SET_OBJECT_PROPERTY (self->connection,
|
g_set_object (&self->connection,
|
||||||
g_value_get_object (value));
|
g_value_get_object (value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -71,15 +71,6 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CALLS_SET_OBJECT_PROPERTY(obj_ptr,new_value) \
|
|
||||||
if (obj_ptr) \
|
|
||||||
{ \
|
|
||||||
g_object_unref (G_OBJECT (obj_ptr)); \
|
|
||||||
} \
|
|
||||||
obj_ptr = new_value; \
|
|
||||||
g_object_ref (G_OBJECT (obj_ptr));
|
|
||||||
|
|
||||||
|
|
||||||
#define CALLS_SET_PTR_PROPERTY(ptr,new_value) \
|
#define CALLS_SET_PTR_PROPERTY(ptr,new_value) \
|
||||||
g_free (ptr); \
|
g_free (ptr); \
|
||||||
ptr = new_value;
|
ptr = new_value;
|
||||||
|
|
Loading…
Reference in a new issue