[gnome-builder] libide/core: rename to IdeLayeredSettings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/core: rename to IdeLayeredSettings
- Date: Tue, 26 Jul 2022 20:02:56 +0000 (UTC)
commit 30bc5a1fd288d1a1116fc26e6aee31b7b3a0df2f
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 26 13:02:47 2022 -0700
libide/core: rename to IdeLayeredSettings
This was a joke name to begin with, and it's time it got something more
descriptive to what it does.
src/libide/core/ide-layered-settings-private.h | 86 +++++++++
...-settings-sandwich.c => ide-layered-settings.c} | 202 ++++++++++-----------
src/libide/core/ide-settings-sandwich-private.h | 87 ---------
src/libide/core/ide-settings.c | 56 +++---
src/libide/core/meson.build | 4 +-
5 files changed, 216 insertions(+), 219 deletions(-)
---
diff --git a/src/libide/core/ide-layered-settings-private.h b/src/libide/core/ide-layered-settings-private.h
new file mode 100644
index 000000000..b902dfeaf
--- /dev/null
+++ b/src/libide/core/ide-layered-settings-private.h
@@ -0,0 +1,86 @@
+/* ide-layered-settings-private.h
+ *
+ * Copyright 2015-2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+#define IDE_TYPE_LAYERED_SETTINGS (ide_layered_settings_get_type())
+
+G_DECLARE_FINAL_TYPE (IdeLayeredSettings, ide_layered_settings, IDE, LAYERED_SETTINGS, GObject)
+
+IdeLayeredSettings *ide_layered_settings_new (const char *schema_id,
+ const char *path);
+GVariant *ide_layered_settings_get_default_value (IdeLayeredSettings *self,
+ const char *key);
+GVariant *ide_layered_settings_get_user_value (IdeLayeredSettings *self,
+ const char *key);
+GVariant *ide_layered_settings_get_value (IdeLayeredSettings *self,
+ const char *key);
+void ide_layered_settings_set_value (IdeLayeredSettings *self,
+ const char *key,
+ GVariant *value);
+gboolean ide_layered_settings_get_boolean (IdeLayeredSettings *self,
+ const char *key);
+double ide_layered_settings_get_double (IdeLayeredSettings *self,
+ const char *key);
+int ide_layered_settings_get_int (IdeLayeredSettings *self,
+ const char *key);
+char *ide_layered_settings_get_string (IdeLayeredSettings *self,
+ const char *key);
+guint ide_layered_settings_get_uint (IdeLayeredSettings *self,
+ const char *key);
+void ide_layered_settings_set_boolean (IdeLayeredSettings *self,
+ const char *key,
+ gboolean val);
+void ide_layered_settings_set_double (IdeLayeredSettings *self,
+ const char *key,
+ double val);
+void ide_layered_settings_set_int (IdeLayeredSettings *self,
+ const char *key,
+ int val);
+void ide_layered_settings_set_string (IdeLayeredSettings *self,
+ const char *key,
+ const char *val);
+void ide_layered_settings_set_uint (IdeLayeredSettings *self,
+ const char *key,
+ guint val);
+void ide_layered_settings_append (IdeLayeredSettings *self,
+ GSettings *settings);
+void ide_layered_settings_bind (IdeLayeredSettings *self,
+ const char *key,
+ gpointer object,
+ const char *property,
+ GSettingsBindFlags flags);
+void ide_layered_settings_bind_with_mapping (IdeLayeredSettings *self,
+ const char *key,
+ gpointer object,
+ const char *property,
+ GSettingsBindFlags flags,
+ GSettingsBindGetMapping get_mapping,
+ GSettingsBindSetMapping set_mapping,
+ gpointer user_data,
+ GDestroyNotify destroy);
+void ide_layered_settings_unbind (IdeLayeredSettings *self,
+ const char *property);
+
+G_END_DECLS
diff --git a/src/libide/core/ide-settings-sandwich.c b/src/libide/core/ide-layered-settings.c
similarity index 60%
rename from src/libide/core/ide-settings-sandwich.c
rename to src/libide/core/ide-layered-settings.c
index 93e58683a..fe890f666 100644
--- a/src/libide/core/ide-settings-sandwich.c
+++ b/src/libide/core/ide-layered-settings.c
@@ -1,4 +1,4 @@
-/* ide-settings-sandwich.c
+/* ide-layered-settings.c
*
* Copyright 2015-2022 Christian Hergert <chergert redhat com>
*
@@ -18,8 +18,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
-
-#define G_LOG_DOMAIN "ide-settings-sandwich"
+#define G_LOG_DOMAIN "ide-layered-settings"
#include "config.h"
@@ -28,9 +27,9 @@
#define G_SETTINGS_ENABLE_BACKEND
#include <gio/gsettingsbackend.h>
-#include "ide-settings-sandwich-private.h"
+#include "ide-layered-settings-private.h"
-struct _IdeSettingsSandwich
+struct _IdeLayeredSettings
{
GObject parent_instance;
GPtrArray *settings;
@@ -40,7 +39,7 @@ struct _IdeSettingsSandwich
char *path;
};
-G_DEFINE_TYPE (IdeSettingsSandwich, ide_settings_sandwich, G_TYPE_OBJECT)
+G_DEFINE_TYPE (IdeLayeredSettings, ide_layered_settings, G_TYPE_OBJECT)
enum {
PROP_0,
@@ -52,9 +51,9 @@ enum {
static GParamSpec *properties [LAST_PROP];
static GSettings *
-ide_settings_sandwich_get_primary_settings (IdeSettingsSandwich *self)
+ide_layered_settings_get_primary_settings (IdeLayeredSettings *self)
{
- g_assert (IDE_IS_SETTINGS_SANDWICH (self));
+ g_assert (IDE_IS_LAYERED_SETTINGS (self));
if (self->settings->len == 0)
g_error ("No settings have been loaded. Aborting.");
@@ -63,13 +62,13 @@ ide_settings_sandwich_get_primary_settings (IdeSettingsSandwich *self)
}
static void
-ide_settings_sandwich_cache_key (IdeSettingsSandwich *self,
- const char *key)
+ide_layered_settings_cache_key (IdeLayeredSettings *self,
+ const char *key)
{
g_autoptr(GVariant) value = NULL;
GSettings *settings;
- g_assert (IDE_IS_SETTINGS_SANDWICH (self));
+ g_assert (IDE_IS_LAYERED_SETTINGS (self));
g_assert (key != NULL);
g_assert (self->settings->len > 0);
@@ -91,13 +90,13 @@ ide_settings_sandwich_cache_key (IdeSettingsSandwich *self,
}
static void
-ide_settings_sandwich_update_cache (IdeSettingsSandwich *self)
+ide_layered_settings_update_cache (IdeLayeredSettings *self)
{
GSettingsSchemaSource *source;
g_autoptr(GSettingsSchema) schema = NULL;
g_auto(GStrv) keys = NULL;
- g_assert (IDE_IS_SETTINGS_SANDWICH (self));
+ g_assert (IDE_IS_LAYERED_SETTINGS (self));
source = g_settings_schema_source_get_default ();
schema = g_settings_schema_source_lookup (source, self->schema_id, TRUE);
@@ -108,28 +107,28 @@ ide_settings_sandwich_update_cache (IdeSettingsSandwich *self)
if ((keys = g_settings_schema_list_keys (schema)))
{
for (guint i = 0; keys[i]; i++)
- ide_settings_sandwich_cache_key (self, keys [i]);
+ ide_layered_settings_cache_key (self, keys [i]);
}
}
static void
-ide_settings_sandwich_settings_changed_cb (IdeSettingsSandwich *self,
- const char *key,
- GSettings *settings)
+ide_layered_settings_settings_changed_cb (IdeLayeredSettings *self,
+ const char *key,
+ GSettings *settings)
{
- g_assert (IDE_IS_SETTINGS_SANDWICH (self));
+ g_assert (IDE_IS_LAYERED_SETTINGS (self));
g_assert (key != NULL);
g_assert (G_IS_SETTINGS (settings));
- ide_settings_sandwich_cache_key (self, key);
+ ide_layered_settings_cache_key (self, key);
}
static void
-ide_settings_sandwich_constructed (GObject *object)
+ide_layered_settings_constructed (GObject *object)
{
- IdeSettingsSandwich *self = (IdeSettingsSandwich *)object;
+ IdeLayeredSettings *self = (IdeLayeredSettings *)object;
- g_assert (IDE_IS_SETTINGS_SANDWICH (self));
+ g_assert (IDE_IS_LAYERED_SETTINGS (self));
g_assert (self->schema_id != NULL);
g_assert (self->path != NULL);
@@ -137,29 +136,29 @@ ide_settings_sandwich_constructed (GObject *object)
self->memory_backend,
self->path);
- G_OBJECT_CLASS (ide_settings_sandwich_parent_class)->constructed (object);
+ G_OBJECT_CLASS (ide_layered_settings_parent_class)->constructed (object);
}
static void
-ide_settings_sandwich_finalize (GObject *object)
+ide_layered_settings_finalize (GObject *object)
{
- IdeSettingsSandwich *self = (IdeSettingsSandwich *)object;
+ IdeLayeredSettings *self = (IdeLayeredSettings *)object;
g_clear_pointer (&self->settings, g_ptr_array_unref);
g_clear_pointer (&self->schema_id, g_free);
g_clear_pointer (&self->path, g_free);
g_clear_object (&self->memory_backend);
- G_OBJECT_CLASS (ide_settings_sandwich_parent_class)->finalize (object);
+ G_OBJECT_CLASS (ide_layered_settings_parent_class)->finalize (object);
}
static void
-ide_settings_sandwich_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ide_layered_settings_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- IdeSettingsSandwich *self = IDE_SETTINGS_SANDWICH (object);
+ IdeLayeredSettings *self = IDE_LAYERED_SETTINGS (object);
switch (prop_id)
{
@@ -177,12 +176,12 @@ ide_settings_sandwich_get_property (GObject *object,
}
static void
-ide_settings_sandwich_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ide_layered_settings_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- IdeSettingsSandwich *self = IDE_SETTINGS_SANDWICH (object);
+ IdeLayeredSettings *self = IDE_LAYERED_SETTINGS (object);
switch (prop_id)
{
@@ -200,14 +199,14 @@ ide_settings_sandwich_set_property (GObject *object,
}
static void
-ide_settings_sandwich_class_init (IdeSettingsSandwichClass *klass)
+ide_layered_settings_class_init (IdeLayeredSettingsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructed = ide_settings_sandwich_constructed;
- object_class->finalize = ide_settings_sandwich_finalize;
- object_class->get_property = ide_settings_sandwich_get_property;
- object_class->set_property = ide_settings_sandwich_set_property;
+ object_class->constructed = ide_layered_settings_constructed;
+ object_class->finalize = ide_layered_settings_finalize;
+ object_class->get_property = ide_layered_settings_get_property;
+ object_class->set_property = ide_layered_settings_set_property;
properties [PROP_SCHEMA_ID] =
g_param_spec_string ("schema-id",
@@ -227,40 +226,40 @@ ide_settings_sandwich_class_init (IdeSettingsSandwichClass *klass)
}
static void
-ide_settings_sandwich_init (IdeSettingsSandwich *self)
+ide_layered_settings_init (IdeLayeredSettings *self)
{
self->settings = g_ptr_array_new_with_free_func (g_object_unref);
self->memory_backend = g_memory_settings_backend_new ();
}
-IdeSettingsSandwich *
-ide_settings_sandwich_new (const char *schema_id,
- const char *path)
+IdeLayeredSettings *
+ide_layered_settings_new (const char *schema_id,
+ const char *path)
{
g_return_val_if_fail (schema_id != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
- return g_object_new (IDE_TYPE_SETTINGS_SANDWICH,
+ return g_object_new (IDE_TYPE_LAYERED_SETTINGS,
"schema-id", schema_id,
"path", path,
NULL);
}
GVariant *
-ide_settings_sandwich_get_default_value (IdeSettingsSandwich *self,
- const char *key)
+ide_layered_settings_get_default_value (IdeLayeredSettings *self,
+ const char *key)
{
- g_return_val_if_fail (IDE_IS_SETTINGS_SANDWICH (self), NULL);
+ g_return_val_if_fail (IDE_IS_LAYERED_SETTINGS (self), NULL);
g_return_val_if_fail (key != NULL, NULL);
- return g_settings_get_default_value (ide_settings_sandwich_get_primary_settings (self), key);
+ return g_settings_get_default_value (ide_layered_settings_get_primary_settings (self), key);
}
GVariant *
-ide_settings_sandwich_get_user_value (IdeSettingsSandwich *self,
- const char *key)
+ide_layered_settings_get_user_value (IdeLayeredSettings *self,
+ const char *key)
{
- g_return_val_if_fail (IDE_IS_SETTINGS_SANDWICH (self), NULL);
+ g_return_val_if_fail (IDE_IS_LAYERED_SETTINGS (self), NULL);
g_return_val_if_fail (self->settings != NULL, NULL);
g_return_val_if_fail (key != NULL, NULL);
@@ -277,10 +276,10 @@ ide_settings_sandwich_get_user_value (IdeSettingsSandwich *self,
}
GVariant *
-ide_settings_sandwich_get_value (IdeSettingsSandwich *self,
- const char *key)
+ide_layered_settings_get_value (IdeLayeredSettings *self,
+ const char *key)
{
- g_return_val_if_fail (IDE_IS_SETTINGS_SANDWICH (self), NULL);
+ g_return_val_if_fail (IDE_IS_LAYERED_SETTINGS (self), NULL);
g_return_val_if_fail (key != NULL, NULL);
for (guint i = 0; i < self->settings->len; i++)
@@ -292,32 +291,32 @@ ide_settings_sandwich_get_value (IdeSettingsSandwich *self,
return g_steal_pointer (&value);
}
- return g_settings_get_value (ide_settings_sandwich_get_primary_settings (self), key);
+ return g_settings_get_value (ide_layered_settings_get_primary_settings (self), key);
}
void
-ide_settings_sandwich_set_value (IdeSettingsSandwich *self,
- const char *key,
- GVariant *value)
+ide_layered_settings_set_value (IdeLayeredSettings *self,
+ const char *key,
+ GVariant *value)
{
- g_return_if_fail (IDE_IS_SETTINGS_SANDWICH (self));
+ g_return_if_fail (IDE_IS_LAYERED_SETTINGS (self));
g_return_if_fail (key != NULL);
- g_settings_set_value (ide_settings_sandwich_get_primary_settings (self), key, value);
+ g_settings_set_value (ide_layered_settings_get_primary_settings (self), key, value);
}
#define DEFINE_GETTER(name, ret_type, func, ...) \
ret_type \
-ide_settings_sandwich_get_##name (IdeSettingsSandwich *self, \
- const char *key) \
+ide_layered_settings_get_##name (IdeLayeredSettings *self, \
+ const char *key) \
{ \
GVariant *value; \
ret_type ret; \
\
- g_return_val_if_fail (IDE_IS_SETTINGS_SANDWICH (self), (ret_type)0); \
+ g_return_val_if_fail (IDE_IS_LAYERED_SETTINGS (self), (ret_type)0); \
g_return_val_if_fail (key != NULL, (ret_type)0); \
\
- value = ide_settings_sandwich_get_value (self, key); \
+ value = ide_layered_settings_get_value (self, key); \
ret = g_variant_##func (value, ##__VA_ARGS__); \
g_variant_unref (value); \
\
@@ -332,17 +331,17 @@ DEFINE_GETTER (uint, guint, get_uint32)
#define DEFINE_SETTER(name, param_type, func) \
void \
-ide_settings_sandwich_set_##name (IdeSettingsSandwich *self, \
- const char *key, \
- param_type val) \
+ide_layered_settings_set_##name (IdeLayeredSettings *self, \
+ const char *key, \
+ param_type val) \
{ \
GVariant *value; \
\
- g_return_if_fail (IDE_IS_SETTINGS_SANDWICH (self)); \
+ g_return_if_fail (IDE_IS_LAYERED_SETTINGS (self)); \
g_return_if_fail (key != NULL); \
\
value = g_variant_##func (val); \
- ide_settings_sandwich_set_value (self, key, value); \
+ ide_layered_settings_set_value (self, key, value); \
}
DEFINE_SETTER (boolean, gboolean, new_boolean)
@@ -352,42 +351,42 @@ DEFINE_SETTER (string, const char *, new_string)
DEFINE_SETTER (uint, guint, new_uint32)
void
-ide_settings_sandwich_append (IdeSettingsSandwich *self,
+ide_layered_settings_append (IdeLayeredSettings *self,
GSettings *settings)
{
- g_return_if_fail (IDE_IS_SETTINGS_SANDWICH (self));
+ g_return_if_fail (IDE_IS_LAYERED_SETTINGS (self));
g_return_if_fail (G_IS_SETTINGS (settings));
g_ptr_array_add (self->settings, g_object_ref (settings));
g_signal_connect_object (settings,
"changed",
- G_CALLBACK (ide_settings_sandwich_settings_changed_cb),
+ G_CALLBACK (ide_layered_settings_settings_changed_cb),
self,
G_CONNECT_SWAPPED);
- ide_settings_sandwich_update_cache (self);
+ ide_layered_settings_update_cache (self);
}
void
-ide_settings_sandwich_bind (IdeSettingsSandwich *self,
- const char *key,
- gpointer object,
- const char *property,
- GSettingsBindFlags flags)
+ide_layered_settings_bind (IdeLayeredSettings *self,
+ const char *key,
+ gpointer object,
+ const char *property,
+ GSettingsBindFlags flags)
{
- g_return_if_fail (IDE_IS_SETTINGS_SANDWICH (self));
+ g_return_if_fail (IDE_IS_LAYERED_SETTINGS (self));
g_return_if_fail (key != NULL);
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (property != NULL);
- ide_settings_sandwich_bind_with_mapping (self, key, object, property, flags,
+ ide_layered_settings_bind_with_mapping (self, key, object, property, flags,
NULL, NULL, NULL, NULL);
}
/**
- * ide_settings_sandwich_bind_with_mapping:
- * @self: An #IdeSettingsSandwich.
+ * ide_layered_settings_bind_with_mapping:
+ * @self: An #IdeLayeredSettings.
* @key: the settings key to bind.
* @object (type GObject.Object): the target object.
* @property: the property on @object to apply.
@@ -401,26 +400,25 @@ ide_settings_sandwich_bind (IdeSettingsSandwich *self,
* from the resolved value via the layered settings.
*/
void
-ide_settings_sandwich_bind_with_mapping (IdeSettingsSandwich *self,
- const char *key,
- gpointer object,
- const char *property,
- GSettingsBindFlags flags,
- GSettingsBindGetMapping get_mapping,
- GSettingsBindSetMapping set_mapping,
- gpointer user_data,
- GDestroyNotify destroy)
+ide_layered_settings_bind_with_mapping (IdeLayeredSettings *self,
+ const char *key,
+ gpointer object,
+ const char *property,
+ GSettingsBindFlags flags,
+ GSettingsBindGetMapping get_mapping,
+ GSettingsBindSetMapping set_mapping,
+ gpointer user_data,
+ GDestroyNotify destroy)
{
- g_return_if_fail (IDE_IS_SETTINGS_SANDWICH (self));
+ g_return_if_fail (IDE_IS_LAYERED_SETTINGS (self));
g_return_if_fail (key != NULL);
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (property != NULL);
/*
* Our memory backend/settings are compiling the values from all of the
- * layers of our sandwich. Therefore, we only want to map reads from the
- * memory backend. We want to direct all writes to the topmost layer of the
- * sandwich (found at index 0).
+ * layers. Therefore, we only want to map reads from the memory backend. We
+ * want to direct all writes to the topmost layer (found at index 0).
*/
if ((flags & G_SETTINGS_BIND_GET) != 0)
g_settings_bind_with_mapping (self->memory_settings, key, object, property,
@@ -429,18 +427,18 @@ ide_settings_sandwich_bind_with_mapping (IdeSettingsSandwich *self,
/* We bind writability directly to our toplevel layer */
if ((flags & G_SETTINGS_BIND_SET) != 0)
- g_settings_bind_with_mapping (ide_settings_sandwich_get_primary_settings (self),
+ g_settings_bind_with_mapping (ide_layered_settings_get_primary_settings (self),
key, object, property, (flags & ~G_SETTINGS_BIND_GET),
get_mapping, set_mapping, user_data, destroy);
}
void
-ide_settings_sandwich_unbind (IdeSettingsSandwich *self,
- const char *property)
+ide_layered_settings_unbind (IdeLayeredSettings *self,
+ const char *property)
{
- g_return_if_fail (IDE_IS_SETTINGS_SANDWICH (self));
+ g_return_if_fail (IDE_IS_LAYERED_SETTINGS (self));
g_return_if_fail (property != NULL);
- g_settings_unbind (ide_settings_sandwich_get_primary_settings (self), property);
+ g_settings_unbind (ide_layered_settings_get_primary_settings (self), property);
g_settings_unbind (self->memory_backend, property);
}
diff --git a/src/libide/core/ide-settings.c b/src/libide/core/ide-settings.c
index f6bf60e36..59be733a7 100644
--- a/src/libide/core/ide-settings.c
+++ b/src/libide/core/ide-settings.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include "ide-settings.h"
-#include "ide-settings-sandwich-private.h"
+#include "ide-layered-settings-private.h"
/**
* SECTION:ide-settings
@@ -45,12 +45,12 @@
struct _IdeSettings
{
- GObject parent_instance;
- IdeSettingsSandwich *settings_sandwich;
- char *relative_path;
- char *schema_id;
- char *project_id;
- guint ignore_project_settings : 1;
+ GObject parent_instance;
+ IdeLayeredSettings *layered_settings;
+ char *relative_path;
+ char *schema_id;
+ char *project_id;
+ guint ignore_project_settings : 1;
};
G_DEFINE_FINAL_TYPE (IdeSettings, ide_settings, G_TYPE_OBJECT)
@@ -161,7 +161,7 @@ ide_settings_constructed (GObject *object)
g_assert ((self->relative_path [0] == 0) || g_str_has_suffix (self->relative_path, "/"));
full_path = g_strdup_printf ("/org/gnome/builder/%s", self->relative_path);
- self->settings_sandwich = ide_settings_sandwich_new (self->schema_id, full_path);
+ self->layered_settings = ide_layered_settings_new (self->schema_id, full_path);
/* Add our project relative settings */
if (self->ignore_project_settings == FALSE)
@@ -172,12 +172,12 @@ ide_settings_constructed (GObject *object)
path = g_strdup_printf ("/org/gnome/builder/projects/%s/%s",
self->project_id, self->relative_path);
project_settings = g_settings_new_with_path (self->schema_id, path);
- ide_settings_sandwich_append (self->settings_sandwich, project_settings);
+ ide_layered_settings_append (self->layered_settings, project_settings);
}
/* Add our application global (user defaults) settings */
app_settings = g_settings_new_with_path (self->schema_id, full_path);
- ide_settings_sandwich_append (self->settings_sandwich, app_settings);
+ ide_layered_settings_append (self->layered_settings, app_settings);
IDE_EXIT;
}
@@ -187,7 +187,7 @@ ide_settings_finalize (GObject *object)
{
IdeSettings *self = (IdeSettings *)object;
- g_clear_object (&self->settings_sandwich);
+ g_clear_object (&self->layered_settings);
g_clear_pointer (&self->relative_path, g_free);
g_clear_pointer (&self->schema_id, g_free);
g_clear_pointer (&self->project_id, g_free);
@@ -368,7 +368,7 @@ ide_settings_get_default_value (IdeSettings *self,
g_return_val_if_fail (IDE_IS_SETTINGS (self), NULL);
g_return_val_if_fail (key != NULL, NULL);
- return ide_settings_sandwich_get_default_value (self->settings_sandwich, key);
+ return ide_layered_settings_get_default_value (self->layered_settings, key);
}
GVariant *
@@ -378,7 +378,7 @@ ide_settings_get_user_value (IdeSettings *self,
g_return_val_if_fail (IDE_IS_SETTINGS (self), NULL);
g_return_val_if_fail (key != NULL, NULL);
- return ide_settings_sandwich_get_user_value (self->settings_sandwich, key);
+ return ide_layered_settings_get_user_value (self->layered_settings, key);
}
GVariant *
@@ -388,7 +388,7 @@ ide_settings_get_value (IdeSettings *self,
g_return_val_if_fail (IDE_IS_SETTINGS (self), NULL);
g_return_val_if_fail (key != NULL, NULL);
- return ide_settings_sandwich_get_value (self->settings_sandwich, key);
+ return ide_layered_settings_get_value (self->layered_settings, key);
}
void
@@ -399,7 +399,7 @@ ide_settings_set_value (IdeSettings *self,
g_return_if_fail (IDE_IS_SETTINGS (self));
g_return_if_fail (key != NULL);
- return ide_settings_sandwich_set_value (self->settings_sandwich, key, value);
+ return ide_layered_settings_set_value (self->layered_settings, key, value);
}
gboolean
@@ -409,7 +409,7 @@ ide_settings_get_boolean (IdeSettings *self,
g_return_val_if_fail (IDE_IS_SETTINGS (self), FALSE);
g_return_val_if_fail (key != NULL, FALSE);
- return ide_settings_sandwich_get_boolean (self->settings_sandwich, key);
+ return ide_layered_settings_get_boolean (self->layered_settings, key);
}
double
@@ -419,7 +419,7 @@ ide_settings_get_double (IdeSettings *self,
g_return_val_if_fail (IDE_IS_SETTINGS (self), 0.0);
g_return_val_if_fail (key != NULL, 0.0);
- return ide_settings_sandwich_get_double (self->settings_sandwich, key);
+ return ide_layered_settings_get_double (self->layered_settings, key);
}
int
@@ -429,7 +429,7 @@ ide_settings_get_int (IdeSettings *self,
g_return_val_if_fail (IDE_IS_SETTINGS (self), 0);
g_return_val_if_fail (key != NULL, 0);
- return ide_settings_sandwich_get_int (self->settings_sandwich, key);
+ return ide_layered_settings_get_int (self->layered_settings, key);
}
char *
@@ -439,7 +439,7 @@ ide_settings_get_string (IdeSettings *self,
g_return_val_if_fail (IDE_IS_SETTINGS (self), NULL);
g_return_val_if_fail (key != NULL, NULL);
- return ide_settings_sandwich_get_string (self->settings_sandwich, key);
+ return ide_layered_settings_get_string (self->layered_settings, key);
}
guint
@@ -449,7 +449,7 @@ ide_settings_get_uint (IdeSettings *self,
g_return_val_if_fail (IDE_IS_SETTINGS (self), 0);
g_return_val_if_fail (key != NULL, 0);
- return ide_settings_sandwich_get_uint (self->settings_sandwich, key);
+ return ide_layered_settings_get_uint (self->layered_settings, key);
}
void
@@ -460,7 +460,7 @@ ide_settings_set_boolean (IdeSettings *self,
g_return_if_fail (IDE_IS_SETTINGS (self));
g_return_if_fail (key != NULL);
- ide_settings_sandwich_set_boolean (self->settings_sandwich, key, val);
+ ide_layered_settings_set_boolean (self->layered_settings, key, val);
}
void
@@ -471,7 +471,7 @@ ide_settings_set_double (IdeSettings *self,
g_return_if_fail (IDE_IS_SETTINGS (self));
g_return_if_fail (key != NULL);
- ide_settings_sandwich_set_double (self->settings_sandwich, key, val);
+ ide_layered_settings_set_double (self->layered_settings, key, val);
}
void
@@ -482,7 +482,7 @@ ide_settings_set_int (IdeSettings *self,
g_return_if_fail (IDE_IS_SETTINGS (self));
g_return_if_fail (key != NULL);
- ide_settings_sandwich_set_int (self->settings_sandwich, key, val);
+ ide_layered_settings_set_int (self->layered_settings, key, val);
}
void
@@ -493,7 +493,7 @@ ide_settings_set_string (IdeSettings *self,
g_return_if_fail (IDE_IS_SETTINGS (self));
g_return_if_fail (key != NULL);
- ide_settings_sandwich_set_string (self->settings_sandwich, key, val);
+ ide_layered_settings_set_string (self->layered_settings, key, val);
}
void
@@ -504,7 +504,7 @@ ide_settings_set_uint (IdeSettings *self,
g_return_if_fail (IDE_IS_SETTINGS (self));
g_return_if_fail (key != NULL);
- ide_settings_sandwich_set_uint (self->settings_sandwich, key, val);
+ ide_layered_settings_set_uint (self->layered_settings, key, val);
}
void
@@ -519,7 +519,7 @@ ide_settings_bind (IdeSettings *self,
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (property != NULL);
- ide_settings_sandwich_bind (self->settings_sandwich, key, object, property, flags);
+ ide_layered_settings_bind (self->layered_settings, key, object, property, flags);
}
/**
@@ -555,7 +555,7 @@ ide_settings_bind_with_mapping (IdeSettings *self,
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (property != NULL);
- ide_settings_sandwich_bind_with_mapping (self->settings_sandwich, key, object, property, flags,
+ ide_layered_settings_bind_with_mapping (self->layered_settings, key, object, property, flags,
get_mapping, set_mapping, user_data, destroy);
}
@@ -566,5 +566,5 @@ ide_settings_unbind (IdeSettings *self,
g_return_if_fail (IDE_IS_SETTINGS (self));
g_return_if_fail (property != NULL);
- ide_settings_sandwich_unbind (self->settings_sandwich, property);
+ ide_layered_settings_unbind (self->layered_settings, property);
}
diff --git a/src/libide/core/meson.build b/src/libide/core/meson.build
index 1d8d09650..0b384765e 100644
--- a/src/libide/core/meson.build
+++ b/src/libide/core/meson.build
@@ -74,7 +74,7 @@ libide_core_public_headers = [
]
libide_core_private_headers = [
- 'ide-settings-sandwich-private.h',
+ 'ide-layered-settings-private.h',
'ide-transfer-manager-private.h',
]
@@ -103,7 +103,7 @@ libide_core_public_sources = [
]
libide_core_private_sources = [
- 'ide-settings-sandwich.c',
+ 'ide-layered-settings.c',
]
libide_core_sources = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]