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:
authorCampbell Barton <ideasman42@gmail.com>2014-05-01 05:58:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-01 05:59:25 +0400
commit7b0bce19468cf83f1198145a9c6b1408b04f91a1 (patch)
tree974637d661ec51fbb7ddc9e73567e14d066983ba /source/blender/windowmanager
parent60c8c130fed60dc1fe5387b960549385188feadf (diff)
Code cleanup: remove redundant filename copy & simplify splash
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index a4355afbbfc..a73532680c5 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1770,11 +1770,10 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiBut *but;
uiLayout *layout, *split, *col;
uiStyle *style = UI_GetStyle();
- struct RecentFile *recent;
+ const struct RecentFile *recent;
int i;
MenuType *mt = WM_menutype_find("USERPREF_MT_splash", true);
char url[96];
- char file[FILE_MAX];
#ifndef WITH_HEADLESS
extern char datatoc_splash_png[];
@@ -1914,11 +1913,10 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiItemL(col, IFACE_("Recent"), ICON_NONE);
for (recent = G.recent_files.first, i = 0; (i < 5) && (recent); recent = recent->next, i++) {
- BLI_split_file_part(recent->filepath, file, sizeof(file));
- if (BLO_has_bfile_extension(file))
- uiItemStringO(col, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath);
- else
- uiItemStringO(col, BLI_path_basename(recent->filepath), ICON_FILE_BACKUP, "WM_OT_open_mainfile", "filepath", recent->filepath);
+ const char *filename = BLI_path_basename(recent->filepath);
+ uiItemStringO(col, filename,
+ BLO_has_bfile_extension(filename) ? ICON_FILE_BLEND : ICON_FILE_BACKUP,
+ "WM_OT_open_mainfile", "filepath", recent->filepath);
}
uiItemS(col);