summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohann Latocha2010-07-10 00:11:47 +0200
committerJohann Latocha2010-07-10 00:11:47 +0200
commitd2d403a8dec0f65bb3665c2bd2dab69456cdee42 (patch)
treea84301974f490b80902a402e9b7c3c3855ebf010 /src
parentfirst commit to test git (diff)
downloadpvs-d2d403a8dec0f65bb3665c2bd2dab69456cdee42.tar.gz
pvs-d2d403a8dec0f65bb3665c2bd2dab69456cdee42.tar.xz
pvs-d2d403a8dec0f65bb3665c2bd2dab69456cdee42.zip
Revoke Fabians changes.
Diffstat (limited to 'src')
-rw-r--r--src/core/pvsConnectionManager.cpp10
-rw-r--r--src/gui/connectionList.cpp23
-rw-r--r--src/gui/connectionList.h1
-rw-r--r--src/gui/connectionWindow.cpp2
-rw-r--r--src/gui/mainWindow.cpp35
-rw-r--r--src/gui/mainWindow.h1
-rw-r--r--src/gui/ui/mainwindow.ui19
-rw-r--r--src/gui/ui/mainwindowtouch.ui17
-rw-r--r--src/net/pvsListenServer.cpp4
-rw-r--r--src/net/pvsServerConnection.cpp8
-rw-r--r--src/pvs.cpp12
-rw-r--r--src/pvsDaemon.cpp21
-rw-r--r--src/util/util.cpp7
-rw-r--r--src/util/util.h1
-rw-r--r--src/version.h4
15 files changed, 30 insertions, 135 deletions
diff --git a/src/core/pvsConnectionManager.cpp b/src/core/pvsConnectionManager.cpp
index aabd869..8a35ca9 100644
--- a/src/core/pvsConnectionManager.cpp
+++ b/src/core/pvsConnectionManager.cpp
@@ -93,14 +93,6 @@ void PVSConnectionManager::onClientRemove(PVSClientConnection* removedConnection
}
// Inform all chat clients about a new event.
-// hier eventuell prozesse anzeigen einbinden
-//
-//
-//
-//
-//
-//
-//
void PVSConnectionManager::sendEventToClients(QString event, PVSClientConnection* connection, QString clientName)
{
if(event.compare("addedConnection") == 0)
@@ -117,8 +109,6 @@ void PVSConnectionManager::sendEventToClients(QString event, PVSClientConnection
if(event.compare("addedClient") == 0)
{
// send name to everybody to all connected clients.
- _pvsServer.sendToAll(PVSMsg(PVSCOMMAND, "SHOWPROCESSES", ""));
- ConsoleLog writeNetwork("SHOWPROCESSES sent...");
_pvsServer.sendToAll(PVSMsg(PVSMESSAGE, "clientToAdd", ":" + clientName, 0));
connection->push_back_send(PVSMsg(PVSMESSAGE, "assignedName", ":" + clientName, 0));
connection->push_back_send(PVSMsg(PVSMESSAGE, "clientToAdd", ":PVSMGR:local", 0));
diff --git a/src/gui/connectionList.cpp b/src/gui/connectionList.cpp
index 61be876..2f9829e 100644
--- a/src/gui/connectionList.cpp
+++ b/src/gui/connectionList.cpp
@@ -432,14 +432,6 @@ void ConnectionList::on_remoteHelp()
}
}
-/*
- *
- */
-void ConnectionList::showProcesses()
-{
- MainWindow::getConnectionWindow()->messageStations("BROADCAST","SHOWPROCESSES");
-}
-
void ConnectionList::on_lock()
{
MainWindow::getConnectionWindow()->lockStations();
@@ -450,21 +442,6 @@ void ConnectionList::on_unlock()
MainWindow::getConnectionWindow()->unlockStations();
}
-/* Hier werden Nachrichten vom Server versendet:
-* Type: PVSMESSAGE
-* Ident: BROADCAST
-* Msg: die Nachricht
-*
-* Wenn Ident: LOCKSTATION -> locke Client
-*
-*
-*
-*
-*
-*
-*
-*/
-
void ConnectionList::on_message()
{
Dialog msgD;
diff --git a/src/gui/connectionList.h b/src/gui/connectionList.h
index 29dd174..50d8924 100644
--- a/src/gui/connectionList.h
+++ b/src/gui/connectionList.h
@@ -108,7 +108,6 @@ public slots:
virtual void on_projection();
virtual void on_unprojection();
virtual void on_lock();
- virtual void showProcesses();
virtual void on_unlock();
virtual void on_message();
virtual void on_lock_with_message();
diff --git a/src/gui/connectionWindow.cpp b/src/gui/connectionWindow.cpp
index 9e7b370..cf51051 100644
--- a/src/gui/connectionWindow.cpp
+++ b/src/gui/connectionWindow.cpp
@@ -263,6 +263,8 @@ bool ConnectionWindow::remoteHelp(QString sname) {
}
+
+
bool ConnectionWindow::lockStations() {
if (std::list<QString>* lockList = MainWindow::getConnectionList()->getSelectedClients()) {
if (!lockList->empty()) {
diff --git a/src/gui/mainWindow.cpp b/src/gui/mainWindow.cpp
index 4cd6997..eb15e82 100644
--- a/src/gui/mainWindow.cpp
+++ b/src/gui/mainWindow.cpp
@@ -116,10 +116,6 @@ MainWindow::MainWindow(QWidget *parent) :
// toolbar and actions in pvsmgr
-
- //testweise chat starten beim klicken auf processlist
- connect(ui->actionShowProcesses, SIGNAL(triggered()), this, SLOT(showProcesses()));
- ui->actionShowProcesses->setStatusTip(tr("Shows list of processes of this client"));
connect(ui->action_Exit, SIGNAL(triggered()), this, SLOT(close()));
ui->action_Exit->setStatusTip(tr("Exit"));
connect(ui->action_Disconnect, SIGNAL(triggered()), this, SLOT(disconnect()));
@@ -134,8 +130,6 @@ MainWindow::MainWindow(QWidget *parent) :
ui->actionLock->setStatusTip(tr("Lock or Unlock all Clients"));
connect(ui->actionCreate_profile, SIGNAL(triggered()), this, SLOT(createProfile()));
-
-
connect(ui->actionShow_Username, SIGNAL(triggered()), this, SLOT(showusername()));
connect(ui->actionShow_Hostname_IP, SIGNAL(triggered()), this, SLOT(showip()));
connect(ui->actionShow_Fullname, SIGNAL(triggered()), this, SLOT(showname()));
@@ -801,35 +795,6 @@ void MainWindow::foto() // makes a screenshot of the selected client
}
}
-/*
- * test if a client is selected and then make him tell his processlist
- *
- *
- *
- *
- *
- */
-
-void MainWindow::showProcesses()
-{
- std::list<QString>* selectedClients =
- MainWindow::getConnectionList()->getSelectedClients();
- if (selectedClients->size() == 1)
- {
- // do stuff
- }
- else
- {
- QString
- message =
- QString(
- tr(
- "This operation can only be performed for one selected Client!"));
- QMessageBox::information(this, "PVS", message);
- }
-}
-
-
void MainWindow::createProfile()
{
profileDialog proDiag;
diff --git a/src/gui/mainWindow.h b/src/gui/mainWindow.h
index 5e20af2..00bd927 100644
--- a/src/gui/mainWindow.h
+++ b/src/gui/mainWindow.h
@@ -171,7 +171,6 @@ public slots:
void projecttoolbar();
void unprojecttoolbar();
void closeUp();
- void showProcesses();
void foto();
void backgroundpicture();
void repaintbackgroundpicture();
diff --git a/src/gui/ui/mainwindow.ui b/src/gui/ui/mainwindow.ui
index b5ac0e3..eb49d1b 100644
--- a/src/gui/ui/mainwindow.ui
+++ b/src/gui/ui/mainwindow.ui
@@ -28,8 +28,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>778</width>
- <height>542</height>
+ <width>776</width>
+ <height>534</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
@@ -195,7 +195,7 @@
<x>0</x>
<y>0</y>
<width>838</width>
- <height>23</height>
+ <height>28</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@@ -286,7 +286,6 @@
<addaction name="actionView"/>
<addaction name="actionLock"/>
<addaction name="actionChat"/>
- <addaction name="actionShowProcesses"/>
</widget>
<action name="actionShow_Username">
<property name="checkable">
@@ -532,18 +531,6 @@
<string>-</string>
</property>
</action>
- <action name="actionShowProcesses">
- <property name="icon">
- <iconset resource="../../../pvsmgr.qrc">
- <normaloff>:/finder</normaloff>:/finder</iconset>
- </property>
- <property name="text">
- <string>Show Processes</string>
- </property>
- <property name="toolTip">
- <string>show processes of this client</string>
- </property>
- </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
diff --git a/src/gui/ui/mainwindowtouch.ui b/src/gui/ui/mainwindowtouch.ui
index f8e76c0..9030b17 100644
--- a/src/gui/ui/mainwindowtouch.ui
+++ b/src/gui/ui/mainwindowtouch.ui
@@ -28,8 +28,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>1329</width>
- <height>660</height>
+ <width>1327</width>
+ <height>658</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">
@@ -365,7 +365,6 @@
<addaction name="actionresetall"/>
<addaction name="separator"/>
<addaction name="actionDozent"/>
- <addaction name="actionShowProcesses"/>
</widget>
<action name="actionShow_Username">
<property name="checkable">
@@ -637,18 +636,6 @@
<string>Ctrl+D</string>
</property>
</action>
- <action name="actionShowProcesses">
- <property name="icon">
- <iconset resource="../../../pvsmgr.qrc">
- <normaloff>:/finder</normaloff>:/finder</iconset>
- </property>
- <property name="text">
- <string>Show Processes</string>
- </property>
- <property name="toolTip">
- <string>show processes of this client</string>
- </property>
- </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
diff --git a/src/net/pvsListenServer.cpp b/src/net/pvsListenServer.cpp
index 1dac9c0..f21303e 100644
--- a/src/net/pvsListenServer.cpp
+++ b/src/net/pvsListenServer.cpp
@@ -245,8 +245,8 @@ bool PVSListenServer::init()
return false;
}
ConsoleLog writeNetwork(
- QString("Server is listening. Socket: ").append(int2String(
- (int) _listenSocket)));
+ QString("Server is listening. Socket: ").append(ptr2String(
+ _listenSocket)));
connect(_listenSocket, SIGNAL(newConnection()), this, SLOT(
server_connectionRequest()));
diff --git a/src/net/pvsServerConnection.cpp b/src/net/pvsServerConnection.cpp
index 1ce9904..04a1ef6 100644
--- a/src/net/pvsServerConnection.cpp
+++ b/src/net/pvsServerConnection.cpp
@@ -133,14 +133,6 @@ void PVSServerConnection::onPing(PVSMsg pingmsg)
}
}
-/* Hier werden Nachrichten behandelt, die vom Client kommen
- *
- *
- *
- *
- *
- */
-
void PVSServerConnection::handleClientMsg(PVSMsg receiver)
{
// FIXME: @SimonR, this line cuase problems with pvs in daemon mode and dbus
diff --git a/src/pvs.cpp b/src/pvs.cpp
index 1531c3d..2069e36 100644
--- a/src/pvs.cpp
+++ b/src/pvs.cpp
@@ -176,18 +176,6 @@ void PVS::onCommand(PVSMsg cmdMessage)
unlock();
return;
}
- if (ident.compare("SHOWPROCESSES") == 0)
- {
- // show processes
- // ConsoleLog writeNetwork(system("ps -f -N -U root"));
- // emit showMessage("SHOWPROCESSES", "proce", true);
- return;
- }
- if (ident.compare("KILLPROCESS") == 0)
- {
- // do stuff if process has to be killed
- return;
- }
#ifdef never
// prototype
diff --git a/src/pvsDaemon.cpp b/src/pvsDaemon.cpp
index 961e0f3..e87bfe7 100644
--- a/src/pvsDaemon.cpp
+++ b/src/pvsDaemon.cpp
@@ -66,11 +66,13 @@ int main(int argc, char** argv)
{
int frequency = 5;
int port = -1;
- QString homeDir("/home/");
- QString scriptPath = homeDir;
- scriptPath.append(getUserName().append(QString("/.pvs/pvs-vncsrv")));
- QString scriptName;
- scriptName = getFilenameFromPath(scriptPath);
+
+ QFileInfo script;
+ script.setFile("/usr/bin/pvs-vncsrv");
+ if (!script.exists())
+ script.setFile("/usr/local/bin/pvs-vncsrv");
+ if (!script.exists())
+ script.setFile("/home/" + getUserName() + "/.pvs/pvs-vncsrv");
QCoreApplication app(argc, argv);
app.setOrganizationName("openslx");
@@ -259,8 +261,7 @@ int main(int argc, char** argv)
{
if (option_index + 1 < argc)
{
- scriptPath = QString(argv[option_index + 1]);
- scriptName = getFilenameFromPath(scriptPath);
+ script.setFile(QString(argv[option_index + 1]));
option_index++;
continue;
}
@@ -347,13 +348,13 @@ int main(int argc, char** argv)
if (port <= 0)
port = SERVER_PORT_INT;
ConsoleLog writeLine(QString("TCP-Port: ").append(int2String(port)));
- mainClient->setScriptPath(scriptPath);
- ConsoleLog writeLine(QString("VNCScriptPath: ").append(scriptPath));
+ mainClient->setScriptPath(script.filePath());
+ ConsoleLog writeLine(QString("VNCScriptPath: ").append(script.filePath()));
createPolicyDir();
createPolicyFiles();
// long int gr = 0;
- mainClient->setScriptPath(scriptPath);
+ mainClient->setScriptPath(script.filePath());
app.exec();
delete mainClient;
diff --git a/src/util/util.cpp b/src/util/util.cpp
index c2d06a0..946168e 100644
--- a/src/util/util.cpp
+++ b/src/util/util.cpp
@@ -325,6 +325,13 @@ QString int2String(int intInt)
return QString(tmp);
}
+QString ptr2String(void* ptr)
+{
+ char tmp[50];
+ snprintf(tmp, 49, "%p", ptr);
+ return QString(tmp);
+}
+
int string2Int(QString string)
{
return atoi(string.toUtf8().data());
diff --git a/src/util/util.h b/src/util/util.h
index 37565cb..6ddefc6 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -46,6 +46,7 @@ QString readPassFromPassFile();
bool getAllowed();
QString int2String(int intInt);
+QString ptr2String(void* ptr);
int string2Int(QString string);
int string2Int(QString string);
//} // end namespace util
diff --git a/src/version.h b/src/version.h
index c217c07..ac24ac2 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,2 +1,2 @@
-#define VERSION_STRING "1.9.8.0"
-#define VERSION_NUMBER 1980
+#define VERSION_STRING "2.0.1.0"
+#define VERSION_NUMBER 2010