Skip to content

Commit

Permalink
Remove auto-start confirmation (non-error) message
Browse files Browse the repository at this point in the history
  • Loading branch information
Erimelowo committed Sep 26, 2024
1 parent a86ce4a commit efeabdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void printLine(GLFWwindow *window, std::string text, long duration)
ImGui::NewFrame();

// Create the Print window
ImGui::Begin("Print", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar);
ImGui::Begin("printLine", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar);

// Set position and size to fill the main window
ImGui::SetWindowPos(ImVec2(0, 0));
Expand Down Expand Up @@ -461,11 +461,7 @@ int main(int argc, char *argv[])

// Set auto-start
int autoStartResult = handle_setup(autoStart);
if (autoStartResult == 1)
printLine(window, "Enabled auto-start", 2800l);
else if (autoStartResult == 2)
printLine(window, "Disabled auto-start", 2800l);
else if (autoStartResult != 0)
if (autoStartResult != 0)
printLine(window, fmt::format("Error toggling auto-start ({}) ", autoStartResult), 6000l);

// Minimize or hide the window according to config
Expand Down
6 changes: 3 additions & 3 deletions src/setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int handle_setup(bool install)
if (!apps->GetApplicationAutoLaunch(application_key))
{
apps->SetApplicationAutoLaunch(application_key, true);
return 1;
return 0;
}
return 0;
}
Expand All @@ -46,7 +46,7 @@ int handle_setup(bool install)
if (app_error)
return app_error;

return 1;
return 0;
}
else if (currently_installed)
{
Expand All @@ -57,7 +57,7 @@ int handle_setup(bool install)
if (app_error)
return app_error;

return 2;
return 0;
}
else
return 0;
Expand Down

0 comments on commit efeabdd

Please sign in to comment.