Get file->open to use DPF file browser actions, not osdialog
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
88beb01572
commit
c6b0a0241e
2 changed files with 29 additions and 14 deletions
|
|
@ -42,7 +42,7 @@ GLFWAPI int glfwGetKeyScancode(int key) { return 0; }
|
|||
|
||||
namespace rack {
|
||||
namespace app {
|
||||
widget::Widget* createMenuBar(CardinalPluginContext* context, bool isStandalone);
|
||||
widget::Widget* createMenuBar(Window& window, bool isStandalone);
|
||||
}
|
||||
namespace window {
|
||||
void WindowInit(Window* window, DISTRHO_NAMESPACE::UI* ui);
|
||||
|
|
@ -116,7 +116,7 @@ public:
|
|||
rack::window::WindowInit(fContext->window, this);
|
||||
|
||||
fContext->scene->removeChild(fContext->scene->menuBar);
|
||||
fContext->scene->menuBar = rack::app::createMenuBar(fContext, getApp().isStandalone());
|
||||
fContext->scene->menuBar = rack::app::createMenuBar(getWindow(), getApp().isStandalone());
|
||||
fContext->scene->addChildBelow(fContext->scene->menuBar, fContext->scene->rackScroll);
|
||||
}
|
||||
|
||||
|
|
@ -476,6 +476,12 @@ protected:
|
|||
fContext->event->handleLeave();
|
||||
}
|
||||
|
||||
void uiFileBrowserSelected(const char* const filename) override
|
||||
{
|
||||
const ScopedContext sc(this);
|
||||
fContext->patch->loadAction(filename);
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
Set our UI class as non-copyable and add a leak detector just in case.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue