Browse Source

More build fixes

Signed-off-by: falkTX <falktx@falktx.com>
pull/349/head
falkTX 4 years ago
parent
commit
b6814b30dd
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 17 additions and 24 deletions
  1. +0
    -5
      dgl/Window.hpp
  2. +0
    -8
      distrho/DistrhoUI.hpp
  3. +9
    -7
      distrho/extra/FileBrowserDialog.cpp
  4. +8
    -4
      distrho/extra/FileBrowserDialog.hpp

+ 0
- 5
dgl/Window.hpp View File

@@ -57,13 +57,8 @@ class Window

public:
#ifndef DGL_FILE_BROWSER_DISABLED
# ifdef DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE
using FileBrowserHandle = DISTRHO_NAMESPACE::DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE::FileBrowserHandle;
using FileBrowserOptions = DISTRHO_NAMESPACE::DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE::FileBrowserOptions;
# else
using FileBrowserHandle = DISTRHO_NAMESPACE::FileBrowserHandle;
using FileBrowserOptions = DISTRHO_NAMESPACE::FileBrowserOptions;
# endif
#endif

/**


+ 0
- 8
distrho/DistrhoUI.hpp View File

@@ -188,14 +188,6 @@ public:
#endif

#ifndef DGL_FILE_BROWSER_DISABLED
# ifdef DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE
using FileBrowserHandle = DISTRHO_NAMESPACE::DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE::FileBrowserHandle;
using FileBrowserOptions = DISTRHO_NAMESPACE::DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE::FileBrowserOptions;
# else
using FileBrowserHandle = DISTRHO_NAMESPACE::FileBrowserHandle;
using FileBrowserOptions = DISTRHO_NAMESPACE::FileBrowserOptions;
# endif

/**
Open a file browser dialog with this window as transient parent.@n
A few options can be specified to setup the dialog.


+ 9
- 7
distrho/extra/FileBrowserDialog.cpp View File

@@ -35,10 +35,6 @@

START_NAMESPACE_DISTRHO

#ifdef DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE
namespace DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE {
#endif

// --------------------------------------------------------------------------------------------------------------------

// static pointer used for signal null/none action taken
@@ -93,11 +89,11 @@ struct FileBrowserData {
ofn.hwndOwner = (HWND)winId;

ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR;
if (options.buttons.showHidden == Window::FileBrowserOptions::kButtonVisibleChecked)
if (options.buttons.showHidden == FileBrowserOptions::kButtonVisibleChecked)
ofn.Flags |= OFN_FORCESHOWHIDDEN;

ofn.FlagsEx = 0x0;
if (options.buttons.showPlaces == Window::FileBrowserOptions::kButtonInvisible)
if (options.buttons.showPlaces == FileBrowserOptions::kButtonInvisible)
ofn.FlagsEx |= OFN_EX_NOPLACESBAR;

startDirW.resize(std::strlen(startDir) + 1);
@@ -224,6 +220,12 @@ struct FileBrowserData {

// --------------------------------------------------------------------------------------------------------------------

#ifdef DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE
namespace DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE {
#endif

// --------------------------------------------------------------------------------------------------------------------

FileBrowserHandle fileBrowserOpen(const bool isEmbed,
const uintptr_t windowId,
const double scaleFactor,
@@ -258,7 +260,7 @@ FileBrowserHandle fileBrowserOpen(const bool isEmbed,

dispatch_async(dispatch_get_main_queue(), ^
{
[nspanel beginSheetModalForWindow:[(NSView*)windowId) window]
[nspanel beginSheetModalForWindow:[(NSView*)windowId window]
completionHandler:^(NSModalResponse result)
{
DISTRHO_SAFE_ASSERT_RETURN(handle != nullptr,);


+ 8
- 4
distrho/extra/FileBrowserDialog.hpp View File

@@ -21,10 +21,6 @@

START_NAMESPACE_DISTRHO

#ifdef DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE
namespace DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE {
#endif

// --------------------------------------------------------------------------------------------------------------------
// File Browser Dialog stuff

@@ -91,6 +87,12 @@ struct FileBrowserOptions {

// --------------------------------------------------------------------------------------------------------------------

#ifdef DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE
namespace DISTRHO_FILE_BROWSER_DIALOG_EXTRA_NAMESPACE {
#endif

// --------------------------------------------------------------------------------------------------------------------

FileBrowserHandle fileBrowserOpen(bool isEmbed, uintptr_t windowId, double scaleFactor,
const char* startDir, const char* windowTitle, const FileBrowserOptions& options);

@@ -115,6 +117,8 @@ const char* fileBrowserGetPath(const FileBrowserHandle handle);
}
#endif

// --------------------------------------------------------------------------------------------------------------------

END_NAMESPACE_DISTRHO

#endif // DISTRHO_FILE_BROWSER_DIALOG_HPP_INCLUDED

Loading…
Cancel
Save