diff options
author | sr | 2013-02-05 18:03:00 +0100 |
---|---|---|
committer | sr | 2013-02-05 18:03:00 +0100 |
commit | d9af1ec4348eca6c4d05ec8effed19697d288072 (patch) | |
tree | 62de9487b6d1cc93c9ea16680ca8cddbaf5514b4 | |
parent | [SERVER] fix vnc startup command (diff) | |
download | pvs2-d9af1ec4348eca6c4d05ec8effed19697d288072.tar.gz pvs2-d9af1ec4348eca6c4d05ec8effed19697d288072.tar.xz pvs2-d9af1ec4348eca6c4d05ec8effed19697d288072.zip |
[SERVER] Properly tell client the VNC server'S client id
-rw-r--r-- | i18n/server/pvsmgr_ar_JO.ts | 4 | ||||
-rw-r--r-- | i18n/server/pvsmgr_de_DE.ts | 4 | ||||
-rw-r--r-- | i18n/server/pvsmgr_es_MX.ts | 4 | ||||
-rw-r--r-- | i18n/server/pvsmgr_fr_FR.ts | 4 | ||||
-rw-r--r-- | i18n/server/pvsmgr_pl_PL.ts | 4 | ||||
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 9 | ||||
-rw-r--r-- | src/server/net/client.h | 1 |
7 files changed, 15 insertions, 15 deletions
diff --git a/i18n/server/pvsmgr_ar_JO.ts b/i18n/server/pvsmgr_ar_JO.ts index 14637a7..1b52528 100644 --- a/i18n/server/pvsmgr_ar_JO.ts +++ b/i18n/server/pvsmgr_ar_JO.ts @@ -51,12 +51,12 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="755"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> <source>Projection Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="757"/> <source>Could not send screen contents of %1 to other clients: VNC Startup failed.</source> <translation type="unfinished"></translation> </message> diff --git a/i18n/server/pvsmgr_de_DE.ts b/i18n/server/pvsmgr_de_DE.ts index 403028e..ed36f2d 100644 --- a/i18n/server/pvsmgr_de_DE.ts +++ b/i18n/server/pvsmgr_de_DE.ts @@ -104,12 +104,12 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="755"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> <source>Projection Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="757"/> <source>Could not send screen contents of %1 to other clients: VNC Startup failed.</source> <translation type="unfinished"></translation> </message> diff --git a/i18n/server/pvsmgr_es_MX.ts b/i18n/server/pvsmgr_es_MX.ts index 15a673a..2e11a13 100644 --- a/i18n/server/pvsmgr_es_MX.ts +++ b/i18n/server/pvsmgr_es_MX.ts @@ -307,12 +307,12 @@ Perform an unprojection or remove remote help to get a target.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="755"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> <source>Projection Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="757"/> <source>Could not send screen contents of %1 to other clients: VNC Startup failed.</source> <translation type="unfinished"></translation> </message> diff --git a/i18n/server/pvsmgr_fr_FR.ts b/i18n/server/pvsmgr_fr_FR.ts index 14637a7..1b52528 100644 --- a/i18n/server/pvsmgr_fr_FR.ts +++ b/i18n/server/pvsmgr_fr_FR.ts @@ -51,12 +51,12 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="755"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> <source>Projection Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="757"/> <source>Could not send screen contents of %1 to other clients: VNC Startup failed.</source> <translation type="unfinished"></translation> </message> diff --git a/i18n/server/pvsmgr_pl_PL.ts b/i18n/server/pvsmgr_pl_PL.ts index 14637a7..1b52528 100644 --- a/i18n/server/pvsmgr_pl_PL.ts +++ b/i18n/server/pvsmgr_pl_PL.ts @@ -51,12 +51,12 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="755"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> <source>Projection Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/server/mainwindow/mainwindow.cpp" line="756"/> + <location filename="../../src/server/mainwindow/mainwindow.cpp" line="757"/> <source>Could not send screen contents of %1 to other clients: VNC Startup failed.</source> <translation type="unfinished"></translation> </message> diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 67d88d0..1d9e565 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -719,6 +719,7 @@ void MainWindow::onVncServerStateChange(Client* client) msg.setField("HOST", client->ip()); msg.setField("PORT", QString::number(client->vncPort())); msg.setField("ROPASS", client->vncRoPass()); + msg.setField("CLIENTID", QString::number(client->id())); msg.setField("CAPTION", client->name() + " @ " + client->host()); for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) { @@ -775,15 +776,15 @@ void MainWindow::onVncClientStateChange(Client* client) for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) { Client *c = (**it).client(); - if (c == NULL || c == client) + if (c == NULL) continue; - if (c->currentProjectionSource() == client->currentProjectionSource()) + if (c->id() == client->currentProjectionSource()) + server = c; + if (c != client && c->currentProjectionSource() == client->currentProjectionSource()) { inUse = true; break; } - if (c->id() == client->currentProjectionSource()) - server = c; } // 3. kill server if applicable if (!inUse && server != NULL) diff --git a/src/server/net/client.h b/src/server/net/client.h index c90c884..2cdfb23 100644 --- a/src/server/net/client.h +++ b/src/server/net/client.h @@ -83,7 +83,6 @@ public: inline const bool isProjectionSource() const { return _isProjectionSource; } inline void setProjectionSource(bool enable) { _isProjectionSource = enable; } inline const ClientId currentProjectionSource() const { return _currentProjectionSource; } - inline void setCurrentProjectionSource(ClientId source) { _currentProjectionSource = source; } void startVncServer(); void stopVncServer(); void stopVncClient(); |