diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-03-07 01:12:42 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-03-07 01:12:42 +0300 |
commit | 26fae8985bbc754325a15a77ca20a63a9669b2dd (patch) | |
tree | 7ee46eed4c949a54821deffc5a447c3008a8b683 /source | |
parent | 3838b80cf1cfe0a340a8471732bc86fde2852c29 (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')
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 4 | ||||
-rw-r--r-- | source/creator/creator.c | 3 |
4 files changed, 6 insertions, 7 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"); diff --git a/source/creator/creator.c b/source/creator/creator.c index 79272568261..697af093688 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1038,9 +1038,8 @@ int main(int argc, char **argv) } else { - if((G.fileflags & (G_FILE_AUTOPLAY | G_SCRIPT_AUTOEXEC)){ + if((G.fileflags & G_FILE_AUTOPLAY) && (G.fileflags & G_SCRIPT_AUTOEXEC)) WM_init_game(C); - } else if(!G.file_loaded) WM_init_splash(C); |