[gnome-builder] libide/core: fix changed signal to include key
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/core: fix changed signal to include key
- Date: Tue, 26 Jul 2022 21:29:01 +0000 (UTC)
commit cb20e3267b730bdf42ee4728e590e29e552ee5bb
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 26 14:28:08 2022 -0700
libide/core: fix changed signal to include key
We want the key in the arguments, not just the detailed quark.
src/libide/core/ide-layered-settings.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/core/ide-layered-settings.c b/src/libide/core/ide-layered-settings.c
index 5b98fafdd..022cb18af 100644
--- a/src/libide/core/ide-layered-settings.c
+++ b/src/libide/core/ide-layered-settings.c
@@ -94,7 +94,7 @@ ide_layered_settings_cache_key (IdeLayeredSettings *self,
value = g_settings_get_value (settings, key);
g_settings_set_value (self->memory_settings, key, value);
- g_signal_emit (self, signals[CHANGED], g_quark_from_string (key));
+ g_signal_emit (self, signals[CHANGED], g_quark_from_string (key), key);
}
static void
@@ -239,7 +239,9 @@ ide_layered_settings_class_init (IdeLayeredSettingsClass *klass)
0,
NULL, NULL,
NULL,
- G_TYPE_NONE, 0);
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
}
static void
@@ -292,6 +294,14 @@ ide_layered_settings_get_user_value (IdeLayeredSettings *self,
return NULL;
}
+/**
+ * ide_layered_settings_get_value:
+ * @self: a #IdeLayeredSettings
+ *
+ * Gets the value of @key from the first layer that is modified.
+ *
+ * Returns: (transfer full): a #GVariant
+ */
GVariant *
ide_layered_settings_get_value (IdeLayeredSettings *self,
const char *key)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]