mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:41:17 -07:00
Add tooltips to systray icon
svn path=/trunk/kdenetwork/krfb/; revision=195816
This commit is contained in:
1
TODO
1
TODO
@@ -2,7 +2,6 @@
|
|||||||
For 3.2:
|
For 3.2:
|
||||||
- write SLP service template for remote desktop protocols
|
- write SLP service template for remote desktop protocols
|
||||||
(documentation)
|
(documentation)
|
||||||
- trayicon mouse-over text
|
|
||||||
- when krfb is started with URL arguments and without connection
|
- when krfb is started with URL arguments and without connection
|
||||||
quality, add some kind of smart algorithm to determine whether the
|
quality, add some kind of smart algorithm to determine whether the
|
||||||
other host is local (maybe using SLP to announce the connectivity
|
other host is local (maybe using SLP to announce the connectivity
|
||||||
|
|||||||
@@ -159,8 +159,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
QObject::connect(&controller, SIGNAL(sessionRefused()),
|
QObject::connect(&controller, SIGNAL(sessionRefused()),
|
||||||
&app, SLOT(quit()));
|
&app, SLOT(quit()));
|
||||||
QObject::connect(&controller, SIGNAL(sessionEstablished()),
|
QObject::connect(&controller, SIGNAL(sessionEstablished(QString)),
|
||||||
&trayicon, SLOT(showConnectedMessage()));
|
&trayicon, SLOT(showConnectedMessage(QString)));
|
||||||
QObject::connect(&controller, SIGNAL(sessionFinished()),
|
QObject::connect(&controller, SIGNAL(sessionFinished()),
|
||||||
&trayicon, SLOT(showDisconnectedMessage()));
|
&trayicon, SLOT(showDisconnectedMessage()));
|
||||||
QObject::connect(&controller, SIGNAL(desktopControlSettingChanged(bool)),
|
QObject::connect(&controller, SIGNAL(desktopControlSettingChanged(bool)),
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ void RFBController::connectionAccepted(bool aRC)
|
|||||||
server->rfbClientHead->clientGoneHook = clientGoneHook;
|
server->rfbClientHead->clientGoneHook = clientGoneHook;
|
||||||
state = RFB_CONNECTED;
|
state = RFB_CONNECTED;
|
||||||
if (!server->rfbAuthPasswdData)
|
if (!server->rfbAuthPasswdData)
|
||||||
emit sessionEstablished();
|
emit sessionEstablished(remoteIp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RFBController::acceptConnection(bool aRemoteControl)
|
void RFBController::acceptConnection(bool aRemoteControl)
|
||||||
@@ -735,7 +735,7 @@ void RFBController::sendKNotifyEvent(const QString &n, const QString &d)
|
|||||||
|
|
||||||
void RFBController::sendSessionEstablished()
|
void RFBController::sendSessionEstablished()
|
||||||
{
|
{
|
||||||
emit sessionEstablished();
|
emit sessionEstablished(remoteIp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __osf__
|
#ifdef __osf__
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ public slots:
|
|||||||
void enableDesktopControl(bool c);
|
void enableDesktopControl(bool c);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sessionEstablished();
|
void sessionEstablished(QString host);
|
||||||
void sessionFinished();
|
void sessionFinished();
|
||||||
void sessionRefused();
|
void sessionRefused();
|
||||||
void quitApp();
|
void quitApp();
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "trayicon.h"
|
#include "trayicon.h"
|
||||||
|
#include <qtooltip.h>
|
||||||
#include <kstdaction.h>
|
#include <kstdaction.h>
|
||||||
#include <kapplication.h>
|
#include <kapplication.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
@@ -57,6 +58,7 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) :
|
|||||||
trayIconOpen = loader->loadIcon("eyes-open24", KIcon::User);
|
trayIconOpen = loader->loadIcon("eyes-open24", KIcon::User);
|
||||||
trayIconClosed = loader->loadIcon("eyes-closed24", KIcon::User);
|
trayIconClosed = loader->loadIcon("eyes-closed24", KIcon::User);
|
||||||
setPixmap(trayIconClosed);
|
setPixmap(trayIconClosed);
|
||||||
|
QToolTip::add(this, i18n("Desktop Sharing - connecting"));
|
||||||
|
|
||||||
manageInvitationsAction = new KAction(i18n("Manage &Invitations"), QString::null,
|
manageInvitationsAction = new KAction(i18n("Manage &Invitations"), QString::null,
|
||||||
0, this, SIGNAL(showManageInvitations()),
|
0, this, SIGNAL(showManageInvitations()),
|
||||||
@@ -91,19 +93,21 @@ void TrayIcon::prepareQuit() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void TrayIcon::showConnectedMessage() {
|
void TrayIcon::showConnectedMessage(QString host) {
|
||||||
|
|
||||||
setPixmap(trayIconOpen);
|
setPixmap(trayIconOpen);
|
||||||
KPassivePopup2::message(i18n("Desktop Sharing"),
|
KPassivePopup2::message(i18n("Desktop Sharing"),
|
||||||
i18n("The remote user has been authenticated and is now connected."),
|
i18n("The remote user has been authenticated and is now connected."),
|
||||||
trayIconOpen,
|
trayIconOpen,
|
||||||
this);
|
this);
|
||||||
|
QToolTip::add(this, i18n("Desktop Sharing - connected with %1").arg(host));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrayIcon::showDisconnectedMessage() {
|
void TrayIcon::showDisconnectedMessage() {
|
||||||
if (quitting)
|
if (quitting)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
QToolTip::add(this, i18n("Desktop Sharing - disconnected"));
|
||||||
setPixmap(trayIconClosed);
|
setPixmap(trayIconClosed);
|
||||||
KPassivePopup2 *p = KPassivePopup2::message(i18n("Desktop Sharing"),
|
KPassivePopup2 *p = KPassivePopup2::message(i18n("Desktop Sharing"),
|
||||||
i18n("The remote user has closed the connection."),
|
i18n("The remote user has closed the connection."),
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ signals:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void prepareQuit();
|
void prepareQuit();
|
||||||
void showConnectedMessage();
|
void showConnectedMessage(QString host);
|
||||||
void showDisconnectedMessage();
|
void showDisconnectedMessage();
|
||||||
void setDesktopControlSetting(bool);
|
void setDesktopControlSetting(bool);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user