Hello community, here is the log from the commit of package knotifications for openSUSE:Factory checked in at 2019-05-21 10:30:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/knotifications (Old) and /work/SRC/openSUSE:Factory/.knotifications.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "knotifications" Tue May 21 10:30:34 2019 rev:67 rq:703368 version:5.58.0 Changes: -------- --- /work/SRC/openSUSE:Factory/knotifications/knotifications.changes 2019-04-19 21:23:39.507818772 +0200 +++ /work/SRC/openSUSE:Factory/.knotifications.new.5148/knotifications.changes 2019-05-21 10:30:34.271432736 +0200 @@ -1,0 +2,13 @@ +Wed May 15 18:16:17 UTC 2019 - [email protected] + +- Update to 5.58.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.58.0.php +- Changes since 5.57.0: + * [Notify by Portal] Support default action and priority hints + * [KNotification] Add HighUrgency + * [KNotifications] Update when flags, urls, or urgency change + * Allow to set urgency for notifications + +------------------------------------------------------------------- Old: ---- knotifications-5.57.0.tar.xz New: ---- knotifications-5.58.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ knotifications.spec ++++++ --- /var/tmp/diff_new_pack.cYPu9X/_old 2019-05-21 10:30:35.571432237 +0200 +++ /var/tmp/diff_new_pack.cYPu9X/_new 2019-05-21 10:30:35.575432235 +0200 @@ -17,14 +17,14 @@ %define lname libKF5Notifications5 -%define _tar_path 5.57 +%define _tar_path 5.58 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %bcond_without lang Name: knotifications -Version: 5.57.0 +Version: 5.58.0 Release: 0 Summary: KDE Desktop notifications License: LGPL-2.1-or-later ++++++ knotifications-5.57.0.tar.xz -> knotifications-5.58.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/CMakeLists.txt new/knotifications-5.58.0/CMakeLists.txt --- old/knotifications-5.57.0/CMakeLists.txt 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/CMakeLists.txt 2019-05-07 13:26:27.000000000 +0200 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.57.0") # handled by release scripts -set(KF5_DEP_VERSION "5.57.0") # handled by release scripts +set(KF5_VERSION "5.58.0") # handled by release scripts +set(KF5_DEP_VERSION "5.58.0") # handled by release scripts project(KNotifications VERSION ${KF5_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 5.57.0 NO_MODULE) +find_package(ECM 5.58.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/po/nb/knotifications5_qt.po new/knotifications-5.58.0/po/nb/knotifications5_qt.po --- old/knotifications-5.57.0/po/nb/knotifications5_qt.po 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/po/nb/knotifications5_qt.po 2019-05-07 13:26:27.000000000 +0200 @@ -31,28 +31,28 @@ msgid "Unknown Application" msgstr "Ukjent program" -#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1055 +#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1061 msgctxt "KStatusNotifierItem|" msgid "&Minimize" msgstr "&Minimer" -#: kstatusnotifieritem.cpp:804 +#: kstatusnotifieritem.cpp:810 msgctxt "KStatusNotifierItem|" msgid "Quit" msgstr "Avslutt" -#: kstatusnotifieritem.cpp:1053 +#: kstatusnotifieritem.cpp:1059 msgctxt "KStatusNotifierItem|" msgid "&Restore" msgstr "&Gjenopprett" -#: kstatusnotifieritem.cpp:1067 +#: kstatusnotifieritem.cpp:1073 #, qt-format msgctxt "KStatusNotifierItem|" msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" msgstr "<qt>Vil du avslutte <b>%1</b>?</qt>" -#: kstatusnotifieritem.cpp:1070 +#: kstatusnotifieritem.cpp:1076 msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" msgstr "Bekreft «Avslutt» fra systemkurven" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/po/se/knotifications5_qt.po new/knotifications-5.58.0/po/se/knotifications5_qt.po --- old/knotifications-5.57.0/po/se/knotifications5_qt.po 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/po/se/knotifications5_qt.po 2019-05-07 13:26:27.000000000 +0200 @@ -26,31 +26,31 @@ msgid "Unknown Application" msgstr "Amas prográmma" -#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1055 +#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1061 #, fuzzy msgctxt "KStatusNotifierItem|" msgid "&Minimize" msgstr "&Minimere" -#: kstatusnotifieritem.cpp:804 +#: kstatusnotifieritem.cpp:810 #, fuzzy msgctxt "KStatusNotifierItem|" msgid "Quit" msgstr "Heaittit" -#: kstatusnotifieritem.cpp:1053 +#: kstatusnotifieritem.cpp:1059 #, fuzzy msgctxt "KStatusNotifierItem|" msgid "&Restore" msgstr "&Máhcat" -#: kstatusnotifieritem.cpp:1067 +#: kstatusnotifieritem.cpp:1073 #, fuzzy, qt-format msgctxt "KStatusNotifierItem|" msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" msgstr "<qt>Háliidatgo duođaid heaittihit <b>%1</b>?</qt>" -#: kstatusnotifieritem.cpp:1070 +#: kstatusnotifieritem.cpp:1076 #, fuzzy msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/po/sr/knotifications5_qt.po new/knotifications-5.58.0/po/sr/knotifications5_qt.po --- old/knotifications-5.57.0/po/sr/knotifications5_qt.po 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/po/sr/knotifications5_qt.po 2019-05-07 13:26:27.000000000 +0200 @@ -29,29 +29,29 @@ msgid "Unknown Application" msgstr "непознат програм" -#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1055 +#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1061 msgctxt "KStatusNotifierItem|" msgid "&Minimize" msgstr "&Минимизуј" -#: kstatusnotifieritem.cpp:804 +#: kstatusnotifieritem.cpp:810 msgctxt "KStatusNotifierItem|" msgid "Quit" msgstr "Напусти" -#: kstatusnotifieritem.cpp:1053 +#: kstatusnotifieritem.cpp:1059 msgctxt "KStatusNotifierItem|" msgid "&Restore" msgstr "&Обнови" -#: kstatusnotifieritem.cpp:1067 +#: kstatusnotifieritem.cpp:1073 #, qt-format msgctxt "KStatusNotifierItem|" msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" msgstr "<qt>Желите ли заиста да напустите програм <b>%1</b>?</qt>" # >> @title:window -#: kstatusnotifieritem.cpp:1070 +#: kstatusnotifieritem.cpp:1076 msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" msgstr "Потврда напуштања преко системске касете" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/po/sr@ijekavian/knotifications5_qt.po new/knotifications-5.58.0/po/sr@ijekavian/knotifications5_qt.po --- old/knotifications-5.57.0/po/sr@ijekavian/knotifications5_qt.po 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/po/sr@ijekavian/knotifications5_qt.po 2019-05-07 13:26:27.000000000 +0200 @@ -28,29 +28,29 @@ msgid "Unknown Application" msgstr "непознат програм" -#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1055 +#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1061 msgctxt "KStatusNotifierItem|" msgid "&Minimize" msgstr "&Минимизуј" -#: kstatusnotifieritem.cpp:804 +#: kstatusnotifieritem.cpp:810 msgctxt "KStatusNotifierItem|" msgid "Quit" msgstr "Напусти" -#: kstatusnotifieritem.cpp:1053 +#: kstatusnotifieritem.cpp:1059 msgctxt "KStatusNotifierItem|" msgid "&Restore" msgstr "&Обнови" -#: kstatusnotifieritem.cpp:1067 +#: kstatusnotifieritem.cpp:1073 #, qt-format msgctxt "KStatusNotifierItem|" msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" msgstr "<qt>Желите ли заиста да напустите програм <b>%1</b>?</qt>" # >> @title:window -#: kstatusnotifieritem.cpp:1070 +#: kstatusnotifieritem.cpp:1076 msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" msgstr "Потврда напуштања преко системске касете" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/po/sr@ijekavianlatin/knotifications5_qt.po new/knotifications-5.58.0/po/sr@ijekavianlatin/knotifications5_qt.po --- old/knotifications-5.57.0/po/sr@ijekavianlatin/knotifications5_qt.po 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/po/sr@ijekavianlatin/knotifications5_qt.po 2019-05-07 13:26:27.000000000 +0200 @@ -28,29 +28,29 @@ msgid "Unknown Application" msgstr "nepoznat program" -#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1055 +#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1061 msgctxt "KStatusNotifierItem|" msgid "&Minimize" msgstr "&Minimizuj" -#: kstatusnotifieritem.cpp:804 +#: kstatusnotifieritem.cpp:810 msgctxt "KStatusNotifierItem|" msgid "Quit" msgstr "Napusti" -#: kstatusnotifieritem.cpp:1053 +#: kstatusnotifieritem.cpp:1059 msgctxt "KStatusNotifierItem|" msgid "&Restore" msgstr "&Obnovi" -#: kstatusnotifieritem.cpp:1067 +#: kstatusnotifieritem.cpp:1073 #, qt-format msgctxt "KStatusNotifierItem|" msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" msgstr "<qt>Želite li zaista da napustite program <b>%1</b>?</qt>" # >> @title:window -#: kstatusnotifieritem.cpp:1070 +#: kstatusnotifieritem.cpp:1076 msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" msgstr "Potvrda napuštanja preko sistemske kasete" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/po/sr@latin/knotifications5_qt.po new/knotifications-5.58.0/po/sr@latin/knotifications5_qt.po --- old/knotifications-5.57.0/po/sr@latin/knotifications5_qt.po 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/po/sr@latin/knotifications5_qt.po 2019-05-07 13:26:27.000000000 +0200 @@ -28,29 +28,29 @@ msgid "Unknown Application" msgstr "nepoznat program" -#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1055 +#: kstatusnotifieritem.cpp:501 kstatusnotifieritem.cpp:1061 msgctxt "KStatusNotifierItem|" msgid "&Minimize" msgstr "&Minimizuj" -#: kstatusnotifieritem.cpp:804 +#: kstatusnotifieritem.cpp:810 msgctxt "KStatusNotifierItem|" msgid "Quit" msgstr "Napusti" -#: kstatusnotifieritem.cpp:1053 +#: kstatusnotifieritem.cpp:1059 msgctxt "KStatusNotifierItem|" msgid "&Restore" msgstr "&Obnovi" -#: kstatusnotifieritem.cpp:1067 +#: kstatusnotifieritem.cpp:1073 #, qt-format msgctxt "KStatusNotifierItem|" msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" msgstr "<qt>Želite li zaista da napustite program <b>%1</b>?</qt>" # >> @title:window -#: kstatusnotifieritem.cpp:1070 +#: kstatusnotifieritem.cpp:1076 msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" msgstr "Potvrda napuštanja preko sistemske kasete" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/po/zh_CN/knotifications5_qt.po new/knotifications-5.58.0/po/zh_CN/knotifications5_qt.po --- old/knotifications-5.57.0/po/zh_CN/knotifications5_qt.po 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/po/zh_CN/knotifications5_qt.po 2019-05-07 13:26:27.000000000 +0200 @@ -13,8 +13,8 @@ msgid "" msgstr "" "Project-Id-Version: kdeorg\n" -"PO-Revision-Date: 2019-03-07 09:22\n" -"Last-Translator: guoyunhe <[email protected]>\n" +"PO-Revision-Date: 2019-05-05 22:21\n" +"Last-Translator: Guo Yunhe (guoyunhe)\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/src/knotification.cpp new/knotifications-5.58.0/src/knotification.cpp --- old/knotifications-5.57.0/src/knotification.cpp 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/src/knotification.cpp 2019-05-07 13:26:27.000000000 +0200 @@ -59,12 +59,13 @@ NotificationFlags flags; QString componentName; QList<QUrl> urls; + KNotification::Urgency urgency; QVariantMap hints; QTimer updateTimer; bool needUpdate; - Private() : id(-1), ref(0), widget(nullptr), needUpdate(false) {} + Private() : id(-1), ref(0), widget(nullptr), urgency(KNotification::DefaultUrgency), needUpdate(false) {} /** * recursive function that raise the widget. @p w * @@ -257,7 +258,15 @@ void KNotification::setFlags(const NotificationFlags &flags) { + if (d->flags == flags) { + return; + } + + d->needUpdate = true; d->flags = flags; + if (d->id >= 0) { + d->updateTimer.start(); + } } void KNotification::setComponentName(const QString &c) @@ -272,7 +281,33 @@ void KNotification::setUrls(const QList<QUrl> &urls) { + if (d->urls == urls) { + return; + } + + d->needUpdate = true; d->urls = urls; + if (d->id >= 0) { + d->updateTimer.start(); + } +} + +KNotification::Urgency KNotification::urgency() const +{ + return d->urgency; +} + +void KNotification::setUrgency(Urgency urgency) +{ + if (d->urgency == urgency) { + return; + } + + d->needUpdate = true; + d->urgency = urgency; + if (d->id >= 0) { + d->updateTimer.start(); + } } void KNotification::activate(unsigned int action) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/src/knotification.h new/knotifications-5.58.0/src/knotification.h --- old/knotifications-5.57.0/src/knotification.h 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/src/knotification.h 2019-05-07 13:26:27.000000000 +0200 @@ -127,6 +127,7 @@ Contexts=group Sound=filetoplay.ogg Action=None + Urgency=Low * </pre> * These are the default settings for each notifiable event. * Action is the string representing the action. Actions can be added to @@ -137,6 +138,8 @@ * * Contexts is a comma separated list of possible context for this event. * + * Urgency can be any of: Low, Normal, Critical. + * * \section userfile The user's config file * * This is an implementation detail, and is described here for your information. @@ -270,6 +273,20 @@ enum StandardEvent { Notification, Warning, Error, Catastrophe }; /** + * The urgency of a notification. + * + * @since 5.58 + * @sa setUrgency + */ + enum Urgency { + DefaultUrgency = -1, + LowUrgency = 10, + NormalUrgency = 50, + HighUrgency = 70, + CriticalUrgency = 90 + }; + + /** * Create a new notification. * * You have to use sendEvent to show the notification. @@ -509,6 +526,28 @@ void setUrls(const QList<QUrl> &urls); /** + * The urgency of the notification. + * @since 5.58 + */ + Urgency urgency() const; + + /** + * Sets the urgency of the notification. + * + * This defines the importance of the notification. For example, + * a track change in a media player would be a low urgency. + * "You have new mail" would be normal urgency. "Your battery level + * is low" would be a critical urgency. + * + * Use critical notifications with care as they might be shown even + * when giving a presentation or when notifications are turned off. + * + * @param urgency The urgency. + * @since 5.58 + */ + void setUrgency(Urgency urgency); + + /** * @internal * the id given by the notification manager */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/src/knotificationmanager.cpp new/knotifications-5.58.0/src/knotificationmanager.cpp --- old/knotifications-5.57.0/src/knotificationmanager.cpp 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/src/knotificationmanager.cpp 2019-05-07 13:26:27.000000000 +0200 @@ -312,6 +312,20 @@ d->notifications.insert(d->notifyIdCounter, n); + // TODO KF6 d-pointer KNotifyConfig and add this there + if (n->urgency() == KNotification::DefaultUrgency) { + const QString urgency = notifyConfig.readEntry(QStringLiteral("Urgency")); + if (urgency == QLatin1String("Low")) { + n->setUrgency(KNotification::LowUrgency); + } else if (urgency == QLatin1String("Normal")) { + n->setUrgency(KNotification::NormalUrgency); + } else if (urgency == QLatin1String("High")) { + n->setUrgency(KNotification::HighUrgency); + } else if (urgency == QLatin1String("Critical")) { + n->setUrgency(KNotification::CriticalUrgency); + } + } + const auto actionsList = notifyActions.split(QLatin1Char('|')); for (const QString &action : actionsList) { KNotificationPlugin *notifyPlugin = pluginForAction(action); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/src/notifybypopup.cpp new/knotifications-5.58.0/src/notifybypopup.cpp --- old/knotifications-5.57.0/src/notifybypopup.cpp 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/src/notifybypopup.cpp 2019-05-07 13:26:27.000000000 +0200 @@ -712,6 +712,28 @@ hintsMap[QStringLiteral("desktop-entry")] = qApp->desktopFileName(); } + int urgency = -1; + switch (notification->urgency()) { + case KNotification::DefaultUrgency: + break; + case KNotification::LowUrgency: + urgency = 0; + break; + case KNotification::NormalUrgency: + Q_FALLTHROUGH(); + // galago notifications only know low, normal, critical + case KNotification::HighUrgency: + urgency = 1; + break; + case KNotification::CriticalUrgency: + urgency = 2; + break; + } + + if (urgency > -1) { + hintsMap[QStringLiteral("urgency")] = urgency; + } + const QVariantMap hints = notification->hints(); for (auto it = hints.constBegin(); it != hints.constEnd(); ++it) { hintsMap[it.key()] = it.value(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.57.0/src/notifybyportal.cpp new/knotifications-5.58.0/src/notifybyportal.cpp --- old/knotifications-5.57.0/src/notifybyportal.cpp 2019-04-07 09:30:43.000000000 +0200 +++ new/knotifications-5.58.0/src/notifybyportal.cpp 2019-05-07 13:26:27.000000000 +0200 @@ -259,6 +259,33 @@ QString title = notification->title().isEmpty() ? appCaption : notification->title(); QString text = notification->text(); + if (!notification->defaultAction().isEmpty()) { + portalArgs.insert(QStringLiteral("default-action"), notification->defaultAction()); + portalArgs.insert(QStringLiteral("default-action-target"), QStringLiteral("0")); + } + + QString priority; + switch (notification->urgency()) { + case KNotification::DefaultUrgency: + break; + case KNotification::LowUrgency: + priority = QStringLiteral("low"); + break; + case KNotification::NormalUrgency: + priority = QStringLiteral("normal"); + break; + case KNotification::HighUrgency: + priority = QStringLiteral("high"); + break; + case KNotification::CriticalUrgency: + priority = QStringLiteral("urgent"); + break; + } + + if (!priority.isEmpty()) { + portalArgs.insert(QStringLiteral("priority"), priority); + } + // galago spec defines action list to be list like // (act_id1, action1, act_id2, action2, ...) //
