Menu

#97 Portadev enhancement: Show free space in Drive menu!

WontFix
nobody
None
Medium
Defect
2014-08-20
2014-08-01
Anonymous
No

Originally created by: nanofo...@gmail.com

I check free spaces of my drives by displaying FAR's Drive Menu, usually.

Seems really useful and very easy to implement to display free space (in parenthes for example) after name of a Portadev device in Drive Menu.

Taking in account checkbox "Show size in Windows Explorer style" would be absolute awsome!

Thank You for all of Your plugins, Portadev becomes a must as I discovered benefits of MTP :)

Discussion

  • Anonymous

    Anonymous - 2014-08-01

    Originally posted by: nanofo...@gmail.com

    Where in the hell can I set issue type? This is not a "defect", this is a "suggestion" - of course...

     
  • Anonymous

    Anonymous - 2014-08-01

    Originally posted by: artem...@gmail.com

    Use Ctrl+L - this information showed in the info panel.

     
  • Anonymous

    Anonymous - 2014-08-02

    Originally posted by: nanofo...@gmail.com

    Yes, I know Ctrl-L - this is the reason why I thought that this feature is not so hard to implement ;)

    Anyway, I inserted a few lines @plugin.cpp line #~90 to append free size - it is OK?

            fsys_wpd wpd_fs;
            ULONG64 total_space = 0, free_space = 0;
            wchar_t sz[64];

            disk_menu_labels[i] += L" (";

            wpd_fs.open(it->second.d.id.c_str(), it->second.s.id.c_str());
            wpd_fs.get_space_info(total_space, free_space);

            _FSF.FormatFileSize(free_space, 7, FFFS_COMMAS|FFFS_SHOWBYTESINDEX, sz, sizeof(sz) / sizeof(wchar_t));
            disk_menu_labels[i] += sz+wstring(sz).find_first_not_of(' ');

            disk_menu_labels[i] += L" free)";

    Thank You for Your answer!

     
  • Anonymous

    Anonymous - 2014-08-20

    Originally posted by: artem...@gmail.com

    Sorry, I can't use this code:
    The function GetPluginInfoW is called too often and this way will affect the performance (COM intialization, query device, COM shutdown). I can cache total size info, but I need to spy for it any file operation. Too difficult.

    Status: WontFix

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB