[gnome-builder/wip/gtk4-port] libide/editor: add gsetting for snippet expansion
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] libide/editor: add gsetting for snippet expansion
- Date: Wed, 20 Apr 2022 17:23:26 +0000 (UTC)
commit d073f6c679421ef6c22c4cd19a45e86b8dfd0ba8
Author: Christian Hergert <chergert redhat com>
Date: Wed Apr 20 09:24:30 2022 -0700
libide/editor: add gsetting for snippet expansion
data/gsettings/org.gnome.builder.editor.gschema.xml | 5 +++++
src/libide/editor/ide-editor-page-settings.c | 3 +++
2 files changed, 8 insertions(+)
---
diff --git a/data/gsettings/org.gnome.builder.editor.gschema.xml
b/data/gsettings/org.gnome.builder.editor.gschema.xml
index d9d091eea..a17450495 100644
--- a/data/gsettings/org.gnome.builder.editor.gschema.xml
+++ b/data/gsettings/org.gnome.builder.editor.gschema.xml
@@ -144,5 +144,10 @@
<summary>Use Tabs</summary>
<description>Use the tabbar within the page grid.</description>
</key>
+ <key name="enable-snippets" type="b">
+ <default>true</default>
+ <summary>Enable Snippets</summary>
+ <description>Allow expanding snippets from the editor by pressing tab after the snippet
trigger.</description>
+ </key>
</schema>
</schemalist>
diff --git a/src/libide/editor/ide-editor-page-settings.c b/src/libide/editor/ide-editor-page-settings.c
index a46166ef6..d466b2d9b 100644
--- a/src/libide/editor/ide-editor-page-settings.c
+++ b/src/libide/editor/ide-editor-page-settings.c
@@ -183,6 +183,9 @@ _ide_editor_page_settings_init (IdeEditorPage *self)
G_SETTINGS_BIND_GET,
show_map_to_vscrollbar_policy,
NULL, NULL, NULL);
+ g_settings_bind (editor_settings, "enable-snippets",
+ self->view, "enable-snippets",
+ G_SETTINGS_BIND_GET);
g_settings_bind_with_mapping (editor_settings, "font-name",
self->view, "font-desc",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]