Navigation Menu

Skip to content

Commit

Permalink
Add OFN_EX_NOPLACESBAR for win32 file dialog as needed
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 8, 2021
1 parent 3b4b946 commit ccece16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions dgl/Window.hpp
Expand Up @@ -59,6 +59,7 @@ class Window
/**
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,
Expand Down
2 changes: 2 additions & 0 deletions dgl/src/WindowPrivateData.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit ccece16

Please sign in to comment.