diff --git a/ChangeLog b/ChangeLog index 51790370..6cc172bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ +2002-02-18 Tim Jansen + + * released 0.6 + 2002-02-17 Tim Jansen + * Replaced port configuration with auto-probing (because + changing ports is not possible with libvncserver and makes + too many problems anyway) + * rfbcontroller.cc: added KNotify support 2002-02-14 Tim Jansen diff --git a/DCOP-INTERFACE b/DCOP-INTERFACE index 8a3a0399..58153acd 100644 --- a/DCOP-INTERFACE +++ b/DCOP-INTERFACE @@ -1,4 +1,5 @@ DCOP Interfaces: + // Disconnects the current session void disconnect() // Exits the application diff --git a/Makefile.am b/Makefile.am index 0bb212d8..aa8d4e6e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ SUBDIRS = libvncserver krfb po doc EXTRA_DIST = admin AUTHORS COPYING ChangeLog INSTALL README TODO NOTES \ - krfb.lsm + ROADMAP DCOP-INTERFACE krfb.lsm # not a GNU package. You can remove this line, if # have all needed files, that a GNU package needs diff --git a/NOTES b/NOTES index 01f89f6a..acdf27bf 100644 --- a/NOTES +++ b/NOTES @@ -1,4 +1,4 @@ -Some comments on various aspects of KRfb: +Comments on various aspects of KRfb: - KRfb has been designed for three use cases: * a user who wants to show something to a friend, so he lets his friend diff --git a/ROADMAP b/ROADMAP index 6065c60c..c159c4bb 100644 --- a/ROADMAP +++ b/ROADMAP @@ -2,8 +2,9 @@ Version 0.5 (2002/01/02): First release - first release - port x0rfbserver with simplified KDE/Qt interface -Version 0.6 (2002/02/17): Improved RFB backend +Version 0.6 (2002/02/18): Improved RFB backend - replace x0rfbserver's backend with libvncserver +- dcop support - knotify Version 0.7: Better integration with KDE, improved GUI diff --git a/krfb/rfbcontroller.cc b/krfb/rfbcontroller.cc index effd01b9..79931f6e 100644 --- a/krfb/rfbcontroller.cc +++ b/krfb/rfbcontroller.cc @@ -235,7 +235,8 @@ RFBController::RFBController(Configuration *c) : allowRemoteControl(false), connectionNum(0), configuration(c), - closePending(false) + closePending(false), + asyncKNotifyEvent(false) { self = this; connect(dialog.acceptConnectionButton, SIGNAL(clicked()), @@ -505,10 +506,9 @@ bool RFBController::handleCheckPassword(rfbClientPtr cl, KExtendedSocket::resolve(KExtendedSocket::peerAddress(cl->sock), host, port); - KNotifyClient::event("InvalidPassword", - i18n("Connecting system: %1") - .arg(remoteIp)); - + sendDelayedKNotifyEvent("InvalidPassword", + i18n("Connecting system: %1") + .arg(remoteIp)); return FALSE; } return TRUE; @@ -524,27 +524,26 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl) if ((connectionNum > 0) || (state != RFB_WAITING)) { - KNotifyClient::event("TooManyConnections", - i18n("Connecting system: %1") - .arg(host)); + sendDelayedKNotifyEvent("TooManyConnections", + i18n("Connecting system: %1") + .arg(host)); return RFB_CLIENT_REFUSE; } - remoteIp = host; state = RFB_CONNECTING; if (!configuration->askOnConnect()) { - KNotifyClient::event("NewConnectionAutoAccepted", - i18n("Connecting system: %1") - .arg(remoteIp)); + sendDelayedKNotifyEvent("NewConnectionAutoAccepted", + i18n("Connecting system: %1") + .arg(remoteIp)); connectionAccepted(configuration->allowDesktopControl()); return RFB_CLIENT_ACCEPT; } - KNotifyClient::event("NewConnectionOnHold", - i18n("Connecting system: %1") - .arg(remoteIp)); + sendDelayedKNotifyEvent("NewConnectionOnHold", + i18n("Connecting system: %1") + .arg(remoteIp)); dialog.ipLabel->setText(remoteIp); dialog.allowRemoteControlCB->setChecked(configuration->allowDesktopControl()); @@ -579,7 +578,7 @@ void RFBController::handlePointerEvent(int button_mask, int x, int y) { } void RFBController::passwordChanged() { - server->rfbAuthPasswdData = (const char*) + server->rfbAuthPasswdData = (void*) ((configuration->password().length() == 0) ? 0 : 1); } @@ -588,6 +587,28 @@ int RFBController::getPort() return server->rfbPort; } +void RFBController::sendDelayedKNotifyEvent(QString name, + QString desc) +{ + if (asyncKNotifyEvent) + return; + + asyncKNotifyEventName = name; + asyncKNotifyEventDesc= desc; + asyncKNotifyEvent = true; + QTimer::singleShot(0, this, SLOT(sendKNotifyEvent())); +} + +void RFBController::sendKNotifyEvent() +{ + if (!asyncKNotifyEvent) + return; + + KNotifyClient::event(asyncKNotifyEventName, + asyncKNotifyEventDesc); + asyncKNotifyEvent = false; +} + bool RFBController::checkX11Capabilities() { int bp1, bp2, majorv, minorv; Bool r = XTestQueryExtension(qt_xdisplay(), &bp1, &bp2, diff --git a/krfb/rfbcontroller.h b/krfb/rfbcontroller.h index 50f0874a..d5c0eae9 100644 --- a/krfb/rfbcontroller.h +++ b/krfb/rfbcontroller.h @@ -139,6 +139,7 @@ private: void startServer(bool xtestGrab = true); void stopServer(bool xtestUngrab = true); bool checkAsyncEvents(); + void sendDelayedKNotifyEvent(QString name, QString desc); bool allowRemoteControl; int connectionNum; @@ -157,10 +158,14 @@ private: QPtrList asyncQueue; bool closePending; + bool asyncKNotifyEvent; + QString asyncKNotifyEventName; + QString asyncKNotifyEventDesc; private slots: void idleSlot(); void dialogAccepted(); void dialogRefused(); + void sendKNotifyEvent(); }; /* diff --git a/libvncserver/TODO.krfb b/libvncserver/TODO.krfb index 9a3a36ac..d7930c16 100644 --- a/libvncserver/TODO.krfb +++ b/libvncserver/TODO.krfb @@ -1,2 +1 @@ -- fix 24 bit encodings - replace stderr/stdout logs \ No newline at end of file