Uncrustify sources

Ran `find src plugins -iname '*.[c|h]' -print0 | xargs -0 uncrustify --no-backup`
with some minimal manual intervention.
This commit is contained in:
Evangelos Ribeiro Tzaras
2022-04-24 12:24:55 +02:00
parent 8daa502de5
commit 7ac862155b
83 changed files with 1744 additions and 1869 deletions

View File

@@ -29,8 +29,7 @@
#include <glib/gi18n.h>
struct _CallsDummyCall
{
struct _CallsDummyCall {
GObject parent_instance;
};
@@ -83,7 +82,7 @@ outbound_timeout_cb (CallsDummyCall *self)
case CALLS_CALL_STATE_DIALING:
calls_call_set_state (call, CALLS_CALL_STATE_ALERTING);
g_timeout_add_seconds
(3, (GSourceFunc)outbound_timeout_cb, self);
(3, (GSourceFunc) outbound_timeout_cb, self);
break;
case CALLS_CALL_STATE_ALERTING:
@@ -116,7 +115,7 @@ constructed (GObject *object)
CallsDummyCall *self = CALLS_DUMMY_CALL (object);
if (!calls_call_get_inbound (CALLS_CALL (object)))
g_timeout_add_seconds (1, (GSourceFunc)outbound_timeout_cb, self);
g_timeout_add_seconds (1, (GSourceFunc) outbound_timeout_cb, self);
G_OBJECT_CLASS (calls_dummy_call_parent_class)->constructed (object);
}

View File

@@ -31,11 +31,10 @@
#include <glib-object.h>
struct _CallsDummyOrigin
{
GObject parent_instance;
struct _CallsDummyOrigin {
GObject parent_instance;
GString *name;
GList *calls;
GList *calls;
};
static void calls_dummy_origin_message_source_interface_init (CallsOriginInterface *iface);
@@ -54,8 +53,8 @@ enum {
/* Property for setting the origins name upon construction */
PROP_DUMMY_NAME_CONSTRUCTOR,
/* The origins name. The implements the name property from CallsOrigin.
* Readonly property, can't be set directly. */
/* The origins name. The implements the name property from CallsOrigin.
* Readonly property, can't be set directly. */
PROP_NAME,
PROP_CALLS,
@@ -99,8 +98,7 @@ remove_calls (CallsDummyOrigin *self, const gchar *reason)
}
struct DisconnectedData
{
struct DisconnectedData {
CallsDummyOrigin *self;
CallsCall *call;
};
@@ -194,10 +192,10 @@ set_property (GObject *object,
static void
get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
CallsDummyOrigin *self = CALLS_DUMMY_ORIGIN (object);

View File

@@ -22,8 +22,7 @@
*
*/
#ifndef CALLS_DUMMY_ORIGIN_H__
#define CALLS_DUMMY_ORIGIN_H__
#pragma once
#include <glib-object.h>
@@ -33,10 +32,8 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (CallsDummyOrigin, calls_dummy_origin, CALLS, DUMMY_ORIGIN, GObject);
CallsDummyOrigin *calls_dummy_origin_new (const gchar *name);
CallsDummyOrigin *calls_dummy_origin_new (const gchar *name);
void calls_dummy_origin_create_inbound (CallsDummyOrigin *self,
const gchar *number);
G_END_DECLS
#endif /* CALLS_DUMMY_ORIGIN_H__ */

View File

@@ -37,11 +37,10 @@ static const char * const supported_protocols[] = {
NULL
};
struct _CallsDummyProvider
{
struct _CallsDummyProvider {
CallsProvider parent_instance;
GListStore *origins;
GListStore *origins;
};
static void calls_dummy_provider_message_source_interface_init (CallsMessageSourceInterface *iface);
@@ -50,16 +49,16 @@ static void calls_dummy_provider_message_source_interface_init (CallsMessageSour
#ifdef FOR_TESTING
G_DEFINE_TYPE_WITH_CODE
(CallsDummyProvider, calls_dummy_provider, CALLS_TYPE_PROVIDER,
G_IMPLEMENT_INTERFACE (CALLS_TYPE_MESSAGE_SOURCE,
calls_dummy_provider_message_source_interface_init))
(CallsDummyProvider, calls_dummy_provider, CALLS_TYPE_PROVIDER,
G_IMPLEMENT_INTERFACE (CALLS_TYPE_MESSAGE_SOURCE,
calls_dummy_provider_message_source_interface_init))
#else
G_DEFINE_DYNAMIC_TYPE_EXTENDED
(CallsDummyProvider, calls_dummy_provider, CALLS_TYPE_PROVIDER, 0,
G_IMPLEMENT_INTERFACE_DYNAMIC (CALLS_TYPE_MESSAGE_SOURCE,
calls_dummy_provider_message_source_interface_init))
(CallsDummyProvider, calls_dummy_provider, CALLS_TYPE_PROVIDER, 0,
G_IMPLEMENT_INTERFACE_DYNAMIC (CALLS_TYPE_MESSAGE_SOURCE,
calls_dummy_provider_message_source_interface_init))
#endif /* FOR_TESTING */
@@ -68,7 +67,8 @@ static gboolean
usr1_handler (CallsDummyProvider *self)
{
GListModel *model;
g_autoptr(CallsDummyOrigin) origin = NULL;
g_autoptr (CallsDummyOrigin) origin = NULL;
model = G_LIST_MODEL (self->origins);
g_return_val_if_fail (g_list_model_get_n_items (model) > 0, FALSE);
@@ -85,8 +85,9 @@ usr1_handler (CallsDummyProvider *self)
static gboolean
usr2_handler (CallsDummyProvider *self)
{
g_autoptr (CallsDummyOrigin) origin = NULL;
GListModel *model;
g_autoptr(CallsDummyOrigin) origin = NULL;
model = G_LIST_MODEL (self->origins);
g_return_val_if_fail (g_list_model_get_n_items (model) > 0, FALSE);
@@ -120,7 +121,7 @@ calls_dummy_provider_get_origins (CallsProvider *provider)
return G_LIST_MODEL (self->origins);
}
static const char * const *
static const char *const *
calls_dummy_provider_get_protocols (CallsProvider *provider)
{
return supported_protocols;
@@ -140,7 +141,7 @@ constructed (GObject *object)
calls_dummy_provider_add_origin (self, "Dummy origin");
g_unix_signal_add (SIGUSR1,
(GSourceFunc)usr1_handler,
(GSourceFunc) usr1_handler,
self);
g_unix_signal_add (SIGUSR2,
(GSourceFunc) usr2_handler,

View File

@@ -37,9 +37,9 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (CallsDummyProvider, calls_dummy_provider, CALLS, DUMMY_PROVIDER, CallsProvider)
CallsDummyProvider *calls_dummy_provider_new (void);
void calls_dummy_provider_add_origin (CallsDummyProvider *self,
const gchar *name);
void peas_register_types (PeasObjectModule *module);
void calls_dummy_provider_add_origin (CallsDummyProvider *self,
const gchar *name);
void peas_register_types (PeasObjectModule *module);
G_END_DECLS