diff --git a/TODO b/TODO index 7c9736ac..412238aa 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ For 3.2: - write SLP service template for remote desktop protocols (documentation) -- trayicon mouse-over text - when krfb is started with URL arguments and without connection quality, add some kind of smart algorithm to determine whether the other host is local (maybe using SLP to announce the connectivity diff --git a/krfb/main.cpp b/krfb/main.cpp index 43fba80c..8a62beb8 100644 --- a/krfb/main.cpp +++ b/krfb/main.cpp @@ -159,8 +159,8 @@ int main(int argc, char *argv[]) QObject::connect(&controller, SIGNAL(sessionRefused()), &app, SLOT(quit())); - QObject::connect(&controller, SIGNAL(sessionEstablished()), - &trayicon, SLOT(showConnectedMessage())); + QObject::connect(&controller, SIGNAL(sessionEstablished(QString)), + &trayicon, SLOT(showConnectedMessage(QString))); QObject::connect(&controller, SIGNAL(sessionFinished()), &trayicon, SLOT(showDisconnectedMessage())); QObject::connect(&controller, SIGNAL(desktopControlSettingChanged(bool)), diff --git a/krfb/rfbcontroller.cc b/krfb/rfbcontroller.cc index c935ffbf..ef750d9d 100644 --- a/krfb/rfbcontroller.cc +++ b/krfb/rfbcontroller.cc @@ -453,7 +453,7 @@ void RFBController::connectionAccepted(bool aRC) server->rfbClientHead->clientGoneHook = clientGoneHook; state = RFB_CONNECTED; if (!server->rfbAuthPasswdData) - emit sessionEstablished(); + emit sessionEstablished(remoteIp); } void RFBController::acceptConnection(bool aRemoteControl) @@ -735,7 +735,7 @@ void RFBController::sendKNotifyEvent(const QString &n, const QString &d) void RFBController::sendSessionEstablished() { - emit sessionEstablished(); + emit sessionEstablished(remoteIp); } #ifdef __osf__ diff --git a/krfb/rfbcontroller.h b/krfb/rfbcontroller.h index 921b9ba7..a13454d8 100644 --- a/krfb/rfbcontroller.h +++ b/krfb/rfbcontroller.h @@ -149,7 +149,7 @@ public slots: void enableDesktopControl(bool c); signals: - void sessionEstablished(); + void sessionEstablished(QString host); void sessionFinished(); void sessionRefused(); void quitApp(); diff --git a/krfb/trayicon.cpp b/krfb/trayicon.cpp index e4a9a527..f71fefe3 100644 --- a/krfb/trayicon.cpp +++ b/krfb/trayicon.cpp @@ -16,6 +16,7 @@ ***************************************************************************/ #include "trayicon.h" +#include #include #include #include @@ -57,6 +58,7 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) : trayIconOpen = loader->loadIcon("eyes-open24", KIcon::User); trayIconClosed = loader->loadIcon("eyes-closed24", KIcon::User); setPixmap(trayIconClosed); + QToolTip::add(this, i18n("Desktop Sharing - connecting")); manageInvitationsAction = new KAction(i18n("Manage &Invitations"), QString::null, 0, this, SIGNAL(showManageInvitations()), @@ -91,19 +93,21 @@ void TrayIcon::prepareQuit() { -void TrayIcon::showConnectedMessage() { +void TrayIcon::showConnectedMessage(QString host) { setPixmap(trayIconOpen); KPassivePopup2::message(i18n("Desktop Sharing"), i18n("The remote user has been authenticated and is now connected."), trayIconOpen, this); + QToolTip::add(this, i18n("Desktop Sharing - connected with %1").arg(host)); } void TrayIcon::showDisconnectedMessage() { if (quitting) return; + QToolTip::add(this, i18n("Desktop Sharing - disconnected")); setPixmap(trayIconClosed); KPassivePopup2 *p = KPassivePopup2::message(i18n("Desktop Sharing"), i18n("The remote user has closed the connection."), diff --git a/krfb/trayicon.h b/krfb/trayicon.h index b3f31b94..4e586efa 100644 --- a/krfb/trayicon.h +++ b/krfb/trayicon.h @@ -64,7 +64,7 @@ signals: public slots: void prepareQuit(); - void showConnectedMessage(); + void showConnectedMessage(QString host); void showDisconnectedMessage(); void setDesktopControlSetting(bool);