diff options
Diffstat (limited to 'source/blender/blenfont/intern/blf_translation.c')
-rw-r--r-- | source/blender/blenfont/intern/blf_translation.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c index 3aaa61d55f2..6394d1169cf 100644 --- a/source/blender/blenfont/intern/blf_translation.c +++ b/source/blender/blenfont/intern/blf_translation.c @@ -33,28 +33,28 @@ #include "BLF_translation.h" -#ifdef WITH_INTERNATIONAL - -#include "boost_locale_wrapper.h" - #include "MEM_guardedalloc.h" -#include "BLI_utildefines.h" +#include "BLI_fileops.h" #include "BLI_path_util.h" #include "BLI_string.h" -#include "BLI_path_util.h" -#include "BLI_fileops.h" #include "DNA_userdef_types.h" /* For user settings. */ #include "BPY_extern.h" +#ifdef WITH_INTERNATIONAL + +#include "boost_locale_wrapper.h" + static const char unifont_filename[] = "droidsans.ttf.gz"; static unsigned char *unifont_ttf = NULL; static int unifont_size = 0; +#endif /* WITH_INTERNATIONAL */ unsigned char *BLF_get_unifont(int *unifont_size_r) { +#ifdef WITH_INTERNATIONAL if (unifont_ttf == NULL) { char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts"); if (fontpath) { @@ -72,15 +72,20 @@ unsigned char *BLF_get_unifont(int *unifont_size_r) *unifont_size_r = unifont_size; return unifont_ttf; +#else + (void)unifont_size_r; + return NULL; +#endif } void BLF_free_unifont(void) { +#ifdef WITH_INTERNATIONAL if (unifont_ttf) MEM_freeN(unifont_ttf); -} - +#else #endif +} const char *BLF_pgettext(const char *msgctxt, const char *msgid) { @@ -103,21 +108,21 @@ const char *BLF_pgettext(const char *msgctxt, const char *msgid) #endif } -int BLF_translate_iface(void) +bool BLF_translate_iface(void) { #ifdef WITH_INTERNATIONAL return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE); #else - return 0; + return false; #endif } -int BLF_translate_tooltips(void) +bool BLF_translate_tooltips(void) { #ifdef WITH_INTERNATIONAL return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS); #else - return 0; + return false; #endif } |