Compare commits

..

1 Commits

Author SHA1 Message Date
Jaime Bernardo
9eb18fc739 [New+]Fix call enabled telemetry event 2024-10-03 14:07:04 +01:00
2 changed files with 5 additions and 27 deletions

View File

@@ -16,7 +16,6 @@
const std::wstring moduleName = L"Workspaces\\WorkspacesLauncher";
const std::wstring internalPath = L"";
const std::wstring instanceMutexName = L"Local\\PowerToys_WorkspacesLauncher_InstanceMutex";
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cmdShow)
{
@@ -29,18 +28,6 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm
return 0;
}
auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str());
if (mutex == nullptr)
{
Logger::error(L"Failed to create mutex. {}", get_last_error_or_default(GetLastError()));
}
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
Logger::warn(L"WorkspacesLauncher instance is already running");
return 0;
}
std::wstring cmdLineStr{ GetCommandLineW() };
auto cmdArgs = split(cmdLineStr, L" ");
if (cmdArgs.workspaceId.empty())

View File

@@ -250,21 +250,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
private void OpenNewTemplateFolder()
{
try
var process = new ProcessStartInfo()
{
CopyTemplateExamples(_templateLocation);
var process = new ProcessStartInfo()
{
FileName = _templateLocation,
UseShellExecute = true,
};
Process.Start(process);
}
catch (Exception ex)
{
Logger.LogError("Failed to show NewPlus template folder.", ex);
}
FileName = _templateLocation,
UseShellExecute = true,
};
Process.Start(process);
}
private async void PickNewTemplateFolder()