Skip to content

Commit

Permalink
macOS|libgui: Native OS behaviors
Browse files Browse the repository at this point in the history
Use the macOS file dialog for selecting files/folders, and open URLs with /usr/bin/open.
  • Loading branch information
skyjake committed Sep 12, 2019
1 parent 41f77a8 commit 8e242f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doomsday/libs/gui/src/dialogs/filedialog_macx.mm
Expand Up @@ -18,7 +18,7 @@

#include "de/FileDialog"

#if 1
#if 0
# include "filedialog_x11.cpp"
#else

Expand Down
8 changes: 6 additions & 2 deletions doomsday/libs/gui/src/guiapp.cpp
Expand Up @@ -372,7 +372,7 @@ void GuiApp::revealFile(const NativePath &fileOrFolder) // static
{
DE_ASSERT_FAIL("File revealing not implemented on this platform");
}
#endif
#endif
}

void GuiApp::openBrowserUrl(const String &url)
Expand All @@ -381,7 +381,11 @@ void GuiApp::openBrowserUrl(const String &url)
{
CommandLine({"/usr/bin/x-www-browser", url}).execute();
}
#else
#elif defined (MACOSX)
{
CommandLine({"/usr/bin/open", url}).execute();
}
#else
{
DE_ASSERT_FAIL("Browser URL opening not implemented on this platform");
}
Expand Down

0 comments on commit 8e242f3

Please sign in to comment.