diff --git a/src/app/MenuBar.cpp b/src/app/MenuBar.cpp index bcd01dac..a0525098 100644 --- a/src/app/MenuBar.cpp +++ b/src/app/MenuBar.cpp @@ -54,7 +54,7 @@ struct NotificationIcon : widget::Widget { struct UrlItem : ui::MenuItem { std::string url; void onAction(const event::Action &e) override { - std::thread t([=]() { + std::thread t([=] { system::openBrowser(url); }); t.detach(); @@ -490,7 +490,7 @@ struct LogInItem : ui::MenuItem { isLoggingIn = true; std::string email = emailField->text; std::string password = passwordField->text; - std::thread t([=]() { + std::thread t([=] { plugin::logIn(email, password); isLoggingIn = false; }); @@ -526,7 +526,7 @@ struct SyncItem : ui::MenuItem { } void onAction(const event::Action &e) override { - std::thread t([=]() { + std::thread t([=] { plugin::syncUpdates(); }); t.detach(); @@ -574,7 +574,7 @@ struct PluginSyncItem : ui::MenuItem { } void onAction(const event::Action &e) override { - std::thread t([=]() { + std::thread t([=] { plugin::syncUpdate(update); }); t.detach(); @@ -702,7 +702,9 @@ struct LibraryButton : MenuButton { struct UserFolderItem : ui::MenuItem { void onAction(const event::Action &e) override { - std::thread t(system::openFolder, asset::user("")); + std::thread t([] { + system::openFolder(asset::user("")); + }); t.detach(); } }; diff --git a/src/system.cpp b/src/system.cpp index 9eff2218..a7ed852d 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -191,7 +191,7 @@ void openBrowser(const std::string &url) { #endif #if defined ARCH_WIN std::wstring urlW = string::toWstring(url); - ShellExecuteW(NULL, L"open", urlW.c_str(), NULL, NULL, SW_SHOWNORMAL); + ShellExecuteW(NULL, L"open", urlW.c_str(), NULL, NULL, SW_SHOWDEFAULT); #endif } @@ -202,7 +202,7 @@ void openFolder(const std::string &path) { #endif #if defined ARCH_WIN std::wstring pathW = string::toWstring(path); - ShellExecuteW(NULL, L"explorer", pathW.c_str(), NULL, NULL, SW_SHOWNORMAL); + ShellExecuteW(NULL, L"explore", pathW.c_str(), NULL, NULL, SW_SHOWDEFAULT); #endif }