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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-04-10 16:31:38 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-04-10 16:34:31 +0300
commitf75bbe27e23d2f79490aac82666ded1b1574083c (patch)
tree2fa753c9911bcb72e34c540a38531d30f4713d41 /source/blender/imbuf/intern/thumbs.c
parent8a99dc232469a987ca2631b3ab5dd8e0da948054 (diff)
Thumbnails: Add translations to font preview.
Not much to say, this is pretty straightforward. We just have to add current locale to thumbnails 'signature', so that previews get re-generated when we change locale... Tested with Japanese and French. Btw, I do not really understand why using BLF in ImBuf is badlevel... :/
Diffstat (limited to 'source/blender/imbuf/intern/thumbs.c')
-rw-r--r--source/blender/imbuf/intern/thumbs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index 59b8f279f98..2318553eecc 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -483,18 +483,22 @@ void IMB_thumb_delete(const char *path, ThumbSize size)
/* create the thumb if necessary and manage failed and old thumbs */
-ImBuf *IMB_thumb_manage(const char *path, ThumbSize size, ThumbSource source)
+ImBuf *IMB_thumb_manage(const char *org_path, ThumbSize size, ThumbSource source)
{
char thumb_path[FILE_MAX];
char thumb_name[40];
char uri[URI_MAX];
const char *file_path;
+ const char *path;
char path_buff[FILE_MAX];
BLI_stat_t st;
ImBuf *img = NULL;
- file_path = path;
- UNUSED_VARS(path_buff);
+ path = file_path = org_path;
+ if (source == THB_SOURCE_FONT) {
+ BLI_snprintf(path_buff, sizeof(path_buff), "%s.%s", org_path, IMB_thumb_load_font_get_language());
+ path = path_buff;
+ }
if (BLI_stat(file_path, &st) == -1) {
return NULL;