DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit ccece16081c89ead759394994f7251092938837e
parent 3b4b9460fe0fec3667ffdb6f932f825058565842
Author: falkTX <falktx@falktx.com>
Date:   Wed,  8 Sep 2021 20:47:27 +0100

Add OFN_EX_NOPLACESBAR for win32 file dialog as needed

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdgl/Window.hpp | 1+
Mdgl/src/WindowPrivateData.cpp | 2++
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dgl/Window.hpp b/dgl/Window.hpp @@ -59,6 +59,7 @@ public: /** File browser button state. This allows to customize the behaviour of the file browse dialog buttons. + Note these are merely hints, not all systems support them. */ enum ButtonState { kButtonInvisible, diff --git a/dgl/src/WindowPrivateData.cpp b/dgl/src/WindowPrivateData.cpp @@ -548,6 +548,8 @@ bool Window::PrivateData::openFileBrowser(const Window::FileBrowserOptions& opti ofn.Flags = OFN_PATHMUSTEXIST; if (options.buttons.showHidden == FileBrowserOptions::kButtonVisibleChecked) ofn.Flags |= OFN_FORCESHOWHIDDEN; + if (options.buttons.showPlaces == FileBrowserOptions::kButtonInvisible) + ofn.FlagsEx |= OFN_EX_NOPLACESBAR; // TODO synchronous only, can't do better with WinAPI native dialogs. // threading might work, if someone is motivated to risk it.