From 82dde3eef9aec2fa7256292199eb646f3bd33de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20F=C3=BCrmetz?= Date: Tue, 11 Apr 2017 14:16:16 +0700 Subject: [PATCH] Fix copy notification --- krunner_pass.notifyrc | 2 +- pass.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/krunner_pass.notifyrc b/krunner_pass.notifyrc index 2a794b6..28261e0 100644 --- a/krunner_pass.notifyrc +++ b/krunner_pass.notifyrc @@ -3,7 +3,7 @@ IconName=object-unlocked Comment=Krunner integration for pass Name=Pass -[Event/passwordunlocked] +[Event/password-unlocked] Name=Password copied to clipboard Comment=Password copied to clipboard Action=Popup diff --git a/pass.cpp b/pass.cpp index bfc5457..c036b60 100644 --- a/pass.cpp +++ b/pass.cpp @@ -109,9 +109,11 @@ void Pass::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &m Q_UNUSED(context); auto ret = QProcess::execute(QString("pass -c ") + match.text()); - QString msg = i18n("Password %1 copied to clipboard for %2 seconds", match.text(), timeout); if (ret == 0) { - KNotification::event("passwordunlocked", msg); + QString msg = i18n("Password %1 copied to clipboard for %2 seconds", match.text(), timeout); + KNotification::event("password-unlocked", "Pass", msg, + "object-unlocked", nullptr, KNotification::CloseOnTimeout, + "krunner_pass"); } }