mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 20:35:31 +00:00
codestyle: get rid of CALLS_SET_PTR_PROPERTY macro
One more step towards fixing #214 In `calls-ofono-call.c` the changed code also adheres to the newly introduced coding style.
This commit is contained in:
parent
042478a8eb
commit
868d9e36da
3 changed files with 6 additions and 13 deletions
|
@ -25,7 +25,6 @@
|
||||||
#include "calls-ofono-call.h"
|
#include "calls-ofono-call.h"
|
||||||
#include "calls-call.h"
|
#include "calls-call.h"
|
||||||
#include "calls-message-source.h"
|
#include "calls-message-source.h"
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
|
@ -287,11 +286,10 @@ static void
|
||||||
disconnect_reason_cb (CallsOfonoCall *self,
|
disconnect_reason_cb (CallsOfonoCall *self,
|
||||||
const gchar *reason)
|
const gchar *reason)
|
||||||
{
|
{
|
||||||
if (reason)
|
if (reason) {
|
||||||
{
|
g_free (self->disconnect_reason);
|
||||||
CALLS_SET_PTR_PROPERTY (self->disconnect_reason,
|
self->disconnect_reason = g_strdup (reason);
|
||||||
g_strdup (reason));
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "calls-call-record.h"
|
#include "calls-call-record.h"
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
|
@ -132,7 +131,8 @@ set_property (GObject *object,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_TARGET:
|
case PROP_TARGET:
|
||||||
CALLS_SET_PTR_PROPERTY (self->target, g_value_dup_string (value));
|
g_free (self->target);
|
||||||
|
self->target = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_INBOUND:
|
case PROP_INBOUND:
|
||||||
|
|
|
@ -88,11 +88,6 @@ G_BEGIN_DECLS
|
||||||
CALLS_DEFINE_IFACE_GETTER_BASE(calls,iface,Calls,Iface,CALLS,IFACE,prop,rettype,errval)
|
CALLS_DEFINE_IFACE_GETTER_BASE(calls,iface,Calls,Iface,CALLS,IFACE,prop,rettype,errval)
|
||||||
|
|
||||||
|
|
||||||
#define CALLS_SET_PTR_PROPERTY(ptr,new_value) \
|
|
||||||
g_free (ptr); \
|
|
||||||
ptr = new_value;
|
|
||||||
|
|
||||||
|
|
||||||
#define calls_clear_source(source_id_ptr) \
|
#define calls_clear_source(source_id_ptr) \
|
||||||
if (*source_id_ptr != 0) \
|
if (*source_id_ptr != 0) \
|
||||||
{ \
|
{ \
|
||||||
|
|
Loading…
Reference in a new issue