settings: Convert to the singleton pattern

We only have a single source of settings, so we should reflect that by
using a singleton. This also reduces our LoC.

This doesn't impair our ability to run tests because there we run with
GSETTINGS_BACKEND=memory
This commit is contained in:
Evangelos Ribeiro Tzaras
2022-05-09 22:57:41 +02:00
parent d28be2650b
commit 94fa13af4c
11 changed files with 26 additions and 57 deletions

View File

@@ -11,4 +11,4 @@
#include "calls-contacts-provider.h"
CallsContactsProvider *__wrap_calls_contacts_provider_new (CallsSettings *settings);
CallsContactsProvider *__wrap_calls_contacts_provider_new (void);

View File

@@ -14,9 +14,8 @@
static void
test_contacts_null_contact (void)
{
g_autoptr (CallsSettings) settings = calls_settings_new ();
g_autoptr (CallsContactsProvider) contacts_provider =
calls_contacts_provider_new (settings);
calls_contacts_provider_new ();
CallsBestMatch *best_match;
best_match = calls_contacts_provider_lookup_id (contacts_provider, NULL);

View File

@@ -12,7 +12,7 @@
#include <libpeas/peas.h>
CallsContactsProvider *
__wrap_calls_contacts_provider_new (CallsSettings *settings)
__wrap_calls_contacts_provider_new (void)
{
return NULL;
}

View File

@@ -138,7 +138,7 @@ __wrap_lfb_event_end_feedback_finish (LfbEvent *self,
CallsContactsProvider *
__wrap_calls_contacts_provider_new (CallsSettings *settings)
__wrap_calls_contacts_provider_new (void)
{
return NULL;
}

View File

@@ -14,7 +14,7 @@
#include <gtk/gtk.h>
CallsContactsProvider *
__wrap_calls_contacts_provider_new (CallsSettings *settings)
__wrap_calls_contacts_provider_new (void)
{
return NULL;
}