[gnome-builder] plugins/editorui: move per-language tweaks into separate file
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/editorui: move per-language tweaks into separate file
- Date: Mon, 15 Aug 2022 19:22:39 +0000 (UTC)
commit 273147db2abbc295d64d7e76397fdf128a08db53
Author: Christian Hergert <chergert redhat com>
Date: Mon Aug 15 12:21:43 2022 -0700
plugins/editorui: move per-language tweaks into separate file
src/plugins/editorui/editorui.gresource.xml | 1 +
src/plugins/editorui/tweaks-language.ui | 68 +++++++++++++++++++++++++++++
src/plugins/editorui/tweaks.ui | 63 --------------------------
3 files changed, 69 insertions(+), 63 deletions(-)
---
diff --git a/src/plugins/editorui/editorui.gresource.xml b/src/plugins/editorui/editorui.gresource.xml
index 990567891..de829dfd2 100644
--- a/src/plugins/editorui/editorui.gresource.xml
+++ b/src/plugins/editorui/editorui.gresource.xml
@@ -8,5 +8,6 @@
<file preprocess="xml-stripblanks">gbp-editorui-position-label.ui</file>
<file preprocess="xml-stripblanks">gbp-editorui-scheme-selector.ui</file>
<file preprocess="xml-stripblanks">tweaks.ui</file>
+ <file preprocess="xml-stripblanks">tweaks-language.ui</file>
</gresource>
</gresources>
diff --git a/src/plugins/editorui/tweaks-language.ui b/src/plugins/editorui/tweaks-language.ui
new file mode 100644
index 000000000..9f325beb6
--- /dev/null
+++ b/src/plugins/editorui/tweaks-language.ui
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <template class="IdeTweaks">
+ <child internal-child="code_section">
+ <object class="IdeTweaksSection">
+ <child>
+ <object class="IdeTweaksPage" id="languages_page">
+ <property name="icon-name">text-x-javascript-symbolic</property>
+ <property name="title" translatable="yes">Programming Languages</property>
+ <child>
+ <object class="IdeTweaksFactory" id="language_page_factory">
+ <property name="model">GtkSourceLanguages</property>
+ <child>
+ <object class="IdeTweaksPage" id="language_page">
+ <binding name="title">
+ <lookup name="name" type="GtkSourceLanguage">
+ <lookup name="item">language_page_factory</lookup>
+ </lookup>
+ </binding>
+ <child>
+ <object class="IdeTweaksSettings" id="language_page_settings">
+ <property name="schema-id">org.gnome.builder.editor.language</property>
+ <binding name="schema-path">
+ <closure type="gchararray" function="format">
+ <constant type="gchararray">/org/gnome/builder/editor/languages/%s/</constant>
+ <lookup name="id" type="GtkSourceLanguage">
+ <lookup name="item">language_page_factory</lookup>
+ </lookup>
+ </closure>
+ </binding>
+ </object>
+ </child>
+ <child>
+ <object class="IdeTweaksGroup" id="language_general_group">
+ <property name="title" translatable="yes">General</property>
+ <child>
+ <object class="IdeTweaksSwitch" id="trim_whitespace">
+ <property name="title" translatable="yes">Trim Trailing Space</property>
+ <property name="subtitle" translatable="yes">Upon saving, trailing whitepsace
from modified lines will be trimmed</property>
+ <property
name="action-name">settings.org.gnome.builder.editor.language.trim-trailing-whitespace</property>
+ </object>
+ </child>
+ <child>
+ <object class="IdeTweaksSwitch" id="overwrite_braces">
+ <property name="title" translatable="yes">Overwrite Braces</property>
+ <property name="subtitle" translatable="yes">Overwrite closing braces, brackets,
parenthesis, and quotes</property>
+ <property
name="action-name">settings.org.gnome.builder.editor.language.overwrite-braces</property>
+ </object>
+ </child>
+ <child>
+ <object class="IdeTweaksSwitch" id="insert_matching_braces">
+ <property name="title" translatable="yes">Insert Matching Brace</property>
+ <property name="subtitle" translatable="yes">Insert matching character for
braces, brackets, parenthesis, and quotes</property>
+ <property
name="action-name">settings.org.gnome.builder.editor.language.insert-matching-brace</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/plugins/editorui/tweaks.ui b/src/plugins/editorui/tweaks.ui
index 54c0f8d2c..3a48708b9 100644
--- a/src/plugins/editorui/tweaks.ui
+++ b/src/plugins/editorui/tweaks.ui
@@ -217,68 +217,5 @@
</child>
</object>
</child>
- <child internal-child="code_section">
- <object class="IdeTweaksSection">
- <child>
- <object class="IdeTweaksPage" id="languages_page">
- <property name="icon-name">text-x-javascript-symbolic</property>
- <property name="title" translatable="yes">Programming Languages</property>
- <child>
- <object class="IdeTweaksFactory" id="language_page_factory">
- <property name="model">GtkSourceLanguages</property>
- <child>
- <object class="IdeTweaksPage" id="language_page">
- <binding name="title">
- <lookup name="name" type="GtkSourceLanguage">
- <lookup name="item">language_page_factory</lookup>
- </lookup>
- </binding>
- <child>
- <object class="IdeTweaksSettings" id="language_page_settings">
- <property name="schema-id">org.gnome.builder.editor.language</property>
- <binding name="schema-path">
- <closure type="gchararray" function="format">
- <constant type="gchararray">/org/gnome/builder/editor/languages/%s/</constant>
- <lookup name="id" type="GtkSourceLanguage">
- <lookup name="item">language_page_factory</lookup>
- </lookup>
- </closure>
- </binding>
- </object>
- </child>
- <child>
- <object class="IdeTweaksGroup" id="language_general_group">
- <property name="title" translatable="yes">General</property>
- <child>
- <object class="IdeTweaksSwitch" id="trim_whitespace">
- <property name="title" translatable="yes">Trim Trailing Space</property>
- <property name="subtitle" translatable="yes">Upon saving, trailing whitepsace
from modified lines will be trimmed</property>
- <property
name="action-name">settings.org.gnome.builder.editor.language.trim-trailing-whitespace</property>
- </object>
- </child>
- <child>
- <object class="IdeTweaksSwitch" id="overwrite_braces">
- <property name="title" translatable="yes">Overwrite Braces</property>
- <property name="subtitle" translatable="yes">Overwrite closing braces, brackets,
parenthesis, and quotes</property>
- <property
name="action-name">settings.org.gnome.builder.editor.language.overwrite-braces</property>
- </object>
- </child>
- <child>
- <object class="IdeTweaksSwitch" id="insert_matching_braces">
- <property name="title" translatable="yes">Insert Matching Brace</property>
- <property name="subtitle" translatable="yes">Insert matching character for
braces, brackets, parenthesis, and quotes</property>
- <property
name="action-name">settings.org.gnome.builder.editor.language.insert-matching-brace</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
</template>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]