Added option to toggle usage of Tab button for indentation.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1087 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-12-12 21:52:48 +00:00
parent 659ed0f3f3
commit 7dda3569ee
6 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2006-12-12 Enrico Tröger <enrico.troeger@uvena.de>
* src/document.c, src/geany.h, src/keyfile.c, src/sciwrappers.c,
src/sciwrappers.h: Added option to toggle usage of Tab button for
indentation.
2006-12-12 Nick Treleaven <nick.treleaven@btinternet.com> 2006-12-12 Nick Treleaven <nick.treleaven@btinternet.com>
* src/build.c, src/interface.c, src/callbacks.c, src/ui_utils.c, * src/build.c, src/interface.c, src/callbacks.c, src/ui_utils.c,

View File

@ -275,6 +275,7 @@ static gint document_create_new_sci(const gchar *filename)
document_apply_update_prefs(sci); document_apply_update_prefs(sci);
sci_set_tab_indents(sci, app->use_tab_to_indent);
sci_set_symbol_margin(sci, app->show_markers_margin); sci_set_symbol_margin(sci, app->show_markers_margin);
sci_set_line_numbers(sci, app->show_linenumber_margin, 0); sci_set_line_numbers(sci, app->show_linenumber_margin, 0);
sci_set_lines_wrapped(sci, app->pref_editor_line_breaking); sci_set_lines_wrapped(sci, app->pref_editor_line_breaking);

View File

@ -93,6 +93,7 @@ typedef struct MyApp
gboolean show_markers_margin; gboolean show_markers_margin;
gboolean show_linenumber_margin; gboolean show_linenumber_margin;
gboolean brace_match_ltgt; gboolean brace_match_ltgt;
gboolean use_tab_to_indent;
gboolean main_window_realized; gboolean main_window_realized;
// I know, it is a bit confusing, but this line breaking is globally, // I know, it is a bit confusing, but this line breaking is globally,
// to change the default value at startup, I think // to change the default value at startup, I think

View File

@ -102,6 +102,7 @@ void configuration_save()
g_key_file_set_boolean(config, PACKAGE, "use_folding", app->pref_editor_folding); g_key_file_set_boolean(config, PACKAGE, "use_folding", app->pref_editor_folding);
g_key_file_set_boolean(config, PACKAGE, "unfold_all_children", app->pref_editor_unfold_all_children); g_key_file_set_boolean(config, PACKAGE, "unfold_all_children", app->pref_editor_unfold_all_children);
g_key_file_set_boolean(config, PACKAGE, "use_auto_indention", app->pref_editor_use_auto_indention); g_key_file_set_boolean(config, PACKAGE, "use_auto_indention", app->pref_editor_use_auto_indention);
g_key_file_set_boolean(config, PACKAGE, "use_tab_to_indent", app->use_tab_to_indent);
g_key_file_set_boolean(config, PACKAGE, "use_indicators", app->pref_editor_use_indicators); g_key_file_set_boolean(config, PACKAGE, "use_indicators", app->pref_editor_use_indicators);
g_key_file_set_boolean(config, PACKAGE, "show_indent_guide", app->pref_editor_show_indent_guide); g_key_file_set_boolean(config, PACKAGE, "show_indent_guide", app->pref_editor_show_indent_guide);
g_key_file_set_boolean(config, PACKAGE, "show_white_space", app->pref_editor_show_white_space); g_key_file_set_boolean(config, PACKAGE, "show_white_space", app->pref_editor_show_white_space);
@ -308,6 +309,7 @@ gboolean configuration_load()
app->msgwindow_visible = utils_get_setting_boolean(config, PACKAGE, "msgwindow_visible", TRUE); app->msgwindow_visible = utils_get_setting_boolean(config, PACKAGE, "msgwindow_visible", TRUE);
app->pref_editor_line_breaking = utils_get_setting_boolean(config, PACKAGE, "line_breaking", FALSE); //default is off for better performance app->pref_editor_line_breaking = utils_get_setting_boolean(config, PACKAGE, "line_breaking", FALSE); //default is off for better performance
app->pref_editor_use_auto_indention = utils_get_setting_boolean(config, PACKAGE, "use_auto_indention", TRUE); app->pref_editor_use_auto_indention = utils_get_setting_boolean(config, PACKAGE, "use_auto_indention", TRUE);
app->use_tab_to_indent = utils_get_setting_boolean(config, PACKAGE, "use_tab_to_indent", TRUE);
app->pref_editor_use_indicators = utils_get_setting_boolean(config, PACKAGE, "use_indicators", TRUE); app->pref_editor_use_indicators = utils_get_setting_boolean(config, PACKAGE, "use_indicators", TRUE);
app->pref_editor_show_indent_guide = utils_get_setting_boolean(config, PACKAGE, "show_indent_guide", FALSE); app->pref_editor_show_indent_guide = utils_get_setting_boolean(config, PACKAGE, "show_indent_guide", FALSE);
app->pref_editor_show_white_space = utils_get_setting_boolean(config, PACKAGE, "show_white_space", FALSE); app->pref_editor_show_white_space = utils_get_setting_boolean(config, PACKAGE, "show_white_space", FALSE);

View File

@ -908,3 +908,8 @@ gint sci_get_overtype(ScintillaObject *sci)
return SSM(sci, SCI_GETOVERTYPE, 0, 0); return SSM(sci, SCI_GETOVERTYPE, 0, 0);
} }
void sci_set_tab_indents(ScintillaObject *sci, gboolean set)
{
SSM(sci, SCI_SETTABINDENTS, set, 0);
}

View File

@ -166,5 +166,6 @@ void sci_set_autoc_max_height (ScintillaObject * sci, gint val);
gint sci_find_bracematch (ScintillaObject * sci, gint pos); gint sci_find_bracematch (ScintillaObject * sci, gint pos);
gint sci_get_overtype (ScintillaObject * sci); gint sci_get_overtype (ScintillaObject * sci);
void sci_set_tab_indents (ScintillaObject * sci, gboolean set);
#endif #endif