From 60c2599a1a5990c66eb8e7c4d9d9959526a3cc2d Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Tue, 30 Jun 2009 20:34:00 +0000 Subject: [PATCH] 2.5 filebrowser * show only name of the last directory for the bookmark * small fix of projectfile: header BLI_fileops.h was moved Note: full path should appear in tool tip later, also for renaming bookmarks later on. --- .../blender/blenlib/BLI_blenlib.vcproj | 2 +- source/blender/blenlib/BLI_util.h | 1 + source/blender/blenlib/intern/util.c | 19 +++++++++++++++++++ .../blender/editors/space_file/file_panels.c | 14 ++++++++++++-- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj b/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj index e31436b9280..6b5359509ab 100644 --- a/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj +++ b/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj @@ -652,7 +652,7 @@ > layout, UI_LAYOUT_ALIGN_LEFT); - char *fname = fsmenu_get_entry(fsmenu, category, i); - uiItemStringO(layout, fname, icon, "FILE_OT_select_bookmark", "dir", fname); + char *entry = fsmenu_get_entry(fsmenu, category, i); + + /* create nice bookmark name, shows last directory in the full path currently */ + BLI_strncpy(temp, entry, FILE_MAX); + BLI_add_slash(temp); + BLI_getlastdir(temp, dir, FILE_MAX); + BLI_del_slash(dir); + + /* operator shows the short bookmark name, should eventually have tooltip */ + uiItemStringO(layout, dir, icon, "FILE_OT_select_bookmark", "dir", entry); if (allow_delete && fsmenu_can_save(fsmenu, category, i) ) uiItemIntO(layout, "", ICON_X, "FILE_OT_delete_bookmark", "index", i); } -- 2.28.0