mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-28 09:27:39 +01:00
Little improvement of open file dialog on MacOS
[git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 460387]
This commit is contained in:
parent
916517776e
commit
31fea08743
2 changed files with 7 additions and 12 deletions
|
|
@ -21,10 +21,7 @@ namespace ARDOUR
|
|||
{
|
||||
// ====== C "trampoline" functions to invoke Objective-C method ====== //
|
||||
string OpenFileDialog(string title)
|
||||
{
|
||||
if(title.size()==0)
|
||||
title = "Open";
|
||||
|
||||
{
|
||||
NSString *nsTitle = [NSString stringWithUTF8String:title.c_str()];
|
||||
|
||||
// Call the Objective-C method using Objective-C syntax
|
||||
|
|
@ -36,9 +33,6 @@ string OpenFileDialog(string title)
|
|||
|
||||
string SaveFileDialog(string title)
|
||||
{
|
||||
if(title.size()==0)
|
||||
title = "Save";
|
||||
|
||||
NSString *nsTitle = [NSString stringWithUTF8String:title.c_str()];
|
||||
|
||||
// Call the Objective-C method using Objective-C syntax
|
||||
|
|
|
|||
|
|
@ -11,15 +11,16 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
// This is the C "trampoline" function that will be used
|
||||
// to invoke a specific Objective-C method FROM C++
|
||||
namespace ARDOUR
|
||||
{
|
||||
// This is the C "trampoline" function that will be used
|
||||
// to invoke a specific Objective-C method FROM C++
|
||||
#ifdef __APPLE__
|
||||
std::string SaveFileDialog(std::string title = "");
|
||||
std::string OpenFileDialog(std::string title = "");
|
||||
std::string SaveFileDialog(std::string title = "Save");
|
||||
std::string OpenFileDialog(std::string title = "Open");
|
||||
#endif
|
||||
|
||||
|
||||
// OS Windows specific functions
|
||||
#ifdef _WIN32
|
||||
bool SaveFileDialog(std::string& fileName, std::string title = "Save");
|
||||
bool OpenFileDialog(std::string& fileName, std::string title = "Open");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue