From dfe1328006193f2ad5013cecb9e4c3558cad6a2d Mon Sep 17 00:00:00 2001 From: Manuel Schneider Date: Thu, 22 May 2014 12:27:16 +0200 Subject: Refactor ambigious projectionsSoure to BroadcastSource --- src/server/mainwindow/mainwindow.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/server/mainwindow/mainwindow.cpp') diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index b194528..5059516 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -446,11 +446,11 @@ void MainWindow::broadcast(Client *from) // Tell all clients to listen to server for (QList::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it){ if ((*it)->client() != NULL) - (*it)->client()->setProjectionSource(false); + (*it)->client()->setBroadcastSource(false); } from->setDesiredProjectionSource(0); - from->setProjectionSource(true); + from->setBroadcastSource(true); // Set desired projection source on all clients, if not "from" or oflline for (QList::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) @@ -481,7 +481,7 @@ void MainWindow::unicast(Client *from, Client *to, bool blockOthers) to->stopVncServer(); from->setDesiredProjectionSource(0); - to->setProjectionSource(false); + to->setBroadcastSource(false); to->setDesiredProjectionSource(from->id()); if (from->isActiveVncServer()) // From is already active @@ -607,7 +607,7 @@ void MainWindow::onButtonStopProjection() if (c == NULL) continue; c->setDesiredProjectionSource(0); - c->setProjectionSource(false); + c->setBroadcastSource(false); } for (QList::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) @@ -813,7 +813,7 @@ void MainWindow::onClientAuthenticated(Client* client) for (QList::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) { Client *c = (**it).client(); - if (c != NULL && c != client && c->isActiveVncServer() && c->isProjectionSource()) + if (c != NULL && c != client && c->isActiveVncServer() && c->isBroadcastSource()) { client->startVncClient(c); client->setDesiredProjectionSource(c->id()); @@ -842,7 +842,7 @@ void MainWindow::onVncServerStateChange(Client* client) continue; // Offline or self if (c->currentProjectionSource() == client->id()) continue; // Already watching this client - if (c->desiredProjectionSource() != client->id() && !client->isProjectionSource()) + if (c->desiredProjectionSource() != client->id() && !client->isBroadcastSource()) continue; // Not interested c->startVncClient(client); } @@ -852,9 +852,9 @@ void MainWindow::onVncServerStateChange(Client* client) // VNC server stopped on some client or failed to start - reset local pending projection information // If at least one other client seemed to be waiting for this client's screen, pop up a message // on the console - bool wasInterested = client->isProjectionSource(); + bool wasInterested = client->isBroadcastSource(); //qDebug() << "On VNC stop:" << client->ip() << "was projection source:" << wasInterested; - client->setProjectionSource(false); + client->setBroadcastSource(false); for (QList::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) { Client *c = (**it).client(); -- cgit v1.2.3-55-g7522