SYNERGY-694 Setup client configuration issues (#6987)
* SYNERGY-694 Fix compilation for old platforms * SYNERGY-694 Add server screen if it hasn't been added. * SYNERGY-694 Fix issue with repeat popups * Update ChangeLog
This commit is contained in:
parent
c1243deab9
commit
7c365c4dac
4 changed files with 12 additions and 13 deletions
|
|
@ -19,7 +19,7 @@ Enhancements:
|
||||||
- #6973 Update synergy UI. Main window
|
- #6973 Update synergy UI. Main window
|
||||||
- #6977 Update synergy UI. Configure server
|
- #6977 Update synergy UI. Configure server
|
||||||
- #6978 Update synergy UI. Settings window
|
- #6978 Update synergy UI. Settings window
|
||||||
- #6981 Update synergy UI. Setup client configuration
|
- #6981 | #6987 Update synergy UI. Setup client configuration
|
||||||
- #6984 Update synergy UI. Client error messages
|
- #6984 Update synergy UI. Client error messages
|
||||||
- #6962 | #6965 Add macOS 10.13 builder
|
- #6962 | #6965 Add macOS 10.13 builder
|
||||||
===========
|
===========
|
||||||
|
|
|
||||||
|
|
@ -461,8 +461,7 @@ void MainWindow::checkConnected(const QString& line)
|
||||||
m_pLabelClientState->updateClientState(line);
|
m_pLabelClientState->updateClientState(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line.contains("connected to server") ||
|
if (line.contains("connected to server") || line.contains("has connected"))
|
||||||
line.contains("accepted client connection"))
|
|
||||||
{
|
{
|
||||||
setSynergyState(synergyConnected);
|
setSynergyState(synergyConnected);
|
||||||
|
|
||||||
|
|
@ -1062,7 +1061,7 @@ QString MainWindow::getIPAddresses()
|
||||||
for (const auto& address : addresses) {
|
for (const auto& address : addresses) {
|
||||||
if (address.protocol() == QAbstractSocket::IPv4Protocol &&
|
if (address.protocol() == QAbstractSocket::IPv4Protocol &&
|
||||||
address != QHostAddress(QHostAddress::LocalHost) &&
|
address != QHostAddress(QHostAddress::LocalHost) &&
|
||||||
!address.isLinkLocal()) {
|
!address.isInSubnet(QHostAddress::parseSubnet("169.254.0.0/16"))) {
|
||||||
|
|
||||||
// usually 192.168.x.x is a useful ip for the user, so indicate
|
// usually 192.168.x.x is a useful ip for the user, so indicate
|
||||||
// this by making it bold.
|
// this by making it bold.
|
||||||
|
|
|
||||||
|
|
@ -70,18 +70,16 @@ ServerConfigDialog::ServerConfigDialog(QWidget* parent, ServerConfig& config) :
|
||||||
|
|
||||||
m_pScreenSetupView->setModel(&m_ScreenSetupModel);
|
m_pScreenSetupView->setModel(&m_ScreenSetupModel);
|
||||||
|
|
||||||
if (serverConfig().numScreens() == 0) {
|
auto& screens = serverConfig().screens();
|
||||||
|
auto server = std::find_if(screens.begin(), screens.end(), [this](const Screen& screen){ return (screen.name() == serverConfig().getServerName());});
|
||||||
|
|
||||||
|
if (server == screens.end()) {
|
||||||
Screen serverScreen(serverConfig().getServerName());
|
Screen serverScreen(serverConfig().getServerName());
|
||||||
serverScreen.markAsServer();
|
serverScreen.markAsServer();
|
||||||
model().screen(serverConfig().numColumns() / 2, serverConfig().numRows() / 2) = serverScreen;
|
model().screen(serverConfig().numColumns() / 2, serverConfig().numRows() / 2) = serverScreen;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (auto& screen : serverConfig().screens()) {
|
server->markAsServer();
|
||||||
if (screen.name() == serverConfig().getServerName()) {
|
|
||||||
screen.markAsServer();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pButtonAddComputer->setEnabled(!model().isFull());
|
m_pButtonAddComputer->setEnabled(!model().isFull());
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,8 @@ void ServerConnection::addClient(const QString& clientName)
|
||||||
{
|
{
|
||||||
if (!m_parent.serverConfig().isFull() && checkMainWindow())
|
if (!m_parent.serverConfig().isFull() && checkMainWindow())
|
||||||
{
|
{
|
||||||
|
m_parent.stopSynergy();
|
||||||
|
|
||||||
QMessageBox message(&m_parent);
|
QMessageBox message(&m_parent);
|
||||||
message.addButton(QObject::tr("Ignore"), QMessageBox::RejectRole);
|
message.addButton(QObject::tr("Ignore"), QMessageBox::RejectRole);
|
||||||
message.addButton(QObject::tr("Accept and configure"), QMessageBox::AcceptRole);
|
message.addButton(QObject::tr("Accept and configure"), QMessageBox::AcceptRole);
|
||||||
|
|
@ -74,6 +76,8 @@ void ServerConnection::addClient(const QString& clientName)
|
||||||
{
|
{
|
||||||
m_ignoredClients.append(clientName);
|
m_ignoredClients.append(clientName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_parent.startSynergy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -84,6 +88,4 @@ void ServerConnection::configureClient(const QString& clientName)
|
||||||
|
|
||||||
ServerConfigDialog dlg(&m_parent, config);
|
ServerConfigDialog dlg(&m_parent, config);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
|
|
||||||
m_parent.restartSynergy();
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue