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:
-rw-r--r--config/darwin-config.py6
-rw-r--r--config/linux2-config.py6
-rw-r--r--config/linuxcross-config.py6
-rw-r--r--config/openbsd3-config.py6
-rw-r--r--config/sunos5-config.py6
-rw-r--r--config/win32-mingw-config.py6
-rw-r--r--config/win32-vc-config.py6
-rw-r--r--source/blender/src/Makefile5
-rw-r--r--source/blender/src/SConscript4
-rw-r--r--source/blender/src/filesel.c36
-rw-r--r--source/blender/src/interface_draw.c2
-rw-r--r--source/nan_link.mk6
12 files changed, 93 insertions, 2 deletions
diff --git a/config/darwin-config.py b/config/darwin-config.py
index 0d4bc5c0be0..08fdbb41baa 100644
--- a/config/darwin-config.py
+++ b/config/darwin-config.py
@@ -109,6 +109,12 @@ BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'true' # -DWITH_QUICKTIME
+WITH_BF_ICONV = 'false'
+BF_ICONV = LIBDIR + "/iconv"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'true'
BF_OPENGL_LIB = 'GL GLU'
diff --git a/config/linux2-config.py b/config/linux2-config.py
index f7d84d228f3..c56a3d1d8f7 100644
--- a/config/linux2-config.py
+++ b/config/linux2-config.py
@@ -103,6 +103,12 @@ WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
+WITH_BF_ICONV = 'false'
+BF_ICONV = LIBDIR + "/iconv"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
# enable ffmpeg support
WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
BF_FFMPEG = '/usr'
diff --git a/config/linuxcross-config.py b/config/linuxcross-config.py
index 2d833d2fcfc..468f4cfcc50 100644
--- a/config/linuxcross-config.py
+++ b/config/linuxcross-config.py
@@ -98,6 +98,12 @@ WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
+WITH_BF_ICONV = 'false'
+BF_ICONV = LIBDIR + "/iconv"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
BF_OPENGL = 'C:\\MingW'
diff --git a/config/openbsd3-config.py b/config/openbsd3-config.py
index b44e79eb2a6..303f79c9bc8 100644
--- a/config/openbsd3-config.py
+++ b/config/openbsd3-config.py
@@ -103,6 +103,12 @@ BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
+WITH_BF_ICONV = 'false'
+BF_ICONV = LIBDIR + "/iconv"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'true'
BF_OPENGL = '/usr/X11R6'
diff --git a/config/sunos5-config.py b/config/sunos5-config.py
index de342c40158..71f1e7a1b48 100644
--- a/config/sunos5-config.py
+++ b/config/sunos5-config.py
@@ -107,6 +107,12 @@ WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
+WITH_BF_ICONV = 'true'
+BF_ICONV = "/usr"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
# enable ffmpeg support
WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
BF_FFMPEG = '/usr/local'
diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py
index e23e6436c59..f84bf45c585 100644
--- a/config/win32-mingw-config.py
+++ b/config/win32-mingw-config.py
@@ -120,6 +120,12 @@ WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
+WITH_BF_ICONV = 'false'
+BF_ICONV = LIBDIR + "/iconv"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
BF_OPENGL = 'C:\\MingW'
diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py
index eb0a2ca2939..9b8c446d918 100644
--- a/config/win32-vc-config.py
+++ b/config/win32-vc-config.py
@@ -123,6 +123,12 @@ BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
BF_QUICKTIME_LIB = 'qtmlClient'
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
+WITH_BF_ICONV = 'false'
+BF_ICONV = LIBDIR + "/iconv"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
WITH_BF_STATICOPENGL = 'false'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
diff --git a/source/blender/src/Makefile b/source/blender/src/Makefile
index fd92c412736..cb6c1954812 100644
--- a/source/blender/src/Makefile
+++ b/source/blender/src/Makefile
@@ -110,6 +110,11 @@ ifeq ($(WITH_QUICKTIME),true)
CPPFLAGS += -DWITH_QUICKTIME
endif
+ifeq ($(WITH_ICONV), true)
+ CPPFLAGS += -DWITH_ICONV
+ CPPFLAGS += $(NAN_ICONV_INC)
+endif
+
ifeq ($(WITH_FFMPEG),true)
CPPFLAGS += -DWITH_FFMPEG
CPPFLAGS += $(NAN_FFMPEGCFLAGS)
diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript
index 37522eb171c..a90f36e1974 100644
--- a/source/blender/src/SConscript
+++ b/source/blender/src/SConscript
@@ -35,6 +35,10 @@ if env['WITH_BF_QUICKTIME']==1:
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
+if env['WITH_BF_ICONV'] == 1:
+ incs += ' ' + env['BF_ICONV_INC']
+ defs.append('WITH_ICONV')
+
if env['WITH_BF_FFMPEG'] == 1:
defs.append('WITH_FFMPEG')
incs += ' ' + env['BF_FFMPEG_INC']
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c
index 86e8cdfdc81..cba0ceb6818 100644
--- a/source/blender/src/filesel.c
+++ b/source/blender/src/filesel.c
@@ -92,6 +92,7 @@
#include "BIF_space.h"
#include "BIF_screen.h"
#include "BIF_resources.h"
+#include "BIF_language.h"
#include "BLO_readfile.h"
@@ -108,6 +109,10 @@
#include "BIF_fsmenu.h" /* include ourselves */
+#if defined WITH_ICONV
+ #include "iconv.h"
+#endif
+
#if defined WIN32 || defined __BeOS
int fnmatch(const char *pattern, const char *string, int flags)
{
@@ -139,6 +144,7 @@ static void library_to_filelist(SpaceFile *sfile);
static void filesel_select_objects(struct SpaceFile *sfile);
static void active_file_object(struct SpaceFile *sfile);
static int groupname_to_code(char *group);
+static void string_to_utf8(char *original, char *utf_8);
extern void countall(void);
@@ -881,6 +887,7 @@ static void print_line(SpaceFile *sfile, struct direntry *files, int x, int y)
{
int boxcol=0;
char *s;
+ char utf_8[512];
boxcol= files->flags & (HILITE + ACTIVE);
@@ -924,7 +931,12 @@ static void print_line(SpaceFile *sfile, struct direntry *files, int x, int y)
s = files->string;
if(s) {
glRasterPos2i(x, y);
+#ifdef WITH_ICONV
+ string_to_utf8(files->relname, utf_8);
+ BIF_DrawString(G.font, utf_8, (U.transopts & USER_TR_MENUS));
+#else
BMF_DrawString(G.font, files->relname);
+#endif
x += sfile->maxnamelen + 100;
@@ -1087,6 +1099,7 @@ void drawfilespace(ScrArea *sa, void *spacedata)
short mval[2];
char name[20];
char *menu;
+ char utf_8[512];
myortho2(-0.375, sa->winx-0.375, -0.375, sa->winy-0.375);
@@ -1158,6 +1171,29 @@ void drawfilespace(ScrArea *sa, void *spacedata)
sa->win_swap= WIN_BACK_OK;
}
+#ifdef WITH_ICONV
+static void string_to_utf8(char *original, char *utf_8) {
+ size_t inbytesleft=strlen(original);
+ size_t outbytesleft=512;
+ size_t rv=0;
+ iconv_t cd;
+
+ cd=iconv_open("UTF-8", "gb2312");
+ if (cd == (iconv_t)(-1)) {
+ printf("iconv_open Error");
+ *utf_8='\0';
+ return ;
+ }
+ rv=iconv(cd, &original, &inbytesleft, &utf_8, &outbytesleft);
+ if (rv == (size_t) -1) {
+ printf("iconv Error\n");
+ return ;
+ }
+ *utf_8 = '\0';
+ iconv_close(cd);
+}
+#endif
+
static void do_filescroll(SpaceFile *sfile)
{
short mval[2], oldy, yo;
diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c
index 84336b2d293..58ca38ec30c 100644
--- a/source/blender/src/interface_draw.c
+++ b/source/blender/src/interface_draw.c
@@ -1565,7 +1565,7 @@ static void ui_draw_text_icon(uiBut *but)
if(but->type==LABEL && but->min!=0.0) BIF_ThemeColor(TH_BUT_TEXT_HI);
ui_rasterpos_safe(x, (but->y1+but->y2- 9.0)/2.0, but->aspect);
- if(but->type==TEX || but->type==IDPOIN) transopts= 0; // no translation, of course!
+ if(but->type==IDPOIN) transopts= 0; // no translation, of course!
else transopts= (U.transopts & USER_TR_BUTTONS);
BIF_DrawString(but->font, but->drawstr+but->ofs, transopts);
diff --git a/source/nan_link.mk b/source/nan_link.mk
index 9b21ebfe2db..e6824643a04 100644
--- a/source/nan_link.mk
+++ b/source/nan_link.mk
@@ -118,7 +118,7 @@ ifeq ($(OS),openbsd)
endif
ifeq ($(OS),solaris)
- LLIBS = -lGLU -lGL -lXmu -lXext -lX11 -lc -lm -ldl -lsocket -lnsl
+ LLIBS = -lGLU -lGL -lXmu -lXext -lXi -lX11 -lc -lm -ldl -lsocket -lnsl
DYNLDFLAGS = -shared $(LDFLAGS)
endif
@@ -155,6 +155,10 @@ ifneq ($(OS), irix)
LLIBS += $(NAN_SDLLIBS)
endif
+ifeq ($(WITH_ICONV),true)
+ LLIBS += $(NAN_ICONV_LIBS)
+endif
+
ifeq ($(WITH_FFMPEG),true)
LLIBS += $(NAN_FFMPEGLIBS)
endif