[gnome-builder] sourceview: make indent-width match tab-width
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] sourceview: make indent-width match tab-width
- Date: Tue, 20 Jan 2015 05:25:05 +0000 (UTC)
commit 9bd5a04667ff9d2dac2c44cb99c5bf4324e205eb
Author: Christian Hergert <christian hergert me>
Date: Mon Jan 19 21:23:34 2015 -0800
sourceview: make indent-width match tab-width
We still need to expose this in language settings.
https://bugzilla.gnome.org/show_bug.cgi?id=742934
...rg.gnome.builder.editor.language.gschema.xml.in | 4 ++++
src/editor/gb-source-view.c | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/data/org.gnome.builder.editor.language.gschema.xml.in
b/data/org.gnome.builder.editor.language.gschema.xml.in
index cd83e85..f63a016 100644
--- a/data/org.gnome.builder.editor.language.gschema.xml.in
+++ b/data/org.gnome.builder.editor.language.gschema.xml.in
@@ -3,6 +3,10 @@
<key name="auto-indent" type="b">
<default>true</default>
</key>
+ <key name="indent-width" type="i">
+ <range min="-1" max="32"/>
+ <default>-1</default>
+ </key>
<key name="insert-spaces-instead-of-tabs" type="b">
<default>false</default>
</key>
diff --git a/src/editor/gb-source-view.c b/src/editor/gb-source-view.c
index 24f3e68..c59b404 100644
--- a/src/editor/gb-source-view.c
+++ b/src/editor/gb-source-view.c
@@ -222,6 +222,7 @@ gb_source_view_disconnect_settings (GbSourceView *view)
g_settings_unbind (view, "auto-indent");
g_settings_unbind (view, "highlight-current-line");
+ g_settings_unbind (view, "indent-width");
g_settings_unbind (view, "insert-spaces-instead-of-tabs");
g_settings_unbind (view, "right-margin-position");
g_settings_unbind (view, "show-line-numbers");
@@ -261,6 +262,8 @@ gb_source_view_connect_settings (GbSourceView *view)
g_settings_bind (settings, "auto-indent", view, "auto-indent",
G_SETTINGS_BIND_GET);
+ g_settings_bind (settings, "indent-width", view, "indent-width",
+ G_SETTINGS_BIND_GET);
g_settings_bind (settings, "insert-matching-brace",
view, "insert-matching-brace",
G_SETTINGS_BIND_GET);
@@ -278,8 +281,6 @@ gb_source_view_connect_settings (GbSourceView *view)
G_SETTINGS_BIND_GET);
g_settings_bind (settings, "tab-width", view, "tab-width",
G_SETTINGS_BIND_GET);
- g_settings_bind (settings, "tab-width", view, "indent-width",
- G_SETTINGS_BIND_GET);
g_settings_bind (settings, "trim-trailing-whitespace",
buffer, "trim-trailing-whitespace",
G_SETTINGS_BIND_GET);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]