[gnome-builder/wip/chergert/perspective] prefs: add more buildin preferences
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/perspective] prefs: add more buildin preferences
- Date: Sat, 7 Nov 2015 10:19:40 +0000 (UTC)
commit a9387dd79658ae506be2f669e91a321035dea860
Author: Christian Hergert <chergert redhat com>
Date: Sat Nov 7 02:19:26 2015 -0800
prefs: add more buildin preferences
libide/preferences/ide-preferences-builtin.c | 71 ++++++++++++++++++++------
1 files changed, 56 insertions(+), 15 deletions(-)
---
diff --git a/libide/preferences/ide-preferences-builtin.c b/libide/preferences/ide-preferences-builtin.c
index 258f029..10fe9c4 100644
--- a/libide/preferences/ide-preferences-builtin.c
+++ b/libide/preferences/ide-preferences-builtin.c
@@ -87,15 +87,6 @@ ide_preferences_builtin_register_appearance (IdePreferences *preferences)
ide_preferences_add_group (preferences, "appearance", "background", NULL, 300);
ide_preferences_add_switch (preferences, "appearance", "background", "org.gnome.builder.editor",
"show-grid-lines", NULL, _("Grid Pattern"), _("Display a grid pattern beneath the source code"), NULL, 0);
-
- ide_preferences_add_list_group (preferences, "appearance", "draw-spaces", _("Whitespace Characters"), 400);
- ide_preferences_add_switch (preferences, "appearance", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"space\"", _("Spaces"), NULL, NULL, 0);
- ide_preferences_add_switch (preferences, "appearance", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"tab\"", _("Tabs"), NULL, NULL, 1);
- ide_preferences_add_switch (preferences, "appearance", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"newline\"", _("New line and carriage return"), NULL, NULL, 2);
- ide_preferences_add_switch (preferences, "appearance", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"nbsp\"", _("Non-breaking spaces"), NULL, NULL, 3);
- ide_preferences_add_switch (preferences, "appearance", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"text\"", _("Spaces inside of text"), NULL, NULL, 4);
- ide_preferences_add_switch (preferences, "appearance", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"trailing\"", _("Trailing Only"), NULL, NULL, 5);
- ide_preferences_add_switch (preferences, "appearance", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"leading\"", _("Leading Only"), NULL, NULL, 6);
}
static void
@@ -113,18 +104,68 @@ ide_preferences_builtin_register_keyboard (IdePreferences *preferences)
ide_preferences_add_switch (preferences, "keyboard", "movements", "org.gnome.builder.editor",
"smart-backspace", NULL, _("Smart Backspace"), _("Backspace will remove extra space to keep you aligned with
your indentation"), NULL, 100);
}
+static void
+ide_preferences_builtin_register_editor (IdePreferences *preferences)
+{
+ ide_preferences_add_page (preferences, "editor", _("Editor"), 100);
+
+ ide_preferences_add_group (preferences, "editor", "position", NULL, 0);
+ ide_preferences_add_switch (preferences, "editor", "position", "org.gnome.builder.editor",
"restore-insert-mark", NULL, _("Restore cursor position"), _("Restore the cursor position when a file is
reopened"), NULL, 0);
+
+ ide_preferences_add_list_group (preferences, "editor", "line", _("Line Information"), 50);
+ ide_preferences_add_switch (preferences, "editor", "line", "org.gnome.builder.editor",
"show-line-numbers", NULL, _("Line numbers"), _("Show the line number at the beginning of each line"), NULL,
0);
+ ide_preferences_add_switch (preferences, "editor", "line", "org.gnome.builder.editor",
"show-line-changes", NULL, _("Changes to the document"), _("Show if a line was added or modified next to the
line number"), NULL, 1);
+
+ ide_preferences_add_list_group (preferences, "editor", "highlight", _("Highlight"), 100);
+ ide_preferences_add_switch (preferences, "editor", "highlight", "org.gnome.builder.editor",
"highlight-current-line", NULL, _("Current line"), _("Make the current line stand out with highlights"),
NULL, 0);
+ ide_preferences_add_switch (preferences, "editor", "highlight", "org.gnome.builder.editor",
"highlight-matching-brackets", NULL, _("Matching brackets"), _("Highlight matching brackets based on cursor
position"), NULL, 1);
+
+ ide_preferences_add_list_group (preferences, "editor", "overview", _("Code Overview"), 100);
+ ide_preferences_add_switch (preferences, "editor", "overview", "org.gnome.builder.editor", "show-map",
NULL, _("Show overview map"), _("Show an overview map next to the source code to enhance navigation"), NULL,
0);
+ ide_preferences_add_switch (preferences, "editor", "overview", "org.gnome.builder.editor",
"auto-hide-map", NULL, _("Automatically hide overview map"), _("Automatically hide the map when the editor
loses focus"), NULL, 1);
+
+ ide_preferences_add_list_group (preferences, "editor", "draw-spaces", _("Whitespace Characters"), 400);
+ ide_preferences_add_switch (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"space\"", _("Spaces"), NULL, NULL, 0);
+ ide_preferences_add_switch (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"tab\"", _("Tabs"), NULL, NULL, 1);
+ ide_preferences_add_switch (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"newline\"", _("New line and carriage return"), NULL, NULL, 2);
+ ide_preferences_add_switch (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"nbsp\"", _("Non-breaking spaces"), NULL, NULL, 3);
+ ide_preferences_add_switch (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"text\"", _("Spaces inside of text"), NULL, NULL, 4);
+ ide_preferences_add_switch (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"trailing\"", _("Trailing Only"), NULL, NULL, 5);
+ ide_preferences_add_switch (preferences, "editor", "draw-spaces", "org.gnome.builder.editor",
"draw-spaces", "\"leading\"", _("Leading Only"), NULL, NULL, 6);
+}
+
+static void
+ide_preferences_builtin_register_code_insight (IdePreferences *preferences)
+{
+ ide_preferences_add_page (preferences, "code-insight", _("Code Insight"), 300);
+
+ ide_preferences_add_group (preferences, "code-insight", "semantic", NULL, 0);
+ ide_preferences_add_switch (preferences, "code-insight", "semantic", "org.gnome.builder.code-insight",
"semantic-highlighting", NULL, _("Semantic Highlighting"), _("Use code insignt to highlight additional
information discovered in the source file"), NULL, 0);
+
+ ide_preferences_add_list_group (preferences, "code-insight", "completion", _("Completion"), 100);
+ ide_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"word-completion", NULL, _("Suggest words found in open files"), _("Suggests completions as you type based on
words found in any open document"), NULL, 0);
+ ide_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"ctags-autocompletion", NULL, _("Suggest completions using Ctags"), _("Create and manages a Ctags database
for completing class names, functions, and more"), NULL, 10);
+ ide_preferences_add_switch (preferences, "code-insight", "completion", "org.gnome.builder.code-insight",
"clang-autocompletion", NULL, _("Suggest completions using Clang (Experimental)"), _("Use Clang to suggest
completions for C and C++ languages"), NULL, 20);
+}
+
+static void
+ide_preferences_builtin_register_snippets (IdePreferences *preferences)
+{
+ ide_preferences_add_page (preferences, "snippets", _("Snippets"), 350);
+
+ ide_preferences_add_group (preferences, "snippets", "completion", NULL, 0);
+ ide_preferences_add_switch (preferences, "snippets", "completion", "org.gnome.builder.code-insight",
"snippet-completion", NULL, _("Suggest code snippets"), _("Improve your efficiency by using the current word
to suggest snippets"), NULL, 0);
+}
+
void
_ide_preferences_builtin_register (IdePreferences *preferences)
{
ide_preferences_builtin_register_appearance (preferences);
-
- ide_preferences_add_page (preferences, "editor", _("Editor"), 100);
+ ide_preferences_builtin_register_editor (preferences);
ide_preferences_add_page (preferences, "languages", _("Programming Languages"), 200);
- ide_preferences_add_page (preferences, "code-insight", _("Code Insight"), 300);
-
+ ide_preferences_builtin_register_code_insight (preferences);
+ ide_preferences_builtin_register_snippets (preferences);
ide_preferences_builtin_register_keyboard (preferences);
-
ide_preferences_add_page (preferences, "vcs", _("Version Control"), 600);
-
ide_preferences_builtin_register_plugins (preferences);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]