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:
authorAndrea Weikert <elubie@gmx.net>2009-07-01 00:34:00 +0400
committerAndrea Weikert <elubie@gmx.net>2009-07-01 00:34:00 +0400
commit60c2599a1a5990c66eb8e7c4d9d9959526a3cc2d (patch)
tree67302fe5ef3d70a6d8174baaf915dd234030552c /source/blender/editors/space_file
parent406b16e7d19b765bd5567661077d78aa315d8fc0 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_panels.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index a9a93d93de0..29c759d43c0 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -69,9 +69,19 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
uiBlockSetEmboss(block, UI_EMBOSSP);
uiBlockBeginAlign(block);
for (i=0; i< nentries;++i) {
+ char dir[FILE_MAX];
+ char temp[FILE_MAX];
uiLayout* layout = uiLayoutRow(pa->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);
}