Synergy 1161 when clicking on save preferences on configure server window, automatically apply all the new settings (#7081)
* SYNERGY-1161 When clicking on "Save" preferences on "Configure server" window, automatically apply all the new settings *Added comparison for all classes which used in server config * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Added server config changes checking logic * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings * Update ChangeLog * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Fix code style * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings * Fix Linux build * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Fix Sonar code smells * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Fix Ubuntu, CentOS and Debian build * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Fix merge conflicts * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Update ChangeLog * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Fix server config OK button behaviour on autoconfig * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Update changelog * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Fix sonar codesmell * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Fix build * SYNERGY-1161 When clicking on Save preferences on Configure server window, automatically apply all the new settings *Adding client on autoconfig silently Co-authored-by: Andrii Batyiev <andrii-external@symless.com>
This commit is contained in:
@ -5,6 +5,7 @@ Bug fixes:
|
||||
- #7078 Fix clipboard re-enables automatically
|
||||
- #7077 Fix Ubuntu, CentOS and Debian build after SYNERGY-1161
|
||||
- #7080 Add trace if the system can't open file with trusted fingerprints
|
||||
- #7081 Fix autoconfig after SYNERGY-1161
|
||||
- #7082 Windows client doesn't resume connection after sleep
|
||||
|
||||
Enhancements:
|
||||
|
||||
@ -135,6 +135,11 @@ ServerConfigDialog::ServerConfigDialog(QWidget* parent, ServerConfig& config) :
|
||||
this, [this]() { serverConfig().setConfigFile(m_pEditConfigFile->text()); onChange();});
|
||||
}
|
||||
|
||||
bool ServerConfigDialog::addClient(const QString& clientName)
|
||||
{
|
||||
return addComputer(clientName, true);
|
||||
}
|
||||
|
||||
void ServerConfigDialog::showEvent(QShowEvent* event)
|
||||
{
|
||||
QDialog::show();
|
||||
@ -304,15 +309,7 @@ void ServerConfigDialog::on_m_pListActions_itemSelectionChanged()
|
||||
|
||||
void ServerConfigDialog::on_m_pButtonAddComputer_clicked()
|
||||
{
|
||||
Screen newScreen("");
|
||||
|
||||
ScreenSettingsDialog dlg(this, &newScreen, &model().m_Screens);
|
||||
if (dlg.exec() == QDialog::Accepted)
|
||||
{
|
||||
model().addScreen(newScreen);
|
||||
}
|
||||
|
||||
m_pButtonAddComputer->setEnabled(!model().isFull());
|
||||
addComputer("", false);
|
||||
}
|
||||
|
||||
void ServerConfigDialog::onScreenRemoved()
|
||||
@ -351,6 +348,23 @@ bool ServerConfigDialog::on_m_pButtonBrowseConfigFile_clicked()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ServerConfigDialog::addComputer(const QString& clientName, bool doSilent)
|
||||
{
|
||||
bool isAccepted = false;
|
||||
Screen newScreen(clientName);
|
||||
|
||||
|
||||
ScreenSettingsDialog dlg(this, &newScreen, &model().m_Screens);
|
||||
if (doSilent || dlg.exec() == QDialog::Accepted)
|
||||
{
|
||||
model().addScreen(newScreen);
|
||||
isAccepted = true;
|
||||
}
|
||||
|
||||
m_pButtonAddComputer->setEnabled(!model().isFull());
|
||||
return isAccepted;
|
||||
}
|
||||
|
||||
void ServerConfigDialog::onChange()
|
||||
{
|
||||
bool isAppConfigDataEqual = m_OrigServerAppConfigUseExternalConfig == serverConfig().getUseExternalConfig() &&
|
||||
|
||||
@ -33,6 +33,7 @@ class ServerConfigDialog : public QDialog, public Ui::ServerConfigDialogBase
|
||||
|
||||
public:
|
||||
ServerConfigDialog(QWidget* parent, ServerConfig& config);
|
||||
bool addClient(const QString& clientName);
|
||||
|
||||
public slots:
|
||||
void accept();
|
||||
@ -57,6 +58,7 @@ class ServerConfigDialog : public QDialog, public Ui::ServerConfigDialogBase
|
||||
bool on_m_pButtonBrowseConfigFile_clicked();
|
||||
|
||||
protected:
|
||||
bool addComputer(const QString& clientName, bool doSilent);
|
||||
ServerConfig& serverConfig() { return m_ServerConfig; }
|
||||
void setOrigServerConfig(const ServerConfig& s) { m_OrigServerConfig = s; }
|
||||
ScreenSetupModel& model() { return m_ScreenSetupModel; }
|
||||
|
||||
@ -81,11 +81,9 @@ void ServerConnection::addClient(const QString& clientName)
|
||||
|
||||
void ServerConnection::configureClient(const QString& clientName)
|
||||
{
|
||||
auto& config = m_parent.serverConfig();
|
||||
config.addClient(clientName);
|
||||
ServerConfigDialog dlg(&m_parent, m_parent.serverConfig());
|
||||
|
||||
ServerConfigDialog dlg(&m_parent, config);
|
||||
dlg.exec();
|
||||
|
||||
m_parent.restartSynergy();
|
||||
if(dlg.addClient(clientName) && dlg.exec() == QDialog::Accepted) {
|
||||
m_parent.restartSynergy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user