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>2003-05-22 22:06:25 +0400
committerSimon Clitherow <aphex@nildram.co.uk>2003-05-22 22:06:25 +0400
commitd617df479310b39c8f0ba8f1cbd57bc29d95a8f9 (patch)
treedd944f5543f13d11b4fbf6be3357685b508bb88f /source/blender/src/language.c
parentb8f2835ba28e7dec09086599127c48b54c9fd3e7 (diff)
- fixed 'double-click on blend file' errors on Windows -- INTERNATIONAL stuff now also checks the installation directory for /.blender, etc
- registering .blend files for WinNT/2000/XP now works correctly (settings remain after a reboot).
Diffstat (limited to 'source/blender/src/language.c')
-rw-r--r--source/blender/src/language.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/src/language.c b/source/blender/src/language.c
index 416b87f8a28..75973174154 100644
--- a/source/blender/src/language.c
+++ b/source/blender/src/language.c
@@ -41,6 +41,7 @@
#include "BLI_blenlib.h"
#include "BLI_linklist.h" /* linknode */
+#include "BLI_winstuff.h"
#include "BIF_language.h"
#include "BIF_space.h" /* allqueue() */
@@ -174,7 +175,7 @@ void start_interface_font(void) {
U.fontsize= 11;
U.encoding= 0;
-#ifdef __APPLE__
+#if defined (__APPLE__)
bundlepath = BLI_getbundle();
strcpy(tstr, bundlepath);
strcat(tstr, "/Contents/Resources/");
@@ -182,6 +183,12 @@ void start_interface_font(void) {
result = FTF_SetFont(tstr, U.fontsize);
sprintf(U.fontname, ".blender/.bfont.ttf\0");
+#elif defined (WIN32)
+ BLI_getInstallationDir(tstr);
+ strcat(tstr, "/.blender/.bfont.ttf\0");
+ result = FTF_SetFont(tstr, U.fontsize);
+
+ sprintf(U.fontname, ".blender/.bfont.ttf\0");
#else
sprintf(U.fontname, ".blender/.bfont.ttf\0");
@@ -273,10 +280,14 @@ int read_languagefile(void) {
if(lines == NULL) {
/* If not found in home, try current dir
* (Resources folder of app bundle on OS X) */
-#ifdef __APPLE__
+#if defined (__APPLE__)
char *bundlePath = BLI_getbundle();
strcpy(name, bundlePath);
strcat(name, "/Contents/Resources/.Blanguages");
+#elif defined (WIN32)
+ /* Check the installation dir in Windows */
+ BLI_getInstallationDir(name);
+ strcat(name,"/.blender/.Blanguages");
#else
strcpy(name, ".blender/.Blanguages");
#endif
@@ -287,8 +298,8 @@ int read_languagefile(void) {
strcpy(name, ".Blanguages");
lines= BLI_read_file_as_lines(name);
if(lines == NULL) {
- error("File \".Blanguages\" not found");
- return 0;
+ error("File \".Blanguages\" not found");
+ return 0;
}
}
}