Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2010-01-15 00:30:51 +0300
committerDalai Felinto <dfelinto@gmail.com>2010-01-15 00:30:51 +0300
commit690ad15099fefd3e1f994529149652fde4929c99 (patch)
tree3077cba243fef15fa4911dc2e52bc44a39206b63 /source/blender/makesrna/intern/rna_text.c
parent5d16a5b7d998c3110e41f1343def4c7e4454ce2b (diff)
Text Editor: Add an option "Tabs as Spaces".
So now tab is not ALWAYS converted to spaces. This is stored by text datablock (what allows to do nice things in the future, as automatic check for the indentation type of the file). Ideally we should redraw the other Text Editor windows after changing that (in case the same file is opened and the Property panel is also open). Not sure how to do that though. I'm using TABSTOSPACES as the DEFINE flag because TABSASSPACES sounds too ugly. (also fix for interface divisor bug)
Diffstat (limited to 'source/blender/makesrna/intern/rna_text.c')
-rw-r--r--source/blender/makesrna/intern/rna_text.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index bed686ed360..3445933a3dc 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -198,6 +198,10 @@ static void rna_def_text(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISSCRIPT);
RNA_def_property_ui_text(prop, "Register", "Register this text as a module on loading.");
+ prop= RNA_def_property(srna, "tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_TABSTOSPACES);
+ RNA_def_property_ui_text(prop, "Tabs as Spaces", "Automatically converts all new tabs into spaces.");
+
prop= RNA_def_property(srna, "lines", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "TextLine");
RNA_def_property_ui_text(prop, "Lines", "Lines of text.");