diff options
author | Sebastien Braun | 2010-10-05 22:57:48 +0200 |
---|---|---|
committer | Sebastien Braun | 2010-10-05 22:57:48 +0200 |
commit | 0cb19c0a597bfb7a6cac416fb5c0b0a89043081e (patch) | |
tree | 1c076c798ae6ce960bccde2e0aea675143d961d8 | |
parent | Fix SIGSEGV-generating lookup bug when incoming multicast transfers are retried (diff) | |
parent | [PVSGUI] parsing cmdargs fixed (diff) | |
download | pvs-0cb19c0a597bfb7a6cac416fb5c0b0a89043081e.tar.gz pvs-0cb19c0a597bfb7a6cac416fb5c0b0a89043081e.tar.xz pvs-0cb19c0a597bfb7a6cac416fb5c0b0a89043081e.zip |
Merge remote branch 'openslx/master' into mcastft
Conflicts:
CMakeLists.txt
pvsmgr.qrc
src/gui/clientConfigDialog.cpp
src/gui/mainWindow.cpp
src/gui/ui/mainwindow.ui
src/gui/ui/mainwindowtouch.ui
src/pvs.cpp
src/pvs.h
src/pvsDaemon.cpp
src/pvsgui.cpp
78 files changed, 4732 insertions, 2163 deletions
@@ -1,4 +1,3 @@ .cproject .project build/ - diff --git a/3rdparty/qtsingleapplication/CMakeLists.txt b/3rdparty/qtsingleapplication/CMakeLists.txt new file mode 100644 index 0000000..313054e --- /dev/null +++ b/3rdparty/qtsingleapplication/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################################################ +# Variables +################################################################################ + +IF(UNIX) +SET( QTSINGLEAPPLICATION_SRCS + 3rdparty/qtsingleapplication/qtlocalpeer.cpp + 3rdparty/qtsingleapplication/qtlockedfile.cpp + 3rdparty/qtsingleapplication/qtlockedfile_unix.cpp + 3rdparty/qtsingleapplication/qtsingleapplication.cpp + 3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp + PARENT_SCOPE +) +ELSEIF(WIN32) +SET( QTSINGLEAPPLICATION_SRCS + 3rdparty/qtsingleapplication/qtlocalpeer.cpp + 3rdparty/qtsingleapplication/qtlockedfile.cpp + 3rdparty/qtsingleapplication/qtlockedfile_win.cpp + 3rdparty/qtsingleapplication/qtsingleapplication.cpp + 3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp + PARENT_SCOPE +) +ENDIF(UNIX) + +SET( QTSINGLEAPPLICATION_MOC_HDRS + 3rdparty/qtsingleapplication/qtlocalpeer.h + 3rdparty/qtsingleapplication/qtlockedfile.h + 3rdparty/qtsingleapplication/qtsingleapplication.h + 3rdparty/qtsingleapplication/qtsinglecoreapplication.h + PARENT_SCOPE +) diff --git a/3rdparty/qtsingleapplication/QtLockedFile b/3rdparty/qtsingleapplication/QtLockedFile new file mode 100644 index 0000000..16b48ba --- /dev/null +++ b/3rdparty/qtsingleapplication/QtLockedFile @@ -0,0 +1 @@ +#include "qtlockedfile.h" diff --git a/3rdparty/qtsingleapplication/QtSingleApplication b/3rdparty/qtsingleapplication/QtSingleApplication new file mode 100644 index 0000000..d111bf7 --- /dev/null +++ b/3rdparty/qtsingleapplication/QtSingleApplication @@ -0,0 +1 @@ +#include "qtsingleapplication.h" diff --git a/3rdparty/qtsingleapplication/qtlocalpeer.cpp b/3rdparty/qtsingleapplication/qtlocalpeer.cpp new file mode 100644 index 0000000..f531956 --- /dev/null +++ b/3rdparty/qtsingleapplication/qtlocalpeer.cpp @@ -0,0 +1,203 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + + +#include "qtlocalpeer.h" +#include <QtCore/QCoreApplication> +#include <QtCore/QTime> + +#if defined(Q_OS_WIN) +#include <QtCore/QLibrary> +#include <QtCore/qt_windows.h> +typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*); +static PProcessIdToSessionId pProcessIdToSessionId = 0; +#endif +#if defined(Q_OS_UNIX) +#include <time.h> +#endif + +namespace QtLP_Private { +#include "qtlockedfile.cpp" +#if defined(Q_OS_WIN) +#include "qtlockedfile_win.cpp" +#else +#include "qtlockedfile_unix.cpp" +#endif +} + +const char* QtLocalPeer::ack = "ack"; + +QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId) + : QObject(parent), id(appId) +{ + QString prefix = id; + if (id.isEmpty()) { + id = QCoreApplication::applicationFilePath(); +#if defined(Q_OS_WIN) + id = id.toLower(); +#endif + prefix = id.section(QLatin1Char('/'), -1); + } + prefix.remove(QRegExp("[^a-zA-Z]")); + prefix.truncate(6); + + QByteArray idc = id.toUtf8(); + quint16 idNum = qChecksum(idc.constData(), idc.size()); + socketName = QLatin1String("qtsingleapp-") + prefix + + QLatin1Char('-') + QString::number(idNum, 16); + +#if defined(Q_OS_WIN) + if (!pProcessIdToSessionId) { + QLibrary lib("kernel32"); + pProcessIdToSessionId = (PProcessIdToSessionId)lib.resolve("ProcessIdToSessionId"); + } + if (pProcessIdToSessionId) { + DWORD sessionId = 0; + pProcessIdToSessionId(GetCurrentProcessId(), &sessionId); + socketName += QLatin1Char('-') + QString::number(sessionId, 16); + } +#else + socketName += QLatin1Char('-') + QString::number(::getuid(), 16); +#endif + + server = new QLocalServer(this); + QString lockName = QDir(QDir::tempPath()).absolutePath() + + QLatin1Char('/') + socketName + + QLatin1String("-lockfile"); + lockFile.setFileName(lockName); + lockFile.open(QIODevice::ReadWrite); +} + + + +bool QtLocalPeer::isClient() +{ + if (lockFile.isLocked()) + return false; + + if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false)) + return true; + + bool res = server->listen(socketName); +#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) + // ### Workaround + if (!res && server->serverError() == QAbstractSocket::AddressInUseError) { + QFile::remove(QDir::cleanPath(QDir::tempPath())+QLatin1Char('/')+socketName); + res = server->listen(socketName); + } +#endif + if (!res) + qWarning("QtSingleCoreApplication: listen on local socket failed, %s", qPrintable(server->errorString())); + QObject::connect(server, SIGNAL(newConnection()), SLOT(receiveConnection())); + return false; +} + + +bool QtLocalPeer::sendMessage(const QString &message, int timeout) +{ + if (!isClient()) + return false; + + QLocalSocket socket; + bool connOk = false; + for(int i = 0; i < 2; i++) { + // Try twice, in case the other instance is just starting up + socket.connectToServer(socketName); + connOk = socket.waitForConnected(timeout/2); + if (connOk || i) + break; + int ms = 250; +#if defined(Q_OS_WIN) + Sleep(DWORD(ms)); +#else + struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; + nanosleep(&ts, NULL); +#endif + } + if (!connOk) + return false; + + QByteArray uMsg(message.toUtf8()); + QDataStream ds(&socket); + ds.writeBytes(uMsg.constData(), uMsg.size()); + bool res = socket.waitForBytesWritten(timeout); + res &= socket.waitForReadyRead(timeout); // wait for ack + res &= (socket.read(qstrlen(ack)) == ack); + return res; +} + + +void QtLocalPeer::receiveConnection() +{ + QLocalSocket* socket = server->nextPendingConnection(); + if (!socket) + return; + + while (socket->bytesAvailable() < (int)sizeof(quint32)) + socket->waitForReadyRead(); + QDataStream ds(socket); + QByteArray uMsg; + quint32 remaining; + ds >> remaining; + uMsg.resize(remaining); + int got = 0; + char* uMsgBuf = uMsg.data(); + do { + got = ds.readRawData(uMsgBuf, remaining); + remaining -= got; + uMsgBuf += got; + } while (remaining && got >= 0 && socket->waitForReadyRead(2000)); + if (got < 0) { + qWarning() << "QtLocalPeer: Message reception failed" << socket->errorString(); + delete socket; + return; + } + QString message(QString::fromUtf8(uMsg)); + socket->write(ack, qstrlen(ack)); + socket->waitForBytesWritten(1000); + delete socket; + emit messageReceived(message); //### (might take a long time to return) +} diff --git a/3rdparty/qtsingleapplication/qtlocalpeer.h b/3rdparty/qtsingleapplication/qtlocalpeer.h new file mode 100644 index 0000000..8a54a9b --- /dev/null +++ b/3rdparty/qtsingleapplication/qtlocalpeer.h @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + + +#include <QtNetwork/QLocalServer> +#include <QtNetwork/QLocalSocket> +#include <QtCore/QDir> + +namespace QtLP_Private { +#include "qtlockedfile.h" +} + +class QtLocalPeer : public QObject +{ + Q_OBJECT + +public: + QtLocalPeer(QObject *parent = 0, const QString &appId = QString()); + bool isClient(); + bool sendMessage(const QString &message, int timeout); + QString applicationId() const + { return id; } + +Q_SIGNALS: + void messageReceived(const QString &message); + +protected Q_SLOTS: + void receiveConnection(); + +protected: + QString id; + QString socketName; + QLocalServer* server; + QtLP_Private::QtLockedFile lockFile; + +private: + static const char* ack; +}; diff --git a/3rdparty/qtsingleapplication/qtlockedfile.cpp b/3rdparty/qtsingleapplication/qtlockedfile.cpp new file mode 100644 index 0000000..2cf0805 --- /dev/null +++ b/3rdparty/qtsingleapplication/qtlockedfile.cpp @@ -0,0 +1,199 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + +#include "qtlockedfile.h" + +/*! + \class QtLockedFile + + \brief The QtLockedFile class extends QFile with advisory locking + functions. + + A file may be locked in read or write mode. Multiple instances of + \e QtLockedFile, created in multiple processes running on the same + machine, may have a file locked in read mode. Exactly one instance + may have it locked in write mode. A read and a write lock cannot + exist simultaneously on the same file. + + The file locks are advisory. This means that nothing prevents + another process from manipulating a locked file using QFile or + file system functions offered by the OS. Serialization is only + guaranteed if all processes that access the file use + QLockedFile. Also, while holding a lock on a file, a process + must not open the same file again (through any API), or locks + can be unexpectedly lost. + + The lock provided by an instance of \e QtLockedFile is released + whenever the program terminates. This is true even when the + program crashes and no destructors are called. +*/ + +/*! \enum QtLockedFile::LockMode + + This enum describes the available lock modes. + + \value ReadLock A read lock. + \value WriteLock A write lock. + \value NoLock Neither a read lock nor a write lock. +*/ + +/*! + Constructs an unlocked \e QtLockedFile object. This constructor + behaves in the same way as \e QFile::QFile(). + + \sa QFile::QFile() +*/ +QtLockedFile::QtLockedFile() + : QFile() +{ +#ifdef Q_OS_WIN + wmutex = 0; + rmutex = 0; +#endif + m_lock_mode = NoLock; +} + +/*! + Constructs an unlocked QtLockedFile object with file \a name. This + constructor behaves in the same way as \e QFile::QFile(const + QString&). + + \sa QFile::QFile() +*/ +QtLockedFile::QtLockedFile(const QString &name) + : QFile(name) +{ +#ifdef Q_OS_WIN + wmutex = 0; + rmutex = 0; +#endif + m_lock_mode = NoLock; +} + +/*! + Opens the file in OpenMode \a mode. + + This is identical to QFile::open(), with the one exception that the + Truncate mode flag is disallowed. Truncation would conflict with the + advisory file locking, since the file would be modified before the + write lock is obtained. If truncation is required, use resize(0) + after obtaining the write lock. + + Returns true if successful; otherwise false. + + \sa QFile::open(), QFile::resize() +*/ +bool QtLockedFile::open(OpenMode mode) +{ + if (mode & QIODevice::Truncate) { + qWarning("QtLockedFile::open(): Truncate mode not allowed."); + return false; + } + return QFile::open(mode); +} + +/*! + Returns \e true if this object has a in read or write lock; + otherwise returns \e false. + + \sa lockMode() +*/ +bool QtLockedFile::isLocked() const +{ + return m_lock_mode != NoLock; +} + +/*! + Returns the type of lock currently held by this object, or \e + QtLockedFile::NoLock. + + \sa isLocked() +*/ +QtLockedFile::LockMode QtLockedFile::lockMode() const +{ + return m_lock_mode; +} + +/*! + \fn bool QtLockedFile::lock(LockMode mode, bool block = true) + + Obtains a lock of type \a mode. The file must be opened before it + can be locked. + + If \a block is true, this function will block until the lock is + aquired. If \a block is false, this function returns \e false + immediately if the lock cannot be aquired. + + If this object already has a lock of type \a mode, this function + returns \e true immediately. If this object has a lock of a + different type than \a mode, the lock is first released and then a + new lock is obtained. + + This function returns \e true if, after it executes, the file is + locked by this object, and \e false otherwise. + + \sa unlock(), isLocked(), lockMode() +*/ + +/*! + \fn bool QtLockedFile::unlock() + + Releases a lock. + + If the object has no lock, this function returns immediately. + + This function returns \e true if, after it executes, the file is + not locked by this object, and \e false otherwise. + + \sa lock(), isLocked(), lockMode() +*/ + +/*! + \fn QtLockedFile::~QtLockedFile() + + Destroys the \e QtLockedFile object. If any locks were held, they + are released. +*/ diff --git a/3rdparty/qtsingleapplication/qtlockedfile.h b/3rdparty/qtsingleapplication/qtlockedfile.h new file mode 100644 index 0000000..1d3b918 --- /dev/null +++ b/3rdparty/qtsingleapplication/qtlockedfile.h @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + +#ifndef QTLOCKEDFILE_H +#define QTLOCKEDFILE_H + +#include <QtCore/QFile> +#ifdef Q_OS_WIN +#include <QtCore/QVector> +#endif + +#if defined(Q_WS_WIN) +# if !defined(QT_QTLOCKEDFILE_EXPORT) && !defined(QT_QTLOCKEDFILE_IMPORT) +# define QT_QTLOCKEDFILE_EXPORT +# elif defined(QT_QTLOCKEDFILE_IMPORT) +# if defined(QT_QTLOCKEDFILE_EXPORT) +# undef QT_QTLOCKEDFILE_EXPORT +# endif +# define QT_QTLOCKEDFILE_EXPORT __declspec(dllimport) +# elif defined(QT_QTLOCKEDFILE_EXPORT) +# undef QT_QTLOCKEDFILE_EXPORT +# define QT_QTLOCKEDFILE_EXPORT __declspec(dllexport) +# endif +#else +# define QT_QTLOCKEDFILE_EXPORT +#endif + +class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile +{ +public: + enum LockMode { NoLock = 0, ReadLock, WriteLock }; + + QtLockedFile(); + QtLockedFile(const QString &name); + ~QtLockedFile(); + + bool open(OpenMode mode); + + bool lock(LockMode mode, bool block = true); + bool unlock(); + bool isLocked() const; + LockMode lockMode() const; + +private: +#ifdef Q_OS_WIN + Qt::HANDLE wmutex; + Qt::HANDLE rmutex; + QVector<Qt::HANDLE> rmutexes; + QString mutexname; + + Qt::HANDLE getMutexHandle(int idx, bool doCreate); + bool waitMutex(Qt::HANDLE mutex, bool doBlock); + +#endif + LockMode m_lock_mode; +}; + +#endif diff --git a/3rdparty/qtsingleapplication/qtlockedfile_unix.cpp b/3rdparty/qtsingleapplication/qtlockedfile_unix.cpp new file mode 100644 index 0000000..2881bdd --- /dev/null +++ b/3rdparty/qtsingleapplication/qtlockedfile_unix.cpp @@ -0,0 +1,121 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + +#include <string.h> +#include <errno.h> +#include <unistd.h> +#include <fcntl.h> + +#include "qtlockedfile.h" + +bool QtLockedFile::lock(LockMode mode, bool block) +{ + if (!isOpen()) { + qWarning("QtLockedFile::lock(): file is not opened"); + return false; + } + + if (mode == NoLock) + return unlock(); + + if (mode == m_lock_mode) + return true; + + if (m_lock_mode != NoLock) + unlock(); + + struct flock fl; + fl.l_whence = SEEK_SET; + fl.l_start = 0; + fl.l_len = 0; + fl.l_type = (mode == ReadLock) ? F_RDLCK : F_WRLCK; + int cmd = block ? F_SETLKW : F_SETLK; + int ret = fcntl(handle(), cmd, &fl); + + if (ret == -1) { + if (errno != EINTR && errno != EAGAIN) + qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); + return false; + } + + + m_lock_mode = mode; + return true; +} + + +bool QtLockedFile::unlock() +{ + if (!isOpen()) { + qWarning("QtLockedFile::unlock(): file is not opened"); + return false; + } + + if (!isLocked()) + return true; + + struct flock fl; + fl.l_whence = SEEK_SET; + fl.l_start = 0; + fl.l_len = 0; + fl.l_type = F_UNLCK; + int ret = fcntl(handle(), F_SETLKW, &fl); + + if (ret == -1) { + qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); + return false; + } + + m_lock_mode = NoLock; + return true; +} + +QtLockedFile::~QtLockedFile() +{ + if (isOpen()) + unlock(); +} + diff --git a/3rdparty/qtsingleapplication/qtlockedfile_win.cpp b/3rdparty/qtsingleapplication/qtlockedfile_win.cpp new file mode 100644 index 0000000..d4bf9e1 --- /dev/null +++ b/3rdparty/qtsingleapplication/qtlockedfile_win.cpp @@ -0,0 +1,213 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + +#include "qtlockedfile.h" +#include <qt_windows.h> +#include <QtCore/QFileInfo> + +#define MUTEX_PREFIX "QtLockedFile mutex " +// Maximum number of concurrent read locks. Must not be greater than MAXIMUM_WAIT_OBJECTS +#define MAX_READERS MAXIMUM_WAIT_OBJECTS + +Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate) +{ + if (mutexname.isEmpty()) { + QFileInfo fi(*this); + mutexname = QString::fromLatin1(MUTEX_PREFIX) + + fi.absoluteFilePath().toLower(); + } + QString mname(mutexname); + if (idx >= 0) + mname += QString::number(idx); + + Qt::HANDLE mutex; + if (doCreate) { + QT_WA( { mutex = CreateMutexW(NULL, FALSE, (TCHAR*)mname.utf16()); }, + { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } ); + if (!mutex) { + qErrnoWarning("QtLockedFile::lock(): CreateMutex failed"); + return 0; + } + } + else { + QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (TCHAR*)mname.utf16()); }, + { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } ); + if (!mutex) { + if (GetLastError() != ERROR_FILE_NOT_FOUND) + qErrnoWarning("QtLockedFile::lock(): OpenMutex failed"); + return 0; + } + } + return mutex; +} + +bool QtLockedFile::waitMutex(Qt::HANDLE mutex, bool doBlock) +{ + Q_ASSERT(mutex); + DWORD res = WaitForSingleObject(mutex, doBlock ? INFINITE : 0); + switch (res) { + case WAIT_OBJECT_0: + case WAIT_ABANDONED: + return true; + break; + case WAIT_TIMEOUT: + break; + default: + qErrnoWarning("QtLockedFile::lock(): WaitForSingleObject failed"); + } + return false; +} + + + +bool QtLockedFile::lock(LockMode mode, bool block) +{ + if (!isOpen()) { + qWarning("QtLockedFile::lock(): file is not opened"); + return false; + } + + if (mode == NoLock) + return unlock(); + + if (mode == m_lock_mode) + return true; + + if (m_lock_mode != NoLock) + unlock(); + + if (!wmutex && !(wmutex = getMutexHandle(-1, true))) + return false; + + if (!waitMutex(wmutex, block)) + return false; + + if (mode == ReadLock) { + int idx = 0; + for (; idx < MAX_READERS; idx++) { + rmutex = getMutexHandle(idx, false); + if (!rmutex || waitMutex(rmutex, false)) + break; + CloseHandle(rmutex); + } + bool ok = true; + if (idx >= MAX_READERS) { + qWarning("QtLockedFile::lock(): too many readers"); + rmutex = 0; + ok = false; + } + else if (!rmutex) { + rmutex = getMutexHandle(idx, true); + if (!rmutex || !waitMutex(rmutex, false)) + ok = false; + } + if (!ok && rmutex) { + CloseHandle(rmutex); + rmutex = 0; + } + ReleaseMutex(wmutex); + if (!ok) + return false; + } + else { + Q_ASSERT(rmutexes.isEmpty()); + for (int i = 0; i < MAX_READERS; i++) { + Qt::HANDLE mutex = getMutexHandle(i, false); + if (mutex) + rmutexes.append(mutex); + } + if (rmutexes.size()) { + DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(), + TRUE, block ? INFINITE : 0); + if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) { + if (res != WAIT_TIMEOUT) + qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed"); + m_lock_mode = WriteLock; // trick unlock() to clean up - semiyucky + unlock(); + return false; + } + } + } + + m_lock_mode = mode; + return true; +} + +bool QtLockedFile::unlock() +{ + if (!isOpen()) { + qWarning("QtLockedFile::unlock(): file is not opened"); + return false; + } + + if (!isLocked()) + return true; + + if (m_lock_mode == ReadLock) { + ReleaseMutex(rmutex); + CloseHandle(rmutex); + rmutex = 0; + } + else { + foreach(Qt::HANDLE mutex, rmutexes) { + ReleaseMutex(mutex); + CloseHandle(mutex); + } + rmutexes.clear(); + ReleaseMutex(wmutex); + } + + m_lock_mode = QtLockedFile::NoLock; + return true; +} + +QtLockedFile::~QtLockedFile() +{ + if (isOpen()) + unlock(); + if (wmutex) + CloseHandle(wmutex); +} diff --git a/3rdparty/qtsingleapplication/qtsingleapplication.cpp b/3rdparty/qtsingleapplication/qtsingleapplication.cpp new file mode 100644 index 0000000..a3a1fd7 --- /dev/null +++ b/3rdparty/qtsingleapplication/qtsingleapplication.cpp @@ -0,0 +1,351 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + + +#include "qtsingleapplication.h" +#include "qtlocalpeer.h" +#include <QtGui/QWidget> + + +/*! + \class QtSingleApplication qtsingleapplication.h + \brief The QtSingleApplication class provides an API to detect and + communicate with running instances of an application. + + This class allows you to create applications where only one + instance should be running at a time. I.e., if the user tries to + launch another instance, the already running instance will be + activated instead. Another usecase is a client-server system, + where the first started instance will assume the role of server, + and the later instances will act as clients of that server. + + By default, the full path of the executable file is used to + determine whether two processes are instances of the same + application. You can also provide an explicit identifier string + that will be compared instead. + + The application should create the QtSingleApplication object early + in the startup phase, and call isRunning() or sendMessage() to + find out if another instance of this application is already + running. Startup parameters (e.g. the name of the file the user + wanted this new instance to open) can be passed to the running + instance in the sendMessage() function. + + If isRunning() or sendMessage() returns false, it means that no + other instance is running, and this instance has assumed the role + as the running instance. The application should continue with the + initialization of the application user interface before entering + the event loop with exec(), as normal. The messageReceived() + signal will be emitted when the application receives messages from + another instance of the same application. + + If isRunning() or sendMessage() returns true, another instance is + already running, and the application should terminate or enter + client mode. + + If a message is received it might be helpful to the user to raise + the application so that it becomes visible. To facilitate this, + QtSingleApplication provides the setActivationWindow() function + and the activateWindow() slot. + + Here's an example that shows how to convert an existing + application to use QtSingleApplication. It is very simple and does + not make use of all QtSingleApplication's functionality (see the + examples for that). + + \code + // Original + int main(int argc, char **argv) + { + QApplication app(argc, argv); + + MyMainWidget mmw; + + mmw.show(); + return app.exec(); + } + + // Single instance + int main(int argc, char **argv) + { + QtSingleApplication app(argc, argv); + + if (app.isRunning()) + return 0; + + MyMainWidget mmw; + + app.setActivationWindow(&mmw); + + mmw.show(); + return app.exec(); + } + \endcode + + Once this QtSingleApplication instance is destroyed(for example, + when the user quits), when the user next attempts to run the + application this instance will not, of course, be encountered. The + next instance to call isRunning() or sendMessage() will assume the + role as the new running instance. + + For console (non-GUI) applications, QtSingleCoreApplication may be + used instead of this class, to avoid the dependency on the QtGui + library. + + \sa QtSingleCoreApplication +*/ + + +void QtSingleApplication::sysInit(const QString &appId) +{ + actWin = 0; + peer = new QtLocalPeer(this, appId); + connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); +} + + +/*! + Creates a QtSingleApplication object. The application identifier + will be QCoreApplication::applicationFilePath(). \a argc, \a + argv, and \a GUIenabled are passed on to the QAppliation constructor. + + If you are creating a console application (i.e. setting \a + GUIenabled to false), you may consider using + QtSingleCoreApplication instead. +*/ + +QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled) + : QApplication(argc, argv, GUIenabled) +{ + sysInit(); +} + + +/*! + Creates a QtSingleApplication object with the application + identifier \a appId. \a argc and \a argv are passed on to the + QAppliation constructor. +*/ + +QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv) + : QApplication(argc, argv) +{ + sysInit(appId); +} + + +/*! + Creates a QtSingleApplication object. The application identifier + will be QCoreApplication::applicationFilePath(). \a argc, \a + argv, and \a type are passed on to the QAppliation constructor. +*/ +QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type) + : QApplication(argc, argv, type) +{ + sysInit(); +} + + +#if defined(Q_WS_X11) +/*! + Special constructor for X11, ref. the documentation of + QApplication's corresponding constructor. The application identifier + will be QCoreApplication::applicationFilePath(). \a dpy, \a visual, + and \a cmap are passed on to the QApplication constructor. +*/ +QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE cmap) + : QApplication(dpy, visual, cmap) +{ + sysInit(); +} + +/*! + Special constructor for X11, ref. the documentation of + QApplication's corresponding constructor. The application identifier + will be QCoreApplication::applicationFilePath(). \a dpy, \a argc, \a + argv, \a visual, and \a cmap are passed on to the QApplication + constructor. +*/ +QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) + : QApplication(dpy, argc, argv, visual, cmap) +{ + sysInit(); +} + +/*! + Special constructor for X11, ref. the documentation of + QApplication's corresponding constructor. The application identifier + will be \a appId. \a dpy, \a argc, \a + argv, \a visual, and \a cmap are passed on to the QApplication + constructor. +*/ +QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) + : QApplication(dpy, argc, argv, visual, cmap) +{ + sysInit(appId); +} +#endif + + +/*! + Returns true if another instance of this application is running; + otherwise false. + + This function does not find instances of this application that are + being run by a different user (on Windows: that are running in + another session). + + \sa sendMessage() +*/ + +bool QtSingleApplication::isRunning() +{ + return peer->isClient(); +} + + +/*! + Tries to send the text \a message to the currently running + instance. The QtSingleApplication object in the running instance + will emit the messageReceived() signal when it receives the + message. + + This function returns true if the message has been sent to, and + processed by, the current instance. If there is no instance + currently running, or if the running instance fails to process the + message within \a timeout milliseconds, this function return false. + + \sa isRunning(), messageReceived() +*/ +bool QtSingleApplication::sendMessage(const QString &message, int timeout) +{ + return peer->sendMessage(message, timeout); +} + + +/*! + Returns the application identifier. Two processes with the same + identifier will be regarded as instances of the same application. +*/ +QString QtSingleApplication::id() const +{ + return peer->applicationId(); +} + + +/*! + Sets the activation window of this application to \a aw. The + activation window is the widget that will be activated by + activateWindow(). This is typically the application's main window. + + If \a activateOnMessage is true (the default), the window will be + activated automatically every time a message is received, just prior + to the messageReceived() signal being emitted. + + \sa activateWindow(), messageReceived() +*/ + +void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage) +{ + actWin = aw; + if (activateOnMessage) + connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); + else + disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); +} + + +/*! + Returns the applications activation window if one has been set by + calling setActivationWindow(), otherwise returns 0. + + \sa setActivationWindow() +*/ +QWidget* QtSingleApplication::activationWindow() const +{ + return actWin; +} + + +/*! + De-minimizes, raises, and activates this application's activation window. + This function does nothing if no activation window has been set. + + This is a convenience function to show the user that this + application instance has been activated when he has tried to start + another instance. + + This function should typically be called in response to the + messageReceived() signal. By default, that will happen + automatically, if an activation window has been set. + + \sa setActivationWindow(), messageReceived(), initialize() +*/ +void QtSingleApplication::activateWindow() +{ + if (actWin) { + actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized); + actWin->raise(); + actWin->activateWindow(); + } +} + + +/*! + \fn void QtSingleApplication::messageReceived(const QString& message) + + This signal is emitted when the current instance receives a \a + message from another instance of this application. + + \sa sendMessage(), setActivationWindow(), activateWindow() +*/ + + +/*! + \fn void QtSingleApplication::initialize(bool dummy = true) + + \obsolete +*/ diff --git a/3rdparty/qtsingleapplication/qtsingleapplication.h b/3rdparty/qtsingleapplication/qtsingleapplication.h new file mode 100644 index 0000000..5df9165 --- /dev/null +++ b/3rdparty/qtsingleapplication/qtsingleapplication.h @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + + +#include <QtGui/QApplication> + +class QtLocalPeer; + +#if defined(Q_WS_WIN) +# if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT) +# define QT_QTSINGLEAPPLICATION_EXPORT +# elif defined(QT_QTSINGLEAPPLICATION_IMPORT) +# if defined(QT_QTSINGLEAPPLICATION_EXPORT) +# undef QT_QTSINGLEAPPLICATION_EXPORT +# endif +# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport) +# elif defined(QT_QTSINGLEAPPLICATION_EXPORT) +# undef QT_QTSINGLEAPPLICATION_EXPORT +# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport) +# endif +#else +# define QT_QTSINGLEAPPLICATION_EXPORT +#endif + +class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication +{ + Q_OBJECT + +public: + QtSingleApplication(int &argc, char **argv, bool GUIenabled = true); + QtSingleApplication(const QString &id, int &argc, char **argv); + QtSingleApplication(int &argc, char **argv, Type type); +#if defined(Q_WS_X11) + QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); + QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0); + QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); +#endif + + bool isRunning(); + QString id() const; + + void setActivationWindow(QWidget* aw, bool activateOnMessage = true); + QWidget* activationWindow() const; + + // Obsolete: + void initialize(bool dummy = true) + { isRunning(); Q_UNUSED(dummy) } + +public Q_SLOTS: + bool sendMessage(const QString &message, int timeout = 5000); + void activateWindow(); + + +Q_SIGNALS: + void messageReceived(const QString &message); + + +private: + void sysInit(const QString &appId = QString()); + QtLocalPeer *peer; + QWidget *actWin; +}; diff --git a/3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp b/3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp new file mode 100644 index 0000000..307e255 --- /dev/null +++ b/3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp @@ -0,0 +1,155 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + + +#include "qtsinglecoreapplication.h" +#include "qtlocalpeer.h" + +/*! + \class QtSingleCoreApplication qtsinglecoreapplication.h + \brief A variant of the QtSingleApplication class for non-GUI applications. + + This class is a variant of QtSingleApplication suited for use in + console (non-GUI) applications. It is an extension of + QCoreApplication (instead of QApplication). It does not require + the QtGui library. + + The API and usage is identical to QtSingleApplication, except that + functions relating to the "activation window" are not present, for + obvious reasons. Please refer to the QtSingleApplication + documentation for explanation of the usage. + + A QtSingleCoreApplication instance can communicate to a + QtSingleApplication instance if they share the same application + id. Hence, this class can be used to create a light-weight + command-line tool that sends commands to a GUI application. + + \sa QtSingleApplication +*/ + +/*! + Creates a QtSingleCoreApplication object. The application identifier + will be QCoreApplication::applicationFilePath(). \a argc and \a + argv are passed on to the QCoreAppliation constructor. +*/ + +QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) + : QCoreApplication(argc, argv) +{ + peer = new QtLocalPeer(this); + connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); +} + + +/*! + Creates a QtSingleCoreApplication object with the application + identifier \a appId. \a argc and \a argv are passed on to the + QCoreAppliation constructor. +*/ +QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc, char **argv) + : QCoreApplication(argc, argv) +{ + peer = new QtLocalPeer(this, appId); + connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); +} + + +/*! + Returns true if another instance of this application is running; + otherwise false. + + This function does not find instances of this application that are + being run by a different user (on Windows: that are running in + another session). + + \sa sendMessage() +*/ + +bool QtSingleCoreApplication::isRunning() +{ + return peer->isClient(); +} + + +/*! + Tries to send the text \a message to the currently running + instance. The QtSingleCoreApplication object in the running instance + will emit the messageReceived() signal when it receives the + message. + + This function returns true if the message has been sent to, and + processed by, the current instance. If there is no instance + currently running, or if the running instance fails to process the + message within \a timeout milliseconds, this function return false. + + \sa isRunning(), messageReceived() +*/ + +bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout) +{ + return peer->sendMessage(message, timeout); +} + + +/*! + Returns the application identifier. Two processes with the same + identifier will be regarded as instances of the same application. +*/ + +QString QtSingleCoreApplication::id() const +{ + return peer->applicationId(); +} + + +/*! + \fn void QtSingleCoreApplication::messageReceived(const QString& message) + + This signal is emitted when the current instance receives a \a + message from another instance of this application. + + \sa sendMessage() +*/ diff --git a/3rdparty/qtsingleapplication/qtsinglecoreapplication.h b/3rdparty/qtsingleapplication/qtsinglecoreapplication.h new file mode 100644 index 0000000..8e2fda6 --- /dev/null +++ b/3rdparty/qtsingleapplication/qtsinglecoreapplication.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of a Qt Solutions component. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact Nokia at qt-info@nokia.com. +** +****************************************************************************/ + + +#include <QtCore/QCoreApplication> + +class QtLocalPeer; + +class QtSingleCoreApplication : public QCoreApplication +{ + Q_OBJECT + +public: + QtSingleCoreApplication(int &argc, char **argv); + QtSingleCoreApplication(const QString &id, int &argc, char **argv); + + bool isRunning(); + QString id() const; + +public Q_SLOTS: + bool sendMessage(const QString &message, int timeout = 5000); + + +Q_SIGNALS: + void messageReceived(const QString &message); + + +private: + QtLocalPeer* peer; +}; diff --git a/3rdparty/qtsingleapplication/version b/3rdparty/qtsingleapplication/version new file mode 100644 index 0000000..0ff835c --- /dev/null +++ b/3rdparty/qtsingleapplication/version @@ -0,0 +1 @@ +2.6_1-opensource
\ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8afb407..0b5e89e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,15 +13,11 @@ SET(CMAKE_BUILD_TYPE Debug) SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall") SET(CMAKE_C_FLAGS_RELEASE "-O3 -march=native") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall") -SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native") -# -DQT_NO_DEBUG_OUTPUT") +SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -DQT_NO_DEBUG_OUTPUT" ) # local cmake modules SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}) -#Test -SET(CMAKE_EDIT_COMMAND ${CMAKE_SOURCE_DIR}) - # this command finds libraries and sets all required variables FIND_PACKAGE( Qt4 4.5.0 REQUIRED ) FIND_PACKAGE( X11 REQUIRED ) @@ -33,6 +29,21 @@ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ) +IF(WIN32) + SET(sysdep_suffix _Win32) + INCLUDE_DIRECTORIES( + /c/KDE4/tmp/LibVNCServer-0.9.7/ + ) +ELSEIF(UNIX) + SET(sysdep_suffix _X11) +ENDIF(WIN32) + +################################################################################ +# Build third-party libraries +################################################################################ +ADD_SUBDIRECTORY(3rdparty/qtsingleapplication) + + ################################################################################ # Build third-party libraries ################################################################################ @@ -73,7 +84,6 @@ SET( PVSMGR_SRCS src/net/pvsClientConnection.cpp src/net/pvsServiceBroadcast.cpp src/util/consoleLogger.cpp - src/util/pvsSettingsManager.cpp src/util/util.cpp src/net/SslServer.cpp src/util/CertManager.cpp @@ -93,8 +103,7 @@ SET( PVS_SRCS src/net/pvsLocalhostCommunicator.cpp src/util/util.cpp src/util/consoleLogger.cpp - src/util/clientGUIUtils.cpp - src/util/pvsSettingsManager.cpp + src/util/clientGUIUtils${sysdep_suffix}.cpp src/core/pvsChatClient.cpp src/net/pvsServiceDiscovery.cpp src/net/pvsDiscoveredServer.cpp @@ -106,6 +115,7 @@ SET( PVS_SRCS # pvsgui SET( PVSGUI_SRCS + ${QTSINGLEAPPLICATION_SRCS} src/pvsgui.cpp src/gui/clientConfigDialog.cpp src/gui/clientFileSendDialog.cpp @@ -204,6 +214,7 @@ SET( PVS_MOC_HDRS ) SET( PVSGUI_MOC_HDRS + ${QTSINGLEAPPLICATION_MOC_HDRS} src/pvsgui.h src/gui/clientConfigDialog.h src/gui/clientFileSendDialog.h @@ -277,15 +288,16 @@ QT4_ADD_DBUS_ADAPTOR( PVS_SRCS ${CMAKE_BINARY_DIR}/org.openslx.pvs.xml src/pvs.h QT4_ADD_DBUS_INTERFACE( PVSGUI_SRCS ${CMAKE_BINARY_DIR}/org.openslx.pvs.xml pvsinterface ) # i18n, run lupdate and lrelease) -QT4_CREATE_TRANSLATION( PVSMGR_QMS ${PVSMGR_SRCS} ${PVSMGR_UI_HDRS} ${PVSMGR_TSS} ) -QT4_CREATE_TRANSLATION( PVS_QMS ${PVS_SRCS} ${PVS_TSS} ) -QT4_CREATE_TRANSLATION( PVSGUI_QMS ${PVSGUI_SRCS} ${PVSGUI_UI_HDRS} ${PVSGUI_TSS} ) +#QT4_CREATE_TRANSLATION( PVSMGR_QMS ${PVSMGR_SRCS} ${PVSMGR_UI_HDRS} ${PVSMGR_TSS} ) +#QT4_CREATE_TRANSLATION( PVS_QMS ${PVS_SRCS} ${PVS_TSS} ) +#QT4_CREATE_TRANSLATION( PVSGUI_QMS ${PVSGUI_SRCS} ${PVSGUI_UI_HDRS} ${PVSGUI_TSS} ) ################################################################################ # Build ################################################################################ ## here we instruct CMake to build our executable from all of the source files +if(UNIX) ADD_EXECUTABLE( pvsmgr ${PVSMGR_SRCS} ${PVSMGR_MOC_SRCS} @@ -301,8 +313,9 @@ ADD_EXECUTABLE( pvsmgrtouch ${PVSMGR_RC_SRCS} ${PVSMGR_QMS} ) +ENDIF(UNIX) -ADD_EXECUTABLE( pvs +ADD_EXECUTABLE( pvs ${PVS_SRCS} ${PVS_MOC_SRCS} ${PVS_RC_SRCS} @@ -319,40 +332,89 @@ ADD_EXECUTABLE( pvsgui # last thing we have to do is to tell CMake what libraries our executable needs, # luckily FIND_PACKAGE prepared variables for us: -TARGET_LINK_LIBRARIES( pvsmgr - ${QT_LIBRARIES} - ${VNC_LIBRARIES} - ${X11_LIBRARIES} - pvsmcast -) - -TARGET_LINK_LIBRARIES( pvsmgrtouch - ${QT_LIBRARIES} - ${VNC_LIBRARIES} - ${X11_LIBRARIES} - pvsmcast -) - -TARGET_LINK_LIBRARIES( pvs - ${QT_LIBRARIES} - ${VNC_LIBRARIES} - ${X11_LIBRARIES} - pvsmcast -) - -TARGET_LINK_LIBRARIES( pvsgui - ${QT_LIBRARIES} - ${VNC_LIBRARIES} -) +IF(WIN32) + TARGET_LINK_LIBRARIES( pvsmgr + + ) +ELSEIF(UNIX) +TARGET_LINK_LIBRARIES( pvsmgr + ${QT_LIBRARIES} + ${VNC_LIBRARIES} + ${X11_LIBRARIES} + pvsmcast + ) +ENDIF(WIN32) + +IF(WIN32) + TARGET_LINK_LIBRARIES( pvsmgrtouch + + ) +ELSEIF(UNIX) + TARGET_LINK_LIBRARIES( pvsmgrtouch + ${QT_LIBRARIES} + ${VNC_LIBRARIES} + ${X11_LIBRARIES} + pvsmcast + ) +ENDIF(WIN32) + +IF(WIN32) + TARGET_LINK_LIBRARIES( pvs + ${QT_LIBRARIES} + ${VNC_LIBRARIES} + advapi32 + ws2_32 + ) +ELSEIF(UNIX) + TARGET_LINK_LIBRARIES( pvs + ${QT_LIBRARIES} + ${VNC_LIBRARIES} + ${X11_LIBRARIES} + pvsmcast + ) +ENDIF(WIN32) + +IF(WIN32) + TARGET_LINK_LIBRARIES( pvsgui + ${QT_LIBRARIES} + ${VNC_LIBRARIES} + #advapi32 + ws2_32 + ) +ELSEIF(UNIX) + TARGET_LINK_LIBRARIES( pvsgui + ${QT_LIBRARIES} + ${VNC_LIBRARIES} + ) +ENDIF(WIN32) + +IF(UNIX) SET_PROPERTY(TARGET pvsmgrtouch PROPERTY COMPILE_DEFINITIONS MAINWINDOW_USE_TOUCHGUI) SET_PROPERTY(TARGET pvsmgr PROPERTY COMPILE_DEFINITIONS MAINWINDOW_USE_NORMALGUI) +ENDIF(UNIX) # add install target to our makefile -CONFIGURE_FILE( org.openslx.pvs.service ${CMAKE_BINARY_DIR}/org.openslx.pvs.service ) -INSTALL( TARGETS pvsmgr pvs pvsgui pvsmgrtouch RUNTIME DESTINATION bin ) -INSTALL( PROGRAMS misc/pvs-vncsrv DESTINATION bin) -INSTALL( FILES ${CMAKE_BINARY_DIR}/org.openslx.pvs.service DESTINATION share/dbus-1/services ) +IF(WIN32) + INSTALL( TARGETS pvs pvsgui RUNTIME DESTINATION bin ) +ELSEIF(UNIX) + CONFIGURE_FILE( org.openslx.pvs.service ${CMAKE_BINARY_DIR}/org.openslx.pvs.service ) + INSTALL( TARGETS pvsmgr pvs pvsgui pvsmgrtouch RUNTIME DESTINATION bin ) + INSTALL( PROGRAMS misc/pvs-vncsrv DESTINATION bin) + INSTALL( FILES ${CMAKE_BINARY_DIR}/org.openslx.pvs.service DESTINATION share/dbus-1/services ) + INSTALL( FILES misc/pvs.conf misc/pvsgui.conf misc/pvsmgr.conf DESTINATION /etc/openslx ) + INSTALL( FILES misc/pvsgui.desktop DESTINATION /etc/xdg/autostart ) +ENDIF(WIN32) + +# add uninstall target to our makefile +CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/Uninstall.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake" + IMMEDIATE @ONLY +) +ADD_CUSTOM_TARGET( uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake" +) # add package target to our makefile SET( CPACK_GENERATOR "DEB;RPM" ) @@ -360,7 +422,7 @@ SET( CPACK_SET_DESTDIR "ON" ) SET( CPACK_PACKAGE_NAME "pvs" ) SET( CPACK_PACKAGE_VERSION_MAJOR "2" ) SET( CPACK_PACKAGE_VERSION_MINOR "0" ) -SET( CPACK_PACKAGE_VERSION_PATCH "1" ) +SET( CPACK_PACKAGE_VERSION_PATCH "3" ) SET( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pool Video Switch" ) SET( CPACK_PACKAGE_DESCRIPTION "") SET( CPACK_PACKAGE_CONTACT "Simon Wittenberg <wittenb@informatik.uni-freiburg.de>" ) diff --git a/Uninstall.cmake b/Uninstall.cmake new file mode 100644 index 0000000..dbda3a2 --- /dev/null +++ b/Uninstall.cmake @@ -0,0 +1,21 @@ +IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +STRING(REGEX REPLACE "\n" ";" files "${files}") +FOREACH(file ${files}) + MESSAGE(STATUS "Uninstalling: $ENV{DESTDIR}${file}") + IF(EXISTS "$ENV{DESTDIR}${file}") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF(NOT "${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") + ENDIF(NOT "${rm_retval}" STREQUAL 0) + ELSE(EXISTS "$ENV{DESTDIR}${file}") + MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") + ENDIF(EXISTS "$ENV{DESTDIR}${file}") +ENDFOREACH(file) diff --git a/i18n/pvs_ar_JO.ts b/i18n/pvs_ar_JO.ts index 0b4c72f..2f5b77e 100644 --- a/i18n/pvs_ar_JO.ts +++ b/i18n/pvs_ar_JO.ts @@ -4,24 +4,155 @@ <context> <name>PVS</name> <message> - <location filename="../src/pvs.cpp" line="259"/> + <location filename="../src/pvs.cpp" line="277"/> <source>Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>VNC connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>The host </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="354"/> + <location filename="../src/pvs.cpp" line="357"/> <source> requested your screen!</source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsDaemon.cpp" line="28"/> + <source>Version: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source>Usage:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source><<option> <value>, ... ></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="31"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>-vncScriptFile <fullpath\filename></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>Specifies a custom location for the vnc-start/stop-script.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>If not specified, /usr/bin/pvs-vncsrv is expected.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>-freq <seconds></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Specifies how long to wait until a reconnection attempt is made.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Default is 5.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>-port <port></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Specifies on which port to run.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Default is </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>-h or --help</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>Shows this help text and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>-v or --version</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>Shows the current version and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>-d or --daemon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>Start as daemon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>-c <string command>:<string value></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Sends the command and the optional value to a running PVS-Client.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Command and value may not contain spaces or colons.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>The dividing colon is mandatory.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="39"/> + <source>Prints out available commands to use with -c.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="48"/> + <source>Use -h or --help to get a listing of all options. +-v or --version gives you the current version. + +</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/i18n/pvs_de_DE.ts b/i18n/pvs_de_DE.ts index 0b4c72f..20da674 100644 --- a/i18n/pvs_de_DE.ts +++ b/i18n/pvs_de_DE.ts @@ -1,27 +1,158 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0"> +<TS version="2.0" language="de_DE"> <context> <name>PVS</name> <message> - <location filename="../src/pvs.cpp" line="259"/> + <location filename="../src/pvs.cpp" line="277"/> <source>Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>VNC connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>The host </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="354"/> + <location filename="../src/pvs.cpp" line="357"/> <source> requested your screen!</source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsDaemon.cpp" line="28"/> + <source>Version: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source>Usage:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source><<option> <value>, ... ></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="31"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>-vncScriptFile <fullpath\filename></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>Specifies a custom location for the vnc-start/stop-script.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>If not specified, /usr/bin/pvs-vncsrv is expected.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>-freq <seconds></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Specifies how long to wait until a reconnection attempt is made.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Default is 5.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>-port <port></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Specifies on which port to run.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Default is </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>-h or --help</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>Shows this help text and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>-v or --version</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>Shows the current version and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>-d or --daemon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>Start as daemon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>-c <string command>:<string value></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Sends the command and the optional value to a running PVS-Client.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Command and value may not contain spaces or colons.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>The dividing colon is mandatory.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="39"/> + <source>Prints out available commands to use with -c.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="48"/> + <source>Use -h or --help to get a listing of all options. +-v or --version gives you the current version. + +</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/i18n/pvs_es_MX.ts b/i18n/pvs_es_MX.ts index 0b4c72f..2f5b77e 100644 --- a/i18n/pvs_es_MX.ts +++ b/i18n/pvs_es_MX.ts @@ -4,24 +4,155 @@ <context> <name>PVS</name> <message> - <location filename="../src/pvs.cpp" line="259"/> + <location filename="../src/pvs.cpp" line="277"/> <source>Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>VNC connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>The host </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="354"/> + <location filename="../src/pvs.cpp" line="357"/> <source> requested your screen!</source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsDaemon.cpp" line="28"/> + <source>Version: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source>Usage:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source><<option> <value>, ... ></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="31"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>-vncScriptFile <fullpath\filename></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>Specifies a custom location for the vnc-start/stop-script.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>If not specified, /usr/bin/pvs-vncsrv is expected.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>-freq <seconds></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Specifies how long to wait until a reconnection attempt is made.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Default is 5.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>-port <port></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Specifies on which port to run.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Default is </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>-h or --help</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>Shows this help text and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>-v or --version</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>Shows the current version and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>-d or --daemon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>Start as daemon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>-c <string command>:<string value></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Sends the command and the optional value to a running PVS-Client.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Command and value may not contain spaces or colons.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>The dividing colon is mandatory.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="39"/> + <source>Prints out available commands to use with -c.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="48"/> + <source>Use -h or --help to get a listing of all options. +-v or --version gives you the current version. + +</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/i18n/pvs_fr_FR.ts b/i18n/pvs_fr_FR.ts index 0b4c72f..2f5b77e 100644 --- a/i18n/pvs_fr_FR.ts +++ b/i18n/pvs_fr_FR.ts @@ -4,24 +4,155 @@ <context> <name>PVS</name> <message> - <location filename="../src/pvs.cpp" line="259"/> + <location filename="../src/pvs.cpp" line="277"/> <source>Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>VNC connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>The host </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="354"/> + <location filename="../src/pvs.cpp" line="357"/> <source> requested your screen!</source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsDaemon.cpp" line="28"/> + <source>Version: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source>Usage:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source><<option> <value>, ... ></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="31"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>-vncScriptFile <fullpath\filename></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>Specifies a custom location for the vnc-start/stop-script.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>If not specified, /usr/bin/pvs-vncsrv is expected.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>-freq <seconds></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Specifies how long to wait until a reconnection attempt is made.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Default is 5.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>-port <port></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Specifies on which port to run.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Default is </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>-h or --help</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>Shows this help text and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>-v or --version</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>Shows the current version and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>-d or --daemon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>Start as daemon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>-c <string command>:<string value></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Sends the command and the optional value to a running PVS-Client.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Command and value may not contain spaces or colons.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>The dividing colon is mandatory.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="39"/> + <source>Prints out available commands to use with -c.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="48"/> + <source>Use -h or --help to get a listing of all options. +-v or --version gives you the current version. + +</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/i18n/pvs_pl_PL.ts b/i18n/pvs_pl_PL.ts index 0b4c72f..2f5b77e 100644 --- a/i18n/pvs_pl_PL.ts +++ b/i18n/pvs_pl_PL.ts @@ -4,24 +4,155 @@ <context> <name>PVS</name> <message> - <location filename="../src/pvs.cpp" line="259"/> + <location filename="../src/pvs.cpp" line="277"/> <source>Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>VNC connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="352"/> + <location filename="../src/pvs.cpp" line="355"/> <source>The host </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvs.cpp" line="354"/> + <location filename="../src/pvs.cpp" line="357"/> <source> requested your screen!</source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsDaemon.cpp" line="28"/> + <source>Version: </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source>Usage:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="30"/> + <source><<option> <value>, ... ></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="31"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>-vncScriptFile <fullpath\filename></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>Specifies a custom location for the vnc-start/stop-script.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="32"/> + <source>If not specified, /usr/bin/pvs-vncsrv is expected.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>-freq <seconds></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Specifies how long to wait until a reconnection attempt is made.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="33"/> + <source>Default is 5.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>-port <port></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Specifies on which port to run.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="34"/> + <source>Default is </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>-h or --help</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="35"/> + <source>Shows this help text and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>-v or --version</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="36"/> + <source>Shows the current version and exits.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>-d or --daemon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="37"/> + <source>Start as daemon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>-c <string command>:<string value></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Sends the command and the optional value to a running PVS-Client.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>Command and value may not contain spaces or colons.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="38"/> + <source>The dividing colon is mandatory.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="39"/> + <source>Prints out available commands to use with -c.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsDaemon.cpp" line="48"/> + <source>Use -h or --help to get a listing of all options. +-v or --version gives you the current version. + +</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/i18n/pvsgui_ar_JO.ts b/i18n/pvsgui_ar_JO.ts index f3e6d65..59b40b9 100644 --- a/i18n/pvsgui_ar_JO.ts +++ b/i18n/pvsgui_ar_JO.ts @@ -40,47 +40,47 @@ <context> <name>ClientChatDialog</name> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="65"/> + <location filename="../src/gui/clientChatDialog.cpp" line="63"/> <source>&Send File...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="178"/> + <location filename="../src/gui/clientChatDialog.cpp" line="176"/> <source> has joined the chat.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="184"/> + <location filename="../src/gui/clientChatDialog.cpp" line="182"/> <source> has left the chat.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="211"/> + <location filename="../src/gui/clientChatDialog.cpp" line="209"/> <source>PVS File Transfer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>Send file '</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>' to </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="231"/> + <location filename="../src/gui/clientChatDialog.cpp" line="229"/> <source>Connected.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="241"/> + <location filename="../src/gui/clientChatDialog.cpp" line="239"/> <source>Disconnected.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="280"/> + <location filename="../src/gui/clientChatDialog.cpp" line="278"/> <source>Message from <</source> <translation type="unfinished"></translation> </message> @@ -260,23 +260,23 @@ <context> <name>ClientFileSendDialog</name> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="68"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="66"/> <source>Open File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="186"/> - <location filename="../src/gui/clientFileSendDialog.cpp" line="192"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="184"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="190"/> <source>PVS - File Transfer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="187"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="185"/> <source>File Transfer complete.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="193"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="191"/> <source>File Transfer canceled!</source> <translation type="unfinished"></translation> </message> @@ -331,42 +331,32 @@ <context> <name>ClientToolbarClass</name> <message> - <location filename="../build/ui_clientToolbar.h" line="179"/> + <location filename="../build/ui_clientToolbar.h" line="166"/> <source>Form</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="181"/> + <location filename="../build/ui_clientToolbar.h" line="168"/> <source>Menu</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="183"/> + <location filename="../build/ui_clientToolbar.h" line="170"/> <source>Host:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="185"/> + <location filename="../build/ui_clientToolbar.h" line="172"/> <source>Click to connect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="187"/> + <location filename="../build/ui_clientToolbar.h" line="174"/> <source>-</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="189"/> - <source>Enable/Disable VNC only for this session</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../build/ui_clientToolbar.h" line="191"/> - <source>Allow VNC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../build/ui_clientToolbar.h" line="192"/> + <location filename="../build/ui_clientToolbar.h" line="175"/> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -404,84 +394,127 @@ p, li { white-space: pre-wrap; } <context> <name>PVSGUI</name> <message> - <location filename="../src/pvsgui.cpp" line="28"/> + <location filename="../src/pvsgui.cpp" line="35"/> <source>Connect</source> <translation type="unfinished"></translation> </message> <message> <location filename="../src/pvsgui.cpp" line="189"/> + <source>Show &toolbar</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="191"/> <source>&Disconnect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="190"/> + <location filename="../src/pvsgui.cpp" line="192"/> <source>C&hat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="191"/> + <location filename="../src/pvsgui.cpp" line="193"/> <source>&Send File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="192"/> + <location filename="../src/pvsgui.cpp" line="194"/> <source>&Config</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="193"/> + <location filename="../src/pvsgui.cpp" line="195"/> <source>&Information</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="194"/> + <location filename="../src/pvsgui.cpp" line="196"/> <source>&About</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="195"/> + <location filename="../src/pvsgui.cpp" line="197"/> <source>&Quit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> - <location filename="../src/pvsgui.cpp" line="297"/> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="285"/> + <location filename="../src/pvsgui.cpp" line="300"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>PVS Connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> + <location filename="../src/pvsgui.cpp" line="285"/> <source>Please enter password (If not needed leave blank):</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="298"/> + <location filename="../src/pvsgui.cpp" line="301"/> <source>Are you sure you want to disconnect?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="343"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="346"/> <source>PVS connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="335"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="338"/> <source>Connected to </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="343"/> - <location filename="../src/pvsgui.cpp" line="355"/> + <location filename="../src/pvsgui.cpp" line="346"/> + <location filename="../src/pvsgui.cpp" line="358"/> <source>Disconnected</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>New host available: </source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsgui.cpp" line="419"/> + <source>Usage: pvsgui [OPTIONS]...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="420"/> + <source>Start the Pool Video Switch GUI.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="421"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="422"/> + <source>Start only with systray icon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="423"/> + <source>Show this help text and quit.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="424"/> + <source>Show version and quit.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="433"/> + <source>Version: </source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/i18n/pvsgui_de_DE.ts b/i18n/pvsgui_de_DE.ts index 9acab81..ba2fe27 100644 --- a/i18n/pvsgui_de_DE.ts +++ b/i18n/pvsgui_de_DE.ts @@ -6,7 +6,7 @@ <message> <location filename="../src/gui/aboutDialog.cpp" line="27"/> <source>Version: </source> - <translation>Version:</translation> + <translation>Version: </translation> </message> </context> <context> @@ -40,47 +40,47 @@ <context> <name>ClientChatDialog</name> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="65"/> + <location filename="../src/gui/clientChatDialog.cpp" line="63"/> <source>&Send File...</source> <translation>Datei &Senden...</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="178"/> + <location filename="../src/gui/clientChatDialog.cpp" line="176"/> <source> has joined the chat.</source> <translation> ist dem Chat beigetreten.</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="184"/> + <location filename="../src/gui/clientChatDialog.cpp" line="182"/> <source> has left the chat.</source> <translation> hat den Chat verlassen.</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="211"/> + <location filename="../src/gui/clientChatDialog.cpp" line="209"/> <source>PVS File Transfer</source> <translation>PVS Dateiübertragung</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>Send file '</source> <translation>Datei senden '</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>' to </source> <translation>' an </translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="231"/> + <location filename="../src/gui/clientChatDialog.cpp" line="229"/> <source>Connected.</source> <translation>Verbunden.</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="241"/> + <location filename="../src/gui/clientChatDialog.cpp" line="239"/> <source>Disconnected.</source> <translation>Getrennt.</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="280"/> + <location filename="../src/gui/clientChatDialog.cpp" line="278"/> <source>Message from <</source> <translation>Nachricht von <</translation> </message> @@ -260,23 +260,23 @@ <context> <name>ClientFileSendDialog</name> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="68"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="66"/> <source>Open File</source> <translation>Datei Öffnen</translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="186"/> - <location filename="../src/gui/clientFileSendDialog.cpp" line="192"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="184"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="190"/> <source>PVS - File Transfer</source> <translation>PBS -Dateiübertragung</translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="187"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="185"/> <source>File Transfer complete.</source> <translation>Dateiübertragung beendet.</translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="193"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="191"/> <source>File Transfer canceled!</source> <translation>Dateiübertragung abgebrochen!</translation> </message> @@ -331,42 +331,40 @@ <context> <name>ClientToolbarClass</name> <message> - <location filename="../build/ui_clientToolbar.h" line="179"/> + <location filename="../build/ui_clientToolbar.h" line="166"/> <source>Form</source> <translation></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="181"/> + <location filename="../build/ui_clientToolbar.h" line="168"/> <source>Menu</source> <translation>Menü</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="183"/> + <location filename="../build/ui_clientToolbar.h" line="170"/> <source>Host:</source> <translation></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="185"/> + <location filename="../build/ui_clientToolbar.h" line="172"/> <source>Click to connect</source> <translation>Zum Verbinden Klicken</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="187"/> + <location filename="../build/ui_clientToolbar.h" line="174"/> <source>-</source> <translation></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="189"/> <source>Enable/Disable VNC only for this session</source> - <translation>VNC nur für diese Sitzung ein- und ausschalten</translation> + <translation type="obsolete">VNC nur für diese Sitzung ein- und ausschalten</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="191"/> <source>Allow VNC</source> - <translation>VNC erlauben</translation> + <translation type="obsolete">VNC erlauben</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="192"/> + <location filename="../build/ui_clientToolbar.h" line="175"/> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -404,84 +402,127 @@ p, li { white-space: pre-wrap; } <context> <name>PVSGUI</name> <message> - <location filename="../src/pvsgui.cpp" line="28"/> + <location filename="../src/pvsgui.cpp" line="35"/> <source>Connect</source> <translation>Verbinden</translation> </message> <message> <location filename="../src/pvsgui.cpp" line="189"/> + <source>Show &toolbar</source> + <translation>&Werkzeugleiste anzeigen</translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="191"/> <source>&Disconnect</source> <translation>&Trennen</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="190"/> + <location filename="../src/pvsgui.cpp" line="192"/> <source>C&hat</source> <translation></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="191"/> + <location filename="../src/pvsgui.cpp" line="193"/> <source>&Send File</source> <translation>Datei &Senden</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="192"/> + <location filename="../src/pvsgui.cpp" line="194"/> <source>&Config</source> <translation>&Konfiguration</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="193"/> + <location filename="../src/pvsgui.cpp" line="195"/> <source>&Information</source> <translation>&Information</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="194"/> + <location filename="../src/pvsgui.cpp" line="196"/> <source>&About</source> <translation>&Über</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="195"/> + <location filename="../src/pvsgui.cpp" line="197"/> <source>&Quit</source> <translation>&Beenden</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> - <location filename="../src/pvsgui.cpp" line="297"/> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="285"/> + <location filename="../src/pvsgui.cpp" line="300"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>PVS Connection</source> <translation>PVS Verbindung</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> + <location filename="../src/pvsgui.cpp" line="285"/> <source>Please enter password (If not needed leave blank):</source> <translation>Bitte geben sie ein Passwor ein (Falls nicht erforderlich einfach leer lassen):</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="298"/> + <location filename="../src/pvsgui.cpp" line="301"/> <source>Are you sure you want to disconnect?</source> <translation>Sind sie sicher dass sie die Verbindung trennen möchten?</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="343"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="346"/> <source>PVS connection</source> <translation>PVS Verbindung</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="335"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="338"/> <source>Connected to </source> <translation>Verbunden mit </translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="343"/> - <location filename="../src/pvsgui.cpp" line="355"/> + <location filename="../src/pvsgui.cpp" line="346"/> + <location filename="../src/pvsgui.cpp" line="358"/> <source>Disconnected</source> <translation>Getrennt</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>New host available: </source> <translation>Neuer Host verfügbar: </translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsgui.cpp" line="419"/> + <source>Usage: pvsgui [OPTIONS]...</source> + <translation>Aufruf: pvsgui [OPTIONEN]...</translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="420"/> + <source>Start the Pool Video Switch GUI.</source> + <translation>Startet die Pool Video Switch GUI.</translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="421"/> + <source>Options:</source> + <translation>Optionen:</translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="422"/> + <source>Start only with systray icon.</source> + <translation>Starte nur mit Symbol in Systray.</translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="423"/> + <source>Show this help text and quit.</source> + <translation>Zeige diesen Hilfetext an und beende.</translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="424"/> + <source>Show version and quit.</source> + <translation>Zeige Versionsinformationen an und beende.</translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="433"/> + <source>Version: </source> + <translation>Version: </translation> + </message> +</context> </TS> diff --git a/i18n/pvsgui_es_MX.ts b/i18n/pvsgui_es_MX.ts index 32b6195..d3cb2d6 100644 --- a/i18n/pvsgui_es_MX.ts +++ b/i18n/pvsgui_es_MX.ts @@ -40,47 +40,47 @@ <context> <name>ClientChatDialog</name> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="65"/> + <location filename="../src/gui/clientChatDialog.cpp" line="63"/> <source>&Send File...</source> <translation>Enviar archivo...</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="178"/> + <location filename="../src/gui/clientChatDialog.cpp" line="176"/> <source> has joined the chat.</source> <translation> ha ingresado al chat.</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="184"/> + <location filename="../src/gui/clientChatDialog.cpp" line="182"/> <source> has left the chat.</source> <translation> ha abandonado el chat</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="211"/> + <location filename="../src/gui/clientChatDialog.cpp" line="209"/> <source>PVS File Transfer</source> <translation>PVS Transferencia de datos</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>Send file '</source> <translation>Enviar archivo '</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>' to </source> <translation>' a </translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="231"/> + <location filename="../src/gui/clientChatDialog.cpp" line="229"/> <source>Connected.</source> <translation>Conectado.</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="241"/> + <location filename="../src/gui/clientChatDialog.cpp" line="239"/> <source>Disconnected.</source> <translation>Desconectado.</translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="280"/> + <location filename="../src/gui/clientChatDialog.cpp" line="278"/> <source>Message from <</source> <translation>Mensaje de <</translation> </message> @@ -260,23 +260,23 @@ <context> <name>ClientFileSendDialog</name> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="68"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="66"/> <source>Open File</source> <translation>Abrir archivo</translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="186"/> - <location filename="../src/gui/clientFileSendDialog.cpp" line="192"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="184"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="190"/> <source>PVS - File Transfer</source> <translation>PVS - Transferencia de datos</translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="187"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="185"/> <source>File Transfer complete.</source> <translation>La transferencia de datos ha sido completada.</translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="193"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="191"/> <source>File Transfer canceled!</source> <translation>La transferencia de datos ha sido cancelada!</translation> </message> @@ -331,42 +331,40 @@ <context> <name>ClientToolbarClass</name> <message> - <location filename="../build/ui_clientToolbar.h" line="179"/> + <location filename="../build/ui_clientToolbar.h" line="166"/> <source>Form</source> <translation>de</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="181"/> + <location filename="../build/ui_clientToolbar.h" line="168"/> <source>Menu</source> <translation>Menu</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="183"/> + <location filename="../build/ui_clientToolbar.h" line="170"/> <source>Host:</source> <translation>Host:</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="185"/> + <location filename="../build/ui_clientToolbar.h" line="172"/> <source>Click to connect</source> <translation>Click para conectar</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="187"/> + <location filename="../build/ui_clientToolbar.h" line="174"/> <source>-</source> <translation>-</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="189"/> <source>Enable/Disable VNC only for this session</source> - <translation>Avilitar/Desavilitar VNC solamente para esta sesión</translation> + <translation type="obsolete">Avilitar/Desavilitar VNC solamente para esta sesión</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="191"/> <source>Allow VNC</source> - <translation>Permitir VNC</translation> + <translation type="obsolete">Permitir VNC</translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="192"/> + <location filename="../build/ui_clientToolbar.h" line="175"/> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -416,84 +414,127 @@ p, li { white-space: pre-wrap; } <context> <name>PVSGUI</name> <message> - <location filename="../src/pvsgui.cpp" line="28"/> + <location filename="../src/pvsgui.cpp" line="35"/> <source>Connect</source> <translation>Conectar</translation> </message> <message> <location filename="../src/pvsgui.cpp" line="189"/> + <source>Show &toolbar</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="191"/> <source>&Disconnect</source> <translation>&Desconectar</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="190"/> + <location filename="../src/pvsgui.cpp" line="192"/> <source>C&hat</source> <translation>???</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="191"/> + <location filename="../src/pvsgui.cpp" line="193"/> <source>&Send File</source> <translation>&Enviar archivo</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="192"/> + <location filename="../src/pvsgui.cpp" line="194"/> <source>&Config</source> <translation>&Configuración</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="193"/> + <location filename="../src/pvsgui.cpp" line="195"/> <source>&Information</source> <translation>&Información</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="194"/> + <location filename="../src/pvsgui.cpp" line="196"/> <source>&About</source> <translation>&Acerca de</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="195"/> + <location filename="../src/pvsgui.cpp" line="197"/> <source>&Quit</source> <translation>&Cerrar</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> - <location filename="../src/pvsgui.cpp" line="297"/> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="285"/> + <location filename="../src/pvsgui.cpp" line="300"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>PVS Connection</source> <translation>PVS Connección</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> + <location filename="../src/pvsgui.cpp" line="285"/> <source>Please enter password (If not needed leave blank):</source> <translation>Porfavor ingrese una contraseña (Deje la seccion vacia si no lo necesita):</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="298"/> + <location filename="../src/pvsgui.cpp" line="301"/> <source>Are you sure you want to disconnect?</source> <translation>Realmente desea desconectarse?</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="343"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="346"/> <source>PVS connection</source> <translation>PVS Connección</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="335"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="338"/> <source>Connected to </source> <translation>Connectar a </translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="343"/> - <location filename="../src/pvsgui.cpp" line="355"/> + <location filename="../src/pvsgui.cpp" line="346"/> + <location filename="../src/pvsgui.cpp" line="358"/> <source>Disconnected</source> <translation>Desconectado</translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>New host available: </source> <translation>Nuevo Host disponible: </translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsgui.cpp" line="419"/> + <source>Usage: pvsgui [OPTIONS]...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="420"/> + <source>Start the Pool Video Switch GUI.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="421"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="422"/> + <source>Start only with systray icon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="423"/> + <source>Show this help text and quit.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="424"/> + <source>Show version and quit.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="433"/> + <source>Version: </source> + <translation type="unfinished">Version: </translation> + </message> +</context> </TS> diff --git a/i18n/pvsgui_fr_FR.ts b/i18n/pvsgui_fr_FR.ts index f3e6d65..59b40b9 100644 --- a/i18n/pvsgui_fr_FR.ts +++ b/i18n/pvsgui_fr_FR.ts @@ -40,47 +40,47 @@ <context> <name>ClientChatDialog</name> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="65"/> + <location filename="../src/gui/clientChatDialog.cpp" line="63"/> <source>&Send File...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="178"/> + <location filename="../src/gui/clientChatDialog.cpp" line="176"/> <source> has joined the chat.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="184"/> + <location filename="../src/gui/clientChatDialog.cpp" line="182"/> <source> has left the chat.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="211"/> + <location filename="../src/gui/clientChatDialog.cpp" line="209"/> <source>PVS File Transfer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>Send file '</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>' to </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="231"/> + <location filename="../src/gui/clientChatDialog.cpp" line="229"/> <source>Connected.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="241"/> + <location filename="../src/gui/clientChatDialog.cpp" line="239"/> <source>Disconnected.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="280"/> + <location filename="../src/gui/clientChatDialog.cpp" line="278"/> <source>Message from <</source> <translation type="unfinished"></translation> </message> @@ -260,23 +260,23 @@ <context> <name>ClientFileSendDialog</name> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="68"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="66"/> <source>Open File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="186"/> - <location filename="../src/gui/clientFileSendDialog.cpp" line="192"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="184"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="190"/> <source>PVS - File Transfer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="187"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="185"/> <source>File Transfer complete.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="193"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="191"/> <source>File Transfer canceled!</source> <translation type="unfinished"></translation> </message> @@ -331,42 +331,32 @@ <context> <name>ClientToolbarClass</name> <message> - <location filename="../build/ui_clientToolbar.h" line="179"/> + <location filename="../build/ui_clientToolbar.h" line="166"/> <source>Form</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="181"/> + <location filename="../build/ui_clientToolbar.h" line="168"/> <source>Menu</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="183"/> + <location filename="../build/ui_clientToolbar.h" line="170"/> <source>Host:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="185"/> + <location filename="../build/ui_clientToolbar.h" line="172"/> <source>Click to connect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="187"/> + <location filename="../build/ui_clientToolbar.h" line="174"/> <source>-</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="189"/> - <source>Enable/Disable VNC only for this session</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../build/ui_clientToolbar.h" line="191"/> - <source>Allow VNC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../build/ui_clientToolbar.h" line="192"/> + <location filename="../build/ui_clientToolbar.h" line="175"/> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -404,84 +394,127 @@ p, li { white-space: pre-wrap; } <context> <name>PVSGUI</name> <message> - <location filename="../src/pvsgui.cpp" line="28"/> + <location filename="../src/pvsgui.cpp" line="35"/> <source>Connect</source> <translation type="unfinished"></translation> </message> <message> <location filename="../src/pvsgui.cpp" line="189"/> + <source>Show &toolbar</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="191"/> <source>&Disconnect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="190"/> + <location filename="../src/pvsgui.cpp" line="192"/> <source>C&hat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="191"/> + <location filename="../src/pvsgui.cpp" line="193"/> <source>&Send File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="192"/> + <location filename="../src/pvsgui.cpp" line="194"/> <source>&Config</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="193"/> + <location filename="../src/pvsgui.cpp" line="195"/> <source>&Information</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="194"/> + <location filename="../src/pvsgui.cpp" line="196"/> <source>&About</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="195"/> + <location filename="../src/pvsgui.cpp" line="197"/> <source>&Quit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> - <location filename="../src/pvsgui.cpp" line="297"/> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="285"/> + <location filename="../src/pvsgui.cpp" line="300"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>PVS Connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> + <location filename="../src/pvsgui.cpp" line="285"/> <source>Please enter password (If not needed leave blank):</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="298"/> + <location filename="../src/pvsgui.cpp" line="301"/> <source>Are you sure you want to disconnect?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="343"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="346"/> <source>PVS connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="335"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="338"/> <source>Connected to </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="343"/> - <location filename="../src/pvsgui.cpp" line="355"/> + <location filename="../src/pvsgui.cpp" line="346"/> + <location filename="../src/pvsgui.cpp" line="358"/> <source>Disconnected</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>New host available: </source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsgui.cpp" line="419"/> + <source>Usage: pvsgui [OPTIONS]...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="420"/> + <source>Start the Pool Video Switch GUI.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="421"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="422"/> + <source>Start only with systray icon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="423"/> + <source>Show this help text and quit.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="424"/> + <source>Show version and quit.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="433"/> + <source>Version: </source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/i18n/pvsgui_pl_PL.ts b/i18n/pvsgui_pl_PL.ts index f3e6d65..59b40b9 100644 --- a/i18n/pvsgui_pl_PL.ts +++ b/i18n/pvsgui_pl_PL.ts @@ -40,47 +40,47 @@ <context> <name>ClientChatDialog</name> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="65"/> + <location filename="../src/gui/clientChatDialog.cpp" line="63"/> <source>&Send File...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="178"/> + <location filename="../src/gui/clientChatDialog.cpp" line="176"/> <source> has joined the chat.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="184"/> + <location filename="../src/gui/clientChatDialog.cpp" line="182"/> <source> has left the chat.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="211"/> + <location filename="../src/gui/clientChatDialog.cpp" line="209"/> <source>PVS File Transfer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>Send file '</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="212"/> + <location filename="../src/gui/clientChatDialog.cpp" line="210"/> <source>' to </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="231"/> + <location filename="../src/gui/clientChatDialog.cpp" line="229"/> <source>Connected.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="241"/> + <location filename="../src/gui/clientChatDialog.cpp" line="239"/> <source>Disconnected.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientChatDialog.cpp" line="280"/> + <location filename="../src/gui/clientChatDialog.cpp" line="278"/> <source>Message from <</source> <translation type="unfinished"></translation> </message> @@ -260,23 +260,23 @@ <context> <name>ClientFileSendDialog</name> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="68"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="66"/> <source>Open File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="186"/> - <location filename="../src/gui/clientFileSendDialog.cpp" line="192"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="184"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="190"/> <source>PVS - File Transfer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="187"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="185"/> <source>File Transfer complete.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/clientFileSendDialog.cpp" line="193"/> + <location filename="../src/gui/clientFileSendDialog.cpp" line="191"/> <source>File Transfer canceled!</source> <translation type="unfinished"></translation> </message> @@ -331,42 +331,32 @@ <context> <name>ClientToolbarClass</name> <message> - <location filename="../build/ui_clientToolbar.h" line="179"/> + <location filename="../build/ui_clientToolbar.h" line="166"/> <source>Form</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="181"/> + <location filename="../build/ui_clientToolbar.h" line="168"/> <source>Menu</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="183"/> + <location filename="../build/ui_clientToolbar.h" line="170"/> <source>Host:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="185"/> + <location filename="../build/ui_clientToolbar.h" line="172"/> <source>Click to connect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="187"/> + <location filename="../build/ui_clientToolbar.h" line="174"/> <source>-</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_clientToolbar.h" line="189"/> - <source>Enable/Disable VNC only for this session</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../build/ui_clientToolbar.h" line="191"/> - <source>Allow VNC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../build/ui_clientToolbar.h" line="192"/> + <location filename="../build/ui_clientToolbar.h" line="175"/> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -404,84 +394,127 @@ p, li { white-space: pre-wrap; } <context> <name>PVSGUI</name> <message> - <location filename="../src/pvsgui.cpp" line="28"/> + <location filename="../src/pvsgui.cpp" line="35"/> <source>Connect</source> <translation type="unfinished"></translation> </message> <message> <location filename="../src/pvsgui.cpp" line="189"/> + <source>Show &toolbar</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="191"/> <source>&Disconnect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="190"/> + <location filename="../src/pvsgui.cpp" line="192"/> <source>C&hat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="191"/> + <location filename="../src/pvsgui.cpp" line="193"/> <source>&Send File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="192"/> + <location filename="../src/pvsgui.cpp" line="194"/> <source>&Config</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="193"/> + <location filename="../src/pvsgui.cpp" line="195"/> <source>&Information</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="194"/> + <location filename="../src/pvsgui.cpp" line="196"/> <source>&About</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="195"/> + <location filename="../src/pvsgui.cpp" line="197"/> <source>&Quit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> - <location filename="../src/pvsgui.cpp" line="297"/> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="285"/> + <location filename="../src/pvsgui.cpp" line="300"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>PVS Connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="282"/> + <location filename="../src/pvsgui.cpp" line="285"/> <source>Please enter password (If not needed leave blank):</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="298"/> + <location filename="../src/pvsgui.cpp" line="301"/> <source>Are you sure you want to disconnect?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="343"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="346"/> <source>PVS connection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="321"/> - <location filename="../src/pvsgui.cpp" line="335"/> + <location filename="../src/pvsgui.cpp" line="324"/> + <location filename="../src/pvsgui.cpp" line="338"/> <source>Connected to </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="343"/> - <location filename="../src/pvsgui.cpp" line="355"/> + <location filename="../src/pvsgui.cpp" line="346"/> + <location filename="../src/pvsgui.cpp" line="358"/> <source>Disconnected</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/pvsgui.cpp" line="377"/> + <location filename="../src/pvsgui.cpp" line="380"/> <source>New host available: </source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="../src/pvsgui.cpp" line="419"/> + <source>Usage: pvsgui [OPTIONS]...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="420"/> + <source>Start the Pool Video Switch GUI.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="421"/> + <source>Options:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="422"/> + <source>Start only with systray icon.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="423"/> + <source>Show this help text and quit.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="424"/> + <source>Show version and quit.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/pvsgui.cpp" line="433"/> + <source>Version: </source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/i18n/pvsmgr_ar_JO.ts b/i18n/pvsmgr_ar_JO.ts index bc5c69c..a5a9a8a 100644 --- a/i18n/pvsmgr_ar_JO.ts +++ b/i18n/pvsmgr_ar_JO.ts @@ -314,360 +314,376 @@ Perform an unprojection or remove remote help to get a target.</source> <context> <name>MainWindow</name> <message> - <location filename="../build/ui_mainwindow.h" line="403"/> - <location filename="../src/gui/mainWindow.cpp" line="120"/> + <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../src/gui/mainWindow.cpp" line="122"/> <source>Exit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="122"/> + <location filename="../src/gui/mainWindow.cpp" line="124"/> <source>Remove the vnc-Connection for the selected client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="125"/> + <location filename="../src/gui/mainWindow.cpp" line="127"/> <source>Show the selected client in the whole window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="129"/> + <location filename="../src/gui/mainWindow.cpp" line="131"/> <source>Make a screenshot for the selected client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="418"/> - <location filename="../src/gui/mainWindow.cpp" line="130"/> + <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../src/gui/mainWindow.cpp" line="132"/> <source>Lock or Unlock all Clients</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="151"/> + <location filename="../src/gui/mainWindow.cpp" line="155"/> <source>The pvs manager</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="740"/> + <location filename="../src/gui/mainWindow.cpp" line="741"/> <source>This operation can only be performed for one selected Client!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="792"/> + <location filename="../src/gui/mainWindow.cpp" line="785"/> + <source>This operation can only be performed if you have selected a Client!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/gui/mainWindow.cpp" line="824"/> <source>This operation can only be performed for at least one selected Client!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1061"/> + <location filename="../src/gui/mainWindow.cpp" line="1099"/> <source>You have to set a Superclient-machine before performing this action.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1176"/> <source>Open Image</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1177"/> <source>Image Files (*.png *.jpg *.svg)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="376"/> + <location filename="../build/ui_mainwindow.h" line="383"/> <source>PVSmgr</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="377"/> + <location filename="../build/ui_mainwindow.h" line="384"/> <source>Show Username</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="378"/> + <location filename="../build/ui_mainwindow.h" line="385"/> <source>Ctrl+3</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="379"/> + <location filename="../build/ui_mainwindow.h" line="386"/> <source>Show IP</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="380"/> + <location filename="../build/ui_mainwindow.h" line="387"/> <source>Ctrl+2</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="381"/> + <location filename="../build/ui_mainwindow.h" line="388"/> <source>VNC-Placeholders</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="382"/> + <location filename="../build/ui_mainwindow.h" line="389"/> <source>Show Log</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="383"/> + <location filename="../build/ui_mainwindow.h" line="390"/> <source>Ctrl+L</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="384"/> + <location filename="../build/ui_mainwindow.h" line="391"/> <source>Show Normal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="385"/> + <location filename="../build/ui_mainwindow.h" line="392"/> <source>Ctrl+O</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="386"/> + <location filename="../build/ui_mainwindow.h" line="393"/> <source>Show Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="387"/> + <location filename="../build/ui_mainwindow.h" line="394"/> <source>Ctrl+E</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="388"/> + <location filename="../build/ui_mainwindow.h" line="395"/> <source>Show Network</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="389"/> + <location filename="../build/ui_mainwindow.h" line="396"/> <source>Ctrl+N</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="390"/> + <location filename="../build/ui_mainwindow.h" line="397"/> <source>Show Terminal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="391"/> + <location filename="../build/ui_mainwindow.h" line="398"/> <source>Ctrl+T</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="392"/> + <location filename="../build/ui_mainwindow.h" line="399"/> <source>Show Chat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="393"/> + <location filename="../build/ui_mainwindow.h" line="400"/> <source>Ctrl+G</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="394"/> + <location filename="../build/ui_mainwindow.h" line="401"/> <source>About pvs</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="395"/> + <location filename="../build/ui_mainwindow.h" line="402"/> <source>Ctrl+P</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="396"/> + <location filename="../build/ui_mainwindow.h" line="403"/> <source>100 x 100</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="397"/> + <location filename="../build/ui_mainwindow.h" line="404"/> <source>200 x 200</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="398"/> + <location filename="../build/ui_mainwindow.h" line="405"/> <source>500 x 500</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="399"/> + <location filename="../build/ui_mainwindow.h" line="406"/> <source>&Disconnect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="400"/> + <location filename="../build/ui_mainwindow.h" line="407"/> <source>Ctrl+W</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="401"/> + <location filename="../build/ui_mainwindow.h" line="408"/> <source>&Exit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="405"/> + <location filename="../build/ui_mainwindow.h" line="412"/> <source>Ctrl+Q</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="406"/> - <location filename="../build/ui_mainwindow.h" line="408"/> + <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="415"/> <source>Foto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../build/ui_mainwindow.h" line="417"/> <source>Ctrl+F</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="411"/> + <location filename="../build/ui_mainwindow.h" line="418"/> <source>view</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="420"/> <source>View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="415"/> + <location filename="../build/ui_mainwindow.h" line="422"/> <source>Ctrl+V</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="416"/> + <location filename="../build/ui_mainwindow.h" line="423"/> <source>lock</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="420"/> + <location filename="../build/ui_mainwindow.h" line="427"/> <source>Ctrl+A</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="421"/> + <location filename="../build/ui_mainwindow.h" line="428"/> <source>Profile &manager</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="422"/> + <location filename="../build/ui_mainwindow.h" line="429"/> <source>Ctrl+M</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="423"/> + <location filename="../build/ui_mainwindow.h" line="430"/> <source>Show Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="424"/> + <location filename="../build/ui_mainwindow.h" line="431"/> <source>Ctrl+1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../build/ui_mainwindow.h" line="432"/> <source>Chat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="427"/> + <location filename="../build/ui_mainwindow.h" line="434"/> <source>Start Chat with client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="429"/> + <location filename="../build/ui_mainwindow.h" line="436"/> <source>Ctrl+D</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="430"/> + <location filename="../build/ui_mainwindow.h" line="437"/> <source>-</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="431"/> + <location filename="../build/ui_mainwindow.h" line="438"/> + <source>showProcesses</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="440"/> + <location filename="../src/gui/mainWindow.cpp" line="135"/> + <source>Show Processes of the selected Client</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="442"/> <source>border-color: rgb(0, 0, 0);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="432"/> + <location filename="../build/ui_mainwindow.h" line="443"/> <source>VNC quality</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="435"/> + <location filename="../build/ui_mainwindow.h" line="446"/> <source>HIGH</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="436"/> + <location filename="../build/ui_mainwindow.h" line="447"/> <source>MEDIUM</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="437"/> + <location filename="../build/ui_mainwindow.h" line="448"/> <source>LOW</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="439"/> + <location filename="../build/ui_mainwindow.h" line="450"/> <source>Set password</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="442"/> + <location filename="../build/ui_mainwindow.h" line="453"/> <source>Thumbnailratio</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="443"/> + <location filename="../build/ui_mainwindow.h" line="454"/> <source>Thumbnailrate</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="445"/> + <location filename="../build/ui_mainwindow.h" line="456"/> <source> 0</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="446"/> + <location filename="../build/ui_mainwindow.h" line="457"/> <source>%</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="447"/> + <location filename="../build/ui_mainwindow.h" line="458"/> <source>background-color: rgb(255, 255, 255);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="448"/> + <location filename="../build/ui_mainwindow.h" line="459"/> <source>background-color: rgb(150, 150, 150);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="449"/> + <location filename="../build/ui_mainwindow.h" line="460"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="450"/> + <location filename="../build/ui_mainwindow.h" line="461"/> <source>Load profile </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="451"/> + <location filename="../build/ui_mainwindow.h" line="462"/> <source>&Clients</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="452"/> + <location filename="../build/ui_mainwindow.h" line="463"/> <source>&Logging</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="453"/> + <location filename="../build/ui_mainwindow.h" line="464"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="454"/> + <location filename="../build/ui_mainwindow.h" line="465"/> <source>toolBar</source> <translation type="unfinished"></translation> </message> diff --git a/i18n/pvsmgr_de_DE.ts b/i18n/pvsmgr_de_DE.ts index fd6d56b..a7ba2a0 100644 --- a/i18n/pvsmgr_de_DE.ts +++ b/i18n/pvsmgr_de_DE.ts @@ -314,360 +314,376 @@ Perform an unprojection or remove remote help to get a target.</source> <context> <name>MainWindow</name> <message> - <location filename="../build/ui_mainwindow.h" line="403"/> - <location filename="../src/gui/mainWindow.cpp" line="120"/> + <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../src/gui/mainWindow.cpp" line="122"/> <source>Exit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="122"/> + <location filename="../src/gui/mainWindow.cpp" line="124"/> <source>Remove the vnc-Connection for the selected client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="125"/> + <location filename="../src/gui/mainWindow.cpp" line="127"/> <source>Show the selected client in the whole window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="129"/> + <location filename="../src/gui/mainWindow.cpp" line="131"/> <source>Make a screenshot for the selected client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="418"/> - <location filename="../src/gui/mainWindow.cpp" line="130"/> + <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../src/gui/mainWindow.cpp" line="132"/> <source>Lock or Unlock all Clients</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="151"/> + <location filename="../src/gui/mainWindow.cpp" line="155"/> <source>The pvs manager</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="740"/> + <location filename="../src/gui/mainWindow.cpp" line="741"/> <source>This operation can only be performed for one selected Client!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="792"/> + <location filename="../src/gui/mainWindow.cpp" line="785"/> + <source>This operation can only be performed if you have selected a Client!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/gui/mainWindow.cpp" line="824"/> <source>This operation can only be performed for at least one selected Client!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1061"/> + <location filename="../src/gui/mainWindow.cpp" line="1099"/> <source>You have to set a Superclient-machine before performing this action.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1176"/> <source>Open Image</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1177"/> <source>Image Files (*.png *.jpg *.svg)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="376"/> + <location filename="../build/ui_mainwindow.h" line="383"/> <source>PVSmgr</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="377"/> + <location filename="../build/ui_mainwindow.h" line="384"/> <source>Show Username</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="378"/> + <location filename="../build/ui_mainwindow.h" line="385"/> <source>Ctrl+3</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="379"/> + <location filename="../build/ui_mainwindow.h" line="386"/> <source>Show IP</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="380"/> + <location filename="../build/ui_mainwindow.h" line="387"/> <source>Ctrl+2</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="381"/> + <location filename="../build/ui_mainwindow.h" line="388"/> <source>VNC-Placeholders</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="382"/> + <location filename="../build/ui_mainwindow.h" line="389"/> <source>Show Log</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="383"/> + <location filename="../build/ui_mainwindow.h" line="390"/> <source>Ctrl+L</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="384"/> + <location filename="../build/ui_mainwindow.h" line="391"/> <source>Show Normal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="385"/> + <location filename="../build/ui_mainwindow.h" line="392"/> <source>Ctrl+O</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="386"/> + <location filename="../build/ui_mainwindow.h" line="393"/> <source>Show Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="387"/> + <location filename="../build/ui_mainwindow.h" line="394"/> <source>Ctrl+E</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="388"/> + <location filename="../build/ui_mainwindow.h" line="395"/> <source>Show Network</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="389"/> + <location filename="../build/ui_mainwindow.h" line="396"/> <source>Ctrl+N</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="390"/> + <location filename="../build/ui_mainwindow.h" line="397"/> <source>Show Terminal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="391"/> + <location filename="../build/ui_mainwindow.h" line="398"/> <source>Ctrl+T</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="392"/> + <location filename="../build/ui_mainwindow.h" line="399"/> <source>Show Chat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="393"/> + <location filename="../build/ui_mainwindow.h" line="400"/> <source>Ctrl+G</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="394"/> + <location filename="../build/ui_mainwindow.h" line="401"/> <source>About pvs</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="395"/> + <location filename="../build/ui_mainwindow.h" line="402"/> <source>Ctrl+P</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="396"/> + <location filename="../build/ui_mainwindow.h" line="403"/> <source>100 x 100</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="397"/> + <location filename="../build/ui_mainwindow.h" line="404"/> <source>200 x 200</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="398"/> + <location filename="../build/ui_mainwindow.h" line="405"/> <source>500 x 500</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="399"/> + <location filename="../build/ui_mainwindow.h" line="406"/> <source>&Disconnect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="400"/> + <location filename="../build/ui_mainwindow.h" line="407"/> <source>Ctrl+W</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="401"/> + <location filename="../build/ui_mainwindow.h" line="408"/> <source>&Exit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="405"/> + <location filename="../build/ui_mainwindow.h" line="412"/> <source>Ctrl+Q</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="406"/> - <location filename="../build/ui_mainwindow.h" line="408"/> + <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="415"/> <source>Foto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../build/ui_mainwindow.h" line="417"/> <source>Ctrl+F</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="411"/> + <location filename="../build/ui_mainwindow.h" line="418"/> <source>view</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="420"/> <source>View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="415"/> + <location filename="../build/ui_mainwindow.h" line="422"/> <source>Ctrl+V</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="416"/> + <location filename="../build/ui_mainwindow.h" line="423"/> <source>lock</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="420"/> + <location filename="../build/ui_mainwindow.h" line="427"/> <source>Ctrl+A</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="421"/> + <location filename="../build/ui_mainwindow.h" line="428"/> <source>Profile &manager</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="422"/> + <location filename="../build/ui_mainwindow.h" line="429"/> <source>Ctrl+M</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="423"/> + <location filename="../build/ui_mainwindow.h" line="430"/> <source>Show Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="424"/> + <location filename="../build/ui_mainwindow.h" line="431"/> <source>Ctrl+1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../build/ui_mainwindow.h" line="432"/> <source>Chat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="427"/> + <location filename="../build/ui_mainwindow.h" line="434"/> <source>Start Chat with client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="429"/> + <location filename="../build/ui_mainwindow.h" line="436"/> <source>Ctrl+D</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="430"/> + <location filename="../build/ui_mainwindow.h" line="437"/> <source>-</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="431"/> + <location filename="../build/ui_mainwindow.h" line="438"/> + <source>showProcesses</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="440"/> + <location filename="../src/gui/mainWindow.cpp" line="135"/> + <source>Show Processes of the selected Client</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="442"/> <source>border-color: rgb(0, 0, 0);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="432"/> + <location filename="../build/ui_mainwindow.h" line="443"/> <source>VNC quality</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="435"/> + <location filename="../build/ui_mainwindow.h" line="446"/> <source>HIGH</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="436"/> + <location filename="../build/ui_mainwindow.h" line="447"/> <source>MEDIUM</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="437"/> + <location filename="../build/ui_mainwindow.h" line="448"/> <source>LOW</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="439"/> + <location filename="../build/ui_mainwindow.h" line="450"/> <source>Set password</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="442"/> + <location filename="../build/ui_mainwindow.h" line="453"/> <source>Thumbnailratio</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="443"/> + <location filename="../build/ui_mainwindow.h" line="454"/> <source>Thumbnailrate</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="445"/> + <location filename="../build/ui_mainwindow.h" line="456"/> <source> 0</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="446"/> + <location filename="../build/ui_mainwindow.h" line="457"/> <source>%</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="447"/> + <location filename="../build/ui_mainwindow.h" line="458"/> <source>background-color: rgb(255, 255, 255);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="448"/> + <location filename="../build/ui_mainwindow.h" line="459"/> <source>background-color: rgb(150, 150, 150);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="449"/> + <location filename="../build/ui_mainwindow.h" line="460"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="450"/> + <location filename="../build/ui_mainwindow.h" line="461"/> <source>Load profile </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="451"/> + <location filename="../build/ui_mainwindow.h" line="462"/> <source>&Clients</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="452"/> + <location filename="../build/ui_mainwindow.h" line="463"/> <source>&Logging</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="453"/> + <location filename="../build/ui_mainwindow.h" line="464"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="454"/> + <location filename="../build/ui_mainwindow.h" line="465"/> <source>toolBar</source> <translation type="unfinished"></translation> </message> diff --git a/i18n/pvsmgr_es_MX.ts b/i18n/pvsmgr_es_MX.ts index fc53e6d..75999b9 100644 --- a/i18n/pvsmgr_es_MX.ts +++ b/i18n/pvsmgr_es_MX.ts @@ -314,360 +314,376 @@ Perform an unprojection or remove remote help to get a target.</source> <context> <name>MainWindow</name> <message> - <location filename="../build/ui_mainwindow.h" line="403"/> - <location filename="../src/gui/mainWindow.cpp" line="120"/> + <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../src/gui/mainWindow.cpp" line="122"/> <source>Exit</source> <translation>Salir</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="122"/> + <location filename="../src/gui/mainWindow.cpp" line="124"/> <source>Remove the vnc-Connection for the selected client(s)</source> <translation>Remover la conexión VNC de los clientes seleccionados</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="125"/> + <location filename="../src/gui/mainWindow.cpp" line="127"/> <source>Show the selected client in the whole window</source> <translation>Mostrar el cliente seleccionado en toda la ventana</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="129"/> + <location filename="../src/gui/mainWindow.cpp" line="131"/> <source>Make a screenshot for the selected client(s)</source> <translation>Capturar la pantalla de los clientes seleccionados</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="418"/> - <location filename="../src/gui/mainWindow.cpp" line="130"/> + <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../src/gui/mainWindow.cpp" line="132"/> <source>Lock or Unlock all Clients</source> <translation>Bloquear o desbloquear todos los clientes</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="151"/> + <location filename="../src/gui/mainWindow.cpp" line="155"/> <source>The pvs manager</source> <translation>PVS Manager</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="740"/> + <location filename="../src/gui/mainWindow.cpp" line="741"/> <source>This operation can only be performed for one selected Client!</source> <translation>Esta operación solamente puede ser realizada para un cliente!</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="792"/> + <location filename="../src/gui/mainWindow.cpp" line="785"/> + <source>This operation can only be performed if you have selected a Client!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/gui/mainWindow.cpp" line="824"/> <source>This operation can only be performed for at least one selected Client!</source> <translation>Esta operación solamente puede ser realizada para el ultimo cliente seleccionado!</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1061"/> + <location filename="../src/gui/mainWindow.cpp" line="1099"/> <source>You have to set a Superclient-machine before performing this action.</source> <translation>Usted debe asignar un super cliente antes de realizar esta acción.</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1176"/> <source>Open Image</source> <translation>Abrir imagen</translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1177"/> <source>Image Files (*.png *.jpg *.svg)</source> <translation>Extensión de imagenes (*.png *.jpg *.svg)</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="376"/> + <location filename="../build/ui_mainwindow.h" line="383"/> <source>PVSmgr</source> <translation>PVSmgr</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="377"/> + <location filename="../build/ui_mainwindow.h" line="384"/> <source>Show Username</source> <translation>Mostrar nombre de usuario</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="378"/> + <location filename="../build/ui_mainwindow.h" line="385"/> <source>Ctrl+3</source> <translation>Ctrl+3</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="379"/> + <location filename="../build/ui_mainwindow.h" line="386"/> <source>Show IP</source> <translation>Mostrar IP</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="380"/> + <location filename="../build/ui_mainwindow.h" line="387"/> <source>Ctrl+2</source> <translation>Ctrl+2</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="381"/> + <location filename="../build/ui_mainwindow.h" line="388"/> <source>VNC-Placeholders</source> <translation>VNC - Marcadores de posición</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="382"/> + <location filename="../build/ui_mainwindow.h" line="389"/> <source>Show Log</source> <translation>Mostrar Log</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="383"/> + <location filename="../build/ui_mainwindow.h" line="390"/> <source>Ctrl+L</source> <translation>Ctrl+L</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="384"/> + <location filename="../build/ui_mainwindow.h" line="391"/> <source>Show Normal</source> <translation>Mostrar normal</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="385"/> + <location filename="../build/ui_mainwindow.h" line="392"/> <source>Ctrl+O</source> <translation>Ctrl+O</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="386"/> + <location filename="../build/ui_mainwindow.h" line="393"/> <source>Show Error</source> <translation>Mostrar Errores</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="387"/> + <location filename="../build/ui_mainwindow.h" line="394"/> <source>Ctrl+E</source> <translation>Ctrl+E</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="388"/> + <location filename="../build/ui_mainwindow.h" line="395"/> <source>Show Network</source> <translation>Mostrar Red</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="389"/> + <location filename="../build/ui_mainwindow.h" line="396"/> <source>Ctrl+N</source> <translation></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="390"/> + <location filename="../build/ui_mainwindow.h" line="397"/> <source>Show Terminal</source> <translation>Mostrar Linea de comandos</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="391"/> + <location filename="../build/ui_mainwindow.h" line="398"/> <source>Ctrl+T</source> <translation>Ctrl+T</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="392"/> + <location filename="../build/ui_mainwindow.h" line="399"/> <source>Show Chat</source> <translation>Mostrar Chat</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="393"/> + <location filename="../build/ui_mainwindow.h" line="400"/> <source>Ctrl+G</source> <translation>Ctrl+G</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="394"/> + <location filename="../build/ui_mainwindow.h" line="401"/> <source>About pvs</source> <translation>Acerca de PVS</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="395"/> + <location filename="../build/ui_mainwindow.h" line="402"/> <source>Ctrl+P</source> <translation>Ctrl+P</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="396"/> + <location filename="../build/ui_mainwindow.h" line="403"/> <source>100 x 100</source> <translation>100 x 100</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="397"/> + <location filename="../build/ui_mainwindow.h" line="404"/> <source>200 x 200</source> <translation>200 x 200</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="398"/> + <location filename="../build/ui_mainwindow.h" line="405"/> <source>500 x 500</source> <translation>500 x 500</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="399"/> + <location filename="../build/ui_mainwindow.h" line="406"/> <source>&Disconnect</source> <translation>&Desconectar</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="400"/> + <location filename="../build/ui_mainwindow.h" line="407"/> <source>Ctrl+W</source> <translation>Ctrl+W</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="401"/> + <location filename="../build/ui_mainwindow.h" line="408"/> <source>&Exit</source> <translation>&Salir</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="405"/> + <location filename="../build/ui_mainwindow.h" line="412"/> <source>Ctrl+Q</source> <translation>Ctrl+Q</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="406"/> - <location filename="../build/ui_mainwindow.h" line="408"/> + <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="415"/> <source>Foto</source> <translation>Imagen</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../build/ui_mainwindow.h" line="417"/> <source>Ctrl+F</source> <translation>Ctrl+F</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="411"/> + <location filename="../build/ui_mainwindow.h" line="418"/> <source>view</source> <translation>ver</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="420"/> <source>View</source> <translation>Ver</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="415"/> + <location filename="../build/ui_mainwindow.h" line="422"/> <source>Ctrl+V</source> <translation>Ctrl+V</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="416"/> + <location filename="../build/ui_mainwindow.h" line="423"/> <source>lock</source> <translation>bloquear</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="420"/> + <location filename="../build/ui_mainwindow.h" line="427"/> <source>Ctrl+A</source> <translation>Ctrl+A</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="421"/> + <location filename="../build/ui_mainwindow.h" line="428"/> <source>Profile &manager</source> <translation>Perfil &manager</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="422"/> + <location filename="../build/ui_mainwindow.h" line="429"/> <source>Ctrl+M</source> <translation>Ctrl+M</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="423"/> + <location filename="../build/ui_mainwindow.h" line="430"/> <source>Show Name</source> <translation>Mostrar nombre</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="424"/> + <location filename="../build/ui_mainwindow.h" line="431"/> <source>Ctrl+1</source> <translation>Ctrl+1</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../build/ui_mainwindow.h" line="432"/> <source>Chat</source> <translation>Chat</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="427"/> + <location filename="../build/ui_mainwindow.h" line="434"/> <source>Start Chat with client(s)</source> <translation>Iniciar Chat con cliente(s)</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="429"/> + <location filename="../build/ui_mainwindow.h" line="436"/> <source>Ctrl+D</source> <translation>Ctrl+D</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="430"/> + <location filename="../build/ui_mainwindow.h" line="437"/> <source>-</source> <translation>-</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="431"/> + <location filename="../build/ui_mainwindow.h" line="438"/> + <source>showProcesses</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="440"/> + <location filename="../src/gui/mainWindow.cpp" line="135"/> + <source>Show Processes of the selected Client</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="442"/> <source>border-color: rgb(0, 0, 0);</source> <translation>border-color: rgb(0, 0, 0);</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="432"/> + <location filename="../build/ui_mainwindow.h" line="443"/> <source>VNC quality</source> <translation>VNC calidad</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="435"/> + <location filename="../build/ui_mainwindow.h" line="446"/> <source>HIGH</source> <translation>Alta</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="436"/> + <location filename="../build/ui_mainwindow.h" line="447"/> <source>MEDIUM</source> <translation>Media</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="437"/> + <location filename="../build/ui_mainwindow.h" line="448"/> <source>LOW</source> <translation>Baja</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="439"/> + <location filename="../build/ui_mainwindow.h" line="450"/> <source>Set password</source> <translation>Asignar contraseña</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="442"/> + <location filename="../build/ui_mainwindow.h" line="453"/> <source>Thumbnailratio</source> <translation>Radio de la vista en miniatura</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="443"/> + <location filename="../build/ui_mainwindow.h" line="454"/> <source>Thumbnailrate</source> <translation>Frecuancia de actualización para las vistas en miniatura</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="445"/> + <location filename="../build/ui_mainwindow.h" line="456"/> <source> 0</source> <translation> 0</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="446"/> + <location filename="../build/ui_mainwindow.h" line="457"/> <source>%</source> <translation>%</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="447"/> + <location filename="../build/ui_mainwindow.h" line="458"/> <source>background-color: rgb(255, 255, 255);</source> <translation>background-color: rgb(255, 255, 255);</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="448"/> + <location filename="../build/ui_mainwindow.h" line="459"/> <source>background-color: rgb(150, 150, 150);</source> <translation>background-color: rgb(150, 150, 150);</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="449"/> + <location filename="../build/ui_mainwindow.h" line="460"/> <source>&File</source> <translation>&Archivo</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="450"/> + <location filename="../build/ui_mainwindow.h" line="461"/> <source>Load profile </source> <translation>Cargar perfil</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="451"/> + <location filename="../build/ui_mainwindow.h" line="462"/> <source>&Clients</source> <translation>&Clientes</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="452"/> + <location filename="../build/ui_mainwindow.h" line="463"/> <source>&Logging</source> <translation>&Logging</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="453"/> + <location filename="../build/ui_mainwindow.h" line="464"/> <source>&Help</source> <translation>&Ayuda</translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="454"/> + <location filename="../build/ui_mainwindow.h" line="465"/> <source>toolBar</source> <translation>Barra de herramientas</translation> </message> diff --git a/i18n/pvsmgr_fr_FR.ts b/i18n/pvsmgr_fr_FR.ts index bc5c69c..a5a9a8a 100644 --- a/i18n/pvsmgr_fr_FR.ts +++ b/i18n/pvsmgr_fr_FR.ts @@ -314,360 +314,376 @@ Perform an unprojection or remove remote help to get a target.</source> <context> <name>MainWindow</name> <message> - <location filename="../build/ui_mainwindow.h" line="403"/> - <location filename="../src/gui/mainWindow.cpp" line="120"/> + <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../src/gui/mainWindow.cpp" line="122"/> <source>Exit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="122"/> + <location filename="../src/gui/mainWindow.cpp" line="124"/> <source>Remove the vnc-Connection for the selected client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="125"/> + <location filename="../src/gui/mainWindow.cpp" line="127"/> <source>Show the selected client in the whole window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="129"/> + <location filename="../src/gui/mainWindow.cpp" line="131"/> <source>Make a screenshot for the selected client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="418"/> - <location filename="../src/gui/mainWindow.cpp" line="130"/> + <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../src/gui/mainWindow.cpp" line="132"/> <source>Lock or Unlock all Clients</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="151"/> + <location filename="../src/gui/mainWindow.cpp" line="155"/> <source>The pvs manager</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="740"/> + <location filename="../src/gui/mainWindow.cpp" line="741"/> <source>This operation can only be performed for one selected Client!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="792"/> + <location filename="../src/gui/mainWindow.cpp" line="785"/> + <source>This operation can only be performed if you have selected a Client!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/gui/mainWindow.cpp" line="824"/> <source>This operation can only be performed for at least one selected Client!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1061"/> + <location filename="../src/gui/mainWindow.cpp" line="1099"/> <source>You have to set a Superclient-machine before performing this action.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1176"/> <source>Open Image</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1177"/> <source>Image Files (*.png *.jpg *.svg)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="376"/> + <location filename="../build/ui_mainwindow.h" line="383"/> <source>PVSmgr</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="377"/> + <location filename="../build/ui_mainwindow.h" line="384"/> <source>Show Username</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="378"/> + <location filename="../build/ui_mainwindow.h" line="385"/> <source>Ctrl+3</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="379"/> + <location filename="../build/ui_mainwindow.h" line="386"/> <source>Show IP</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="380"/> + <location filename="../build/ui_mainwindow.h" line="387"/> <source>Ctrl+2</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="381"/> + <location filename="../build/ui_mainwindow.h" line="388"/> <source>VNC-Placeholders</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="382"/> + <location filename="../build/ui_mainwindow.h" line="389"/> <source>Show Log</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="383"/> + <location filename="../build/ui_mainwindow.h" line="390"/> <source>Ctrl+L</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="384"/> + <location filename="../build/ui_mainwindow.h" line="391"/> <source>Show Normal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="385"/> + <location filename="../build/ui_mainwindow.h" line="392"/> <source>Ctrl+O</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="386"/> + <location filename="../build/ui_mainwindow.h" line="393"/> <source>Show Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="387"/> + <location filename="../build/ui_mainwindow.h" line="394"/> <source>Ctrl+E</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="388"/> + <location filename="../build/ui_mainwindow.h" line="395"/> <source>Show Network</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="389"/> + <location filename="../build/ui_mainwindow.h" line="396"/> <source>Ctrl+N</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="390"/> + <location filename="../build/ui_mainwindow.h" line="397"/> <source>Show Terminal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="391"/> + <location filename="../build/ui_mainwindow.h" line="398"/> <source>Ctrl+T</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="392"/> + <location filename="../build/ui_mainwindow.h" line="399"/> <source>Show Chat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="393"/> + <location filename="../build/ui_mainwindow.h" line="400"/> <source>Ctrl+G</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="394"/> + <location filename="../build/ui_mainwindow.h" line="401"/> <source>About pvs</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="395"/> + <location filename="../build/ui_mainwindow.h" line="402"/> <source>Ctrl+P</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="396"/> + <location filename="../build/ui_mainwindow.h" line="403"/> <source>100 x 100</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="397"/> + <location filename="../build/ui_mainwindow.h" line="404"/> <source>200 x 200</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="398"/> + <location filename="../build/ui_mainwindow.h" line="405"/> <source>500 x 500</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="399"/> + <location filename="../build/ui_mainwindow.h" line="406"/> <source>&Disconnect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="400"/> + <location filename="../build/ui_mainwindow.h" line="407"/> <source>Ctrl+W</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="401"/> + <location filename="../build/ui_mainwindow.h" line="408"/> <source>&Exit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="405"/> + <location filename="../build/ui_mainwindow.h" line="412"/> <source>Ctrl+Q</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="406"/> - <location filename="../build/ui_mainwindow.h" line="408"/> + <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="415"/> <source>Foto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../build/ui_mainwindow.h" line="417"/> <source>Ctrl+F</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="411"/> + <location filename="../build/ui_mainwindow.h" line="418"/> <source>view</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="420"/> <source>View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="415"/> + <location filename="../build/ui_mainwindow.h" line="422"/> <source>Ctrl+V</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="416"/> + <location filename="../build/ui_mainwindow.h" line="423"/> <source>lock</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="420"/> + <location filename="../build/ui_mainwindow.h" line="427"/> <source>Ctrl+A</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="421"/> + <location filename="../build/ui_mainwindow.h" line="428"/> <source>Profile &manager</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="422"/> + <location filename="../build/ui_mainwindow.h" line="429"/> <source>Ctrl+M</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="423"/> + <location filename="../build/ui_mainwindow.h" line="430"/> <source>Show Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="424"/> + <location filename="../build/ui_mainwindow.h" line="431"/> <source>Ctrl+1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../build/ui_mainwindow.h" line="432"/> <source>Chat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="427"/> + <location filename="../build/ui_mainwindow.h" line="434"/> <source>Start Chat with client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="429"/> + <location filename="../build/ui_mainwindow.h" line="436"/> <source>Ctrl+D</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="430"/> + <location filename="../build/ui_mainwindow.h" line="437"/> <source>-</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="431"/> + <location filename="../build/ui_mainwindow.h" line="438"/> + <source>showProcesses</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="440"/> + <location filename="../src/gui/mainWindow.cpp" line="135"/> + <source>Show Processes of the selected Client</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="442"/> <source>border-color: rgb(0, 0, 0);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="432"/> + <location filename="../build/ui_mainwindow.h" line="443"/> <source>VNC quality</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="435"/> + <location filename="../build/ui_mainwindow.h" line="446"/> <source>HIGH</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="436"/> + <location filename="../build/ui_mainwindow.h" line="447"/> <source>MEDIUM</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="437"/> + <location filename="../build/ui_mainwindow.h" line="448"/> <source>LOW</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="439"/> + <location filename="../build/ui_mainwindow.h" line="450"/> <source>Set password</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="442"/> + <location filename="../build/ui_mainwindow.h" line="453"/> <source>Thumbnailratio</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="443"/> + <location filename="../build/ui_mainwindow.h" line="454"/> <source>Thumbnailrate</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="445"/> + <location filename="../build/ui_mainwindow.h" line="456"/> <source> 0</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="446"/> + <location filename="../build/ui_mainwindow.h" line="457"/> <source>%</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="447"/> + <location filename="../build/ui_mainwindow.h" line="458"/> <source>background-color: rgb(255, 255, 255);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="448"/> + <location filename="../build/ui_mainwindow.h" line="459"/> <source>background-color: rgb(150, 150, 150);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="449"/> + <location filename="../build/ui_mainwindow.h" line="460"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="450"/> + <location filename="../build/ui_mainwindow.h" line="461"/> <source>Load profile </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="451"/> + <location filename="../build/ui_mainwindow.h" line="462"/> <source>&Clients</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="452"/> + <location filename="../build/ui_mainwindow.h" line="463"/> <source>&Logging</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="453"/> + <location filename="../build/ui_mainwindow.h" line="464"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="454"/> + <location filename="../build/ui_mainwindow.h" line="465"/> <source>toolBar</source> <translation type="unfinished"></translation> </message> diff --git a/i18n/pvsmgr_pl_PL.ts b/i18n/pvsmgr_pl_PL.ts index bc5c69c..a5a9a8a 100644 --- a/i18n/pvsmgr_pl_PL.ts +++ b/i18n/pvsmgr_pl_PL.ts @@ -314,360 +314,376 @@ Perform an unprojection or remove remote help to get a target.</source> <context> <name>MainWindow</name> <message> - <location filename="../build/ui_mainwindow.h" line="403"/> - <location filename="../src/gui/mainWindow.cpp" line="120"/> + <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../src/gui/mainWindow.cpp" line="122"/> <source>Exit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="122"/> + <location filename="../src/gui/mainWindow.cpp" line="124"/> <source>Remove the vnc-Connection for the selected client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="125"/> + <location filename="../src/gui/mainWindow.cpp" line="127"/> <source>Show the selected client in the whole window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="129"/> + <location filename="../src/gui/mainWindow.cpp" line="131"/> <source>Make a screenshot for the selected client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="418"/> - <location filename="../src/gui/mainWindow.cpp" line="130"/> + <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../src/gui/mainWindow.cpp" line="132"/> <source>Lock or Unlock all Clients</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="151"/> + <location filename="../src/gui/mainWindow.cpp" line="155"/> <source>The pvs manager</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="740"/> + <location filename="../src/gui/mainWindow.cpp" line="741"/> <source>This operation can only be performed for one selected Client!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="792"/> + <location filename="../src/gui/mainWindow.cpp" line="785"/> + <source>This operation can only be performed if you have selected a Client!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/gui/mainWindow.cpp" line="824"/> <source>This operation can only be performed for at least one selected Client!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1061"/> + <location filename="../src/gui/mainWindow.cpp" line="1099"/> <source>You have to set a Superclient-machine before performing this action.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1176"/> <source>Open Image</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/gui/mainWindow.cpp" line="1141"/> + <location filename="../src/gui/mainWindow.cpp" line="1177"/> <source>Image Files (*.png *.jpg *.svg)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="376"/> + <location filename="../build/ui_mainwindow.h" line="383"/> <source>PVSmgr</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="377"/> + <location filename="../build/ui_mainwindow.h" line="384"/> <source>Show Username</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="378"/> + <location filename="../build/ui_mainwindow.h" line="385"/> <source>Ctrl+3</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="379"/> + <location filename="../build/ui_mainwindow.h" line="386"/> <source>Show IP</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="380"/> + <location filename="../build/ui_mainwindow.h" line="387"/> <source>Ctrl+2</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="381"/> + <location filename="../build/ui_mainwindow.h" line="388"/> <source>VNC-Placeholders</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="382"/> + <location filename="../build/ui_mainwindow.h" line="389"/> <source>Show Log</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="383"/> + <location filename="../build/ui_mainwindow.h" line="390"/> <source>Ctrl+L</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="384"/> + <location filename="../build/ui_mainwindow.h" line="391"/> <source>Show Normal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="385"/> + <location filename="../build/ui_mainwindow.h" line="392"/> <source>Ctrl+O</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="386"/> + <location filename="../build/ui_mainwindow.h" line="393"/> <source>Show Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="387"/> + <location filename="../build/ui_mainwindow.h" line="394"/> <source>Ctrl+E</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="388"/> + <location filename="../build/ui_mainwindow.h" line="395"/> <source>Show Network</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="389"/> + <location filename="../build/ui_mainwindow.h" line="396"/> <source>Ctrl+N</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="390"/> + <location filename="../build/ui_mainwindow.h" line="397"/> <source>Show Terminal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="391"/> + <location filename="../build/ui_mainwindow.h" line="398"/> <source>Ctrl+T</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="392"/> + <location filename="../build/ui_mainwindow.h" line="399"/> <source>Show Chat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="393"/> + <location filename="../build/ui_mainwindow.h" line="400"/> <source>Ctrl+G</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="394"/> + <location filename="../build/ui_mainwindow.h" line="401"/> <source>About pvs</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="395"/> + <location filename="../build/ui_mainwindow.h" line="402"/> <source>Ctrl+P</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="396"/> + <location filename="../build/ui_mainwindow.h" line="403"/> <source>100 x 100</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="397"/> + <location filename="../build/ui_mainwindow.h" line="404"/> <source>200 x 200</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="398"/> + <location filename="../build/ui_mainwindow.h" line="405"/> <source>500 x 500</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="399"/> + <location filename="../build/ui_mainwindow.h" line="406"/> <source>&Disconnect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="400"/> + <location filename="../build/ui_mainwindow.h" line="407"/> <source>Ctrl+W</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="401"/> + <location filename="../build/ui_mainwindow.h" line="408"/> <source>&Exit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="405"/> + <location filename="../build/ui_mainwindow.h" line="412"/> <source>Ctrl+Q</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="406"/> - <location filename="../build/ui_mainwindow.h" line="408"/> + <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="415"/> <source>Foto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="410"/> + <location filename="../build/ui_mainwindow.h" line="417"/> <source>Ctrl+F</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="411"/> + <location filename="../build/ui_mainwindow.h" line="418"/> <source>view</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="413"/> + <location filename="../build/ui_mainwindow.h" line="420"/> <source>View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="415"/> + <location filename="../build/ui_mainwindow.h" line="422"/> <source>Ctrl+V</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="416"/> + <location filename="../build/ui_mainwindow.h" line="423"/> <source>lock</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="420"/> + <location filename="../build/ui_mainwindow.h" line="427"/> <source>Ctrl+A</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="421"/> + <location filename="../build/ui_mainwindow.h" line="428"/> <source>Profile &manager</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="422"/> + <location filename="../build/ui_mainwindow.h" line="429"/> <source>Ctrl+M</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="423"/> + <location filename="../build/ui_mainwindow.h" line="430"/> <source>Show Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="424"/> + <location filename="../build/ui_mainwindow.h" line="431"/> <source>Ctrl+1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="425"/> + <location filename="../build/ui_mainwindow.h" line="432"/> <source>Chat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="427"/> + <location filename="../build/ui_mainwindow.h" line="434"/> <source>Start Chat with client(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="429"/> + <location filename="../build/ui_mainwindow.h" line="436"/> <source>Ctrl+D</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="430"/> + <location filename="../build/ui_mainwindow.h" line="437"/> <source>-</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="431"/> + <location filename="../build/ui_mainwindow.h" line="438"/> + <source>showProcesses</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="440"/> + <location filename="../src/gui/mainWindow.cpp" line="135"/> + <source>Show Processes of the selected Client</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../build/ui_mainwindow.h" line="442"/> <source>border-color: rgb(0, 0, 0);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="432"/> + <location filename="../build/ui_mainwindow.h" line="443"/> <source>VNC quality</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="435"/> + <location filename="../build/ui_mainwindow.h" line="446"/> <source>HIGH</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="436"/> + <location filename="../build/ui_mainwindow.h" line="447"/> <source>MEDIUM</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="437"/> + <location filename="../build/ui_mainwindow.h" line="448"/> <source>LOW</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="439"/> + <location filename="../build/ui_mainwindow.h" line="450"/> <source>Set password</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="442"/> + <location filename="../build/ui_mainwindow.h" line="453"/> <source>Thumbnailratio</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="443"/> + <location filename="../build/ui_mainwindow.h" line="454"/> <source>Thumbnailrate</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="445"/> + <location filename="../build/ui_mainwindow.h" line="456"/> <source> 0</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="446"/> + <location filename="../build/ui_mainwindow.h" line="457"/> <source>%</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="447"/> + <location filename="../build/ui_mainwindow.h" line="458"/> <source>background-color: rgb(255, 255, 255);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="448"/> + <location filename="../build/ui_mainwindow.h" line="459"/> <source>background-color: rgb(150, 150, 150);</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="449"/> + <location filename="../build/ui_mainwindow.h" line="460"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="450"/> + <location filename="../build/ui_mainwindow.h" line="461"/> <source>Load profile </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="451"/> + <location filename="../build/ui_mainwindow.h" line="462"/> <source>&Clients</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="452"/> + <location filename="../build/ui_mainwindow.h" line="463"/> <source>&Logging</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="453"/> + <location filename="../build/ui_mainwindow.h" line="464"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../build/ui_mainwindow.h" line="454"/> + <location filename="../build/ui_mainwindow.h" line="465"/> <source>toolBar</source> <translation type="unfinished"></translation> </message> diff --git a/icons/gears.png b/icons/gears.png Binary files differnew file mode 100644 index 0000000..d0effe4 --- /dev/null +++ b/icons/gears.png diff --git a/misc/pvs.conf b/misc/pvs.conf index a6fe1f0..93c4ac5 100644 --- a/misc/pvs.conf +++ b/misc/pvs.conf @@ -1,10 +1,9 @@ -[General] -chatstate=on -chatmode=community -VNCPermit= +[VNC] +script=/usr/local/bin/pvs-vncsrv + +[Permissions] +vnc_lecturer=ro +vnc_other=no +allow_chat=T +allow_filetransfer=T -[room] -room=2 -background= -clientorder= -tag= diff --git a/misc/pvsgui.conf b/misc/pvsgui.conf new file mode 100644 index 0000000..9725bf5 --- /dev/null +++ b/misc/pvsgui.conf @@ -0,0 +1,3 @@ +[Display] +location=1 + diff --git a/misc/pvsgui.desktop b/misc/pvsgui.desktop new file mode 100644 index 0000000..676248d --- /dev/null +++ b/misc/pvsgui.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Exec=/usr/local/bin/pvsgui +Type=Application +Name=pvsgui diff --git a/misc/pvsmgr.conf b/misc/pvsmgr.conf index 3ff7b40..e69de29 100644 --- a/misc/pvsmgr.conf +++ b/misc/pvsmgr.conf @@ -1,12 +0,0 @@ -[Chat] -chatstate=on -chatmode=bossmode - -[Room] -roomId=123 - -[VNC] -quality=high - -[General] -chatmode=private diff --git a/org.openslx.pvs.service b/org.openslx.pvs.service index 0398081..91a3e67 100644 --- a/org.openslx.pvs.service +++ b/org.openslx.pvs.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.openslx.pvs -Exec=@CMAKE_INSTALL_PREFIX@/bin/pvs +Exec=@CMAKE_INSTALL_PREFIX@/bin/pvs -d @@ -1,32 +1,3 @@ <RCC> - <qresource prefix="/" lang="de_DE"> - <file alias="pvs.qm">build/pvs_de_DE.qm</file> - </qresource> - <qresource prefix="/" lang="de"> - <file alias="pvs.qm">build/pvs_de_DE.qm</file> - </qresource> - <qresource prefix="/" lang="fr_FR"> - <file alias="pvs.qm">build/pvs_fr_FR.qm</file> - </qresource> - <qresource prefix="/" lang="fr"> - <file alias="pvs.qm">build/pvs_fr_FR.qm</file> - </qresource> - <qresource prefix="/" lang="es_MX"> - <file alias="pvs.qm">build/pvs_es_MX.qm</file> - </qresource> - <qresource prefix="/" lang="es"> - <file alias="pvs.qm">build/pvs_es_MX.qm</file> - </qresource> - <qresource prefix="/" lang="ar_JO"> - <file alias="pvs.qm">build/pvs_ar_JO.qm</file> - </qresource> - <qresource prefix="/" lang="ar"> - <file alias="pvs.qm">build/pvs_ar_JO.qm</file> - </qresource> - <qresource prefix="/" lang="pl_PL"> - <file alias="pvs.qm">build/pvs_pl_PL.qm</file> - </qresource> - <qresource prefix="/" lang="pl"> - <file alias="pvs.qm">build/pvs_pl_PL.qm</file> - </qresource> + </RCC> @@ -10,34 +10,4 @@ <file alias="AUTHORS">AUTHORS</file> <file alias="TRANSLATION">TRANSLATION</file> </qresource> - <qresource prefix="/" lang="de_DE"> - <file alias="pvsgui.qm">build/pvsgui_de_DE.qm</file> - </qresource> - <qresource prefix="/" lang="de"> - <file alias="pvsgui.qm">build/pvsgui_de_DE.qm</file> - </qresource> - <qresource prefix="/" lang="fr_FR"> - <file alias="pvsgui.qm">build/pvsgui_fr_FR.qm</file> - </qresource> - <qresource prefix="/" lang="fr"> - <file alias="pvsgui.qm">build/pvsgui_fr_FR.qm</file> - </qresource> - <qresource prefix="/" lang="es_MX"> - <file alias="pvsgui.qm">build/pvsgui_es_MX.qm</file> - </qresource> - <qresource prefix="/" lang="es"> - <file alias="pvsgui.qm">build/pvsgui_es_MX.qm</file> - </qresource> - <qresource prefix="/" lang="ar_JO"> - <file alias="pvsgui.qm">build/pvsgui_ar_JO.qm</file> - </qresource> - <qresource prefix="/" lang="ar"> - <file alias="pvsgui.qm">build/pvsgui_ar_JO.qm</file> - </qresource> - <qresource prefix="/" lang="pl_PL"> - <file alias="pvsgui.qm">build/pvsgui_pl_PL.qm</file> - </qresource> - <qresource prefix="/" lang="pl"> - <file alias="pvsgui.qm">build/pvsgui_pl_PL.qm</file> - </qresource> </RCC> @@ -1,59 +1,32 @@ <RCC> - <qresource prefix="/" > + <qresource prefix="/"> + <file>icons/gears.png</file> <file>icons/projection.png</file> <file>icons/reset.png</file> - <file alias="finder" >icons/finder.png</file> - <file alias="exit" >icons/exit.png</file> - <file alias="terminal" >icons/terminal.png</file> - <file alias="photo" >icons/photo.png</file> - <file alias="photos" >icons/photo2.png</file> - <file alias="logout" >icons/log-out.png</file> - <file alias="restore" >icons/view-restore.png</file> - <file alias="lock" >icons/lock.png</file> - <file alias="profile" >icons/profile.png</file> - <file alias="dozent" >icons/dozent.svg</file> - <file alias="offline" >icons/offline.png</file> - <file alias="online" >icons/online.png</file> - <file alias="source" >icons/source.png</file> - <file alias="target" >icons/target.png</file> - <file alias="dozent2" >icons/dozent.png</file> - <file alias="chat" >icons/chat.png</file> - <file alias="cam32" >icons/cam32.svg</file> - <file alias="netconf" >icons/network_configure.png</file> + <file alias="finder">icons/finder.png</file> + <file alias="exit">icons/exit.png</file> + <file alias="terminal">icons/terminal.png</file> + <file alias="photo">icons/photo.png</file> + <file alias="photos">icons/photo2.png</file> + <file alias="logout">icons/log-out.png</file> + <file alias="restore">icons/view-restore.png</file> + <file alias="lock">icons/lock.png</file> + <file alias="profile">icons/profile.png</file> + <file alias="dozent">icons/dozent.svg</file> + <file alias="offline">icons/offline.png</file> + <file alias="online">icons/online.png</file> + <file alias="source">icons/source.png</file> + <file alias="target">icons/target.png</file> + <file alias="dozent2">icons/dozent.png</file> + <file alias="chat">icons/chat.png</file> + <file alias="cam32.svg">icons/cam32.svg</file> + <file alias="netconf">icons/network_configure.png</file> <file alias="AUTHORS">AUTHORS</file> - <file alias="TRANSLATION">TRANSLATION</file> + <file alias="TRANSLATION">TRANSLATION</file> </qresource> - <qresource prefix="/" lang="de_DE" > + <qresource prefix="/" lang="de_DE"> <file>icons/unprojection.png</file> <file>icons/unlocksingle.png</file> <file>icons/locksingle.png</file> - <file alias="pvsmgr.qm" >build/pvsmgr_de_DE.qm</file> - </qresource> - <qresource prefix="/" lang="de" > - <file alias="pvsmgr.qm" >build/pvsmgr_de_DE.qm</file> - </qresource> - <qresource prefix="/" lang="fr_FR" > - <file alias="pvsmgr.qm" >build/pvsmgr_fr_FR.qm</file> - </qresource> - <qresource prefix="/" lang="fr" > - <file alias="pvsmgr.qm" >build/pvsmgr_fr_FR.qm</file> - </qresource> - <qresource prefix="/" lang="es_MX" > - <file alias="pvsmgr.qm" >build/pvsmgr_es_MX.qm</file> - </qresource> - <qresource prefix="/" lang="es" > - <file alias="pvsmgr.qm" >build/pvsmgr_es_MX.qm</file> - </qresource> - <qresource prefix="/" lang="ar_JO" > - <file alias="pvsmgr.qm" >build/pvsmgr_ar_JO.qm</file> - </qresource> - <qresource prefix="/" lang="ar" > - <file alias="pvsmgr.qm" >build/pvsmgr_ar_JO.qm</file> - </qresource> - <qresource prefix="/" lang="pl_PL" > - <file alias="pvsmgr.qm" >build/pvsmgr_pl_PL.qm</file> - </qresource> - <qresource prefix="/" lang="pl" > - <file alias="pvsmgr.qm" >build/pvsmgr_pl_PL.qm</file> </qresource> </RCC> diff --git a/src/gui/clientChatDialog.cpp b/src/gui/clientChatDialog.cpp index 7c32790..163ac92 100644 --- a/src/gui/clientChatDialog.cpp +++ b/src/gui/clientChatDialog.cpp @@ -29,8 +29,6 @@ ClientChatDialog::ClientChatDialog(QWidget *parent) : // connect to D-Bus and get interface QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject("/chat", this); - dbus.registerService("org.openslx.pvsgui"); _ifaceDBus = new OrgOpenslxPvsInterface("org.openslx.pvs", "/", dbus, this); connect(_ifaceDBus, SIGNAL(chat_receive(QString, QString, QString)), this, SLOT(receive(QString, QString, QString))); diff --git a/src/gui/clientConfigDialog.cpp b/src/gui/clientConfigDialog.cpp index 70d38fc..b7ba407 100644 --- a/src/gui/clientConfigDialog.cpp +++ b/src/gui/clientConfigDialog.cpp @@ -39,6 +39,10 @@ ClientConfigDialog::ClientConfigDialog(QWidget *parent) : interfaceList->setModel(_interfaceListModel); interfaceList->setModelColumn(0); connect(reloadInterfaceListButton, SIGNAL(clicked()), _interfaceListModel, SLOT(reloadInterfaceList())); + + // connect to D-Bus and get interface + QDBusConnection dbus = QDBusConnection::sessionBus(); + _ifaceDBus = new OrgOpenslxPvsInterface("org.openslx.pvs", "/", dbus, this); } ClientConfigDialog::~ClientConfigDialog() @@ -62,54 +66,73 @@ void ClientConfigDialog::readSettings() else comboBox->setCurrentIndex(_settings.value("Display/location").toInt()); - if (_settings.value("Permissions/vnc_lecturer").toString() == "rw") - radioButtonLecturerRW->setChecked(true); - else if (_settings.value("Permissions/vnc_lecturer").toString() == "ro") - radioButtonLecturerRO->setChecked(true); - else - radioButtonLecturerNO->setChecked(true); - if (_settings.value("Permissions/vnc_other").toString() == "rw") - radioButtonOtherRW->setChecked(true); - else if (_settings.value("Permissions/vnc_other").toString() == "ro") - radioButtonOtherRO->setChecked(true); - else - radioButtonOtherNO->setChecked(true); - checkBoxAllowChat->setChecked( - _settings.value("Permissions/allow_chat").toBool()); - checkBoxAllowFiletransfer->setChecked(_settings.value( - "Permissions/allow_filetransfer").toBool()); + QDBusPendingReply<QString> reply = _ifaceDBus->getConfigValue("multicast/interface"); + reply.waitForFinished(); + if (reply.isValid()) + { + interfaceList->setEditText(reply.value()); + } + + reply = _ifaceDBus->getConfigValue("Permissions/vnc_lecturer"); + reply.waitForFinished(); + if (reply.isValid()) + { + if (reply.value() == "rw") + radioButtonLecturerRW->setChecked(true); + else if (reply.value() == "ro") + radioButtonLecturerRO->setChecked(true); + else + radioButtonLecturerNO->setChecked(true); + } - if(!_settings.value("Muticast/interface").isNull()) - interfaceList->setEditText(_settings.value("Multicast/interface").toString()); + reply = _ifaceDBus->getConfigValue("Permissions/vnc_other"); + reply.waitForFinished(); + if (reply.isValid()) + { + if (reply.value() == "rw") + radioButtonOtherRW->setChecked(true); + else if (reply.value() == "ro") + radioButtonOtherRO->setChecked(true); + else + radioButtonOtherNO->setChecked(true); + } - qDebug("[%s] Setting read from: '%s'", metaObject()->className(), - qPrintable(_settings.fileName())); + reply = _ifaceDBus->getConfigValue("Permissions/allow_chat"); + reply.waitForFinished(); + if (reply.isValid()) + checkBoxAllowChat->setChecked(reply.value() == "T"); + + reply = _ifaceDBus->getConfigValue("Permissions/allow_filetransfer"); + reply.waitForFinished(); + if (reply.isValid()) + checkBoxAllowFiletransfer->setChecked(reply.value() == "T"); } void ClientConfigDialog::writeSettings() { _settings.setValue("Display/location", comboBox->currentIndex()); + if (radioButtonLecturerRW->isChecked()) - _settings.setValue("Permissions/vnc_lecturer", "rw"); + _ifaceDBus->setConfigValue("Permissions/vnc_lecturer", "rw"); else if (radioButtonLecturerRO->isChecked()) - _settings.setValue("Permissions/vnc_lecturer", "ro"); + _ifaceDBus->setConfigValue("Permissions/vnc_lecturer", "ro"); else - _settings.setValue("Permissions/vnc_lecturer", "no"); + _ifaceDBus->setConfigValue("Permissions/vnc_lecturer", "no"); if (radioButtonOtherRW->isChecked()) - _settings.setValue("Permissions/vnc_other", "rw"); + _ifaceDBus->setConfigValue("Permissions/vnc_other", "rw"); else if (radioButtonOtherRO->isChecked()) - _settings.setValue("Permissions/vnc_other", "ro"); + _ifaceDBus->setConfigValue("Permissions/vnc_other", "ro"); else - _settings.setValue("Permissions/vnc_other", "no"); - _settings.setValue("Permissions/allow_chat", checkBoxAllowChat->isChecked()); - _settings.setValue("Permissions/allow_filetransfer", - checkBoxAllowFiletransfer->isChecked()); - _settings.setValue("Multicast/interface", interfaceList->currentText()); + _ifaceDBus->setConfigValue("Permissions/vnc_other", "no"); + + _ifaceDBus->setConfigValue("Permissions/allow_chat", + QString(checkBoxAllowChat->isChecked() ? "T" : "F")); + _ifaceDBus->setConfigValue("Permissions/allow_filetransfer", + QString(checkBoxAllowFiletransfer->isChecked() ? "T" : "F")); + _ifaceDBus->setConfigValue("multicast/interface", interfaceList->currentText()); + _settings.sync(); emit configChanged(); - - qDebug("[%s] Settings written to: '%s'.", metaObject()->className(), - qPrintable(_settings.fileName())); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/gui/clientConfigDialog.h b/src/gui/clientConfigDialog.h index 5582ec6..fd7529e 100644 --- a/src/gui/clientConfigDialog.h +++ b/src/gui/clientConfigDialog.h @@ -15,6 +15,7 @@ #define CLIENTCONFIGDIALOG_H_ #include <QtGui> +#include "pvsinterface.h" #include "ui_clientConfigDialog.h" class QAbstractItemModel; @@ -39,6 +40,7 @@ private Q_SLOTS: void checkPermissions(); private: + OrgOpenslxPvsInterface *_ifaceDBus; QSettings _settings; QAbstractItemModel* _interfaceListModel; diff --git a/src/gui/clientFileSendDialog.cpp b/src/gui/clientFileSendDialog.cpp index 25e3eaa..93da725 100644 --- a/src/gui/clientFileSendDialog.cpp +++ b/src/gui/clientFileSendDialog.cpp @@ -32,8 +32,6 @@ ClientFileSendDialog::ClientFileSendDialog(QWidget *parent) : // connect to D-Bus and get interface QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject("/filesend", this); - dbus.registerService("org.openslx.pvsgui"); _ifaceDBus = new OrgOpenslxPvsInterface("org.openslx.pvs", "/", dbus, this); // get current users name from backend diff --git a/src/gui/clientVNCViewer.cpp b/src/gui/clientVNCViewer.cpp index d6a218b..d794b0b 100644 --- a/src/gui/clientVNCViewer.cpp +++ b/src/gui/clientVNCViewer.cpp @@ -22,8 +22,6 @@ ClientVNCViewer::ClientVNCViewer(QWidget *parent) : { // connect to D-Bus and get interface QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject("/vnc", this); - dbus.registerService("org.openslx.pvsgui"); _ifaceDBus = new OrgOpenslxPvsInterface("org.openslx.pvs", "/", dbus, this); connect(_ifaceDBus, SIGNAL(project(QString, int, QString, bool, bool, int)), this, SLOT(open(QString, int, QString, bool, bool, int))); diff --git a/src/gui/mainWindow.cpp b/src/gui/mainWindow.cpp index 1ed3ef2..0f2fd0e 100644 --- a/src/gui/mainWindow.cpp +++ b/src/gui/mainWindow.cpp @@ -10,7 +10,7 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # mainWindow.cpp - This is the Main class for the pvsManager. The GUI is contructed here. + This is the Main class for the pvsManager. The GUI is contructed here. # ----------------------------------------------------------------------------- */ @@ -41,122 +41,126 @@ using namespace std; #include <iostream> MainWindow::MainWindow(QWidget *parent) : - QMainWindow(parent), ui(new Ui::MainWindow) + QMainWindow(parent), ui(new Ui::MainWindow) { + ui->setupUi(this); - ui->setupUi(this); + if (!QFile::exists(_settings.fileName())) + { + QDir::root().mkpath(QFileInfo(_settings.fileName()).path()); + QFile::copy("/etc/openslx/pvsmgr.conf", _settings.fileName()); + } - ui->horizontalSlider->setValue(100); - ui->label_2->setText("100"); + ui->horizontalSlider->setValue(100); + ui->label_2->setText("100"); - ui->separator->setVisible(false); + ui->separator->setVisible(false); - myself = this; - conWin = new ConnectionWindow(ui->widget); - ui->VconWinLayout->addWidget(conWin); - conList = new ConnectionList(ui->ClWidget); - ui->ClientGLayout->addWidget(conList); + myself = this; + conWin = new ConnectionWindow(ui->widget); + ui->VconWinLayout->addWidget(conWin); + conList = new ConnectionList(ui->ClWidget); + ui->ClientGLayout->addWidget(conList); - bgimage = false; + bgimage = false; - _aboutDialog = new AboutDialog(this); + _aboutDialog = new AboutDialog(this); - PVSConnectionManager::getManager(); + PVSConnectionManager::getManager(); - //set the maximum width for list content - ui->ClWidget->setMaximumWidth(160); + //set the maximum width for list content + ui->ClWidget->setMaximumWidth(160); - ui->pvsLog->setReadOnly(true); - ui->pvsLog->hide(); + ui->pvsLog->setReadOnly(true); + ui->pvsLog->hide(); - onToggleLog(false); - // add ourself to the log listeners, so we can output them too - ConsoleLog addListener(this, &MainWindow::on_log_line); + onToggleLog(false); + // add ourself to the log listeners, so we can output them too + ConsoleLog addListener(this, &MainWindow::on_log_line); - _firstResize = 1; - _oldRatio = "100"; - _isThumbnailrate = false; - is_closeup = false; - is_fullscreen = false; - _isLockAll = false; - locked = false; + _firstResize = 1; + _oldRatio = "100"; + _isThumbnailrate = false; + is_closeup = false; + is_fullscreen = false; + _isLockAll = false; + locked = false; - /* - * _sessionName: The session name for this Connection - * _pwdCon: Password needed to connect to the session with the name _sessionName - */ - _pwdCon = PVSConnectionManager::getManager()->setNeedPassword(false); - _sessionName = PVSConnectionManager::getManager()->getSessionName(); + /* + * _sessionName: The session name for this Connection + * _pwdCon: Password needed to connect to the session with the name _sessionName + */ + _pwdCon = PVSConnectionManager::getManager()->setNeedPassword(false); + _sessionName = PVSConnectionManager::getManager()->getSessionName(); - ui->setPassword->setCheckState(Qt::Checked); + ui->setPassword->setCheckState(Qt::Checked); #ifdef MAINWINDOW_USE_TOUCHGUI //only used for the touchgui + // define the slots we want to use + connect(ui->comboBox_touch1, SIGNAL(currentIndexChanged(int)), this, SLOT(combobox1(int))); // Combobox 1 verknüpfen mit IndexChangend Signal + connect(ui->comboBox_touch1, SIGNAL(currentIndexChanged(int)), this, SLOT(setindexback())); - // define the slots we want to use - connect(ui->comboBox_touch1, SIGNAL(currentIndexChanged(int)), this, SLOT(combobox1(int))); // Combobox 1 verknüpfen mit IndexChangend Signal - connect(ui->comboBox_touch1, SIGNAL(currentIndexChanged(int)), this, SLOT(setindexback())); - - - connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(createProfile())); // profile button - connect(ui->pushButton_2, SIGNAL(clicked()), this, SLOT(clientlisthide())); // clienlist button - - // toolbar slots - connect(ui->actionresetall, SIGNAL(triggered()), this, SLOT(resetall())); - connect(ui->actionLocksingle, SIGNAL(triggered()), this, SLOT(locksingle())); - connect(ui->actionUnlocksingle, SIGNAL(triggered()), this, SLOT(unlocksingle())); - connect(ui->actionProjection, SIGNAL(triggered()), this, SLOT(projecttoolbar())); - connect(ui->actionUnprojection, SIGNAL(triggered()), this, SLOT(unprojecttoolbar())); - connect(ui->actionDozent, SIGNAL(triggered()), this, SLOT(setdozenttoolbar())); + connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(createProfile())); // profile button + connect(ui->pushButton_2, SIGNAL(clicked()), this, SLOT(clientlisthide())); // clienlist button - // Ui specific settings + // toolbar slots + connect(ui->actionresetall, SIGNAL(triggered()), this, SLOT(resetall())); + connect(ui->actionLocksingle, SIGNAL(triggered()), this, SLOT(locksingle())); + connect(ui->actionUnlocksingle, SIGNAL(triggered()), this, SLOT(unlocksingle())); + connect(ui->actionProjection, SIGNAL(triggered()), this, SLOT(projecttoolbar())); + connect(ui->actionUnprojection, SIGNAL(triggered()), this, SLOT(unprojecttoolbar())); + connect(ui->actionDozent, SIGNAL(triggered()), this, SLOT(setdozenttoolbar())); + connect(ui->actionShowProcesses, SIGNAL(triggered()), this, SLOT(showProcesses())); - ui->ClWidget->hide(); - ui->progressBar->hide(); - ui->pvsLog->hide(); + // Ui specific settings + ui->ClWidget->hide(); + ui->progressBar->hide(); + ui->pvsLog->hide(); #endif - - // toolbar and actions in pvsmgr - connect(ui->action_Exit, SIGNAL(triggered()), this, SLOT(close())); - ui->action_Exit->setStatusTip(tr("Exit")); - connect(ui->action_Disconnect, SIGNAL(triggered()), this, SLOT(disconnect())); - ui->action_Disconnect->setStatusTip(tr("Remove the vnc-Connection for the selected client(s)")); - ui->action_Disconnect->setVisible(false);//we need it only for debug - connect(ui->actionView, SIGNAL(triggered()), this, SLOT(closeUp())); - ui->actionView->setStatusTip(tr("Show the selected client in the whole window")); - connect(ui->actionFoto, SIGNAL(triggered()), this, SLOT(foto())); - connect(ui->actionLock, SIGNAL(triggered()), this, SLOT(lockalltoolbar())); - connect(ui->actionChat, SIGNAL(triggered()), this, SLOT(startChatDialog())); - ui->actionFoto->setStatusTip(tr("Make a screenshot for the selected client(s)")); - ui->actionLock->setStatusTip(tr("Lock or Unlock all Clients")); - connect(ui->actionCreate_profile, SIGNAL(triggered()), this, SLOT(createProfile())); - connect(ui->actionConfigure_Network, SIGNAL(triggered()), this, SLOT(configureNetwork())); - - 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())); - connect(ui->horizontalSlider, SIGNAL(valueChanged (int)), this, SLOT(changeRatio(int))); - connect(ui->setPassword, SIGNAL(stateChanged (int)), this, SLOT(setPasswordForConnection(int))); - connect(ui->vncQuality, SIGNAL(currentIndexChanged (int)), this, SLOT(setVNCQuality(int))); - connect(ui->thumbStatus, SIGNAL(currentIndexChanged(int)), this, SLOT(changeStatus(int))); - connect(ui->actionShow_Log, SIGNAL(toggled(bool)), this, SLOT(setLogConsoleDisabled(bool))); - connect(ui->actionShow_Network, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); - connect(ui->actionShow_Chat, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); - connect(ui->actionShow_Terminal, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); - connect(ui->actionShow_Normal, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); - connect(ui->actionShow_Error, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); - connect(ui->actionAbout_pvs, SIGNAL(triggered()), _aboutDialog, SLOT(open())); - - loadSettings(); //we load the appliocation settings - - setUnifiedTitleAndToolBarOnMac(true); - statusBar()->showMessage(tr("The pvs manager")); - this->showMaximized(); // show the Mainwindow maximized - - // listen on port 29481 for incoming file transfers + // toolbar and actions in pvsmgr + connect(ui->action_Exit, SIGNAL(triggered()), this, SLOT(close())); + ui->action_Exit->setStatusTip(tr("Exit")); + connect(ui->action_Disconnect, SIGNAL(triggered()), this, SLOT(disconnect())); + ui->action_Disconnect->setStatusTip(tr("Remove the vnc-Connection for the selected client(s)")); + ui->action_Disconnect->setVisible(false);//we need it only for debug + connect(ui->actionView, SIGNAL(triggered()), this, SLOT(closeUp())); + ui->actionView->setStatusTip(tr("Show the selected client in the whole window")); + connect(ui->actionFoto, SIGNAL(triggered()), this, SLOT(foto())); + connect(ui->actionLock, SIGNAL(triggered()), this, SLOT(lockalltoolbar())); + connect(ui->actionChat, SIGNAL(triggered()), this, SLOT(startChatDialog())); + ui->actionFoto->setStatusTip(tr("Make a screenshot for the selected client(s)")); + ui->actionLock->setStatusTip(tr("Lock or Unlock all Clients")); + connect(ui->actionCreate_profile, SIGNAL(triggered()), this, SLOT(createProfile())); + connect(ui->actionConfigure_Network, SIGNAL(triggered()), this, SLOT(configureNetwork())); + connect(ui->actionShowProcesses, SIGNAL(triggered()), this, SLOT(showProcesses())); + ui->actionShowProcesses->setStatusTip(tr("Show Processes of the selected Client")); + + 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())); + connect(ui->horizontalSlider, SIGNAL(valueChanged (int)), this, SLOT(changeRatio(int))); + connect(ui->setPassword, SIGNAL(stateChanged (int)), this, SLOT(setPasswordForConnection(int))); + connect(ui->vncQuality, SIGNAL(currentIndexChanged (int)), this, SLOT(setVNCQuality(int))); + connect(ui->thumbStatus, SIGNAL(currentIndexChanged(int)), this, SLOT(changeStatus(int))); + connect(ui->actionShow_Log, SIGNAL(toggled(bool)), this, SLOT(setLogConsoleDisabled(bool))); + connect(ui->actionShow_Network, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); + connect(ui->actionShow_Chat, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); + connect(ui->actionShow_Terminal, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); + connect(ui->actionShow_Normal, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); + connect(ui->actionShow_Error, SIGNAL(toggled(bool)), this, SLOT(onToggleLog(bool))); + connect(ui->actionAbout_pvs, SIGNAL(triggered()), _aboutDialog, SLOT(open())); + + loadSettings(); //we load the appliocation settings + + setUnifiedTitleAndToolBarOnMac(true); + statusBar()->showMessage(tr("The pvs manager")); + this->showMaximized(); // show the Mainwindow maximized + + // listen on port 29481 for incoming file transfers _serverSocket = new QTcpServer(); _serverSocket->listen(QHostAddress::Any, 29481); connect(_serverSocket, SIGNAL(newConnection()), this, SLOT(incomingFile())); @@ -164,7 +168,7 @@ MainWindow::MainWindow(QWidget *parent) : MainWindow::~MainWindow() { - delete ui; + delete ui; } /* @@ -183,38 +187,38 @@ void MainWindow::closeEvent(QCloseEvent *e) MainWindow* MainWindow::getWindow() // catches the window { - if (myself) - { - return myself; - } - else - { - return myself = new MainWindow; - } + if (myself) + { + return myself; + } + else + { + return myself = new MainWindow; + } } ConnectionWindow* MainWindow::getConnectionWindow() // catches the ConnectionWindow { - if (conWin) - { - return conWin; - } - else - { - conWin = new ConnectionWindow; - return conWin; - } + if (conWin) + { + return conWin; + } + else + { + conWin = new ConnectionWindow; + return conWin; + } } ConnectionList* MainWindow::getConnectionList() // catches the ConnectionList { - if (conList) - return conList; - else - { - conList = new ConnectionList; - return conList; - } + if (conList) + return conList; + else + { + conList = new ConnectionList; + return conList; + } } int MainWindow::getConnectionWindowWidth() // returns the width of the ConnectionWindow @@ -229,9 +233,9 @@ int MainWindow::getConnectionWindowHeight() // returns the height of the Coonect QStringList MainWindow::getProfilList() // loads the profile list { - QSettings settings("openslx", "pvsmgr"); - profilList = settings.childGroups(); - return profilList; + QSettings settings("openslx", "pvsmgr"); + profilList = settings.childGroups(); + return profilList; } #ifdef MAINWINDOW_USE_NORMALGUI @@ -257,70 +261,63 @@ void MainWindow::removeProfileInMenu(QString name) #endif void MainWindow::loadSettings() { - QSettings settings("openslx", "pvsmgr"); - QString current = settings.value("current", "default").toString(); - currentProfi = current; - _profilName = current; + QSettings settings("openslx", "pvsmgr"); + QString current = settings.value("current", "default").toString(); + currentProfi = current; + _profilName = current; - //When no profile is available, we define a default one whith 9 dummy screens - if (current.compare("default") == 0) - { - setWindowTitle("PVSmgr - Default"); - QPoint pos1 = settings.value("default/1", QPoint(0, 0)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("1", pos1); - QPoint pos2 = - settings.value("default/2", QPoint(194, 0)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("2", pos2); - QPoint pos3 = - settings.value("default/3", QPoint(388, 0)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("3", pos3); - QPoint pos4 = - settings.value("default/4", QPoint(582, 0)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("4", pos4); - QPoint pos5 = - settings.value("default/5", QPoint(0, 173)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("5", pos5); - QPoint pos6 = - settings.value("default/6", QPoint(194, 173)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("6", pos6); - QPoint pos7 = - settings.value("default/7", QPoint(388, 173)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("7", pos7); - QPoint pos8 = - settings.value("default/8", QPoint(582, 173)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("8", pos8); - QPoint pos9 = - settings.value("default/9", QPoint(293, 346)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings("9", pos9); - - QString title = "PVSmgr - "; + //When no profile is available, we define a default one whith 9 dummy screens + if (current.compare("default") == 0) + { + setWindowTitle("PVSmgr - Default"); + QPoint pos1 = settings.value("default/1", QPoint(0, 0)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("1", pos1); + QPoint pos2 = settings.value("default/2", QPoint(194, 0)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("2", pos2); + QPoint pos3 = settings.value("default/3", QPoint(388, 0)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("3", pos3); + QPoint pos4 = settings.value("default/4", QPoint(582, 0)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("4", pos4); + QPoint pos5 = settings.value("default/5", QPoint(0, 173)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("5", pos5); + QPoint pos6 = settings.value("default/6", QPoint(194, 173)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("6", pos6); + QPoint pos7 = settings.value("default/7", QPoint(388, 173)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("7", pos7); + QPoint pos8 = settings.value("default/8", QPoint(582, 173)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("8", pos8); + QPoint pos9 = settings.value("default/9", QPoint(293, 346)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings("9", pos9); + + QString title = "PVSmgr - "; title.append(_profilName); - title.append(" ["+_sessionName + " : "); - title.append(_pwdCon+"]"); + title.append(" [" + _sessionName + " : "); + title.append(_pwdCon + "]"); setWindowTitle(title); - } - else - { - QString title = "PVSmgr - "; + } + else + { + QString title = "PVSmgr - "; title.append(_profilName); - title.append(" ["+_sessionName + " : "); - title.append(_pwdCon+"]"); + title.append(" [" + _sessionName + " : "); + title.append(_pwdCon + "]"); setWindowTitle(title); - settings.beginGroup(current); - QStringList keys = settings.childKeys(); - for (int i=0; i<keys.size(); i++) - { - QString profil = current; - profil = profil.append("/").append(keys.at(i)); - QPoint pos = settings.value(keys.at(i)).toPoint(); - MainWindow::getConnectionWindow()->addFrameBySettings(keys.at(i), pos); - } - } + settings.beginGroup(current); + QStringList keys = settings.childKeys(); + for (int i = 0; i < keys.size(); i++) + { + QString profil = current; + profil = profil.append("/").append(keys.at(i)); + QPoint pos = settings.value(keys.at(i)).toPoint(); + MainWindow::getConnectionWindow()->addFrameBySettings(keys.at(i), + pos); + } + } - MainWindow::getConnectionWindow()->showFrameFromSettings(); + MainWindow::getConnectionWindow()->showFrameFromSettings(); #ifdef MAINWINDOW_USE_NORMALGUI - foreach (QString profile, getProfilList()) - addProfileInMenu(profile); + foreach (QString profile, getProfilList()) + addProfileInMenu(profile); #endif } @@ -332,17 +329,17 @@ void MainWindow::loadProfile(QAction* actiontriggered) void MainWindow::loadSettings(QString profilname) // loads the current profile { - QList<ConnectionFrame*> AllFrameOnWindow = - MainWindow::getConnectionWindow()->getAllFrameOnWindow(); + QList<ConnectionFrame*> AllFrameOnWindow = + MainWindow::getConnectionWindow()->getAllFrameOnWindow(); - if (AllFrameOnWindow.size() > 0) - { - _profilName = profilname; - MainWindow::getConnectionWindow()->ClientLocationList.clear(); - QSettings settings("openslx", "pvsmgr"); - settings.setValue("current", _profilName); - ConnectionFrame* cFrame; - foreach (cFrame, AllFrameOnWindow) + if (AllFrameOnWindow.size() > 0) + { + _profilName = profilname; + MainWindow::getConnectionWindow()->ClientLocationList.clear(); + QSettings settings("openslx", "pvsmgr"); + settings.setValue("current", _profilName); + ConnectionFrame* cFrame; + foreach (cFrame, AllFrameOnWindow) { if (cFrame->isDummy()) { @@ -351,90 +348,91 @@ void MainWindow::loadSettings(QString profilname) // loads the current profile cFrame->deleteLater(); } } - settings.beginGroup(_profilName); - QStringList keys = settings.childKeys(); - int rest = AllFrameOnWindow.size(); - int init = 1; - for (int i = 0; i < keys.size(); i++) - { - if (init <= rest) - { - ConnectionFrame* cF = AllFrameOnWindow.at(i); - QString profil = _profilName; - profil = profil.append("/").append(cF->getTaskbarTitle()); - if (!cF->isDummy()) - cF->move(settings.value(keys.at(i)).toPoint()); - else - cF->move(settings.value(profil, QPoint(10,(10+(5*i)))).toPoint()); - - init += 1; - } - else - { - MainWindow::getConnectionWindow()->addFrameBySettings( - keys.at(i), settings.value(keys.at(i)).toPoint()); - } - } - - MainWindow::getConnectionWindow()->showFrameFromSettings(); - - QString title = "PVSmgr - "; - title.append(_profilName); - title.append(" ["+_sessionName + " : "); - title.append(_pwdCon+"]"); - setWindowTitle(title); - } + settings.beginGroup(_profilName); + QStringList keys = settings.childKeys(); + int rest = AllFrameOnWindow.size(); + int init = 1; + for (int i = 0; i < keys.size(); i++) + { + if (init <= rest) + { + ConnectionFrame* cF = AllFrameOnWindow.at(i); + QString profil = _profilName; + profil = profil.append("/").append(cF->getTaskbarTitle()); + if (!cF->isDummy()) + cF->move(settings.value(keys.at(i)).toPoint()); + else + cF->move( + settings.value(profil, QPoint(10, (10 + (5 * i)))).toPoint()); + + init += 1; + } + else + { + MainWindow::getConnectionWindow()->addFrameBySettings( + keys.at(i), settings.value(keys.at(i)).toPoint()); + } + } + + MainWindow::getConnectionWindow()->showFrameFromSettings(); + + QString title = "PVSmgr - "; + title.append(_profilName); + title.append(" [" + _sessionName + " : "); + title.append(_pwdCon + "]"); + setWindowTitle(title); + } } void MainWindow::saveSettings(QString profilname) { - QList<ConnectionFrame*> AllFrameOnWindow = - MainWindow::getConnectionWindow()->getAllFrameOnWindow(); - QSettings settings("openslx", "pvsmgr"); - settings.setValue("current", profilname); - settings.setValue("size", QString("%1").arg(AllFrameOnWindow.size())); + QList<ConnectionFrame*> AllFrameOnWindow = + MainWindow::getConnectionWindow()->getAllFrameOnWindow(); + QSettings settings("openslx", "pvsmgr"); + settings.setValue("current", profilname); + settings.setValue("size", QString("%1").arg(AllFrameOnWindow.size())); - for (int i = 0; i < AllFrameOnWindow.size(); i++) - { - ConnectionFrame* current = AllFrameOnWindow.at(i); - QString profil = ""; - profil = settings.value("current").toString().append("/"); - if (!current->isDummy()) - profil.append(QString(current->getTaskbarTitle())); - else - profil.append(QString("%1").arg(i + 1)); - settings.setValue(profil, current->pos()); - } + for (int i = 0; i < AllFrameOnWindow.size(); i++) + { + ConnectionFrame* current = AllFrameOnWindow.at(i); + QString profil = ""; + profil = settings.value("current").toString().append("/"); + if (!current->isDummy()) + profil.append(QString(current->getTaskbarTitle())); + else + profil.append(QString("%1").arg(i + 1)); + settings.setValue(profil, current->pos()); + } #ifdef MAINWINDOW_USE_NORMALGUI -addProfileInMenu(profilname); + addProfileInMenu(profilname); #endif } void MainWindow::removeProfil(QString profilname) { - QSettings settings("openslx", "pvsmgr"); - settings.remove(profilname); + QSettings settings("openslx", "pvsmgr"); + settings.remove(profilname); #ifdef MAINWINDOW_USE_NORMALGUI -removeProfileInMenu(profilname); + removeProfileInMenu(profilname); #endif } void MainWindow::addConnection(PVSClient* newCon) { - conWin->addConnection(newCon); - if (!_chatListClients.contains(newCon->getUserName())) - { - _chatListClients.append(newCon->getUserName()); - sChatDialog.chat_client_add(newCon->getUserName()); - sChatDialog.chat_nicklist_update(); - } - // sChatDialog->chat_nicklist_update(newCon->getUserName()); + conWin->addConnection(newCon); + if (!_chatListClients.contains(newCon->getUserName())) + { + _chatListClients.append(newCon->getUserName()); + sChatDialog.chat_client_add(newCon->getUserName()); + sChatDialog.chat_nicklist_update(); + } + // sChatDialog->chat_nicklist_update(newCon->getUserName()); } void MainWindow::removeConnection(PVSClient* newCon) { - conWin->removeConnection(newCon); - if (_chatListClients.contains(newCon->getUserName())) + conWin->removeConnection(newCon); + if (_chatListClients.contains(newCon->getUserName())) { _chatListClients.removeOne(newCon->getUserName()); sChatDialog.chat_client_remove(newCon->getUserName()); @@ -445,87 +443,87 @@ void MainWindow::removeConnection(PVSClient* newCon) void MainWindow::onConnectionFailed(QString host) { #ifdef never - // code is voided because the info-management will be overhauled sometime + // code is voided because the info-management will be overhauled sometime - if (pwDiag) // assume this thing failed after the pw-question... so a wrong password, ey? + if (pwDiag) // assume this thing failed after the pw-question... so a wrong password, ey? - { - onPasswordFailed(host); - return; - } + { + onPasswordFailed(host); + return; + } - QString caption, secondary; - if (host != "") - { - caption = ("PVSConnection with hostname \""); - caption.append(host); - caption.append("\" failed."); - secondary = "PVSConnection attempt for this hostname failed.Maybe the host is not prepared to accept vnc connections. Please make sure hostname and (if needed) password are correct."; - } - else - { - caption = "No IP given"; - secondary = "PVSConnection attempt for this host failed. There was either no or an errorous Hostname given."; - } - QMessageBox::information(*this, caption, secondary); - /* Gtk::MessageDialog dialog(*this, Glib::ustring(caption)); - dialog.set_secondary_text(secondary); - dialog.run();*/ + QString caption, secondary; + if (host != "") + { + caption = ("PVSConnection with hostname \""); + caption.append(host); + caption.append("\" failed."); + secondary = "PVSConnection attempt for this hostname failed.Maybe the host is not prepared to accept vnc connections. Please make sure hostname and (if needed) password are correct."; + } + else + { + caption = "No IP given"; + secondary = "PVSConnection attempt for this host failed. There was either no or an errorous Hostname given."; + } + QMessageBox::information(*this, caption, secondary); + /* Gtk::MessageDialog dialog(*this, Glib::ustring(caption)); + dialog.set_secondary_text(secondary); + dialog.run();*/ #endif } void MainWindow::onConnectionTerminated(PVSClient* newConnection) { #ifdef never - // code is voided because the info-management will be overhauled sometime + // code is voided because the info-management will be overhauled sometime - QString host; - if (newConnection) - { - host = newConnection->getIp(); // copy hostname for message - } - else - host = "spooky unknown"; + QString host; + if (newConnection) + { + host = newConnection->getIp(); // copy hostname for message + } + else + host = "spooky unknown"; - // now inform - QString caption, secondary; + // now inform + QString caption, secondary; - caption = "Hostname \""; - caption.append(host); - caption.append("\" terminated connection."); - secondary = "The server has closed the connection to your client."; + caption = "Hostname \""; + caption.append(host); + caption.append("\" terminated connection."); + secondary = "The server has closed the connection to your client."; - QMessageBox::information(*this, caption, secondary); - /*Gtk::MessageDialog dialog(*this, Glib::ustring(caption)); - dialog.set_secondary_text(secondary); - dialog.run();*/ + QMessageBox::information(*this, caption, secondary); + /*Gtk::MessageDialog dialog(*this, Glib::ustring(caption)); + dialog.set_secondary_text(secondary); + dialog.run();*/ #endif } void MainWindow::onConnectionRemoved(PVSClient* newConnection) { - // TODO this would be the place to handle the rest of the fullscreen issue - conWin->onConnectionRemoved(newConnection); + // TODO this would be the place to handle the rest of the fullscreen issue + conWin->onConnectionRemoved(newConnection); } void MainWindow::onPasswordFailed(QString Qhost) { #ifdef never - // code is voided because the info-management will be overhauled sometime - QString caption, secondary; - if (Qhost != "") - { - caption = "Hostname \""; - caption.append(Qhost); - caption.append("\" refused password."); - secondary = "You have entered no or a wrong password."; - } - else - return; // unknown connection was terminated? too spooky - QMessageBox::information(*this, caption, secondary); - /* Gtk::MessageDialog dialog(*this, Glib::ustring(caption)); - dialog.set_secondary_text(secondary); - Gtk::Main::run(dialog);*/ + // code is voided because the info-management will be overhauled sometime + QString caption, secondary; + if (Qhost != "") + { + caption = "Hostname \""; + caption.append(Qhost); + caption.append("\" refused password."); + secondary = "You have entered no or a wrong password."; + } + else + return; // unknown connection was terminated? too spooky + QMessageBox::information(*this, caption, secondary); + /* Gtk::MessageDialog dialog(*this, Glib::ustring(caption)); + dialog.set_secondary_text(secondary); + Gtk::Main::run(dialog);*/ #endif } @@ -541,41 +539,41 @@ void MainWindow::receiveChatMsg(QString nick_from, QString nick_to, QString msg) int MainWindow::getPrevWidth() // PVSConnectionManager::getManager()->getPrevWidth() { - return prev_width; + return prev_width; } void MainWindow::setPrevWidth(int newWidth) { - if (newWidth > 100) - prev_width = newWidth; - else - prev_width = 100; + if (newWidth > 100) + prev_width = newWidth; + else + prev_width = 100; } int MainWindow::getPrevHeight() { - return prev_height; + return prev_height; } void MainWindow::setPrevHeight(int newHeight) { - if (newHeight > 100) - prev_height = newHeight; - else - prev_height = 100; + if (newHeight > 100) + prev_height = newHeight; + else + prev_height = 100; } void MainWindow::changeEvent(QEvent *e) { - QMainWindow::changeEvent(e); - switch (e->type()) - { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } + QMainWindow::changeEvent(e); + switch (e->type()) + { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } } /* @@ -589,107 +587,108 @@ void MainWindow::changeEvent(QEvent *e) void MainWindow::resizeEvent(QResizeEvent *event) { - if (bgimage == true){ - repaintbackgroundpicture(); // repaint the backgroundpicture scaled to the window size + if (bgimage == true) + { + repaintbackgroundpicture(); // repaint the backgroundpicture scaled to the window size } if (_firstResize == 3) { QSize oldSize = event->oldSize(); - _initW = ui->widget->width(); - _initH = ui->widget->height(); + _initW = ui->widget->width(); + _initH = ui->widget->height(); _firstResize++; } - std::list<QString>* selectedClients = - MainWindow::getConnectionList()->getSelectedClients(); - if (is_closeup && selectedClients->size() == 1) - { - PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - selectedClients->front().toStdString().c_str()); - pvsClient->getConnectionFrame()->paintCloseUp(ui->widget->width(), - ui->widget->height()); - } - else if (!is_closeup && _firstResize > 3) - { - int ratio_w = (ui->widget->width()*100)/_initW; - int ratio_h = (ui->widget->height()*100)/_initH; - foreach (ConnectionFrame* cf, getConnectionWindow()->getFrameList()) - { - /*int margin = ui->widget->style()->pixelMetric(QStyle::PM_DefaultTopLevelMargin); - int x = ui->widget->width() - margin; - int y = ui->widget->height() - margin; - updatePos(cf, x, y);*/ - int w = (cf->init_w * ratio_w) / 100; - int h = (cf->init_h * ratio_h) / 100; - cf->paintCloseUp(w,h); - } - } + std::list<QString>* selectedClients = + MainWindow::getConnectionList()->getSelectedClients(); + if (is_closeup && selectedClients->size() == 1) + { + PVSClient* pvsClient = + PVSConnectionManager::getManager()->getClientFromIp( + selectedClients->front().toStdString().c_str()); + pvsClient->getConnectionFrame()->paintCloseUp(ui->widget->width(), + ui->widget->height()); + } + else if (!is_closeup && _firstResize > 3) + { + int ratio_w = (ui->widget->width() * 100) / _initW; + int ratio_h = (ui->widget->height() * 100) / _initH; +foreach (ConnectionFrame* cf, getConnectionWindow()->getFrameList()) + { + /*int margin = ui->widget->style()->pixelMetric(QStyle::PM_DefaultTopLevelMargin); + int x = ui->widget->width() - margin; + int y = ui->widget->height() - margin; + updatePos(cf, x, y);*/ + int w = (cf->init_w * ratio_w) / 100; + int h = (cf->init_h * ratio_h) / 100; + cf->paintCloseUp(w,h); + } +} - if (_firstResize < 3) - _firstResize++; +if (_firstResize < 3) +_firstResize++; } void MainWindow::updatePos(ConnectionFrame* cf, int x, int y) { - int posx = (x*cf->pos().x())/_initW; - int posy = (y*cf->pos().y())/_initH; + int posx = (x * cf->pos().x()) / _initW; + int posy = (y * cf->pos().y()) / _initH; cf->move(posx, posy); /*QSize size = cf->sizeHint(); - cf->setGeometry(x - size.rwidth(), y - size.rheight(), - size.rwidth(), size.rheight());*/ + cf->setGeometry(x - size.rwidth(), y - size.rheight(), + size.rwidth(), size.rheight());*/ } void MainWindow::on_log_line(LogEntry consoleEntry) { - ConsoleLogger::LOG_LEVEL level = consoleEntry.getLevel(); - if (level == ConsoleLogger::LOG_ERROR && !showError) - return; - if (level == ConsoleLogger::LOG_NORMAL && !showNormal) - return; - if (level == ConsoleLogger::LOG_NETWORK && !showNetwork) - return; - if (level == ConsoleLogger::LOG_TERMINAL && !showTerminal) - return; - if (level == ConsoleLogger::LOG_CHAT && !showChat) - return; - - ui->pvsLog->insertPlainText(consoleEntry.getLine()); + ConsoleLogger::LOG_LEVEL level = consoleEntry.getLevel(); + if (level == ConsoleLogger::LOG_ERROR && !showError) + return; + if (level == ConsoleLogger::LOG_NORMAL && !showNormal) + return; + if (level == ConsoleLogger::LOG_NETWORK && !showNetwork) + return; + if (level == ConsoleLogger::LOG_TERMINAL && !showTerminal) + return; + if (level == ConsoleLogger::LOG_CHAT && !showChat) + return; + + ui->pvsLog->insertPlainText(consoleEntry.getLine()); } void MainWindow::onToggleLog(bool showtime) { - if (showtime) - ;//to kill the system warning due "unused variable" - showError = ui->actionShow_Error->isChecked(); - showTerminal = ui->actionShow_Terminal->isChecked(); - showNetwork = ui->actionShow_Network->isChecked(); - showChat = ui->actionShow_Chat->isChecked(); - showNormal = ui->actionShow_Normal->isChecked(); - //showAtAll = ui->logAtAllAction->get_active(); + if (showtime) + ;//to kill the system warning due "unused variable" + showError = ui->actionShow_Error->isChecked(); + showTerminal = ui->actionShow_Terminal->isChecked(); + showNetwork = ui->actionShow_Network->isChecked(); + showChat = ui->actionShow_Chat->isChecked(); + showNormal = ui->actionShow_Normal->isChecked(); + //showAtAll = ui->logAtAllAction->get_active(); - ConsoleLog dump2Listener(this, &MainWindow::on_log_line); + ConsoleLog dump2Listener(this, &MainWindow::on_log_line); } void MainWindow::setLogConsoleDisabled(bool visible) { - if (!visible) - ui->pvsLog->hide(); - else - ui->pvsLog->show(); + if (!visible) + ui->pvsLog->hide(); + else + ui->pvsLog->show(); } /*void MainWindow::close() -{ - //sChatDialog.close(); - QApplication::closeAllWindows(); -}*/ + { + //sChatDialog.close(); + QApplication::closeAllWindows(); + }*/ void MainWindow::disconnect() { - conWin->removeVNC(); + conWin->removeVNC(); } void MainWindow::lockUnlockAll() @@ -710,119 +709,153 @@ void MainWindow::lockUnlockAll() void MainWindow::closeUp() { - std::list<QString>* selectedClients = - MainWindow::getConnectionList()->getSelectedClients(); - if (!is_closeup) - { - if (selectedClients->size() == 1) - { - PVSClient - * pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - selectedClients->front().toStdString().c_str()); - _framePosOnCloseUp = pvsClient->getConnectionFrame()->pos();//get the actualy position before run closeup - if (pvsClient->getVNCConnection()) - { - conWin->setCloseupFrame(pvsClient->getConnectionFrame()); - _updatefreq = pvsClient->getConnectionFrame()->getFrame()->getVNCClientThread()->getUpdatefreq(); - pvsClient->getConnectionFrame()->getFrame()->getVNCClientThread()->setUpdatefreq(50); - pvsClient->getConnectionFrame()->move(5,5); - pvsClient->getConnectionFrame()->setWindowFlags(Qt::WindowStaysOnTopHint); + std::list<QString>* selectedClients = + MainWindow::getConnectionList()->getSelectedClients(); + if (!is_closeup) + { + if (selectedClients->size() == 1) + { + PVSClient * pvsClient = + PVSConnectionManager::getManager()->getClientFromIp( + selectedClients->front().toStdString().c_str()); + _framePosOnCloseUp = pvsClient->getConnectionFrame()->pos();//get the actualy position before run closeup + if (pvsClient->getVNCConnection()) + { + conWin->setCloseupFrame(pvsClient->getConnectionFrame()); + _updatefreq + = pvsClient->getConnectionFrame()->getFrame()->getVNCClientThread()->getUpdatefreq(); + pvsClient->getConnectionFrame()->getFrame()->getVNCClientThread()->setUpdatefreq( + 50); + pvsClient->getConnectionFrame()->move(5, 5); + pvsClient->getConnectionFrame()->setWindowFlags( + Qt::WindowStaysOnTopHint); pvsClient->getConnectionFrame()->raise(); - pvsClient->getConnectionFrame()->paintCloseUp(ui->widget->width(),ui->widget->height()); + pvsClient->getConnectionFrame()->paintCloseUp( + ui->widget->width(), ui->widget->height()); is_closeup = true; conWin->setCloseupFrame(pvsClient->getConnectionFrame()); } - } - else - { - QString - message = - QString( - tr( - "This operation can only be performed for one selected Client!")); - QMessageBox::information(this, "PVS", message); - } - } - else if (conWin->getCloseupFrame()) - { - /*PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - selectedClients->front().toStdString().c_str());*/ - conWin->getCloseupFrame()->setWindowFlags(Qt::Widget); - conWin->getCloseupFrame()->paintCloseUp(conWin->getCloseupFrame()->getPrevWidth(), conWin->getCloseupFrame()->getPrevHeight()); - conWin->getCloseupFrame()->move(_framePosOnCloseUp);//back to the position before the closeup - if (conWin->getCloseupFrame()->getConnection()->getVNCConnection()) - conWin->getCloseupFrame()->getFrame()->getVNCClientThread()->setUpdatefreq(_updatefreq); - - is_closeup = false; - conWin->setCloseupFrame(NULL); - } + } + else + { + QString + message = + QString( + tr( + "This operation can only be performed for one selected Client!")); + QMessageBox::information(this, "PVS", message); + } + } + else if (conWin->getCloseupFrame()) + { + /*PVSClient* pvsClient = + PVSConnectionManager::getManager()->getClientFromIp( + selectedClients->front().toStdString().c_str());*/ + conWin->getCloseupFrame()->setWindowFlags(Qt::Widget); + conWin->getCloseupFrame()->paintCloseUp( + conWin->getCloseupFrame()->getPrevWidth(), + conWin->getCloseupFrame()->getPrevHeight()); + conWin->getCloseupFrame()->move(_framePosOnCloseUp);//back to the position before the closeup + if (conWin->getCloseupFrame()->getConnection()->getVNCConnection()) + conWin->getCloseupFrame()->getFrame()->getVNCClientThread()->setUpdatefreq( + _updatefreq); + + is_closeup = false; + conWin->setCloseupFrame(NULL); + } +} + +/* Perform some action if actionShowProcesses button was pressed + * + */ +void MainWindow::showProcesses() +{ + std::list<QString>* selectedClients = + MainWindow::getConnectionList()->getSelectedClients(); + if (selectedClients->size() == 1) + { + // do stuff + PVSClient * pvsClient = + PVSConnectionManager::getManager()->getClientFromIp( + selectedClients->front().toStdString().c_str()); + pvsClient->sendMessage(PVSCOMMAND, "SHOWPROCESSES", ""); + } + else + { + QString + message = + QString( + tr( + "This operation can only be performed if you have selected a Client!")); + QMessageBox::information(this, "PVS", message); + } } void MainWindow::foto() // makes a screenshot of the selected client { - std::list<QString>* selectedClients = - MainWindow::getConnectionList()->getSelectedClients(); - if (selectedClients->size() > 0) - { - QString format = "png"; - for (std::list<QString>::iterator tmpIt = selectedClients->begin(); tmpIt - != selectedClients->end(); tmpIt++) - { - - QString path = QDir::homePath().append("/").append(*tmpIt).append( - ".png"); - PVSClient - * pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - (*tmpIt).toUtf8().data()); - if (pvsClient->getVNCConnection()) - { - const QImage img = pvsClient->getConnectionFrame()->getFrame()->getImageForFoto(); - if (!img.isNull()) - img.save(path, format.toAscii()); - } - else printf("Cannot save screen: Image is null.\n"); - } - } - else - { - QString - message = - QString( - tr( - "This operation can only be performed for at least one selected Client!")); - QMessageBox::information(this, "PVS", message); - } + std::list<QString>* selectedClients = + MainWindow::getConnectionList()->getSelectedClients(); + if (selectedClients->size() > 0) + { + QString format = "png"; + for (std::list<QString>::iterator tmpIt = selectedClients->begin(); tmpIt + != selectedClients->end(); tmpIt++) + { + + QString path = QDir::homePath().append("/").append(*tmpIt).append( + ".png"); + PVSClient * pvsClient = + PVSConnectionManager::getManager()->getClientFromIp( + (*tmpIt).toUtf8().data()); + if (pvsClient->getVNCConnection()) + { + const QImage + img = + pvsClient->getConnectionFrame()->getFrame()->getImageForFoto(); + if (!img.isNull()) + img.save(path, format.toAscii()); + } + else + qDebug("Cannot save screen: Image is null."); + } + } + else + { + QString + message = + QString( + tr( + "This operation can only be performed for at least one selected Client!")); + QMessageBox::information(this, "PVS", message); + } } void MainWindow::createProfile() { - profileDialog proDiag; - proDiag.exec(); + profileDialog proDiag; + proDiag.exec(); } void MainWindow::showusername() { - MainWindow::getConnectionList()->setColumnHidden(2, false); - MainWindow::getConnectionList()->setColumnHidden(0, true); - MainWindow::getConnectionList()->setColumnHidden(1, true); + MainWindow::getConnectionList()->setColumnHidden(2, false); + MainWindow::getConnectionList()->setColumnHidden(0, true); + MainWindow::getConnectionList()->setColumnHidden(1, true); } void MainWindow::showname() { - MainWindow::getConnectionList()->setColumnHidden(0, false); - MainWindow::getConnectionList()->setColumnHidden(1, true); - MainWindow::getConnectionList()->setColumnHidden(2, true); + MainWindow::getConnectionList()->setColumnHidden(0, false); + MainWindow::getConnectionList()->setColumnHidden(1, true); + MainWindow::getConnectionList()->setColumnHidden(2, true); } void MainWindow::showip() { - MainWindow::getConnectionList()->setColumnHidden(1, false); - MainWindow::getConnectionList()->setColumnHidden(2, true); - MainWindow::getConnectionList()->setColumnHidden(0, true); + MainWindow::getConnectionList()->setColumnHidden(1, false); + MainWindow::getConnectionList()->setColumnHidden(2, true); + MainWindow::getConnectionList()->setColumnHidden(0, true); } void MainWindow::incomingFile() @@ -841,15 +874,16 @@ void MainWindow::changeRatio(int ratio) // needed the change the size of the vnc str.append(QString("%1").arg(ratio)); ui->label_2->setText(str); - std::list<QString>* selClients = getConnectionList()->getSelectedClients(); + std::list<QString>* selClients = + getConnectionList()->getSelectedClients(); if (selClients->size() > 0) { for (std::list<QString>::iterator client = selClients->begin(); client != selClients->end(); client++) { PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - (*client).toUtf8().data()); + PVSConnectionManager::getManager()->getClientFromIp( + (*client).toUtf8().data()); ConnectionFrame *frame = pvsClient->getConnectionFrame(); int w = (frame->init_w * ratio) / 100; int h = (frame->init_h * ratio) / 100; @@ -864,46 +898,46 @@ void MainWindow::changeRatio(int ratio) // needed the change the size of the vnc QList<ConnectionFrame *> frameList = MainWindow::getConnectionWindow()->getFrameList(); ConnectionFrame *frame; - foreach(frame, frameList) - { - int w = (frame->init_w * ratio) / 100; - int h = (frame->init_h * ratio) / 100; - frame->setPrevWidth(w); - frame->setPrevHeight(h); - frame->paintCloseUp(w, h); - } +foreach (frame, frameList) + { + int w = (frame->init_w * ratio) / 100; + int h = (frame->init_h * ratio) / 100; + frame->setPrevWidth(w); + frame->setPrevHeight(h); + frame->paintCloseUp(w, h); } } - else +} +else +{ + int updatefreq = (ratio*500)/100; + QString str; + str.append(QString("%1").arg(updatefreq)); + ui->label_2->setText(str); + std::list<QString>* selClients = getConnectionList()->getSelectedClients(); + if (selClients->size() > 0) { - int updatefreq = (ratio*500)/100; - QString str; - str.append(QString("%1").arg(updatefreq)); - ui->label_2->setText(str); - std::list<QString>* selClients = getConnectionList()->getSelectedClients(); - if (selClients->size() > 0) + for (std::list<QString>::iterator client = selClients->begin(); client + != selClients->end(); client++) { - for (std::list<QString>::iterator client = selClients->begin(); client - != selClients->end(); client++) - { - PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - (*client).toUtf8().data()); - if (pvsClient->getVNCConnection()) - pvsClient->getConnectionFrame()->getFrame()->getVNCClientThread()->setUpdatefreq(updatefreq); - } + PVSClient* pvsClient = + PVSConnectionManager::getManager()->getClientFromIp( + (*client).toUtf8().data()); + if (pvsClient->getVNCConnection()) + pvsClient->getConnectionFrame()->getFrame()->getVNCClientThread()->setUpdatefreq(updatefreq); } - else + } + else + { + std::list<PVSClient*> clients = PVSConnectionManager::getManager()->getConnections(); + foreach (PVSClient* client, clients) { - std::list<PVSClient*> clients = PVSConnectionManager::getManager()->getConnections(); - foreach (PVSClient* client, clients) - { - if (client->getVNCConnection()) - client->getConnectionFrame()->getFrame()->getVNCClientThread()->setUpdatefreq(updatefreq); - } + if (client->getVNCConnection()) + client->getConnectionFrame()->getFrame()->getVNCClientThread()->setUpdatefreq(updatefreq); } - } + +} } /* @@ -917,18 +951,19 @@ void MainWindow::changeRatio(int ratio) // needed the change the size of the vnc */ void MainWindow::changeStatus(int index) { - QString status = ui->thumbStatus->currentText (); + QString status = ui->thumbStatus->currentText(); if (status == "Thumbnailratio") { _isThumbnailrate = false; ui->label_3->setText("%"); - std::list<QString>* selClients = getConnectionList()->getSelectedClients(); + std::list<QString>* selClients = + getConnectionList()->getSelectedClients(); if (selClients->size() == 1) { PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - selClients->front().toStdString().c_str()); + PVSConnectionManager::getManager()->getClientFromIp( + selClients->front().toStdString().c_str()); int ratio = pvsClient->getConnectionFrame()->getRatio(); ui->label_2->setText(QString::number(ratio)); ui->horizontalSlider->setValue(ratio); @@ -944,16 +979,19 @@ void MainWindow::changeStatus(int index) { _isThumbnailrate = true; ui->label_3->setText("ms"); - std::list<QString>* selClients = getConnectionList()->getSelectedClients(); + std::list<QString>* selClients = + getConnectionList()->getSelectedClients(); if (selClients->size() == 1) { PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - selClients->front().toStdString().c_str()); + PVSConnectionManager::getManager()->getClientFromIp( + selClients->front().toStdString().c_str()); if (pvsClient->getVNCConnection()) { - int updatefreq = pvsClient->getConnectionFrame()->getFrame()->getVNCClientThread()->getUpdatefreq(); - int showfreq = (updatefreq*100)/500; + int + updatefreq = + pvsClient->getConnectionFrame()->getFrame()->getVNCClientThread()->getUpdatefreq(); + int showfreq = (updatefreq * 100) / 500; ui->label_2->setText(QString::number(updatefreq)); ui->horizontalSlider->setValue(showfreq); } @@ -966,7 +1004,6 @@ void MainWindow::changeStatus(int index) } } - /* * Going to run a new vncthread with quality: quality */ @@ -976,47 +1013,48 @@ void MainWindow::setVNCQuality(int quality) if (selClients->size() > 0) { for (std::list<QString>::iterator client = selClients->begin(); client - != selClients->end(); client++) + != selClients->end(); client++) { PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - (*client).toUtf8().data()); + PVSConnectionManager::getManager()->getClientFromIp( + (*client).toUtf8().data()); pvsClient->getConnectionFrame()->resetConnectionWithQuality(quality); pvsClient->getConnectionFrame()->update(); } } else { - QList<ConnectionFrame*> FrameList = MainWindow::getConnectionWindow()->getFrameList(); - foreach(ConnectionFrame* frame, FrameList) - { - frame->resetConnectionWithQuality(quality); - frame->update(); - } + QList<ConnectionFrame*> FrameList = + MainWindow::getConnectionWindow()->getFrameList(); +foreach (ConnectionFrame* frame, FrameList) + { + frame->resetConnectionWithQuality(quality); + frame->update(); } - } +} void MainWindow::setPasswordForConnection(int enabled) { - if(enabled == 0)//the checkbox isn't checked, so no passowrd needed, we remove it in the titlebar + if (enabled == 0)//the checkbox isn't checked, so no passowrd needed, we remove it in the titlebar { - QString dummy = PVSConnectionManager::getManager()->setNeedPassword(false); - _sessionName = PVSConnectionManager::getManager()->getSessionName(); + QString dummy = PVSConnectionManager::getManager()->setNeedPassword( + false); + _sessionName = PVSConnectionManager::getManager()->getSessionName(); QString title = "PVSmgr - "; title.append(_profilName); - title.append(" ["+_sessionName + " : ]"); + title.append(" [" + _sessionName + " : ]"); setWindowTitle(title); } else if (enabled == 2) //password is needed, we show it in the titlebar { - _pwdCon = PVSConnectionManager::getManager()->setNeedPassword(true); + _pwdCon = PVSConnectionManager::getManager()->setNeedPassword(true); _sessionName = PVSConnectionManager::getManager()->getSessionName(); QString title = "PVSmgr - "; title.append(_profilName); - title.append(" ["+_sessionName + " : "); - title.append(_pwdCon+"]"); + title.append(" [" + _sessionName + " : "); + title.append(_pwdCon + "]"); setWindowTitle(title); } } @@ -1026,153 +1064,155 @@ void MainWindow::setPasswordForConnection(int enabled) void MainWindow::setindexback() //sets the index of the combobox back { #ifdef MAINWINDOW_USE_TOUCHGUI - ui->comboBox_touch1->setCurrentIndex(0); + ui->comboBox_touch1->setCurrentIndex(0); #endif } void MainWindow::clientlisthide() // hide or show the clientlist { - if (locked1 == false) - { - ui->ClWidget->show(); - locked1 = true; - } + if (locked1 == false) + { + ui->ClWidget->show(); + locked1 = true; + } - else - { - ui->ClWidget->hide(); - locked1 = false; - } + else + { + ui->ClWidget->hide(); + locked1 = false; + } } - void MainWindow::lockalltoolbar() // locks all if a dozent is set { + if (locked == false) + { + if (MainWindow::getConnectionWindow()->hasDozent) + { + MainWindow::getConnectionList()->on_lock_all(); + locked = true; + } + else + { + QString + message = + QString( + tr( + "You have to set a Superclient-machine before performing this action.")); + QMessageBox::information(this, "PVS", message); + } + } - if (locked == false) - { - if (MainWindow::getConnectionWindow()->hasDozent) - { - MainWindow::getConnectionList()->on_lock_all(); - locked = true; - } - else - { - QString message = QString(tr("You have to set a Superclient-machine before performing this action.")); - QMessageBox::information(this, "PVS", message); - } - } - - else - { - MainWindow::getConnectionList()->on_unlock_all(); - locked = false; - } + else + { + MainWindow::getConnectionList()->on_unlock_all(); + locked = false; + } } void MainWindow::locksingle() // locks a single client { - MainWindow::getConnectionList()->on_lock(); + MainWindow::getConnectionList()->on_lock(); } void MainWindow::unlocksingle() // unlocks a single client { - MainWindow::getConnectionList()->on_unlock(); + MainWindow::getConnectionList()->on_unlock(); } - void MainWindow::combobox1(int menuindex1) // defines the functions to call from the combobox { - switch (menuindex1) - // index comes from the slot definition - { - case 1: - // Lock all - MainWindow::getConnectionList()->on_lock_all(); - break; - - case 2: - // UnLock all - MainWindow::getConnectionList()->on_unlock_all(); - break; - - case 3: - // UnProject all - MainWindow::getConnectionList()->on_unproject_all(); - break; - - case 4: - //Background Picture - backgroundpicture(); - break; - } + switch (menuindex1) + // index comes from the slot definition + { + case 1: + // Lock all + MainWindow::getConnectionList()->on_lock_all(); + break; + + case 2: + // UnLock all + MainWindow::getConnectionList()->on_unlock_all(); + break; + + case 3: + // UnProject all + MainWindow::getConnectionList()->on_unproject_all(); + break; + + case 4: + //Background Picture + backgroundpicture(); + break; + } } void MainWindow::resetall() // unlock and unproject all in toolbar - { +{ MainWindow::getConnectionList()->on_unlock_all(); MainWindow::getConnectionList()->on_unproject_all(); - } - +} void MainWindow::projecttoolbar() // projection from toolbar button - { +{ MainWindow::getConnectionList()->on_projection(); - } +} void MainWindow::unprojecttoolbar() // unproject all in toolbar - { +{ MainWindow::getConnectionList()->on_unprojection(); - } +} void MainWindow::backgroundpicture() - { - +{ - fileName = QFileDialog::getOpenFileName(this, - tr("Open Image"), "/home", tr("Image Files (*.png *.jpg *.svg)")); // user chooses a file + fileName = QFileDialog::getOpenFileName(this, tr("Open Image"), "/home", + tr("Image Files (*.png *.jpg *.svg)")); // user chooses a file - QImage img(""+fileName+""); // set image + QImage img("" + fileName + ""); // set image QString test("/tmp/test.png"); // set path for saving the scaled picture - QImage img2 = img.scaled(ui->widget->size(),Qt::IgnoreAspectRatio,Qt::FastTransformation); // scale it + QImage img2 = img.scaled(ui->widget->size(), Qt::IgnoreAspectRatio, + Qt::FastTransformation); // scale it - img2.save(""+test+""); // save it + img2.save("" + test + ""); // save it - ui->widget->setStyleSheet("background-image: url(/tmp/test.png);background-repeat:no-repeat; background-position:center;"); //set the picture as background + ui->widget->setStyleSheet( + "background-image: url(/tmp/test.png);background-repeat:no-repeat; background-position:center;"); //set the picture as background foreach (ConnectionFrame* cf, MainWindow::getConnectionWindow()->getAllFrameOnWindow()) { cf->setStyleSheet(QString::fromUtf8("background-color: rgb(150, 150, 168);")); } - bgimage=true; // for the resize event, set background true + bgimage = true; // for the resize event, set background true - } +} void MainWindow::repaintbackgroundpicture() // same as backgroundpicture but called when mainwindow is resized - { +{ QImage img("/tmp/test.png"); QString test("/tmp/test.png"); - QImage img2 = img.scaled(ui->widget->size(),Qt::IgnoreAspectRatio,Qt::FastTransformation); - - img2.save(""+test+""); + QImage img2 = img.scaled(ui->widget->size(), Qt::IgnoreAspectRatio, + Qt::FastTransformation); - ui->widget->setStyleSheet("background-image: url(/tmp/test.png);background-repeat:no-repeat; background-position:center;"); + img2.save("" + test + ""); + ui->widget->setStyleSheet( + "background-image: url(/tmp/test.png);background-repeat:no-repeat; background-position:center;"); - } +} void MainWindow::setdozenttoolbar() // set the dozents pc which is not locked with lockedall { @@ -1184,8 +1224,8 @@ void MainWindow::setdozenttoolbar() // set the dozents pc which is not locked wi { PVSClient* pvsClient = - PVSConnectionManager::getManager()->getClientFromIp( - selectedClients->front().toStdString().c_str()); + PVSConnectionManager::getManager()->getClientFromIp( + selectedClients->front().toStdString().c_str()); if (pvsClient->getVNCConnection()) pvsClient->getConnectionFrame()->getFrame()->setDozent(); } @@ -1212,7 +1252,7 @@ void MainWindow::configureNetwork() } } -MainWindow* MainWindow::myself = NULL; -ConnectionList* MainWindow::conList = NULL; -ConnectionWindow* MainWindow::conWin = NULL; -bool MainWindow::_isLockAll = false; +MainWindow* MainWindow::myself = NULL; +ConnectionList* MainWindow::conList = NULL; +ConnectionWindow* MainWindow::conWin = NULL; +bool MainWindow::_isLockAll = false; diff --git a/src/gui/mainWindow.h b/src/gui/mainWindow.h index 41d9cfa..88756fd 100644 --- a/src/gui/mainWindow.h +++ b/src/gui/mainWindow.h @@ -159,6 +159,8 @@ private: QMenu* _profileMenuList; QMap<QString, QAction*> _mapProfileToAction; + QSettings _settings; + public slots: void loadProfile(QAction* actiontriggered); void setindexback(); @@ -176,6 +178,7 @@ public slots: void repaintbackgroundpicture(); void setdozenttoolbar(); void startChatDialog(); + void showProcesses(); private slots: void onToggleLog(bool showtime); diff --git a/src/gui/ui/clientToolbar.ui b/src/gui/ui/clientToolbar.ui index 5a59c5f..d70857a 100644 --- a/src/gui/ui/clientToolbar.ui +++ b/src/gui/ui/clientToolbar.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>577</width> + <width>328</width> <height>28</height> </rect> </property> @@ -144,46 +144,6 @@ p, li { white-space: pre-wrap; } </spacer> </item> <item> - <widget class="QCheckBox" name="vncCheckBox"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="toolTip"> - <string>Enable/Disable VNC only for this session</string> - </property> - <property name="text"> - <string>Allow VNC</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="label"> - <property name="text"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600; font-style:italic; color:#0055ff;">Pool Video Switch</span></p></body></html></string> - </property> - </widget> - </item> - <item> <widget class="QLabel" name="label_3"> <property name="maximumSize"> <size> diff --git a/src/gui/ui/mainwindow.ui b/src/gui/ui/mainwindow.ui index 7b8f2b4..7913e38 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>776</width> - <height>534</height> + <width>778</width> + <height>542</height> </rect> </property> <layout class="QGridLayout" name="gridLayout_2"> @@ -195,7 +195,7 @@ <x>0</x> <y>0</y> <width>838</width> - <height>28</height> + <height>23</height> </rect> </property> <widget class="QMenu" name="menu_File"> @@ -293,6 +293,7 @@ <addaction name="actionView"/> <addaction name="actionLock"/> <addaction name="actionChat"/> + <addaction name="actionShowProcesses"/> </widget> <action name="actionShow_Username"> <property name="checkable"> @@ -546,6 +547,18 @@ <string>Configure Network Parameters</string> </property> </action> + <action name="actionShowProcesses"> + <property name="icon"> + <iconset resource="../../../pvsmgr.qrc"> + <normaloff>:/icons/gears.png</normaloff>:/icons/gears.png</iconset> + </property> + <property name="text"> + <string>showProcesses</string> + </property> + <property name="toolTip"> + <string>Show Processes of the selected 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 cf7e411..24f40b6 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>1327</width> - <height>658</height> + <width>1329</width> + <height>660</height> </rect> </property> <layout class="QGridLayout" name="gridLayout_3"> @@ -367,6 +367,7 @@ <addaction name="actionDozent"/> <addaction name="separator"/> <addaction name="actionConfigure_Network"/> + <addaction name="actionShowProcesses"/> </widget> <action name="actionShow_Username"> <property name="checkable"> @@ -647,6 +648,18 @@ <string>Configure Network...</string> </property> </action> + <action name="actionShowProcesses"> + <property name="icon"> + <iconset resource="../../../pvsmgr.qrc"> + <normaloff>:/icons/gears.png</normaloff>:/icons/gears.png</iconset> + </property> + <property name="text"> + <string>showProcesses</string> + </property> + <property name="toolTip"> + <string>Show Processes of the selected Client</string> + </property> + </action> </widget> <layoutdefault spacing="6" margin="11"/> <resources> diff --git a/src/net/SslServer.cpp b/src/net/SslServer.cpp index e353e0a..9940a61 100644 --- a/src/net/SslServer.cpp +++ b/src/net/SslServer.cpp @@ -59,7 +59,7 @@ void SslServer::incomingConnection(int socketDescriptor) void SslServer :: sslErrors ( const QList<QSslError> & errors ) { - printf("FIXME: SSL ERRORS on SERVER: %s\n", errors.begin()->errorString().toUtf8().data()); + qDebug("FIXME: SSL ERRORS on SERVER: %s", qPrintable(errors.begin()->errorString())); } void SslServer::timerEvent (QTimerEvent* event) @@ -98,7 +98,7 @@ bool SslServer::hasPendingConnections() { for (QList<QSslSocket*>::iterator it = _pending.begin(); it != _pending.end(); it++) { - printf("State: %d - Encrypted: %d\n", (int)(*it)->state(), (*it)->isEncrypted()); + qDebug("State: %d - Encrypted: %d", (int)(*it)->state(), (*it)->isEncrypted()); if ((*it)->state() == QAbstractSocket::ConnectedState && (*it)->isEncrypted()) return true; } return false; diff --git a/src/net/pvsClientConnection.cpp b/src/net/pvsClientConnection.cpp index dff40d5..5354e95 100644 --- a/src/net/pvsClientConnection.cpp +++ b/src/net/pvsClientConnection.cpp @@ -134,7 +134,7 @@ bool PVSClientConnection::push_back_send(PVSMsg newMsg) char *tmp = data; if (!newMsg.getBinaryData(tmp, len)) { - printf("Message empty. Ignored.\n"); + qDebug("Message empty. Ignored."); return false; } QByteArray ba; diff --git a/src/net/pvsDiscoveredServer.cpp b/src/net/pvsDiscoveredServer.cpp index dddb5a0..efa1506 100644 --- a/src/net/pvsDiscoveredServer.cpp +++ b/src/net/pvsDiscoveredServer.cpp @@ -48,7 +48,7 @@ void PVSDiscoveredServer::ssl_Error( const QList<QSslError> & errors ) } //ConsoleLog writeNetwork(err.errorString().toUtf8().data()); //ConsoleLog writeNetwork("***** SSL ERROR, ABORTING *****"); - printf("Unhandled SSL Error in SD: %s\n", err.errorString().toUtf8().data()); + qDebug("Unhandled SSL Error in SD: %s", qPrintable(err.errorString())); return; } _socket->ignoreSslErrors(); @@ -70,30 +70,30 @@ void PVSDiscoveredServer::sock_connected() QByteArray cert = _socket->peerCertificate().digest(QCryptographicHash::Sha1); if (_socket->peerCertificate().isNull()) { - printf("**** WARNING - PEER CERTIFICATE IS NULL ****\n"); + qDebug("**** WARNING - PEER CERTIFICATE IS NULL ****"); } else { - printf("%s\n", _socket->peerCertificate().subjectInfo(QSslCertificate::Organization).toUtf8().data()); - printf("%s\n", _socket->peerCertificate().subjectInfo(QSslCertificate::CommonName).toUtf8().data()); - printf("%s\n", _socket->peerCertificate().subjectInfo(QSslCertificate::LocalityName).toUtf8().data()); - printf("%s\n", _socket->peerCertificate().subjectInfo(QSslCertificate::OrganizationalUnitName ).toUtf8().data()); - printf("%s\n", _socket->peerCertificate().subjectInfo(QSslCertificate::CountryName ).toUtf8().data()); - printf("%s\n", _socket->peerCertificate().subjectInfo(QSslCertificate::StateOrProvinceName ).toUtf8().data()); + qDebug("%s", qPrintable(_socket->peerCertificate().subjectInfo(QSslCertificate::Organization))); + qDebug("%s", qPrintable(_socket->peerCertificate().subjectInfo(QSslCertificate::CommonName))); + qDebug("%s", qPrintable(_socket->peerCertificate().subjectInfo(QSslCertificate::LocalityName))); + qDebug("%s", qPrintable(_socket->peerCertificate().subjectInfo(QSslCertificate::OrganizationalUnitName))); + qDebug("%s", qPrintable(_socket->peerCertificate().subjectInfo(QSslCertificate::CountryName))); + qDebug("%s", qPrintable(_socket->peerCertificate().subjectInfo(QSslCertificate::StateOrProvinceName))); } if (cert == _fingerprint && !_validated) { _validated = true; emit validated(this); - printf("Validated certificate of %s :)\n", _socket->peerAddress().toString().toUtf8().data()); + qDebug("Validated certificate of %s :)", qPrintable(_socket->peerAddress().toString())); } else { - printf("Certificate of %s is invalid :(\n", _socket->peerAddress().toString().toUtf8().data()); + qDebug("Certificate of %s is invalid :(", qPrintable(_socket->peerAddress().toString())); QByteArray is, should; is = cert.toBase64(); should = _fingerprint.toBase64(); - printf("Is %s and should be %s\n", is.data(), should.data()); + qDebug("Is %s and should be %s", is.data(), should.data()); } _socket->disconnectFromHost(); } diff --git a/src/net/pvsListenServer.cpp b/src/net/pvsListenServer.cpp index 1c1387b..90c2dfb 100644 --- a/src/net/pvsListenServer.cpp +++ b/src/net/pvsListenServer.cpp @@ -142,7 +142,7 @@ void PVSListenServer::timerEvent(QTimerEvent *event) } if (client->lastData() < refval) { // ping timeout - printf("Ping timeout for client %s\n", client->getNameUser().toLocal8Bit().data()); + qDebug("Ping timeout for client %s", qPrintable(client->getNameUser())); if (disconnectClient(client)) break; // list was modified, iterator not valid anymore } @@ -294,9 +294,8 @@ void PVSListenServer::server_connectionRequest() void PVSListenServer::handleClientMsg(unsigned int clientID, PVSMsg msg) { - printf("Got Message for client %ud: [%c][%s][%s]\n", clientID, - (char) msg.getType(), msg.getIdent().toUtf8().data(), - msg.getMessage().toUtf8().data()); + qDebug("Got Message for client %ud: [%c][%s][%s]", clientID, + (char) msg.getType(), qPrintable(msg.getIdent()), qPrintable(msg.getMessage())); msg.setSndID(clientID); if (msg.getType() == PVSCOMMAND) _commandDispatcher.fire(msg.getIdent(), msg); diff --git a/src/net/pvsListenServer.h b/src/net/pvsListenServer.h index 90d2a77..ca9977c 100644 --- a/src/net/pvsListenServer.h +++ b/src/net/pvsListenServer.h @@ -83,7 +83,7 @@ public: template<class T> void addLoginHandler(QString ident, T* who, void (T :: *func)(PVSMsg)) { - printf("Listener got added to LoginHandler\n"); + qDebug("Listener got added to LoginHandler"); _loginDispatcher.addListener(ident, who, func); }; template<class T> void removeLoginHandler(QString ident, T* who, void (T :: *func)(PVSMsg)) diff --git a/src/net/pvsLocalhostCommunicator.cpp b/src/net/pvsLocalhostCommunicator.cpp index 199b39c..20783bb 100644 --- a/src/net/pvsLocalhostCommunicator.cpp +++ b/src/net/pvsLocalhostCommunicator.cpp @@ -83,7 +83,7 @@ void PVSLocalhostCommunicator::sendCommand(QString ident, QString cmd) int len; sender.getBinaryData(data, len); QByteArray qba(data, len); - printf("Sending %d bytes to daemon...\n", qba.length()); + qDebug("Sending %d bytes to daemon...", qba.length()); qint64 result = _sock->writeDatagram(qba, localhost, localport); _sock->waitForBytesWritten(100); @@ -92,11 +92,11 @@ void PVSLocalhostCommunicator::sendCommand(QString ident, QString cmd) { if (result == -1) { - printf("Error sending PVSMsg to daemon: %s\n", _sock->errorString().toUtf8().data()); + qDebug("Error sending PVSMsg to daemon: %s", qPrintable(_sock->errorString())); } else { - printf("Sent PVSMsg was incomplete.\n"); + qDebug("Sent PVSMsg was incomplete."); } stop(); } diff --git a/src/net/pvsServerConnection.cpp b/src/net/pvsServerConnection.cpp index 04a1ef6..d187ce3 100644 --- a/src/net/pvsServerConnection.cpp +++ b/src/net/pvsServerConnection.cpp @@ -70,7 +70,7 @@ void PVSServerConnection::sslErrors ( const QList<QSslError> & errors ) for (QList<QSslError>::const_iterator it = errors.begin(); it != errors.end(); it++) { QSslError err = *it; - printf("Connect SSL: %s\n", err.errorString().toUtf8().data()); + qDebug("Connect SSL: %s", qPrintable(err.errorString())); if (err.error() == QSslError::HostNameMismatch) continue; // We don't pay attention to hostnames for validation if (err.error() == QSslError::SelfSignedCertificate) continue; // Also, this will always be the case; we check the fingerprint later ConsoleLog writeNetwork(err.errorString().toUtf8().data()); diff --git a/src/net/pvsServiceBroadcast.cpp b/src/net/pvsServiceBroadcast.cpp index cf15b5b..a861456 100644 --- a/src/net/pvsServiceBroadcast.cpp +++ b/src/net/pvsServiceBroadcast.cpp @@ -20,12 +20,22 @@ #include <cassert>
#include "src/util/serviceDiscoveryUtil.h"
+#include <QNetworkInterface>
+#include <QNetworkAddressEntry>
+
PVSServiceBroadcast::PVSServiceBroadcast()
{
_announce = NULL;
_timer = 0;
_broadcaster.bind(SD_PORT_CONSOLE);
- _everyone = QHostAddress(QHostAddress::Broadcast);
+
+ foreach (QNetworkInterface interface, QNetworkInterface::allInterfaces())
+ foreach (QNetworkAddressEntry entry, interface.addressEntries())
+ if (!entry.broadcast().isNull() && entry.broadcast().toString() != "127.255.255.255")
+ _everyone.append(entry.broadcast());
+
+ if (_everyone.isEmpty())
+ qDebug("ERROR: No broadcast address found");
}
PVSServiceBroadcast::~PVSServiceBroadcast()
@@ -47,5 +57,9 @@ void PVSServiceBroadcast::setFingerprint(QByteArray sha1) void PVSServiceBroadcast::timerEvent(QTimerEvent *event)
{
if (_announce == NULL) return;
- _broadcaster.writeDatagram(*_announce, _everyone, SD_PORT_CLIENT);
+ foreach (QHostAddress bcast, _everyone)
+ {
+ qDebug("DEBUG: Broadcasting to %s:%i", qPrintable(bcast.toString()),SD_PORT_CLIENT);
+ _broadcaster.writeDatagram(*_announce, bcast, SD_PORT_CLIENT);
+ }
}
diff --git a/src/net/pvsServiceBroadcast.h b/src/net/pvsServiceBroadcast.h index cf3f63d..a23370f 100644 --- a/src/net/pvsServiceBroadcast.h +++ b/src/net/pvsServiceBroadcast.h @@ -39,7 +39,7 @@ protected: private:
QByteArray *_announce;
QUdpSocket _broadcaster;
- QHostAddress _everyone;
+ QList<QHostAddress> _everyone;
int _timer;
};
diff --git a/src/net/pvsServiceDiscovery.cpp b/src/net/pvsServiceDiscovery.cpp index 0a99802..dd6b500 100644 --- a/src/net/pvsServiceDiscovery.cpp +++ b/src/net/pvsServiceDiscovery.cpp @@ -30,7 +30,7 @@ PVSServiceDiscovery::PVSServiceDiscovery(PVS* client) bool ret = _sock.bind(SD_PORT_CLIENT); if (!ret) { - printf("Could not open SERVICE DISCOVERY port\n"); + qDebug("Could not open SERVICE DISCOVERY port"); exit(1); } connect(&_sock, SIGNAL(readyRead()), this, SLOT(sock_dataArrival())); diff --git a/src/pvs.cpp b/src/pvs.cpp index 1c389df..cd9ed2d 100644..100755 --- a/src/pvs.cpp +++ b/src/pvs.cpp @@ -43,16 +43,17 @@ PVS::PVS() : _vncRequested = false; readPolicyFiles(); loadCommands(); - _blankScreen = NULL; + /*#ifndef __WIN32__*/ + _blankScreen = NULL; + /*#endif*/ _vncPort = -1; - QSettings settings; _masterMcastConfig = new McastConfiguration(this); - _masterMcastConfig->loadFrom(&settings); + _masterMcastConfig->loadFrom(&_settings, "multicast"); // add a notify to the allow file, so we get informed when the file is changed - QString watchPath("/home/"); - watchPath.append(getUserName().append(QString("/.pvs/.allow"))); + QString watchPath(getPolicyDir()); + watchPath.append(QString(".allow")); _notify = new QFileSystemWatcher(this); _notify->addPath(QString(watchPath.toUtf8().data())); @@ -62,8 +63,10 @@ PVS::PVS() : // connect to D-Bus new PvsAdaptor(this); QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject("/", this); - dbus.registerService("org.openslx.pvs"); + if (!dbus.registerObject("/", this)) + qDebug("[ERROR] DBus: Could not register object"); + if (!dbus.registerService("org.openslx.pvs")) + qDebug("[ERROR] DBus: Could not register service"); _sdClient = new PVSServiceDiscovery(this); @@ -75,6 +78,7 @@ PVS::PVS() : _timerLockTest = 0; _timerLockDelay = 0; + #ifndef __WIN32__ //add signalhandling for sigterm signals struct sigaction act; act.sa_handler = &PVS::signalHandler; @@ -86,7 +90,7 @@ PVS::PVS() : sigaction(SIGHUP, &act, 0); sigaction(SIGINT, &act, 0); sigaction(SIGQUIT, &act, 0); - + #endif /*__WIN32__*/ } PVS::~PVS() @@ -242,6 +246,19 @@ void PVS::onCommand(PVSMsg cmdMessage) loadMcastConfig(message); return; } + if (ident.compare("SHOWPROCESSES") == 0) + { + // do stuff to show processes + // to test if SHOWPROCESSES command is submitted correct uncomment following lines + // a messagebox will appear on the client + // emit showMessage("Show Processes", "", true); + return; + } + if (ident.compare("KILLPROCESS") == 0) + { + // do stuff to kill a process + return; + } #ifdef never // prototype @@ -383,24 +400,9 @@ bool PVS::allowExists() */ bool PVS::getVNCAllow() { - if (allowExists()) - { - if (getAllowed()) - { - _vncAllowed = true; - } - else - { - _vncAllowed = false; - } - } - else - { - ConsoleLog writeError("No .allow file found."); - _vncAllowed = false; - //make sure the vncsever is off - ConsoleLog writeError("Shutting down vnc-server because we have no .allow file."); - } + + QString value = getConfigValue("Permissions/vnc_lecturer"); + _vncAllowed = (value == "rw" || value == "ro"); if (_vncAllowed && _vncRequested) { @@ -515,12 +517,13 @@ void PVS::setScriptPath(QString path) bool PVS::gotVNCScript() { - if (fileExists(_vncScriptPath)) + if (!_vncScriptPath.isEmpty() && fileExists(_vncScriptPath)) return true; - if (policyFileExists(_vncScriptName)) + + if (!_vncScriptName.isEmpty() && policyFileExists(_vncScriptName)) return true; - return false; + return false; } /** * setup password and port @@ -566,14 +569,19 @@ int PVS::startVNCScript(int port, QString pass, QString rwpass) commandLine.append(rwpass); if (!system(NULL)) ConsoleLog writeError("No Command processor available"); - int result = system(commandLine.toUtf8().data()); + #ifndef __WIN32__ +//TODO Win32 result = WEXITSTATUS(result); if (result != 0) ConsoleLog writeError(QString("VNC-Server is not running, code: ") + int2String(result)); else ConsoleLog writeLine("VNC-Server should be running"); return result; + #else + /*Code fuer VNC-Aufruf unter Windows einfuegen*/ + return 0; + #endif /*__WIN32__*/ } else { @@ -589,6 +597,7 @@ int PVS::stopVNCScript() { if (gotVNCScript()) { + #ifndef __WIN32__ ConsoleLog writeLine("Stopping VNC-Script"); QString commandLine(_vncScriptPath); commandLine.append(" "); @@ -600,6 +609,10 @@ int PVS::stopVNCScript() ConsoleLog writeLine("VNC-Server should be stopped"); int result = system(commandLine.toUtf8().data()); return WEXITSTATUS(result); + #else + /*Code fuer VNC-Server stoppen unter Windows einfuegen*/ + return 0; + #endif /*__WIN32__*/ } else { @@ -607,9 +620,10 @@ int PVS::stopVNCScript() } } -void PVS::start() +bool PVS::start() { _pvsServerConnection->sendMessage(PVSMsg(PVSCOMMAND, "PROJECTING", "YES")); + return true; } void PVS::onConnected(QString name) @@ -676,6 +690,7 @@ QString PVS::getIpByNick(QString nick) void PVS::signalHandler(int signal) { ConsoleLog writeLine(QString("Received Signal ").append (int2String(signal))); + #ifndef __WIN32__ switch (signal) { case SIGHUP: mainClient->quit(); @@ -690,6 +705,9 @@ void PVS::signalHandler(int signal) mainClient->quit(); break; } + #else + ConsoleLog writeLine("Abfang nicht definiert fuer Windows"); + #endif /*__WIN32__*/ } @@ -740,14 +758,6 @@ void PVS::cancelIncomingMulticastTransfer(qulonglong transferID) } } -void PVS::setMulticastInterface(QString const& interfaceName) -{ - QSettings settings; - _masterMcastConfig->multicastInterface(interfaceName); - _masterMcastConfig->writeTo(&settings, "multicast"); - settings.sync(); -} - void PVS::onIncomingMulticastTransfer(QString const& sender, qulonglong transferID, QString const& basename, qulonglong size, ushort port) { @@ -870,3 +880,15 @@ void PVS::loadMcastConfig(QString const& message) ConsoleLog writeLine(QString("Reconfigured multicast filetransfer to IP %1, UDP port base %2, destination port %3, source port %4, MTU %5, Window Size %6, rate %7, %8using UDP") .arg(addr).arg(udpp).arg(dp).arg(sp).arg(mtu).arg(wsz).arg(rate).arg(useudp ? "" : "not ")); } + +void PVS::setConfigValue(QString key, QString value) +{ + _settings.setValue(key, value); + _settings.sync(); + getVNCAllow(); +} + +QString PVS::getConfigValue(QString key) +{ + return _settings.value(key).toString(); +} diff --git a/src/pvs.h b/src/pvs.h index 3b3365c..5c35a0e 100644..100755 --- a/src/pvs.h +++ b/src/pvs.h @@ -13,8 +13,10 @@ #define PVSCLIENT_H_ #include <QtCore> -#include <X11/Xlib.h> -#include <X11/cursorfont.h> +#ifndef __WIN32__ + #include <X11/Xlib.h> + #include <X11/cursorfont.h> +#endif #include <signal.h> #include "setup.h" @@ -25,7 +27,6 @@ #include "src/util/consoleLogger.h" #include "src/util/clientGUIUtils.h" - class PVSServiceDiscovery; class PVSDiscoveredServer; class McastConfiguration; @@ -71,7 +72,7 @@ public: void guiDelHost(QString host); public Q_SLOTS: - void start(); + bool start(); void quit(); void chat_send(QString nick_to, QString nick_from, QString msg); QString chat_getNickname(); @@ -87,8 +88,9 @@ public Q_SLOTS: bool createMulticastTransfer(QString const& objectPath, quint64& transferID, QString& errorReason); void cancelOutgoingMulticastTransfer(quint64 transferID); void cancelIncomingMulticastTransfer(qulonglong transferID); - void setMulticastInterface(QString const& interfaceName); - void loadMcastConfig(QString const& encoded); + + void setConfigValue(QString key, QString value); + QString getConfigValue(QString key); Q_SIGNALS: void project(QString host, int port, QString passwd, bool fullscreen, @@ -134,7 +136,9 @@ private: bool _locked; ///< are we locked? QString _lockMsg; ///< message to display while we're locked bool _vncAllowed; ///< whether vncConnections to this client are allowed (dup?) - BlankScreen *_blankScreen;///< obhject to blank the screen + /*#ifndef __WIN32__*/ + BlankScreen *_blankScreen;///< object to blank the screen + /*#endif*/ QFileSystemWatcher* _notify; ///< used to get notifies about file changes //vnc-server @@ -152,8 +156,6 @@ private: PVSServerConnection* _pvsServerConnection; ///< our tcp connection object to the pvsserver - QSettings _settings; - PVSServiceDiscovery *_sdClient; PVSChatClient *_chat; @@ -167,6 +169,7 @@ private: QHash<quint64, PVSOutgoingMulticastTransfer*> _outgoingTransfers; QHash<quint64, PVSIncomingMulticastTransfer*> _incomingTransfers; + void loadMcastConfig(QString const& encoded); void onIncomingMulticastTransfer(QString const& sender, qulonglong transferID, QString const& basename, qulonglong size, ushort port); static quint64 generateMcastTransferID(); @@ -175,5 +178,8 @@ private Q_SLOTS: void outgoingMulticastTransferDelete(qulonglong transferID); void incomingMulticastTransferDelete(qulonglong transferID); void onIncomingMulticastTransferRetry(QString const& sender, qulonglong transferID); + +private: + QSettings _settings; }; #endif /* PVSCLIENT_H_ */ diff --git a/src/pvsDaemon.cpp b/src/pvsDaemon.cpp index 591d43b..4918a60 100644 --- a/src/pvsDaemon.cpp +++ b/src/pvsDaemon.cpp @@ -3,21 +3,18 @@ #include <stdlib.h> #include "pvs.h" #include "src/net/pvsLocalhostCommunicator.h" -#include "src/util/pvsSettingsManager.h" #include "setup.h" #include "src/net/pvsMsg.h" #include "src/core/pvsChatClient.h" PVS *mainClient = NULL; - -// This define works as a switch whether to run as deamon or regular app -#define as_daemon +QTextStream qout(stdout); /// VERSION_STRING is defined in src/version.h void printVersion(bool doExit) { - - printf("Version:\t"VERSION_STRING"\n"); + qout << "Version:\t"VERSION_STRING"\n"; + qout.flush(); if (doExit) exit(0); } @@ -25,57 +22,48 @@ void printVersion(bool doExit) /// outputs the full help text void printHelp() { - printf("**************************************************************\n"); - printf("\nPool Video Switch Client\n"); - printf("**************************************************************\n"); - printVersion(false); - printf("**************************************************************\n"); - printf("Usage:\tpoolVSClient <<option> <value>, ... >\n\n"); - printf("Options:\n\n"); - printf("-vncScriptFile <fullpath\\filename>\n\tSpecifies a custom location for the vnc-start/stop-script.\n\tIf not specified, ~/.pvs/pvs-vncsrv is expected.\n\n"); - printf("-freq <seconds>\n\tSpecifies how long to wait until a reconnection attempt is made.\n\tDefault is 5.\n\n"); - printf("-port <port>\n\tSpecifies on which port to run.\n\tDefault is %d.\n\n", SERVER_PORT_INT); - printf("-h or --help\n\t Shows this help text and exits.\n\n"); - printf("-v or --version\n\t Shows the current version and exits.\n"); - printf( - "-c <string command>:<string value> \n\t Sends the command and the optional value to a running PVS-Client.\n\t Command and value may not contain spaces or colons.\n\t The dividing colon is mandatory.\n"); - printf("-commands: \n\tPrints out available commands to use with -c . \n "); - printf("**************************************************************\n"); + qout << "**************************************************************\n"; + qout << "Pool Video Switch Client\n"; + qout << "**************************************************************\n"; + qout << QObject::tr("Version: ") << VERSION_STRING << "\n"; + qout << "**************************************************************\n"; + qout << QObject::tr("Usage:") << "\tpoolVSClient " << QObject::tr("<<option> <value>, ... >") << "\n\n"; + qout << QObject::tr("Options:") << "\n\n"; + qout << QObject::tr("-vncScriptFile <fullpath\\filename>") << "\n\t" << QObject::tr("Specifies a custom location for the vnc-start/stop-script.")<< "\n\t" << QObject::tr("If not specified, /usr/bin/pvs-vncsrv is expected.") << "\n\n"; + qout << QObject::tr("-freq <seconds>") << "\n\t" << QObject::tr("Specifies how long to wait until a reconnection attempt is made.") << "\n\t" << QObject::tr("Default is 5.") << "\n\n"; + qout << QObject::tr("-port <port>") << "\n\t" << QObject::tr("Specifies on which port to run.") << "\n\t" << QObject::tr("Default is ") << SERVER_PORT_INT << ".\n\n"; + qout << QObject::tr("-h or --help") << "\n\t" << QObject::tr("Shows this help text and exits.") << "\n\n"; + qout << QObject::tr("-v or --version") << "\n\t" << QObject::tr("Shows the current version and exits.") << "\n"; + qout << QObject::tr("-d or --daemon") << "\n\t" << QObject::tr("Start as daemon.") << "\n"; + qout << QObject::tr("-c <string command>:<string value>") << "\n\t" << QObject::tr("Sends the command and the optional value to a running PVS-Client.") << "\n\t" << QObject::tr("Command and value may not contain spaces or colons.") << "\n\t" << QObject::tr("The dividing colon is mandatory.") << "\n"; + qout << "--commands: \n\t" << QObject::tr("Prints out available commands to use with -c.") << "\n"; + qout << "**************************************************************\n"; + qout.flush(); exit(0); } /// outputs a brief help text void printNotice() { - printf( - "Use -h or --help to get a listing of all options.\n-v or --version gives you the current version.\n\n"); + qout << QObject::tr("Use -h or --help to get a listing of all options.\n-v or --version gives you the current version.\n\n"); + qout.flush(); } void printCommands() { - printf("**************************************************************\n"); - printf("chat:<on/ off/ 1/ 2/ 3>\n "); - printf("on = turns that chat option on\n off = turns the chat option off\n 1 = bossmode\n 2 = community\n 3 = private\n"); - printf("stop \n\t Stops the running PVS-Client.\n"); - printf("**************************************************************\n"); + qout << "**************************************************************\n"; + qout << "stop \n\t Stops the running PVS-Client.\n"; + qout << "**************************************************************\n"; + qout.flush(); exit(0); } /// int main(int argc, char** argv) { + bool _daemon = false; int frequency = 5; int port = -1; -#ifdef as_daemon - bool no_fork = false; -#endif - - 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"); @@ -86,17 +74,37 @@ int main(int argc, char** argv) translator.load(":pvs"); app.installTranslator(&translator); + QFileInfo script; +#ifdef __WIN32__ + //TODO Win32 + if (!script.exists()) + script.setFile(getHomeDir() + "/.pvs/pvs-vncsrv_win32.bat"); +#else + QSettings settings; + if (!QFile::exists(settings.fileName())) + { + QDir::root().mkpath(QFileInfo(settings.fileName()).path()); + QFile::copy("/etc/openslx/pvs.conf", settings.fileName()); + } + QString s = settings.value("VNC/script").toString(); + script.setFile(s); + if (!script.exists()) + script.setFile("/usr/bin/pvs-vncsrv"); + if (!script.exists()) + script.setFile("/usr/local/bin/pvs-vncsrv"); + if (!script.exists()) + script.setFile(getHomeDir() + "/.pvs/pvs-vncsrv"); +#endif //__WIN32__ PVSLocalhostCommunicator com(getPolicyFilePath(QString( ".comfile"))); com.run(); if (!(com.running())) { - printf("Error. UDS Communicator is not running. Exiting.\n"); + qDebug("Error. UDS Communicator is not running. Exiting."); exit(0); } - printf("UDS Communicator is running.\n"); int option_index = 0; while (1) @@ -106,18 +114,16 @@ int main(int argc, char** argv) { "help", no_argument, 0, 'h' }, { "commands", no_argument, 0, 'o' }, { "version", no_argument, 0, 'v' }, + { "daemon", no_argument, 0, 'd' }, { "port", required_argument, 0, 'p' }, { "freq", required_argument, 0, 'f' }, { "client", required_argument, 0, 'e' }, { "script", required_argument, 0, 's' }, -#ifdef as_daemon - { "no-fork", no_argument, 0, 'F' }, -#endif { 0, 0, 0, 0 }, }; /* getopt_long stores the option index here. */ - int c = getopt_long(argc, argv, "hvoFc:f:e:s:p:", long_options, + int c = getopt_long(argc, argv, "hvodc:f:e:s:p:", long_options, &option_index); option_index++; if (c == -1) @@ -134,6 +140,9 @@ int main(int argc, char** argv) case 'v': printVersion(true); break; + case 'd': + _daemon = true; + break; case 'c': { if (option_index + 1 < argc) @@ -141,78 +150,22 @@ int main(int argc, char** argv) if (com.server()) { // wont work, no daemon running - printf("Error. No running PVS-Client found. Exiting.\n"); + qDebug("No running PVS-Client found. Exiting."); com.stop(); } else { - QStringList line = QString::fromLocal8Bit(argv[option_index - + 1]).split(":"); - QString &ident = line[0]; - QString message; - if (line.size() > 1) - message = line[1]; - if (ident.size() > 0) // no use sending empty idents... not even sure if this COULD happen - { - bool flag = false; - if (ident == "make") - PVSSettingsManager::getManager()->setConfigs(); - else if (ident == "chat" && message == "boss") - { - PVSSettingsManager::getManager()->reWriteConfigs("chatmode", "bossmode"); - flag = true; - - } - else if (ident == "chat" && message == "all") - { - PVSSettingsManager::getManager()->reWriteConfigs("chatmode", "community"); - flag = true; - } - else if (ident == "chat" && message == "private") - { - PVSSettingsManager::getManager()->reWriteConfigs("chatmode", "private"); - flag = true; - } - else if (ident == "chat" && message == "on") - { - PVSSettingsManager::getManager()->reWriteConfigs("chatstate", "on"); - flag = true; - } - else if (ident == "chat" && message == "off") - { - PVSSettingsManager::getManager()->reWriteConfigs("chatstate", "off"); - flag = true; - } - else if (ident == "room") - { - //PVSSettingsManager::getManager()->reWriteConfigs(ident, message); - flag = true; - } - else if (ident == "stop" && message == NULL) - flag = true; - else - printf("option %s doesn't exist\n", ident.toUtf8().data()); - - if (flag) - { - qDebug("Will send i: %s, m: %s\n", ident.toUtf8().data(), message.toUtf8().data()); - com.sendCommand(ident, message); - QCoreApplication::processEvents(QEventLoop::AllEvents); - printf("Sent command. Exiting.\n"); - } - } - - else - printf("Something went horribly wrong, since the ident is empty.\n"); - - } + qDebug("Will send i: %s, m: %s\n", argv[option_index + 1], ""); + com.sendCommand(QString(argv[option_index + 1]), ""); + QCoreApplication::processEvents(QEventLoop::AllEvents); + qDebug("Sent command. Exiting."); + } } else { - printf("Error. No command issued. Exiting.\n"); + qDebug("Error. No command issued. Exiting."); } exit(0); // and gone - break; } case 'f': { @@ -257,7 +210,7 @@ int main(int argc, char** argv) { if (option_index + 1 < argc) { - printf("WARNING: -e is deprecated\n"); + qDebug("WARNING: -e is deprecated"); option_index++; continue; } @@ -273,13 +226,6 @@ int main(int argc, char** argv) } break; } -#ifdef as_daemon - case 'F': - { - no_fork = true; - break; - } -#endif case '?': { ConsoleLog writeError( @@ -296,7 +242,7 @@ int main(int argc, char** argv) if (!com.server()) { - printf("Error. PoolVSClient already running. Exiting\n"); + qDebug("Error. PoolVSClient already running. Exiting"); com.stop(); exit(0); } @@ -304,66 +250,14 @@ int main(int argc, char** argv) ConsoleLog setLogName(QString("log.client")); ConsoleLog writeLine(QString("PVS-Client started.")); -#ifdef as_daemon - - if (!no_fork) + if (_daemon) { - /* Our process ID and Session ID */ - pid_t pid, sid; - - /* Fork off the parent process */ - pid = fork(); - if (pid < 0) - { - exit(-1); - } - /* If we got a good PID, then - we can exit the parent process. */ - if (pid > 0) - { - exit(0); - } - - /* Change the file mode mask */ - umask(0); - - /* Open any logs here */ - - /* Create a new SID for the child process */ - sid = setsid(); - if (sid < 0) - { - /* Log the failure */ - exit(-1); - } - - /* Change the current working directory */ - if ((chdir("/")) < 0) - { - /* Log the failure */ - exit(-1); - } - - /* Close out the standard file descriptors */ - close(STDIN_FILENO); - freopen ((QString("/home/").append(getUserName().append(QString("/.pvs/dump")))).toUtf8().data(),"w",stdout); - //close(STDOUT_FILENO); - close(STDERR_FILENO); - - /* Daemon-specific initialization goes here */ - - /* The Big Loop */ + #ifndef __WIN32__ + daemon(1, 1); + #endif /*__WIN32__*/ } - else - { - /* just the umask(), please */ - umask(0); - } - -#endif mainClient = new PVS(); - PVSSettingsManager::getManager()->setConfigFile(getPolicyFilePath("clientconf")); com.getDispatcher()->addListener("*", mainClient, &PVS::onDaemonCommand); if (port <= 0) @@ -374,11 +268,6 @@ int main(int argc, char** argv) createPolicyDir(); createPolicyFiles(); - // long int gr = 0; - mainClient->setScriptPath(script.filePath()); - app.exec(); - delete mainClient; - - return 0; + return app.exec(); } diff --git a/src/pvsgui.cpp b/src/pvsgui.cpp index 40112b4..eb1383b 100644 --- a/src/pvsgui.cpp +++ b/src/pvsgui.cpp @@ -17,13 +17,25 @@ # ----------------------------------------------------------------------------- */ +#include <getopt.h> #include "pvsgui.h" +#include "version.h" PVSGUI::PVSGUI(QWidget *parent) : QWidget(parent) { setupUi(this); + if (!QFile::exists(_settings.fileName())) + { + QDir::root().mkpath(QFileInfo(_settings.fileName()).path()); + QFile::copy("/etc/openslx/pvsgui.conf", _settings.fileName()); + } + + // stop running pvs + qDebug("[%s] Stopping pvs daemon.", metaObject()->className()); + QProcess::execute("pvs -c stop"); + _menu = new QMenu(this); _hostMenu = new QMenu(tr("Connect"), this); _hosts = new QHash<QString, QAction*> (); @@ -38,62 +50,52 @@ PVSGUI::PVSGUI(QWidget *parent) : setupMenu(); - if (QSystemTrayIcon::isSystemTrayAvailable()) - { - qDebug("[%s] System tray available.", metaObject()->className()); - _trayIcon = new QSystemTrayIcon(QIcon(":cam_off32.svg"), this); - _trayIcon->setContextMenu(_menu); - _trayIcon->setVisible(true); - _chatDialog->setTrayIcon(_trayIcon); - } - else - _trayIcon = NULL; + _trayIcon = new QSystemTrayIcon(QIcon(":cam_off32.svg"), this); + _trayIcon->setContextMenu(_menu); + _trayIcon->setVisible(true); + _chatDialog->setTrayIcon(_trayIcon); // connect to D-Bus and get interface QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject("/", this); - dbus.registerService("org.openslx.pvsgui"); _ifaceDBus = new OrgOpenslxPvsInterface("org.openslx.pvs", "/", dbus, this); - _ifaceDBus->start(); // start pvs if not running + if (dbus.isConnected()) + qDebug("[%s] Connection to DBus successful.", metaObject()->className()); + else + qDebug("[%s] ERROR: Could not connect to DBus!", metaObject()->className()); - // get available hosts - QDBusPendingReply<QStringList> reply0 = _ifaceDBus->getAvailableHosts(); + // start pvs daemon + qDebug("[%s] Starting pvs daemon.", metaObject()->className()); + QDBusPendingReply<bool> reply0 = _ifaceDBus->start(); reply0.waitForFinished(); - QStringList hosts = reply0.value(); - if (reply0.isValid() && !hosts.isEmpty()) + if (reply0.isValid() && reply0.value()) + qDebug("[%s] Connection to PVS daemon successful.", metaObject()->className()); + else + qDebug("[%s] ERROR: Could not connect to PVS daemon!", metaObject()->className()); + + // get available hosts + QDBusPendingReply<QStringList> reply1 = _ifaceDBus->getAvailableHosts(); + reply1.waitForFinished(); + QStringList hosts = reply1.value(); + if (reply1.isValid() && !hosts.isEmpty()) foreach (QString host, hosts) addHost(host); // already connected? - QDBusPendingReply<QString> reply1 = _ifaceDBus->isConnected(); - reply1.waitForFinished(); - QString host = reply1.value(); - if (reply1.isValid() && host != "") + QDBusPendingReply<QString> reply2 = _ifaceDBus->isConnected(); + reply2.waitForFinished(); + QString host = reply2.value(); + if (reply2.isValid() && host != "") connected(host); else disconnected(); - if (dbus.isConnected()) - qDebug("[%s] Connection to DBus successful!", metaObject()->className()); - - // TODO: perhaps this can go if fadi does his work - // check if vnc is allowed and setup checkbox - QFile file(QDir::toNativeSeparators(QDir::homePath() + "/.pvs/.allow")); - if (file.open(QIODevice::ReadOnly | QIODevice::Text)) - { - QTextStream in(&file); - QString line = in.readLine(); - if (line == "1") - vncCheckBox->setChecked(true); - file.close(); - } - // listen on port 29481 for incoming file transfers _serverSocket = new QTcpServer(); _serverSocket->listen(QHostAddress::Any, 29481); connect(_serverSocket, SIGNAL(newConnection()), this, SLOT(receiveFile())); // signals & slots - menu + connect(_showAction, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool))); connect(_disconnectAction, SIGNAL(triggered()), this, SLOT(pvsDisconnect())); connect(_startChatAction, SIGNAL(triggered()), _chatDialog, SLOT(open())); connect(_sendFileAction, SIGNAL(triggered()), this, SLOT(sendFile())); @@ -108,8 +110,6 @@ PVSGUI::PVSGUI(QWidget *parent) : connect(_hostMenu, SIGNAL(aboutToHide()), this, SLOT(hide())); connect(_hostMenu, SIGNAL(triggered(QAction*)), this, SLOT(pvsConnect(QAction*))); - connect(vncCheckBox, SIGNAL(stateChanged(int)), this, - SLOT(setVncAllow(int))); // signals & slots - dbus connect(_ifaceDBus, SIGNAL(showMessage(QString, QString, bool)), this, @@ -122,11 +122,8 @@ PVSGUI::PVSGUI(QWidget *parent) : connect(_ifaceDBus, SIGNAL(incomingMulticastTransferNew(qulonglong, QString, QString, qulonglong)), SLOT(incomingMulticastFile(qulonglong, QString, QString, qulonglong))); // show toolbar - setWindowFlags(Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint); + setWindowFlags(Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint); setAttribute(Qt::WA_AlwaysShowToolTips); - updateConfig(); - setVisible(true); - hide(); } PVSGUI::~PVSGUI() @@ -140,12 +137,52 @@ PVSGUI::~PVSGUI() void PVSGUI::updateConfig() { if (_settings.value("Display/location").isNull()) - setLocation(POSITION_TOP_CENTER); + setPosition(POSITION_TOP_CENTER); else - setLocation(_settings.value("Display/location").toInt()); + setPosition(_settings.value("Display/location").toInt()); +} - if (!_settings.value("Multicast/interface").isNull()) - _ifaceDBus->setMulticastInterface(_settings.value("Multicast/interface").toString()); + +void PVSGUI::setVisible(bool visible) +{ + QWidget::setVisible(visible); + _showAction->setChecked(isVisible()); +} + +void PVSGUI::setPosition(int position) +{ + _position = position; + switch (_position) + { + case POSITION_TOP_LEFT: + move(0, 0); + break; + case POSITION_TOP_CENTER: + move((QApplication::desktop()->width() - width()) / 2, 0); + break; + case POSITION_TOP_RIGHT: + move(QApplication::desktop()->width() - width(), 0); + break; + case POSITION_BOTTOM_LEFT: + move(0, QApplication::desktop()->height() - height()); + break; + case POSITION_BOTTOM_CENTER: + move((QApplication::desktop()->width() - width()) / 2, + QApplication::desktop()->height() - height()); + break; + case POSITION_BOTTOM_RIGHT: + move(QApplication::desktop()->width() - width(), + QApplication::desktop()->height() - height()); + break; + default: + updateConfig(); + } +} + +void PVSGUI::hide() +{ + if (!_menu->isVisible() && !_hostMenu->isVisible()) + hide(true); } //////////////////////////////////////////////////////////////////////////////// @@ -190,6 +227,8 @@ void PVSGUI::mouseMoveEvent(QMouseEvent *event) void PVSGUI::setupMenu() { // setup actions + _showAction = new QAction(tr("Show &toolbar"), this); + _showAction->setCheckable(true); _disconnectAction = new QAction(tr("&Disconnect"), this); _startChatAction = new QAction(tr("C&hat"), this); _sendFileAction = new QAction(tr("&Send File"), this); @@ -199,6 +238,7 @@ void PVSGUI::setupMenu() _quitAction = new QAction(tr("&Quit"), this); // setup menu + _menu->addAction(_showAction); _menu->addMenu(_hostMenu); _menu->addAction(_disconnectAction); _menu->addAction(_showInfoAction); @@ -215,60 +255,24 @@ void PVSGUI::setupMenu() hostButton->setMenu(_hostMenu); } -void PVSGUI::setLocation(int location) -{ - _location = location; - switch (_location) - { - case POSITION_TOP_LEFT: - move(0, 0); - break; - case POSITION_TOP_CENTER: - move((QApplication::desktop()->width() - width()) / 2, 0); - break; - case POSITION_TOP_RIGHT: - move(QApplication::desktop()->width() - width(), 0); - break; - case POSITION_BOTTOM_LEFT: - move(0, QApplication::desktop()->height() - height()); - break; - case POSITION_BOTTOM_CENTER: - move((QApplication::desktop()->width() - width()) / 2, - QApplication::desktop()->height() - height()); - break; - case POSITION_BOTTOM_RIGHT: - move(QApplication::desktop()->width() - width(), - QApplication::desktop()->height() - height()); - break; - default: - break; - } -} - void PVSGUI::hide(bool b) { if (b) { - if (_location <= POSITION_TOP_RIGHT) + if (_position <= POSITION_TOP_RIGHT) move(x(), 2 - height()); else move(x(), QApplication::desktop()->height() - 2); } else { - if (_location <= POSITION_TOP_RIGHT) + if (_position <= POSITION_TOP_RIGHT) move(x(), 0); else move(x(), QApplication::desktop()->height() - height()); } } -void PVSGUI::hide() -{ - if (!_menu->isVisible() && !_hostMenu->isVisible()) - hide(true); -} - void PVSGUI::pvsConnect(QAction *action) { QString host = action->text(); @@ -396,22 +400,6 @@ void PVSGUI::delHost(QString host) } } -// TODO: perhaps this can go if fadi does his work -void PVSGUI::setVncAllow(int i) -{ - QFile file(QDir::toNativeSeparators(QDir::homePath() + "/.pvs/.allow")); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) - return; - - QTextStream out(&file); - if (i == 0) - out << 0; - else - out << 1; - - file.close(); -} - void PVSGUI::sendFile() { ClientFileSendDialog *d = new ClientFileSendDialog(); @@ -436,19 +424,92 @@ void PVSGUI::incomingMulticastFile(qulonglong transferID, QString sender, QStrin //////////////////////////////////////////////////////////////////////////////// // Main +void printHelp() +{ + QTextStream qout(stdout); + qout << QObject::tr("Usage: pvsgui [OPTIONS]...") << endl; + qout << QObject::tr("Start the Pool Video Switch GUI.") << endl; + qout << QObject::tr("Options:") << endl << endl; + qout << "-b or --toolbar" << "\t\t" << QObject::tr("Start with toolbar.") << endl; + qout << "-p or --position" << "\t" << QObject::tr("Set toolbar position (0-5)") << endl; + qout << "-h or --help" << "\t\t" << QObject::tr("Show this help text and quit.") << endl; + qout << "-v or --version" << "\t\t" << QObject::tr("Show version and quit.") << endl; + qout << endl; + qout.flush(); + exit(0); +} + +void printVersion() +{ + QTextStream qout(stdout); + qout << QObject::tr("Version: ") << VERSION_STRING << endl; + qout << endl; + qout.flush(); + exit(0); +} + int main(int argc, char *argv[]) { - QApplication app(argc, argv); + QtSingleApplication app(argc, argv); + app.setQuitOnLastWindowClosed(false); app.setOrganizationName("openslx"); app.setOrganizationDomain("openslx.org"); app.setApplicationName("pvsgui"); + // only one instance should be allowed + if (app.sendMessage("")) + { + qDebug("[PVSGUI] ERROR: Already running. Exiting"); + return 0; + } + // use system locale as language to translate gui QTranslator translator; translator.load(":pvsgui"); app.installTranslator(&translator); + bool visible = false; + int position = -1; + + // parse command line arguments + int opt = 0; + int longIndex = 0; + static const char *optString = "hvp:b?"; + static const struct option longOpts[] = + { + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'v' }, + { "position", required_argument, NULL, 'p' }, + { "toolbar", no_argument, NULL, 'b' } + }; + + opt = getopt_long( argc, argv, optString, longOpts, &longIndex ); + while( opt != -1 ) + { + switch( opt ) + { + case 'h': + printHelp(); + break; + case 'v': + printVersion(); + break; + case 'p': + position = atoi(optarg); + break; + case 'b': + visible = true; + break; + case '?': + exit(1); + } + opt = getopt_long( argc, argv, optString, longOpts, &longIndex ); + } + PVSGUI pvsgui; + pvsgui.setPosition(position); + pvsgui.setVisible(visible); + pvsgui.hide(); return app.exec(); } diff --git a/src/pvsgui.h b/src/pvsgui.h index 2883b60..b96d73c 100644 --- a/src/pvsgui.h +++ b/src/pvsgui.h @@ -16,6 +16,7 @@ #include <QtGui> #include <QtNetwork> +#include "3rdparty/qtsingleapplication/qtsingleapplication.h" #include "ui_clientToolbar.h" #include "src/gui/clientConfigDialog.h" #include "src/gui/clientChatDialog.h" @@ -30,7 +31,6 @@ class PVSGUI: public QWidget, private Ui_ClientToolbarClass { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.openslx.pvsgui") public: PVSGUI(QWidget *parent = 0); @@ -45,6 +45,9 @@ public: public Q_SLOTS: void updateConfig(); + void setVisible(bool visible); + void setPosition(int position); + void hide(); protected: void enterEvent(QEvent *e); @@ -55,21 +58,18 @@ protected: private Q_SLOTS: void showMessage(QString title, QString msg, bool useDialog = false); - void hide(); void connected(QString host); void disconnected(); void addHost(QString host); void delHost(QString host); void pvsConnect(QAction *action); void pvsDisconnect(); - void setVncAllow(int i); void sendFile(); void receiveFile(); void incomingMulticastFile(qulonglong, QString sender, QString basename, qulonglong size); private: void setupMenu(); - void setLocation(int location); void hide(bool b); QMenu *_menu; @@ -83,6 +83,7 @@ private: ClientVNCViewer *_vncViewer; AboutDialog *_aboutDialog; + QAction *_showAction; QAction *_disconnectAction; QAction *_startChatAction; QAction *_sendFileAction; @@ -91,7 +92,7 @@ private: QAction *_aboutAction; QAction *_quitAction; - int _location; + int _position; QPoint _clickPoint; QString _passwd; diff --git a/src/pvsmgr.cpp b/src/pvsmgr.cpp index 83f5fe0..dd00c0e 100644 --- a/src/pvsmgr.cpp +++ b/src/pvsmgr.cpp @@ -18,7 +18,6 @@ #include <QtGui/QDesktopServices> #include "gui/mainWindow.h" #include "util/consoleLogger.h" -#include "util/pvsSettingsManager.h" #include "util/CertManager.h" QApplication *qtApp; @@ -47,7 +46,6 @@ int main(int argc, char** argv) exit(123); } */ - PVSSettingsManager::getManager()->setConfigFile(getPolicyFilePath("serverconf")); MainWindow w; w.show(); return qtApp->exec(); diff --git a/src/pvsmgrtouch.cpp b/src/pvsmgrtouch.cpp index fa34294..d14ea56 100644 --- a/src/pvsmgrtouch.cpp +++ b/src/pvsmgrtouch.cpp @@ -16,9 +16,7 @@ #include <QtGui> #include <QtGui/QDesktopServices> -#include "gui/touchgui.h" #include "util/consoleLogger.h" -#include "util/pvsSettingsManager.h" #include "util/CertManager.h" QApplication *qtApp; @@ -47,7 +45,6 @@ int main(int argc, char** argv) exit(123); } */ - PVSSettingsManager::getManager()->setConfigFile(getPolicyFilePath("serverconf")); pvsMainWindow w; w.show(); return qtApp->exec(); diff --git a/src/util/clientGUIUtils.h b/src/util/clientGUIUtils.h index 28b05cc..b04d3fe 100644..100755 --- a/src/util/clientGUIUtils.h +++ b/src/util/clientGUIUtils.h @@ -1,21 +1,20 @@ +#ifndef _BLANKSCREEN_H_ +#define _BLANKSCREEN_H_ + #include "src/util/consoleLogger.h" -#include <X11/Xlib.h> // Every Xlib program must include this -#include <X11/cursorfont.h> #include <assert.h> #include <unistd.h> #include <stdio.h> - #define REFRESH_RATE 0.15 - -#ifndef _BLANKSCREEN_H_ -#define _BLANKSCREEN_H_ +class BlankScreen_Sysdep; class BlankScreen { public: BlankScreen(); + virtual ~BlankScreen(); void draw(bool force = false); bool lock(); bool unlock(); @@ -23,17 +22,7 @@ public: bool lock_inputs(); private: - Display *dpy; - Window win; - XEvent ev; - int scr; - - bool locked; - - - QString lockMsg; - int blackColor, whiteColor; - int offX, offY; + BlankScreen_Sysdep* _sysdep; }; -#endif +#endif
\ No newline at end of file diff --git a/src/util/clientGUIUtils_Win32.cpp b/src/util/clientGUIUtils_Win32.cpp new file mode 100755 index 0000000..1b4d2ae --- /dev/null +++ b/src/util/clientGUIUtils_Win32.cpp @@ -0,0 +1,46 @@ +
+#include "clientGUIUtils.h"
+#include <qwidget.h>
+
+struct BlankScreen_Sysdep {
+
+ bool locked;
+ QWidget* blankwin;
+
+ QString lockMsg;
+ int blackColor, whiteColor;
+ int offX, offY;
+};
+
+BlankScreen::BlankScreen()
+{
+ _sysdep = new BlankScreen_Sysdep;
+ _sysdep->blankwin = new QWidget(0, Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
+ _sysdep->blankwin->setWindowState(Qt::WindowFullScreen);
+ _sysdep->blankwin->show();
+}
+
+BlankScreen::~BlankScreen()
+{
+ delete _sysdep;
+}
+
+void BlankScreen::draw(bool force)
+{
+
+}
+
+bool BlankScreen::lock()
+{
+ return true;
+}
+
+bool BlankScreen::lock_inputs()
+{
+ return true;
+}
+
+bool BlankScreen::unlock()
+{
+ return true;
+}
diff --git a/src/util/clientGUIUtils_X11.cpp b/src/util/clientGUIUtils_X11.cpp new file mode 100755 index 0000000..29c96f0 --- /dev/null +++ b/src/util/clientGUIUtils_X11.cpp @@ -0,0 +1,168 @@ +#include "clientGUIUtils.h" +#include <X11/Xlib.h> +#include <X11/cursorfont.h> + + +struct BlankScreen_Sysdep { + + Display *dpy; + Window win; + XEvent ev; + int scr; + + bool locked; + + + QString lockMsg; + int blackColor, whiteColor; + int offX, offY; +}; + +BlankScreen::BlankScreen() +{ + _sysdep = new BlankScreen_Sysdep; + _sysdep->dpy = XOpenDisplay(NULL); + _sysdep->scr = DefaultScreen(_sysdep->dpy); + assert(_sysdep->dpy); + _sysdep->blackColor = BlackPixel(_sysdep->dpy, DefaultScreen(_sysdep->dpy)); + _sysdep->whiteColor = WhitePixel(_sysdep->dpy, DefaultScreen(_sysdep->dpy)); +// win = XCreateSimpleWindow(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy), 0, 0, 200, 100, 0, blackColor, whiteColor); + _sysdep->win = XCreateSimpleWindow(_sysdep->dpy, RootWindow(_sysdep->dpy, _sysdep->scr), 10, 10, 200, 200, 1, WhitePixel(_sysdep->dpy, _sysdep->scr), BlackPixel(_sysdep->dpy, _sysdep->scr)); + + XSelectInput(_sysdep->dpy, _sysdep->win, ExposureMask | KeyPressMask); + _sysdep->locked = false; + _sysdep->offX = _sysdep->offY = 0; +} + +BlankScreen::~BlankScreen() +{ + delete _sysdep; +} + +void BlankScreen::draw(bool force) +{ + if (_sysdep->locked)// no need to draw if we're not showing the window + { + XWindowAttributes xwa; + XGetWindowAttributes(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy), &xwa); + int hx = (xwa.width)>>2, hy = (xwa.height)>>2; + + if (XCheckTypedEvent(_sysdep->dpy, Expose, &_sysdep->ev) || force ) + { + hx += _sysdep->offX; + hy += _sysdep->offY; + + GC gcc = XCreateGC(_sysdep->dpy, _sysdep->win, 0, NULL); + XSetForeground(_sysdep->dpy, gcc, _sysdep->whiteColor); +// XClearArea(_sysdep->dpy, _sysdep->win, 0, 0, xwa.width, xwa.height, false); + if (_sysdep->lockMsg.size() > 0) + { + char *msg = const_cast<char*>(_sysdep->lockMsg.toUtf8().data()); + XDrawString(_sysdep->dpy, _sysdep->win, gcc/*DefaultGC(dpy, scr)*/, hx, hy, msg, strlen(msg)); + } + else + { + } + } + } +} + +bool BlankScreen::lock() +{ +#define lock_test + + if (_sysdep->locked) + return _sysdep->locked; + + // We want to get MapNotify events + XSelectInput(_sysdep->dpy, _sysdep->win, StructureNotifyMask); + + // "Map" the window (that is, make it appear on the screen) + XMapWindow(_sysdep->dpy, _sysdep->win); + + // Create a "Graphics Context" + //GC gc = XCreateGC(dpy, win, 0, NULL); + + XEvent xev; + Atom wm_state = XInternAtom(_sysdep->dpy, "_NET_WM_STATE", False); + Atom fullscreen = XInternAtom(_sysdep->dpy, "_NET_WM_STATE_FULLSCREEN", False); + memset(&xev, 0, sizeof(xev)); + xev.type = ClientMessage; + xev.xclient.window = _sysdep->win; + xev.xclient.message_type = wm_state; + xev.xclient.format = 32; + xev.xclient.data.l[0] = 1; + xev.xclient.data.l[1] = fullscreen; + xev.xclient.data.l[2] = 0; + + XSendEvent(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy), False, + SubstructureNotifyMask, &xev); + + + + + // Wait for the MapNotify event + for (;;) + { + XEvent e; + XNextEvent(_sysdep->dpy, &e); + if (e.type == MapNotify) + break; + } + //Flush it! + //XFlush(_sysdep->dpy); + +#ifndef lock_test + // load the locked cursor, so people dont think they can click anything + // TODO: Use some kind of invisible cursor instead of the wait-cursor + Cursor _sysdep->locked_cur = XCreateFontCursor(_sysdep->dpy, XC_watch); + XDefineCursor(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy),_sysdep->locked_cur); +#endif + + // grabbing of keyboard and mouse and hide the cursor + XGrabKeyboard(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy), false, GrabModeAsync, GrabModeAsync, CurrentTime); + XGrabPointer(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy), false, 0, GrabModeAsync, GrabModeAsync, None, NULL, CurrentTime); + + if (!_sysdep->locked) + ConsoleLog writeLine(QString("Locked")); + + // see header for more information on this switch + return _sysdep->locked = true; +} + +bool BlankScreen::lock_inputs() +{ + // grabbing of keyboard and mouse and hide the cursor + XGrabKeyboard(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy), false, GrabModeAsync, GrabModeAsync, CurrentTime); + XGrabPointer(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy), false, 0, GrabModeAsync, GrabModeAsync, None, NULL, CurrentTime); + return true; +} + +bool BlankScreen::unlock() +{ + + if (_sysdep->dpy) + { + + int retval = -1; + + //reset cursor to arrow (no *real* default here...) + Cursor normal_cur = XCreateFontCursor(_sysdep->dpy, XC_arrow); + XDefineCursor(_sysdep->dpy, DefaultRootWindow(_sysdep->dpy), normal_cur); + + // ungrabbing of keyboard and mouse + XUngrabPointer(_sysdep->dpy, CurrentTime); + XUngrabKeyboard(_sysdep->dpy, CurrentTime); + + + retval = XUnmapWindow(_sysdep->dpy,_sysdep->win); + if (retval == BadWindow) + ConsoleLog writeError(QString("Bad window while unmapping. Badwindow: ").append(int2String(retval))); + XFlush(_sysdep->dpy); + } + if (_sysdep->locked) + ConsoleLog writeLine(QString("Unlocked")); + + _sysdep->lockMsg.clear(); + return !(_sysdep->locked = false); +} diff --git a/src/util/consoleLogger.cpp b/src/util/consoleLogger.cpp index b523b40..9189543 100644..100755 --- a/src/util/consoleLogger.cpp +++ b/src/util/consoleLogger.cpp @@ -226,21 +226,17 @@ void ConsoleLogger::_prepareLog() _logFileGood = false; _readLog(); - mkdir(getPolicyFilePath(QString()).toUtf8().data(), 0777); + createPolicyDir(); QString fullpath; fullpath.append(_logPath); //TODO: handle wether path/ or path were entered? fullpath.append(_logName); _logFile.open(fullpath.toUtf8().data(), std::ofstream::out | std::ofstream::app); if (_logFile.good()) - { _logFileGood = true; - writeTerminal(QString("LogPath/Name changed to: ").append(fullpath)); - } else - { - printf("ERROR: Logfile ( %s ) not accessible/found. Logs will not be available.\n", _logPath.toUtf8().data()); - } + qDebug("ERROR: Logfile ( %s ) not accessible/found. Logs will not be available.", qPrintable(_logPath)); + _logFile.close(); } diff --git a/src/util/consoleLogger.h b/src/util/consoleLogger.h index 3a0950d..e4cb291 100644 --- a/src/util/consoleLogger.h +++ b/src/util/consoleLogger.h @@ -116,7 +116,7 @@ public: _line.push_back('\n'); // add an explicit newline char, so it looks better in the logfile //#ifndef as_daemon if (_level == LOG_TERMINAL) // may look strange here, but its quite central :-) - printf("%s\n", _line.toUtf8().data()); + qDebug("%s", qPrintable(_line)); //#endif }; LOG_LEVEL getLevel() diff --git a/src/util/pvsSettingsManager.cpp b/src/util/pvsSettingsManager.cpp deleted file mode 100644 index a6a742b..0000000 --- a/src/util/pvsSettingsManager.cpp +++ /dev/null @@ -1,185 +0,0 @@ -#include "pvsSettingsManager.h" -#include "TextFile.h" - -PVSSettingsManager* PVSSettingsManager::getManager() -{ - if (myself) - return myself; - else - return myself = new PVSSettingsManager; -} - -void PVSSettingsManager::setConfigFile(QString path) -{ - if (path.size() && fileExists(path)) - { - _path = path; - _parseFile(_path); - - } - else - ConsoleLog writeError(QString("Can't open config file \"").append(QString(path).append("\""))); -} - -bool PVSSettingsManager::hasEntry(QString name) -{ - for (SettingsIter it = settingsList.begin(); it != settingsList.end(); it++) - { - if ((*it).first.compare(name) == 0) - { - return true; - } - } - return false; -} - -QString PVSSettingsManager::getEntryString(QString name) -{ - for (SettingsIter it = settingsList.begin(); it != settingsList.end(); it++) - { - if ((*it).first.compare(name) == 0) - { - return (*it).second; - } - } - return QString(); -} - -void PVSSettingsManager::writeEntry(QString name, QString value) -{ - if (name.size() && value.size()) - return; - bool unique = true; - for (SettingsIter it = settingsList.begin(); it != settingsList.end(); it++) - { - if ((*it).first.compare(name) == 0) - { - unique = false; - (*it).second = value; - break; - } - } - if (unique) - { - SettingsEntry tmp(name, value); - settingsList.push_back(tmp); - } -} - - -PVSSettingsManager* PVSSettingsManager::myself = NULL; - -PVSSettingsManager::PVSSettingsManager() -{ - -} - -void PVSSettingsManager::setConfigs() -{ - //default settings - _configs.setValue("Chat/chatstate", "on"); - _configs.setValue("Chat/chatmode", "bossmode"); - _configs.setValue("Room/roomId", "0"); - _configs.setValue("VNC/permit", "off"); - _configs.setValue("VNC/quality", "high"); - _configs.sync(); -} -void PVSSettingsManager::reWriteConfigs(QString set, QString val) -{ - _configs.setValue(set, val); - _configs.sync(); -} - -void PVSSettingsManager::readConfigs(QString sett, QString vall) -{ - //TODO: read the config file.. - _configs.value("Chat/chatstate").toBool(); - _configs.value("Chat/chatmode").toString(); - _configs.value("Room/room").toInt(); - _configs.value("VNC/permit").toBool(); - _configs.value("VNC/quality").toString(); -} - -void PVSSettingsManager::_parseFile(QString path) -{ - QString line; - TextFile file(path); - - SettingsList tmpList; - - if (file.good()) - { - while (!file.eof()) - { - line = file.readLine(); - if (!(line.length() <=1)) // ignore blank - { - if (!(line[0] == '#' || line[0] == '/' || line[0] == '[')) // ignore comments and section headers - { - SettingsEntry tmp = _parseLine(line); - if (tmp.first.size() && tmp.second.size()) - { - bool unique = true; - for (SettingsIter it = tmpList.begin(); it != tmpList.end(); it++) - { - if ((*it).first.compare(tmp.first) == 0) - { - unique = false; - break; - } - } - if (unique) - tmpList.push_back(tmp); - } - } - } - } - } - else - { - ConsoleLog writeError(QString("No configfile \"").append(QString(path).append("\" found or file corrupt."))); - } - - if (tmpList.size()) - settingsList = tmpList; -} -#ifdef verbose -ConsoleLog writeLine(QString("Dumping Config Content of ").append(QString(path).append(" : "))); -for (SettingsIter it = settingsList.begin(); it != settingsList.end(); it++) -{ - ConsoleLog writeLine(QString("Option: ").append(QString((*it).first).append(QString(" | Value: ").append((*it).second)))); -} -ConsoleLog writeLine(QString("End of ").append(QString(path).append("."))); -#endif - -SettingsEntry PVSSettingsManager::_parseLine(QString line) -{ - QString name; - QString value; - - name = lineSplitter(line, "=\n\t", true); - value = lineSplitter(line, "=\n\t", false); - - if (!(name.size() && value.size())) - return SettingsEntry("",""); - - - // remove whitespaces in front of option name - for (int i = 0; i < name.size(); i++) - { - if (name[i] == '\t' || name[i] == ' ') - { - name.remove(i, 1); - i--; - } - else - break; - } - // whitespaces after the value are trimmed by the lineSplitter - - SettingsEntry tmp(name, value); - return tmp; -} - - - diff --git a/src/util/pvsSettingsManager.h b/src/util/pvsSettingsManager.h deleted file mode 100644 index 78607eb..0000000 --- a/src/util/pvsSettingsManager.h +++ /dev/null @@ -1,50 +0,0 @@ -/// documentation test 1 -/// line 2 -/// line 3 -#ifndef _PVSSETTINGSMANGER_H_ -#define _PVSSETTINGSMANGER_H_ - -#include <list> -#include <map> -#include <src/util/util.h> -#include <src/util/consoleLogger.h> -#include <QSettings> - - -/// documentation test 1.1 -/// line 2.1 -/// line 3.1 - -typedef std::pair<QString, QString> SettingsEntry; ///< first = option name, second = option value -typedef std::list<SettingsEntry> SettingsList; ///< obvious -typedef std::list<SettingsEntry>::iterator SettingsIter; - - -class PVSSettingsManager; -/// documentation test 1.2 -/// line 2.2 -/// line 3.2 -class PVSSettingsManager -{ -public: - static PVSSettingsManager* getManager(); - void setConfigFile(QString path); - bool hasEntry(QString name); - QString getEntryString(QString name); - void writeEntry(QString name, QString value); - void setConfigs(); - void reWriteConfigs(QString set, QString val); - void readConfigs(QString sett, QString vall); -private: - static PVSSettingsManager* myself; - PVSSettingsManager(); - void _parseFile(QString path); - SettingsEntry _parseLine(QString line); - QString _path; - SettingsList settingsList; - QSettings _configs; - -}; - - -#endif diff --git a/src/util/util.cpp b/src/util/util.cpp index 946168e..05a209f 100644..100755 --- a/src/util/util.cpp +++ b/src/util/util.cpp @@ -6,7 +6,11 @@ #include <cstdlib> #include <QStringList> #include <iostream> - +#include <QDir> +#ifdef __WIN32__ + #include <windows.h> + #include <Lmcons.h> +#endif //__WIN32__ PVSServerEntry::PVSServerEntry(QString name) { @@ -45,7 +49,11 @@ int getRandom(int min, int max) if (init) { init = false; + #ifndef __WIN32__ srand ( time(NULL) + getpid() ); + #else + srand ( time(NULL) ); /*might be solved by another random factor*/ + #endif } if (min >= max) return rand(); return rand() % (max-min+1) + min; @@ -184,15 +192,28 @@ QString colonSplitter(QString line, bool first) QString getUserName() { - struct passwd* passUser = getpwuid(getuid()); QString username; - if (passUser) - { - username = QString(passUser->pw_name); - } + #ifdef __WIN32__ + WCHAR* lpszSystemInfo; // pointer to system information + DWORD cchBuff = 256; // size of user name + WCHAR tchBuffer[UNLEN + 1]; // buffer for expanded string + + lpszSystemInfo = tchBuffer; + + // Get and display the user name. + GetUserNameW(lpszSystemInfo, &cchBuff); + + //Unicode string needs to be converted + username = QString::fromWCharArray(lpszSystemInfo); + #else + struct passwd* passUser = getpwuid(getuid()); + if (passUser) + username = QString(passUser->pw_name); + + #endif //#ifdef __WIN32__ if (username.isEmpty()) { - printf("USERNAME COULDNT BE RETRIEVED!\n"); + qDebug("USERNAME COULDNT BE RETRIEVED!"); username = QString("USERNAMEERROR"); } return username; @@ -202,19 +223,21 @@ QString getUserName() QString getFullUsername() { QString fullname = getUserName(); - struct passwd *pd; + #ifndef __WIN32__ + struct passwd *pd; - if (NULL == (pd = getpwuid(getuid()))) - {ConsoleLog writeError("getpwuid() error.");} - else - { - QString tmp = pd->pw_gecos; - QStringList userData = tmp.split(","); - if(userData[0].length() > 0 ) + if (NULL == (pd = getpwuid(getuid()))) + {ConsoleLog writeError("getpwuid() error.");} + else { - fullname = userData[0]; + QString tmp = pd->pw_gecos; + QStringList userData = tmp.split(","); + if(userData[0].length() > 0 ) + { + fullname = userData[0]; + } } - } + #endif //__WIN32__ //might be completed some time to a full solution for WIN32 return fullname; } @@ -266,7 +289,8 @@ bool policyFileExists(QString fileName) void createPolicyDir() { - mkdir(getPolicyDir().toUtf8().data(), 0777); + QDir(QDesktopServices::storageLocation(QDesktopServices::HomeLocation)).mkdir(".pvs"); + //assuming PolicyDir is defined like in getPolicyDir() } void createPolicyFiles() @@ -299,7 +323,7 @@ QString readPassFromPassFile() } bool getAllowed() { - printf("Checking %s\n", getPolicyFilePath(QString(".allow")).toUtf8().data()); + qDebug("Checking %s", qPrintable(getPolicyFilePath(QString(".allow")))); TextFile file(getPolicyFilePath(".allow")); if (file.good()) // should have been checked via exists before, but better be safe { @@ -314,7 +338,7 @@ bool getAllowed() (allowed.compare(QString("TRUE")) == 0) ) return true; } - printf("...negative\n"); + qDebug("...negative"); return false; } diff --git a/src/util/util.h b/src/util/util.h index 6ddefc6..4f2d0ee 100644..100755 --- a/src/util/util.h +++ b/src/util/util.h @@ -4,7 +4,11 @@ #include <list> #include <fstream> #include <iostream> -#include <pwd.h> +#ifndef __WIN32__ + #include <pwd.h> +#else + /*#include "pwd_win32.h"*/ +#endif /*__WIN32*/ #include <sys/types.h> #include <sys/stat.h> diff --git a/src/version.h b/src/version.h index ac24ac2..de5c6aa 100644 --- a/src/version.h +++ b/src/version.h @@ -1,2 +1,2 @@ -#define VERSION_STRING "2.0.1.0" -#define VERSION_NUMBER 2010 +#define VERSION_STRING "2.0.5" +#define VERSION_NUMBER 205 |