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-09-16 23:23:05 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-09-16 23:23:05 +0300
commit79c668dbec52f8834ac5013f254c12d8315d4924 (patch)
treed8c1f31ee4f7b69ad27358ee65b9be4eee5d2849 /source/blender/editors/space_file
parent4fb9cc24a8b9bd37e2a668f8466976b0d24ed8dc (diff)
Correction to previous commit.
Mostly styling, but also str_exec would often remain undefined...
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_draw.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index a77375a2214..7d68e782a89 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -232,17 +232,16 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
/* Execute / cancel buttons. */
if (loadbutton) {
const struct FileDirEntry *file = sfile->files ? filelist_file(sfile->files, params->active_file) : NULL;
-
char const *str_exec;
- if (file) {
- const bool is_parent_dir = (FILENAME_IS_PARENT(file->relpath));
- if (is_parent_dir){
- str_exec = IFACE_("Parent Directory");
- } else if (file->typeflag & FILE_TYPE_DIR) {
- str_exec = IFACE_("Open Directory");
- }
- } else {
- str_exec = params->title; /* params->title is already translated! */
+
+ if (file && FILENAME_IS_PARENT(file->relpath)){
+ str_exec = IFACE_("Parent Directory");
+ }
+ else if (file && file->typeflag & FILE_TYPE_DIR) {
+ str_exec = IFACE_("Open Directory");
+ }
+ else {
+ str_exec = params->title; /* params->title is already translated! */
}
uiDefButO(block, UI_BTYPE_BUT, "FILE_OT_execute", WM_OP_EXEC_REGION_WIN, str_exec,