[GUI] When another instance of the BOINC Manager is already running - show the corresponding message to the user

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2024-01-08 15:44:09 +01:00
parent 86669cd2c1
commit 3fdebcb190
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 8 additions and 2 deletions

View File

@ -461,8 +461,14 @@ bool CBOINCGUIApp::OnInit() {
// Detect if BOINC Manager is already running, if so, bring it into the
// foreground and then exit.
if (DetectDuplicateInstance()) {
printf( "Another instance of BOINC Manager already running.\n");
return false;
wxMessageDialog dialog(
NULL,
_("Another instance of BOINC Manager is already running."),
_("BOINC Manager"),
wxOK|wxICON_WARNING
);
dialog.ShowModal();
return false;
}
// Initialize the main document