diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-15 09:01:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-15 09:01:47 +0400 |
commit | 5da894b1fe1214866d7b343fabab848e8f32a581 (patch) | |
tree | 83269a27a8c5623be3ce164df3355eebe92c33fd /source/blender/editors/space_file | |
parent | 317b649bb241726d8be1a700cd0028f28914595d (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/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 4 |
2 files changed, 4 insertions, 4 deletions
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); |