Page MenuHome

UI: Better Windows Volume Descriptions
ClosedPublic

Authored by Harley Acheson (harley) on Tue, Sep 10, 10:22 PM.

Details

Summary

When creating the names in the File Browser "Volumes" list we are just using volume label and the drive letter. But the operating system can supply a nicer string for this.

On the left is how my own drives are shown to me in Windows Explorer. The middle shows how Blender presents those same drives in the File Browser. Right is how it looks after this patch is applied:

Diff Detail

Repository
rB Blender

Event Timeline

William Reynish (billreynish) accepted this revision.

Since I don’t have Windows here I can’t test this patch, but the change makes obvious sense.

This revision is now accepted and ready to land.Tue, Sep 10, 10:50 PM
Brecht Van Lommel (brecht) requested changes to this revision.Tue, Sep 10, 11:05 PM
Brecht Van Lommel (brecht) added inline comments.
source/blender/editors/space_file/fsmenu.c
482

Move this into the if (i > 1) { block, and zero initialize it: SHFILEINFOW shFile = {0};

498
500

FILE_MAXDIR - 4 -> FILE_MAXDIR

This revision now requires changes to proceed.Tue, Sep 10, 11:05 PM

Updated as per Brecht's suggestions: moving SHFILEINFOW into the block and initializing it, checks return for success, and uses correct FILE_MAXDIR.

Brecht Van Lommel (brecht) added inline comments.
source/blender/editors/space_file/fsmenu.c
504

Just name = tmps; will work.

This revision is now accepted and ready to land.Tue, Sep 10, 11:36 PM

Just name = tmps; will work.

Oh... so it does. Thanks!

Last update had left in a line meant for debugging.