diff --git a/src/gui/src/ServerConfig.cpp b/src/gui/src/ServerConfig.cpp index 8ced4148..e24b8540 100644 --- a/src/gui/src/ServerConfig.cpp +++ b/src/gui/src/ServerConfig.cpp @@ -51,6 +51,7 @@ ServerConfig::ServerConfig(QSettings* settings, int numColumns, int numRows , m_ServerName(serverName), m_IgnoreAutoConfigClient(false), m_EnableDragAndDrop(false), + m_DisableLockToScreen(false), m_ClipboardSharing(true), m_pMainWindow(mainWindow) { @@ -116,6 +117,7 @@ void ServerConfig::saveSettings() settings().setValue("switchDoubleTap", switchDoubleTap()); settings().setValue("switchCornerSize", switchCornerSize()); settings().setValue("ignoreAutoConfigClient", ignoreAutoConfigClient()); + settings().setValue("disableLockToScreen", disableLockToScreen()); settings().setValue("enableDragAndDrop", enableDragAndDrop()); writeSettings(settings(), switchCorners(), "switchCorner"); @@ -160,6 +162,7 @@ void ServerConfig::loadSettings() setSwitchDoubleTap(settings().value("switchDoubleTap", 250).toInt()); setSwitchCornerSize(settings().value("switchCornerSize").toInt()); setIgnoreAutoConfigClient(settings().value("ignoreAutoConfigClient").toBool()); + setDisableLockToScreen(settings().value("disableLockToScreen", false).toBool()); setEnableDragAndDrop(settings().value("enableDragAndDrop", true).toBool()); readSettings(settings(), switchCorners(), "switchCorner", false, NumSwitchCorners); @@ -247,6 +250,7 @@ QTextStream& operator<<(QTextStream& outStream, const ServerConfig& config) outStream << "\t" << "relativeMouseMoves = " << (config.relativeMouseMoves() ? "true" : "false") << endl; outStream << "\t" << "screenSaverSync = " << (config.screenSaverSync() ? "true" : "false") << endl; outStream << "\t" << "win32KeepForeground = " << (config.win32KeepForeground() ? "true" : "false") << endl; + outStream << "\t" << "disableLockToScreen = " << (config.disableLockToScreen() ? "true" : "false") << endl; outStream << "\t" << "clipboardSharing = " << (config.clipboardSharing() ? "true" : "false") << endl; if (config.hasSwitchDelay()) diff --git a/src/gui/src/ServerConfig.h b/src/gui/src/ServerConfig.h index e9b685c5..9ab3ba3b 100644 --- a/src/gui/src/ServerConfig.h +++ b/src/gui/src/ServerConfig.h @@ -62,6 +62,7 @@ class ServerConfig : public BaseConfig const HotkeyList& hotkeys() const { return m_Hotkeys; } bool ignoreAutoConfigClient() const { return m_IgnoreAutoConfigClient; } bool enableDragAndDrop() const { return m_EnableDragAndDrop; } + bool disableLockToScreen() const { return m_DisableLockToScreen; } bool clipboardSharing() const { return m_ClipboardSharing; } void saveSettings(); @@ -91,6 +92,7 @@ class ServerConfig : public BaseConfig void setSwitchCornerSize(int val) { m_SwitchCornerSize = val; } void setIgnoreAutoConfigClient(bool on) { m_IgnoreAutoConfigClient = on; } void setEnableDragAndDrop(bool on) { m_EnableDragAndDrop = on; } + void setDisableLockToScreen(bool on) { m_DisableLockToScreen = on; } void setClipboardSharing(bool on) { m_ClipboardSharing = on; } QList& switchCorners() { return m_SwitchCorners; } HotkeyList& hotkeys() { return m_Hotkeys; } @@ -124,6 +126,7 @@ class ServerConfig : public BaseConfig QString m_ServerName; bool m_IgnoreAutoConfigClient; bool m_EnableDragAndDrop; + bool m_DisableLockToScreen; bool m_ClipboardSharing; MainWindow* m_pMainWindow; }; diff --git a/src/gui/src/ServerConfigDialog.cpp b/src/gui/src/ServerConfigDialog.cpp index 6fc10248..8463a214 100644 --- a/src/gui/src/ServerConfigDialog.cpp +++ b/src/gui/src/ServerConfigDialog.cpp @@ -53,6 +53,7 @@ ServerConfigDialog::ServerConfigDialog(QWidget* parent, ServerConfig& config, co m_pCheckBoxCornerBottomLeft->setChecked(serverConfig().switchCorner(BaseConfig::BottomLeft)); m_pCheckBoxCornerBottomRight->setChecked(serverConfig().switchCorner(BaseConfig::BottomRight)); m_pSpinBoxSwitchCornerSize->setValue(serverConfig().switchCornerSize()); + m_pCheckBoxDisableLockToScreen->setChecked(serverConfig().disableLockToScreen()); m_pCheckBoxIgnoreAutoConfigClient->setChecked(serverConfig().ignoreAutoConfigClient()); @@ -102,6 +103,7 @@ void ServerConfigDialog::accept() serverConfig().setSwitchCornerSize(m_pSpinBoxSwitchCornerSize->value()); serverConfig().setIgnoreAutoConfigClient(m_pCheckBoxIgnoreAutoConfigClient->isChecked()); serverConfig().setEnableDragAndDrop(m_pCheckBoxEnableDragAndDrop->isChecked()); + serverConfig().setDisableLockToScreen(m_pCheckBoxDisableLockToScreen->isChecked()); serverConfig().setClipboardSharing(m_pCheckBoxEnableClipboard->isChecked()); // now that the dialog has been accepted, copy the new server config to the original one, diff --git a/src/gui/src/ServerConfigDialogBase.ui b/src/gui/src/ServerConfigDialogBase.ui index 5478f360..e4e988cf 100644 --- a/src/gui/src/ServerConfigDialogBase.ui +++ b/src/gui/src/ServerConfigDialogBase.ui @@ -44,7 +44,7 @@ - :/res/icons/64x64/user-trash.png + :/res/icons/64x64/user-trash.png @@ -82,7 +82,7 @@ - :/res/icons/64x64/video-display.png + :/res/icons/64x64/video-display.png @@ -408,6 +408,13 @@ Double click on a screen to edit its settings. &Options + + + + Enable drag and drop file transfers + + + @@ -428,13 +435,33 @@ Double click on a screen to edit its settings. - - - + + + + Qt::Vertical + + + + 20 + 16 + + + + + + + + Enable clipboard sharing + + true + + + + - S&ynchronize screen savers + Ignore auto config clients @@ -491,40 +518,20 @@ Double click on a screen to edit its settings. - - - - Qt::Vertical + + + + true - - - 20 - 16 - - - - - - - Enable drag and drop file transfers - - - - - - - Ignore auto config clients + S&ynchronize screen savers - + - Enable clipboard sharing - - - true + Disable lock to screen @@ -662,7 +669,7 @@ Double click on a screen to edit its settings. - +