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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-15 09:01:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-15 09:01:47 +0400
commit5da894b1fe1214866d7b343fabab848e8f32a581 (patch)
tree83269a27a8c5623be3ce164df3355eebe92c33fd /source
parent317b649bb241726d8be1a700cd0028f28914595d (diff)
misc edits
- cmake/windows was installing locale & font when internationalization was disabled, twice when enabled. - file selector was using the string size-1, where this isn't needed since string buttons expected this value to be the sizeof(), accounting for '\0'. - use const char for extension checking funcs. - minor pep8 edits
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/BLO_readfile.h2
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/editors/include/ED_fileselect.h2
-rw-r--r--source/blender/editors/space_file/file_draw.c4
-rw-r--r--source/blender/editors/space_file/filelist.c4
-rw-r--r--source/creator/CMakeLists.txt10
6 files changed, 8 insertions, 16 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 47931477728..e7be98d955d 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -204,7 +204,7 @@ BLO_blendhandle_close(
#define GROUP_MAX 32
-int BLO_has_bfile_extension(char *str);
+int BLO_has_bfile_extension(const char *str);
/* return ok when a blenderfile, in dir is the filename,
* in group the type of libdata
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 7d84eeba9c8..76070e42f29 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1048,7 +1048,7 @@ void blo_freefiledata(FileData *fd)
/* ************ DIV ****************** */
-int BLO_has_bfile_extension(char *str)
+int BLO_has_bfile_extension(const char *str)
{
return (BLI_testextensie(str, ".ble") || BLI_testextensie(str, ".blend") || BLI_testextensie(str, ".blend.gz"));
}
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h
index 1eedd7ec782..df4113ca07a 100644
--- a/source/blender/editors/include/ED_fileselect.h
+++ b/source/blender/editors/include/ED_fileselect.h
@@ -106,7 +106,7 @@ void ED_fileselect_clear(struct bContext *C, struct SpaceFile *sfile);
void ED_fileselect_exit(struct bContext *C, struct SpaceFile *sfile);
-int ED_file_extension_icon(char *relname);
+int ED_file_extension_icon(const char *relname);
#endif /* ED_FILES_H */
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 611bf79603e..85edcce35ca 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -181,7 +181,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
but = uiDefButTextO(block, TEX, "FILE_OT_directory", 0, "",
min_x, line1_y, line1_w-chan_offs, btn_h,
- params->dir, 0.0, (float)FILE_MAX-1, 0, 0,
+ params->dir, 0.0, (float)FILE_MAX, 0, 0,
UI_translate_do_tooltip(N_("File path")));
uiButSetCompleteFunc(but, autocomplete_directory, NULL);
uiButSetFlag(but, UI_BUT_NO_UTF8);
@@ -189,7 +189,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
if((params->flag & FILE_DIRSEL_ONLY) == 0) {
but = uiDefBut(block, TEX, B_FS_FILENAME, "",
min_x, line2_y, line2_w-chan_offs, btn_h,
- params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0,
+ params->file, 0.0, (float)FILE_MAXFILE, 0, 0,
UI_translate_do_tooltip(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
uiButSetCompleteFunc(but, autocomplete_file, NULL);
uiButSetFlag(but, UI_BUT_NO_UTF8);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index c2e45c5ad8a..b478976d027 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -736,7 +736,7 @@ static int file_is_blend_backup(const char *str)
}
-static int file_extension_type(char *relname)
+static int file_extension_type(const char *relname)
{
if(BLO_has_bfile_extension(relname)) {
return BLENDERFILE;
@@ -769,7 +769,7 @@ static int file_extension_type(char *relname)
return 0;
}
-int ED_file_extension_icon(char *relname)
+int ED_file_extension_icon(const char *relname)
{
int type= file_extension_type(relname);
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 0650a5678b2..e7a1ff14f03 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -443,14 +443,6 @@ elseif(WIN32)
endif()
endif()
- install( # same as linux!, deduplicate
- DIRECTORY
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
- DESTINATION ${TARGETDIR_VER}/datafiles
- PATTERN ".svn" EXCLUDE
- )
-
# plugins in blender 2.5 don't work at the moment.
#
# install(
@@ -656,8 +648,8 @@ elseif(APPLE)
if(WITH_INTERNATIONAL)
install(
DIRECTORY
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)