MCPcopy Create free account
hub / github.com/TheAssassin/AppImageLauncher / toggleDaemon

Method toggleDaemon

src/ui/settings_dialog.cpp:166–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void SettingsDialog::toggleDaemon() {
167 // assumes defaults if config doesn't exist or lacks the related key(s)
168 if (settingsFile) {
169 if (settingsFile->value("AppImageLauncher/enable_daemon", "true").toBool()) {
170 system("systemctl --user enable appimagelauncherd.service");
171 // we want to actually restart the service to apply the new configuration
172 system("systemctl --user restart appimagelauncherd.service");
173 } else {
174 system("systemctl --user disable appimagelauncherd.service");
175 system("systemctl --user stop appimagelauncherd.service");
176 }
177 }
178}
179
180void SettingsDialog::onChooseAppsDirClicked() {
181 QFileDialog fileDialog(this);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected