[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:24:53 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=0ced268

The following commit has been merged in the master branch:
commit 0ced2683cc501a001fa93808e0828834914d8c90
Author: Marcin Ziemiński <zieminn at gmail.com>
Date:   Thu Aug 28 01:49:09 2014 +0200

    Add view action to OTR authentication related notifications
---
 lib/authenticationwizard.cpp |  8 +++-----
 lib/otr-notifications.cpp    | 24 ++++++++++++++++++++++--
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/lib/authenticationwizard.cpp b/lib/authenticationwizard.cpp
index 0e95422..e0502bd 100644
--- a/lib/authenticationwizard.cpp
+++ b/lib/authenticationwizard.cpp
@@ -27,6 +27,7 @@
 #include <KLocale>
 #include <KNotification>
 #include <KIconLoader>
+#include <KWindowSystem>
 
 #include <QGroupBox>
 #include <QProgressBar>
@@ -436,10 +437,7 @@ void AuthenticationWizard::notificationActivated( unsigned int id)
 {
 	kDebug() << "notificationActivated. ButtonId" << id;
 	if(id == 1) {
-		// raise the view to bring the chatwindow + authwizard to current desktop and on top
-        dynamic_cast<QWidget*>(QWizard::parent())->raise();
-		// now grab focus and keyboard again to the auth-wizard
-		setFocus(Qt::ActiveWindowFocusReason);
-		leAnswer->grabKeyboard();
+        this->raise();
+        KWindowSystem::forceActiveWindow(this->winId());
 	}
 }
diff --git a/lib/otr-notifications.cpp b/lib/otr-notifications.cpp
index ba3172a..4a2dccc 100644
--- a/lib/otr-notifications.cpp
+++ b/lib/otr-notifications.cpp
@@ -46,6 +46,8 @@ namespace OTRNotifications
         KAboutData telepathySharedAboutData("ktelepathy", 0, KLocalizedString(), 0);
         notification->setComponentData(KComponentData(telepathySharedAboutData));
 
+        notification->setActions(QStringList(i18n("View")));
+
         QPixmap notificationPixmap;
         if(notificationPixmap.load(contact->avatarData().fileName)) {
             notification->setPixmap(notificationPixmap);
@@ -63,7 +65,6 @@ namespace OTRNotifications
             notification->setText(i18n("Unverified OTR session started with %1", targetContact->alias()));
         }
 
-        notification->setActions(QStringList(i18n("View")));
         if(widget) {
             QObject::connect(notification, SIGNAL(activated(uint)), widget, SIGNAL(notificationClicked()));
             QObject::connect(notification, SIGNAL(activated(uint)), notification, SLOT(close()));
@@ -77,7 +78,6 @@ namespace OTRNotifications
         KNotification *notification = prepareNotification(widget, targetContact);
         notification->setText(i18n("Finished OTR session with %1", targetContact->alias()));
 
-        notification->setActions(QStringList(i18n("View")));
         if(widget) {
             QObject::connect(notification, SIGNAL(activated(uint)), widget, SIGNAL(notificationClicked()));
             QObject::connect(notification, SIGNAL(activated(uint)), notification, SLOT(close()));
@@ -90,6 +90,11 @@ namespace OTRNotifications
         KNotification *notification = prepareNotification(widget, targetContact);
         notification->setText(i18n("%1 has requested your authentication", targetContact->alias()));
 
+        if(widget) {
+            QObject::connect(notification, SIGNAL(activated(uint)), widget, SLOT(notificationActivated(uint)));
+            QObject::connect(notification, SIGNAL(activated(uint)), notification, SLOT(close()));
+        }
+
         notification->sendEvent();
     }
 
@@ -102,6 +107,11 @@ namespace OTRNotifications
             notification->setText(i18n("Authentication with %1 failed", targetContact->alias()));
         }
 
+        if(widget) {
+            QObject::connect(notification, SIGNAL(activated(uint)), widget, SLOT(notificationActivated(uint)));
+            QObject::connect(notification, SIGNAL(activated(uint)), notification, SLOT(close()));
+        }
+
         notification->sendEvent();
     }
 
@@ -110,6 +120,11 @@ namespace OTRNotifications
         KNotification *notification = prepareNotification(widget, targetContact);
         notification->setText(i18n("Authentication with %1 was aborted", targetContact->alias()));
 
+        if(widget) {
+            QObject::connect(notification, SIGNAL(activated(uint)), widget, SLOT(notificationActivated(uint)));
+            QObject::connect(notification, SIGNAL(activated(uint)), notification, SLOT(close()));
+        }
+
         notification->sendEvent();
     }
 
@@ -118,6 +133,11 @@ namespace OTRNotifications
         KNotification *notification = prepareNotification(widget, targetContact);
         notification->setText(i18n("Authentication with %1 failed", targetContact->alias()));
 
+        if(widget) {
+            QObject::connect(notification, SIGNAL(activated(uint)), widget, SLOT(notificationActivated(uint)));
+            QObject::connect(notification, SIGNAL(activated(uint)), notification, SLOT(close()));
+        }
+
         notification->sendEvent();
     }
 }

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list