From: Andrea Weikert Date: Tue, 30 Jun 2009 20:34:00 +0000 (+0000) Subject: 2.5 filebrowser X-Git-Tag: v2.50~1395^2~1114 X-Git-Url: https://git.blender.org/gitweb/gitweb.cgi/blender.git/commitdiff_plain/60c2599a1a5990c66eb8e7c4d9d9959526a3cc2d 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. --- 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); }