single instance check

processing paths with whitespaces
unified lock for all systems - wxInstanceChecker
checking a messaging only for same binaries
This commit is contained in:
David Kocik
2020-05-14 12:15:02 +02:00
parent 6823d70722
commit c3f0ef7a84
10 changed files with 282 additions and 200 deletions

View File

@@ -102,7 +102,11 @@ void PreferencesDialog::build()
def.label = L("Single Instance");
def.type = coBool;
def.tooltip = L("If this is enabled, when staring PrusaSlicer and another instance is running, that instance will be reactivated instead.");
#if __APPLE__
def.tooltip = L("On OSX there is always only one instance of app running by default. However it is allowed to run multiple instances of same app from the command line. In such case this settings will allow only one instance.");
#else
def.tooltip = L("If this is enabled, when staring PrusaSlicer and another instance of same PrusaSlicer is running, that instance will be reactivated instead.");
#endif
def.set_default_value(new ConfigOptionBool{ app_config->has("single_instance") ? app_config->get("single_instance") == "1" : false });
option = Option(def, "single_instance");
m_optgroup_general->append_single_option_line(option);