mirror of
https://github.com/KDE/krfb
synced 2026-07-01 15:31:19 -07:00
- added single connection controller in separate thread
- added hooks to manage vnc events - moved events out of rfbcontroller.cpp/.h into their own source file svn path=/trunk/KDE/kdenetwork/krfb/; revision=650434
This commit is contained in:
18
main.cpp
18
main.cpp
@@ -75,26 +75,26 @@ int main(int argc, char *argv[])
|
||||
|
||||
KApplication app;
|
||||
|
||||
|
||||
TrayIcon trayicon(new ManageInvitationsDialog);
|
||||
KrfbServer server;
|
||||
|
||||
KrfbServer *server = KrfbServer::self(); // initialize the server manager
|
||||
|
||||
QObject::connect(&app, SIGNAL(lastWindowClosed()), // do not show passivepopup
|
||||
&trayicon, SLOT(prepareQuit()));
|
||||
QObject::connect(&app, SIGNAL(lastWindowClosed()),
|
||||
&server, SLOT(disconnectAndQuit()));
|
||||
server, SLOT(disconnectAndQuit()));
|
||||
|
||||
QObject::connect(&trayicon, SIGNAL(enableDesktopControl(bool)),
|
||||
&server, SLOT(enableDesktopControl(bool)));
|
||||
QObject::connect(&server, SIGNAL(sessionEstablished(QString)),
|
||||
server, SLOT(enableDesktopControl(bool)));
|
||||
QObject::connect(server, SIGNAL(sessionEstablished(QString)),
|
||||
&trayicon, SLOT(showConnectedMessage(QString)));
|
||||
QObject::connect(&server, SIGNAL(sessionFinished()),
|
||||
QObject::connect(server, SIGNAL(sessionFinished()),
|
||||
&trayicon, SLOT(showDisconnectedMessage()));
|
||||
QObject::connect(&server, SIGNAL(desktopControlSettingChanged(bool)),
|
||||
QObject::connect(server, SIGNAL(desktopControlSettingChanged(bool)),
|
||||
&trayicon, SLOT(setDesktopControlSetting(bool)));
|
||||
QObject::connect(&trayicon, SIGNAL(quitApp()),
|
||||
&server, SLOT(disconnectAndQuit()));
|
||||
QObject::connect(&server, SIGNAL(quitApp()),
|
||||
server, SLOT(disconnectAndQuit()));
|
||||
QObject::connect(server, SIGNAL(quitApp()),
|
||||
&app, SLOT(quit()));
|
||||
|
||||
//TODO: implement some error reporting mechanism between server and tray icon
|
||||
|
||||
Reference in New Issue
Block a user