Hello community, here is the log from the commit of package knotifications for openSUSE:Factory checked in at 2015-05-11 19:36:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/knotifications (Old) and /work/SRC/openSUSE:Factory/.knotifications.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "knotifications" Changes: -------- --- /work/SRC/openSUSE:Factory/knotifications/knotifications.changes 2015-04-13 20:25:41.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.knotifications.new/knotifications.changes 2015-05-11 19:48:05.000000000 +0200 @@ -1,0 +2,14 @@ +Sun May 3 19:47:17 UTC 2015 - [email protected] + +- Update to 5.10.0 + * Fix KNotifications when used with Ubuntu's NotifyOSD + (kde#345973) + * Don't trigger notification updates when setting the + same properties (kde#345973) + * Introduce LoopSound flag allowing notifications to play sound + in a loop if they need it (kde#346148) + * Don't crash if notification doesn't have a widget + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.10.0.php + +------------------------------------------------------------------- Old: ---- knotifications-5.9.0.tar.xz New: ---- knotifications-5.10.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ knotifications.spec ++++++ --- /var/tmp/diff_new_pack.xlWamS/_old 2015-05-11 19:48:06.000000000 +0200 +++ /var/tmp/diff_new_pack.xlWamS/_new 2015-05-11 19:48:06.000000000 +0200 @@ -18,9 +18,9 @@ %bcond_without lang %define lname libKF5Notifications5 -%define _tar_path 5.9 +%define _tar_path 5.10 Name: knotifications -Version: 5.9.0 +Version: 5.10.0 Release: 0 %define kf5_version %{version} BuildRequires: cmake >= 2.8.12 ++++++ knotifications-5.9.0.tar.xz -> knotifications-5.10.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/CMakeLists.txt new/knotifications-5.10.0/CMakeLists.txt --- old/knotifications-5.9.0/CMakeLists.txt 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/CMakeLists.txt 2015-05-03 17:18:52.000000000 +0200 @@ -3,7 +3,7 @@ project(KNotifications) # ECM setup -find_package(ECM 5.9.0 REQUIRED NO_MODULE) +find_package(ECM 5.10.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(FeatureSummary) @@ -13,8 +13,8 @@ include(ECMPoQmTools) -set(KF5_VERSION "5.9.0") # handled by release scripts -set(KF5_DEP_VERSION "5.9.0") # handled by release scripts +set(KF5_VERSION "5.10.0") # handled by release scripts +set(KF5_DEP_VERSION "5.10.0") # handled by release scripts ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KNOTIFICATIONS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/po/ast/knotifications5_qt.po new/knotifications-5.10.0/po/ast/knotifications5_qt.po --- old/knotifications-5.9.0/po/ast/knotifications5_qt.po 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/po/ast/knotifications5_qt.po 2015-05-03 17:18:52.000000000 +0200 @@ -1,23 +1,23 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # +# enolp <[email protected]>, 2015. msgid "" msgstr "" "Project-Id-Version: kdelibs4-1\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-03-23 01:50+0000\n" -"PO-Revision-Date: 2012-12-28 17:14+0100\n" -"Last-Translator: ivarela <[email protected]>\n" -"Language-Team: asturian <[email protected]>\n" -"Language: \n" +"PO-Revision-Date: 2015-04-07 19:39+0100\n" +"Last-Translator: enolp <[email protected]>\n" +"Language-Team: Asturian <[email protected]>\n" +"Language: ast\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Poedit-Language: asturian\n" "X-Qt-Contexts: true\n" +"X-Generator: Lokalize 2.0\n" #: knotificationrestrictions.cpp:184 #, fuzzy @@ -52,11 +52,11 @@ #| msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" msgctxt "KStatusNotifierItem|" msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" -msgstr "<qt>¿Daveres quies colar de <b>%1</b>?</qt>" +msgstr "<qt>¿De xuru que quies colar de <b>%1</b>?</qt>" #: kstatusnotifieritem.cpp:894 #, fuzzy #| msgid "Confirm Quit From System Tray" msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" -msgstr "Confirmar colar dende la bandexa del sistema" +msgstr "Confirmar salida dende la bandexa del sistema" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/po/fr/knotifications5_qt.po new/knotifications-5.10.0/po/fr/knotifications5_qt.po --- old/knotifications-5.9.0/po/fr/knotifications5_qt.po 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/po/fr/knotifications5_qt.po 2015-05-03 17:18:52.000000000 +0200 @@ -24,10 +24,10 @@ "PO-Revision-Date: 2014-03-16 18:32+0100\n" "Last-Translator: Sebastien Renard <[email protected]>\n" "Language-Team: French <[email protected]>\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Lokalize 1.5\n" "X-Environment: kde\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/po/ja/knotifications5_qt.po new/knotifications-5.10.0/po/ja/knotifications5_qt.po --- old/knotifications-5.9.0/po/ja/knotifications5_qt.po 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/po/ja/knotifications5_qt.po 2015-05-03 17:18:52.000000000 +0200 @@ -7,15 +7,15 @@ # AWASHIRO Ikuya <[email protected]>, 2004. # Shinichi Tsunoda <[email protected]>, 2005. # Yukiko Bando <[email protected]>, 2006, 2007, 2008, 2009, 2010. -# Fumiaki Okushi <[email protected]>, 2006, 2007, 2008, 2010, 2011. +# Fumiaki Okushi <[email protected]>, 2006, 2007, 2008, 2010, 2011, 2015. # msgid "" msgstr "" "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-03-23 01:50+0000\n" -"PO-Revision-Date: 2011-08-27 14:05-0700\n" -"Last-Translator: Fumiaki Okushi <[email protected]>\n" +"PO-Revision-Date: 2015-04-19 16:20-0700\n" +"Last-Translator: Fumiaki Okushi <[email protected]>\n" "Language-Team: Japanese <[email protected]>\n" "Language: ja\n" "MIME-Version: 1.0\n" @@ -28,43 +28,32 @@ "X-Qt-Contexts: true\n" #: knotificationrestrictions.cpp:184 -#, fuzzy -#| msgid "Unknown Application" msgctxt "KNotificationRestrictions|" msgid "Unknown Application" msgstr "不明なアプリケーション" #: kstatusnotifieritem.cpp:439 kstatusnotifieritem.cpp:879 -#, fuzzy -#| msgid "&Minimize" msgctxt "KStatusNotifierItem|" msgid "&Minimize" msgstr "最小化(&M)" #: kstatusnotifieritem.cpp:704 -#, fuzzy -#| msgid "Quit" msgctxt "KStatusNotifierItem|" msgid "Quit" msgstr "終了" #: kstatusnotifieritem.cpp:877 -#, fuzzy -#| msgid "&Restore" msgctxt "KStatusNotifierItem|" msgid "&Restore" msgstr "復元(&R)" #: kstatusnotifieritem.cpp:891 -#, fuzzy, qt-format -#| msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" +#, qt-format msgctxt "KStatusNotifierItem|" msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" msgstr "<qt>本当に <b>%1</b> を終了しますか?</qt>" #: kstatusnotifieritem.cpp:894 -#, fuzzy -#| msgid "Confirm Quit From System Tray" msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" msgstr "システムトレイからの終了の確認" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/po/ko/knotifications5_qt.po new/knotifications-5.10.0/po/ko/knotifications5_qt.po --- old/knotifications-5.9.0/po/ko/knotifications5_qt.po 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/po/ko/knotifications5_qt.po 2015-05-03 17:18:52.000000000 +0200 @@ -1,8 +1,8 @@ # Korean messages for kdelibs. # Copyright (C) Free Software Foundation, Inc. # Cho Sung Jae <[email protected]>, 2007. -# Park Shinjo <[email protected]>, 2007, 2008, 2009, 2010, 2011. -# Park Shinjo <[email protected]>, 2011, 2012, 2013, 2014, 2015. +# Shinjo Park <[email protected]>, 2007, 2008, 2009, 2010, 2011. +# Shinjo Park <[email protected]>, 2011, 2012, 2013, 2014, 2015. # msgid "" msgstr "" @@ -10,7 +10,7 @@ "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-03-23 01:50+0000\n" "PO-Revision-Date: 2015-01-18 17:08+0900\n" -"Last-Translator: Park Shinjo <[email protected]>\n" +"Last-Translator: Shinjo Park <[email protected]>\n" "Language-Team: Korean <[email protected]>\n" "Language: ko\n" "MIME-Version: 1.0\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/src/knotification.cpp new/knotifications-5.10.0/src/knotification.cpp --- old/knotifications-5.9.0/src/knotification.cpp 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/src/knotification.cpp 2015-05-03 17:18:52.000000000 +0200 @@ -133,6 +133,10 @@ void KNotification::setTitle(const QString &title) { + if (title == d->title) { + return; + } + d->needUpdate = true; d->title = title; if (d->id > 0) { @@ -142,6 +146,10 @@ void KNotification::setText(const QString &text) { + if (text == d->text) { + return; + } + d->needUpdate = true; d->text = text; if (d->id > 0) { @@ -151,6 +159,10 @@ void KNotification::setIconName(const QString &icon) { + if (icon == d->iconName) { + return; + } + d->needUpdate = true; d->iconName = icon; if (d->id > 0) { @@ -184,6 +196,10 @@ void KNotification::setActions(const QStringList &as) { + if (as == d->actions) { + return; + } + d->needUpdate = true; d->actions = as; if (d->id > 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/src/knotification.h new/knotifications-5.10.0/src/knotification.h --- old/knotifications-5.9.0/src/knotification.h 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/src/knotification.h 2015-05-03 17:18:52.000000000 +0200 @@ -1,6 +1,6 @@ /* This file is part of the KDE libraries Copyright (C) 2005-2006 Olivier Goffart <ogoffart at kde.org> - Copyright (C) 2013-2014 Martin Klapetek <[email protected]> + Copyright (C) 2013-2015 Martin Klapetek <[email protected]> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -239,6 +239,11 @@ CloseWhenWidgetActivated = 0x04, /** + * The audio plugin will loop the sound until the notification is closed + */ + LoopSound = 0x08, + + /** * @internal * The event is a standard kde event, and not an event of the application */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/src/notifybyaudio.cpp new/knotifications-5.10.0/src/notifybyaudio.cpp --- old/knotifications-5.9.0/src/notifybyaudio.cpp 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/src/notifybyaudio.cpp 2015-05-03 17:18:52.000000000 +0200 @@ -1,5 +1,5 @@ /* This file is part of the KDE libraries - Copyright 2014 by Martin Klapetek <[email protected]> + Copyright (C) 2014-2015 by Martin Klapetek <[email protected]> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -86,7 +86,7 @@ m->setCurrentSource(soundURL); m->play(); - if (notification->flags() & KNotification::Persistent) { + if (notification->flags() & KNotification::LoopSound) { // Enqueing essentially prevents the subsystem pipeline from partial teardown // which is the most desired thing in terms of load and delay between loop cycles. // All of this is timing dependent, which is why we want at least one source queued; @@ -135,6 +135,14 @@ KNotification *notification = m_notifications.value(m); + //if the sound is short enough, we can't guarantee new sounds are + //enqueued before finished is emitted. + //so to make sure we are looping restart it when the sound finished + if (notification->flags() & KNotification::LoopSound) { + m->play(); + return; + } + finish(notification); disconnect(m, SIGNAL(currentSourceChanged(Phonon::MediaSource)), this, SLOT(onAudioSourceChanged(Phonon::MediaSource))); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/src/notifybypopup.cpp new/knotifications-5.10.0/src/notifybypopup.cpp --- old/knotifications-5.9.0/src/notifybypopup.cpp 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/src/notifybypopup.cpp 2015-05-03 17:18:52.000000000 +0200 @@ -67,12 +67,6 @@ */ void fillPopup(KPassivePopup *popup, KNotification *notification, const KNotifyConfig &config); /** - * Make sure a popup is completely supported by the notification backend. - * Changes the popup to be compatible if needed. - * @param notification the notification data to check - */ - void ensurePopupCompatibility(KNotification *notification); - /** * Removes HTML from a given string. Replaces line breaks with \n and * HTML entities by their 'normal forms'. * @param string the HTML to remove. @@ -259,10 +253,10 @@ // if Growl can display our popups, use that instead if (NotifyByPopupGrowl::canPopup()) { - d->ensurePopupCompatibility(notification); QString appCaption, iconName; d->getAppCaptionAndIconName(notifyConfig, &appCaption, &iconName); + appCaption = d->stripHtml(appCaption); //did the user override the icon name? if (!notification->iconName().isEmpty()) { @@ -272,7 +266,12 @@ KIconLoader iconLoader(iconName); QPixmap appIcon = iconLoader.loadIcon(iconName, KIconLoader::Small); - NotifyByPopupGrowl::popup(&appIcon, timeout, appCaption, notification->text()); + // Our growl implementation does not support html stuff + // so strip it off right away + QString text = notification->text(); + text = d->stripHtml(text); + + NotifyByPopupGrowl::popup(&appIcon, timeout, appCaption, text); // Finish immediately, because current NotifyByPopupGrowl can't callback finish(notification); @@ -547,7 +546,6 @@ // capabilities immediately, so we don't need to wait for callback as in the case // of galago notifications queryPopupServerCapabilities(); - ensurePopupCompatibility(notification); KIconLoader iconLoader(iconName); QPixmap appIcon = iconLoader.loadIcon(iconName, KIconLoader::Small); @@ -631,25 +629,38 @@ iconName = notification->iconName(); } - // FIXME: rename this to something better reflecting what this is doing...maybe - ensurePopupCompatibility(notification); - args.append(appCaption); // app_name args.append(updateId); // notification to update args.append(iconName); // app_icon - args.append(notification->title().isEmpty() ? appCaption : notification->title()); // summary - args.append(notification->text()); // body + + QString title = notification->title().isEmpty() ? appCaption : notification->title(); + QString text = notification->text(); + + if (!popupServerCapabilities.contains("body-markup")) { + if (title.startsWith("<html>")) { + title = stripHtml(title); + } + if (text.startsWith("<html>")) { + text = stripHtml(text); + } + } + + args.append(title); // summary + args.append(text); // body + // galago spec defines action list to be list like // (act_id1, action1, act_id2, action2, ...) // // assign id's to actions like it's done in fillPopup() method // (i.e. starting from 1) QStringList actionList; - int actId = 0; - Q_FOREACH (const QString &actionName, notification->actions()) { - actId++; - actionList.append(QString::number(actId)); - actionList.append(actionName); + if (popupServerCapabilities.contains("actions")) { + int actId = 0; + Q_FOREACH (const QString &actionName, notification->actions()) { + actId++; + actionList.append(QString::number(actId)); + actionList.append(actionName); + } } args.append(actionList); // actions @@ -745,22 +756,6 @@ } } -void NotifyByPopupPrivate::ensurePopupCompatibility(KNotification *notification) -{ - if (!popupServerCapabilities.contains("actions")) { - notification->setActions(QStringList()); - } - - if (!popupServerCapabilities.contains("body-markup")) { - if (notification->title().startsWith("<html>")) { - notification->setTitle(stripHtml(notification->title())); - } - if (notification->text().startsWith("<html>")) { - notification->setText(stripHtml(notification->text())); - } - } -} - QString NotifyByPopupPrivate::stripHtml(const QString &text) { QXmlStreamReader r("<elem>" + text + "</elem>"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.9.0/src/notifybytaskbar.cpp new/knotifications-5.10.0/src/notifybytaskbar.cpp --- old/knotifications-5.9.0/src/notifybytaskbar.cpp 2015-04-04 14:10:05.000000000 +0200 +++ new/knotifications-5.10.0/src/notifybytaskbar.cpp 2015-05-03 17:18:52.000000000 +0200 @@ -41,6 +41,12 @@ void NotifyByTaskbar::notify(KNotification *notification, KNotifyConfig *config) { Q_UNUSED(config); + if (!notification->widget()) { + qWarning() << "Could not notify " << notification->eventId() << "by taskbar, notification has no associated widget"; + finish(notification); + return; + } + qDebug() << notification->id() << notification->widget()->topLevelWidget()->winId(); WId win = notification->widget()->topLevelWidget()->winId();
