SF.net SVN: geany:[2838] branches/custom-tab-width
ntrel at users.sourceforge.net
ntrel at xxxxx
Wed Jul 30 15:26:51 UTC 2008
Revision: 2838
http://geany.svn.sourceforge.net/geany/?rev=2838&view=rev
Author: ntrel
Date: 2008-07-30 15:26:49 +0000 (Wed, 30 Jul 2008)
Log Message:
-----------
Move use_tab_to_indent pref back to editor_prefs (should be unique).
Modified Paths:
--------------
branches/custom-tab-width/ChangeLog
branches/custom-tab-width/src/editor.h
branches/custom-tab-width/src/keyfile.c
Modified: branches/custom-tab-width/ChangeLog
===================================================================
--- branches/custom-tab-width/ChangeLog 2008-07-29 21:44:29 UTC (rev 2837)
+++ branches/custom-tab-width/ChangeLog 2008-07-30 15:26:49 UTC (rev 2838)
@@ -1,3 +1,9 @@
+2008-07-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/keyfile.c, src/editor.h:
+ Move use_tab_to_indent pref back to editor_prefs (should be unique).
+
+
2008-07-29 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/prefs.c, src/editor.h:
Modified: branches/custom-tab-width/src/editor.h
===================================================================
--- branches/custom-tab-width/src/editor.h 2008-07-29 21:44:29 UTC (rev 2837)
+++ branches/custom-tab-width/src/editor.h 2008-07-30 15:26:49 UTC (rev 2838)
@@ -64,23 +64,24 @@
GeanyAutoIndent;
+/** Indentation prefs that might be different according to project or filetype.
+ * Use @c editor_get_indent_prefs() to lookup the prefs for a particular document. */
typedef struct GeanyIndentPrefs
{
gint width; /**< Indent width. */
GeanyIndentType type; /**< Whether to use tabs, spaces or both to indent. */
gint tab_width; /**< Width of a tab, when using GEANY_INDENT_TYPE_BOTH. */
- gboolean use_tab_to_indent; /* hidden pref makes pressing Tab key like Ctrl-I */
GeanyAutoIndent auto_indent_mode;
gboolean detect_type;
}
GeanyIndentPrefs;
-/** Default prefs when creating a new editor window.
+/* Default prefs when creating a new editor window.
* Some of these can be overridden per document. */
typedef struct GeanyEditorPrefs
{
- GeanyIndentPrefs *indentation; /**< Indentation prefs. */
+ GeanyIndentPrefs *indentation; /*< Default indentation prefs. @see editor_get_indent_prefs(). */
gboolean show_white_space;
gboolean show_indent_guide;
gboolean show_line_endings;
@@ -96,6 +97,7 @@
gboolean folding;
gboolean unfold_all_children;
gboolean disable_dnd;
+ gboolean use_tab_to_indent; /* hidden pref makes pressing Tab key like Ctrl-I */
gboolean smart_home_key;
gboolean newline_strip;
gboolean auto_complete_symbols;
Modified: branches/custom-tab-width/src/keyfile.c
===================================================================
--- branches/custom-tab-width/src/keyfile.c 2008-07-29 21:44:29 UTC (rev 2837)
+++ branches/custom-tab-width/src/keyfile.c 2008-07-30 15:26:49 UTC (rev 2838)
@@ -487,7 +487,7 @@
static void save_hidden_prefs(GKeyFile *config)
{
write_hidden_pref_boolean(config, PACKAGE, "show_editor_scrollbars", editor_prefs.show_scrollbars);
- write_hidden_pref_boolean(config, PACKAGE, "use_tab_to_indent", editor_prefs.indentation->use_tab_to_indent);
+ write_hidden_pref_boolean(config, PACKAGE, "use_tab_to_indent", editor_prefs.use_tab_to_indent);
write_hidden_pref_boolean(config, PACKAGE, "brace_match_ltgt", editor_prefs.brace_match_ltgt);
write_hidden_pref_boolean(config, PACKAGE, "use_gtk_word_boundaries", editor_prefs.use_gtk_word_boundaries);
write_hidden_pref_boolean(config, PACKAGE, "complete_snippets_whilst_editing", editor_prefs.complete_snippets_whilst_editing);
@@ -627,7 +627,7 @@
editor_prefs.symbolcompletion_min_chars = utils_get_setting_integer(config, PACKAGE, "symbolcompletion_min_chars", GEANY_MIN_SYMBOLLIST_CHARS);
editor_prefs.symbolcompletion_max_height = utils_get_setting_integer(config, PACKAGE, "symbolcompletion_max_height", GEANY_MAX_SYMBOLLIST_HEIGHT);
editor_prefs.line_wrapping = utils_get_setting_boolean(config, PACKAGE, "line_wrapping", FALSE); /* default is off for better performance */
- editor_prefs.indentation->use_tab_to_indent = utils_get_setting_boolean(config, PACKAGE, "use_tab_to_indent", FALSE);
+ editor_prefs.use_tab_to_indent = utils_get_setting_boolean(config, PACKAGE, "use_tab_to_indent", FALSE);
editor_prefs.use_indicators = utils_get_setting_boolean(config, PACKAGE, "use_indicators", TRUE);
editor_prefs.show_indent_guide = utils_get_setting_boolean(config, PACKAGE, "show_indent_guide", FALSE);
editor_prefs.show_white_space = utils_get_setting_boolean(config, PACKAGE, "show_white_space", FALSE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list