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:
authorSimon Clitherow <aphex@nildram.co.uk>2004-04-20 23:12:48 +0400
committerSimon Clitherow <aphex@nildram.co.uk>2004-04-20 23:12:48 +0400
commit255cd235a3f7a5520f7a4d44fbaefba254b8f2c0 (patch)
tree9d43a44fdf7a804cba67cd31fbb96dec3265659f /source/blender/src/language.c
parentd694335cc2e882cb7ef08806bc7cd07191f93d70 (diff)
- Returned multi-user support on Win2k/XP.
Now uses 'Application Data/Blender Foundation/Blender' instead of old "Not A Number" dir. - Updated windows installer to make this change transparent for the users. It copies /.blender to the new location and displays a short message to advise them of the change (http://homepages.nildram.co.uk/~aphex/installer_msg.jpg). - Installer also includes fix for opening blend files from explorer (patch provided by Valentin Ungureanu (vung) - thanks!) Note to CVS users on Win2k/XP: Although blender will continue to work without changes, you should ideally copy the /.blender dir to <app data>/Blender Foundation/Blender for the sake of correctness :)
Diffstat (limited to 'source/blender/src/language.c')
-rw-r--r--source/blender/src/language.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/src/language.c b/source/blender/src/language.c
index d126444a0a9..d7a4316411b 100644
--- a/source/blender/src/language.c
+++ b/source/blender/src/language.c
@@ -210,6 +210,17 @@ void start_interface_font(void) {
if(!result) { // else try loading font from current dir
result = FTF_SetFont(U.fontname, U.fontsize);
}
+
+ // try home dir (special case for .bfont.ttf) (aphex)
+
+ if(!result) {
+ strcpy(tstr, BLI_gethome());
+ if (strstr(tstr,".blender") == 0) {
+ strcat(tstr,".blender/");
+ }
+ strcat(tstr, U.fontname);
+ result = FTF_SetFont(tstr, U.fontsize);
+ }
} else {
U.language= 0;
U.fontsize= 11;
@@ -226,13 +237,14 @@ void start_interface_font(void) {
strncpy(U.fontname, tstr, 255);
#elif defined (WIN32)
- BLI_getInstallationDir(tstr);
- strcat(tstr, "/.blender/.bfont.ttf\0");
+ strcat(tstr, BLI_gethome());
+ strcat(tstr, "/.bfont.ttf\0");
+ printf("path: %s\n", tstr);
result = FTF_SetFont(tstr, U.fontsize);
- sprintf(U.fontname, ".blender/.bfont.ttf\0");
+ sprintf(U.fontname, "/.bfont.ttf\0");
#else
- sprintf(U.fontname, ".blender/.bfont.ttf\0");
+ sprintf(U.fontname, "/.bfont.ttf\0");
result = FTF_SetFont(U.fontname, U.fontsize);
#endif
@@ -331,11 +343,8 @@ int read_languagefile(void) {
strcat(name, "/Contents/Resources/.Blanguages");
#elif defined (WIN32)
/* Check the installation dir in Windows */
- result = BLI_getInstallationDir(name);
- if (!result)
- strcpy(name,"/.blender/.Blanguages");
- else
- strcat(name,"/.blender/.Blanguages");
+ strcat(name, BLI_gethome());
+ strcpy(name,"/.Blanguages");
#else
strcpy(name, ".blender/.Blanguages");
#endif