diff options
author | Jannik Schönartz | 2021-11-24 00:41:37 +0100 |
---|---|---|
committer | Jannik Schönartz | 2021-11-24 00:41:37 +0100 |
commit | 89331d303117288edf07f628a9c5c454be4bfdb4 (patch) | |
tree | 72d5fad5fa979a9186911fa5db8b55738993f2e2 | |
parent | vsession icon: Match agains OS display name too (diff) | |
download | vmchooser2-remote-edit-vm.tar.gz vmchooser2-remote-edit-vm.tar.xz vmchooser2-remote-edit-vm.zip |
Add a parameter allowing the edit checkbox to be checked by defaultremote-edit-vm
-rw-r--r-- | src/config.cpp | 1 | ||||
-rw-r--r-- | src/config.h | 1 | ||||
-rw-r--r-- | src/dialog.cpp | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/config.cpp b/src/config.cpp index 0d4a72d..56775ec 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -42,6 +42,7 @@ struct ConfigOption const ConfigOption* const Config::ALLOW_SCREENSAVER_DISABLE = new ConfigOption("", "allow-screensaver-disable", "allow-screensaver-disable", "", "", "Show checkbox to disable the screen saver for this session"); const ConfigOption* const Config::ALLOW_VM_EDIT = new ConfigOption("", "allow-vm-edit", "allow-vm-edit", "", "", "Show edit checkbox for VMs/lectures where meta data allows editing"); +const ConfigOption* const Config::ALLOW_VM_EDIT_CHECKED = new ConfigOption("", "allow-vm-edit-checked", "allow-vm-edit-checked", "", "", "Edit checkbox is selected by default"); const ConfigOption* const Config::AUTOQUIT = new ConfigOption("", "autoquit", "autoquit", "seconds", "120", "Time after which vmchooser will quit if no user interaction is detected"); const ConfigOption* const Config::BASEDIR = new ConfigOption("b", "base", "base", "path", "/mnt/vmstore", "Base directory where vm meta data is relative to"); const ConfigOption* const Config::CONFIG = new ConfigOption("c", "config", "", "path", CONFIG_FILE_GLOBAL, "Path to global config file"); diff --git a/src/config.h b/src/config.h index 011e82a..3536549 100644 --- a/src/config.h +++ b/src/config.h @@ -10,6 +10,7 @@ class Config public: static const ConfigOption* const ALLOW_SCREENSAVER_DISABLE; static const ConfigOption* const ALLOW_VM_EDIT; + static const ConfigOption* const ALLOW_VM_EDIT_CHECKED; static const ConfigOption* const AUTOQUIT; static const ConfigOption* const BASEDIR; static const ConfigOption* const CONFIG; diff --git a/src/dialog.cpp b/src/dialog.cpp index 94b271c..a402e03 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -96,6 +96,7 @@ Dialog::Dialog(QWidget *parent) } ui->chkAdminMode->setVisible(Config::isSet(Config::ALLOW_VM_EDIT)); + ui->chkAdminMode->setChecked(Config::isSet(Config::ALLOW_VM_EDIT_CHECKED)); ui->chkAdminMode->setEnabled(false); ui->btnScreenSetup->setVisible(isProcessRunning("beamergui")); |