[gnome-builder] plugins: fetch the enabled key once
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins: fetch the enabled key once
- Date: Wed, 9 Feb 2022 01:04:56 +0000 (UTC)
commit 2ad5d6383ab06598cc05bb983a2355920b7f448d
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 8 17:03:28 2022 -0800
plugins: fetch the enabled key once
We need to fetch the key once or we'll never get notifications for the
changed::enabled detailed signal.
Related #1621
src/libide/plugins/ide-extension-set-adapter.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/libide/plugins/ide-extension-set-adapter.c b/src/libide/plugins/ide-extension-set-adapter.c
index a86d43089..9b9a62ac8 100644
--- a/src/libide/plugins/ide-extension-set-adapter.c
+++ b/src/libide/plugins/ide-extension-set-adapter.c
@@ -150,8 +150,8 @@ watch_extension (IdeExtensionSetAdapter *self,
PeasPluginInfo *plugin_info,
GType interface_type)
{
- GSettings *settings;
- gchar *path;
+ g_autoptr(GSettings) settings = NULL;
+ g_autofree char *path = NULL;
g_assert (IDE_IS_MAIN_THREAD ());
g_assert (IDE_IS_EXTENSION_SET_ADAPTER (self));
@@ -165,14 +165,14 @@ watch_extension (IdeExtensionSetAdapter *self,
g_ptr_array_add (self->settings, g_object_ref (settings));
+ /* We have to fetch the key once to get changed events */
+ g_settings_get_boolean (settings, "enabled");
+
g_signal_connect_object (settings,
"changed::enabled",
G_CALLBACK (ide_extension_set_adapter_enabled_changed),
self,
G_CONNECT_SWAPPED);
-
- g_object_unref (settings);
- g_free (path);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]