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-03-07 01:12:42 +0300
committerDalai Felinto <dfelinto@gmail.com>2010-03-07 01:12:42 +0300
commit26fae8985bbc754325a15a77ca20a63a9669b2dd (patch)
tree7ee46eed4c949a54821deffc5a447c3008a8b683 /source/blender
parent3838b80cf1cfe0a340a8471732bc86fde2852c29 (diff)
flipping "tab as space" option (so it's on by default - argh ;)
(and fix error in creator.c last commit)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/text.c4
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index c28f4fde8ed..b58caf14293 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -191,7 +191,7 @@ Text *add_empty_text(char *name)
ta->nlines=1;
ta->flags= TXT_ISDIRTY | TXT_ISMEM;
- if(U.flag & USER_TXT_TABSTOSPACES)
+ if((U.flag & USER_TXT_TABSTOSPACES_DISABLE)==0)
ta->flags |= TXT_TABSTOSPACES;
ta->lines.first= ta->lines.last= NULL;
@@ -357,7 +357,7 @@ Text *add_text(char *file, const char *relpath)
ta->markers.first= ta->markers.last= NULL;
ta->curl= ta->sell= NULL;
- if(U.flag & USER_TXT_TABSTOSPACES)
+ if((U.flag & USER_TXT_TABSTOSPACES_DISABLE)==0)
ta->flags= TXT_TABSTOSPACES;
fseek(fp, 0L, SEEK_END);
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 945a1977f03..8a41c2da071 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -406,7 +406,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_SCRIPT_AUTOEXEC_DISABLE (1 << 22)
#define USER_FILENOUI (1 << 23)
#define USER_NONEGFRAMES (1 << 24)
-#define USER_TXT_TABSTOSPACES (1 << 25)
+#define USER_TXT_TABSTOSPACES_DISABLE (1 << 25)
/* helper macro for checking frame clamping */
#define FRAMENUMBER_MIN_CLAMP(cfra) \
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 536942bb9a9..a71c809af84 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2359,8 +2359,8 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");
prop= RNA_def_property(srna, "tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TXT_TABSTOSPACES);
- RNA_def_property_ui_text(prop, "Tabs as Spaces", "Automatically converts all new tabs into spaces in Text Editor");
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABSTOSPACES_DISABLE);
+ RNA_def_property_ui_text(prop, "Tabs as Spaces", "Automatically converts all new tabs into spaces for new and loaded text files");
prop= RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prefetchframes");