[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/krfb
From:       George Goldberg <grundleborg () googlemail ! com>
Date:       2009-09-16 11:15:11
Message-ID: 1253099711.421688.15581.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1024313 by gberg:

Show KNotifications when a user connects, rather than KPassivePopups.

BUG: 207501

 M  +9 -9      trayicon.cpp  
 M  +1 -1      trayicon.h  


--- trunk/KDE/kdenetwork/krfb/trayicon.cpp #1024312:1024313
@@ -24,6 +24,7 @@
 #include <kglobal.h>
 #include <kactioncollection.h>
 #include <kaboutapplicationdialog.h>
+#include <KNotification>
 
 #include "manageinvitationsdialog.h"
 #include "invitedialog.h"
@@ -74,11 +75,11 @@
 {
 
     setIconByPixmap(KIcon("krfb"));
-    KPassivePopup::message(i18n("Desktop Sharing"),
-                           i18n("The remote user has been authenticated and is now connected."),
-                           KIcon("krfb").pixmap(22, 22),
-                           (QWidget*)0);
+    KNotification::event("UserAcceptsConnection",
+                           i18n("The remote user %1 is now connected.",
+                                host));
     setToolTipTitle(i18n("Desktop Sharing - connected with %1", host));
+
     setStatus(KNotificationItem::Active);
 }
 
@@ -89,12 +90,11 @@
 
     setToolTipTitle(i18n("Desktop Sharing - disconnected"));
     setIconByPixmap(KIcon("krfb").pixmap(22, 22, KIcon::Disabled));
-    KPassivePopup *p = KPassivePopup::message(i18n("Desktop Sharing"),
-                                              i18n("The remote user has closed the connection."),
-                                              KIcon("krfb").pixmap(22, 22, KIcon::Disabled),
-                                              (QWidget*)0);
-    connect(p, SIGNAL(hidden()), this, SIGNAL(diconnectedMessageDisplayed()));
+    KNotification::event("ConnectionClosed", i18n("The remote user has closed the connection."));
+
     setStatus(KNotificationItem::Passive);
+
+    Q_EMIT disconnectedMessageDisplayed();
 }
 
 void TrayIcon::setDesktopControlSetting(bool b)
--- trunk/KDE/kdenetwork/krfb/trayicon.h #1024312:1024313
@@ -38,7 +38,7 @@
 
 signals:
 
-	void diconnectedMessageDisplayed();
+        void disconnectedMessageDisplayed();
 	void enableDesktopControl(bool);
     void quitApp();
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic