Hello community, here is the log from the commit of package knotifyconfig for openSUSE:Leap:15.2 checked in at 2020-04-21 19:05:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/knotifyconfig (Old) and /work/SRC/openSUSE:Leap:15.2/.knotifyconfig.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "knotifyconfig" Tue Apr 21 19:05:29 2020 rev:62 rq:794327 version:5.69.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/knotifyconfig/knotifyconfig.changes 2020-03-21 16:45:13.517528502 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.knotifyconfig.new.2738/knotifyconfig.changes 2020-04-21 19:05:29.879741504 +0200 @@ -1,0 +2,10 @@ +Sun Apr 5 19:45:45 UTC 2020 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.69.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/kde-frameworks-5.69.0 +- Changes since 5.68.0: + * Use libcanberra as primary means of previewing the sound + +------------------------------------------------------------------- Old: ---- knotifyconfig-5.68.0.tar.xz knotifyconfig-5.68.0.tar.xz.sig New: ---- knotifyconfig-5.69.0.tar.xz knotifyconfig-5.69.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ knotifyconfig.spec ++++++ --- /var/tmp/diff_new_pack.LOhVVt/_old 2020-04-21 19:05:30.291742343 +0200 +++ /var/tmp/diff_new_pack.LOhVVt/_new 2020-04-21 19:05:30.291742343 +0200 @@ -17,14 +17,14 @@ %define lname libKF5NotifyConfig5 -%define _tar_path 5.68 +%define _tar_path 5.69 # 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: knotifyconfig -Version: 5.68.0 +Version: 5.69.0 Release: 0 Summary: Configuration dialog for desktop notifications License: LGPL-2.1-or-later @@ -40,6 +40,7 @@ BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes BuildRequires: kf5-filesystem +BuildRequires: pkgconfig BuildRequires: cmake(KF5Bookmarks) >= %{_kf5_bugfix_version} BuildRequires: cmake(KF5Completion) >= %{_kf5_bugfix_version} BuildRequires: cmake(KF5ConfigWidgets) >= %{_kf5_bugfix_version} @@ -57,11 +58,11 @@ BuildRequires: cmake(KF5WidgetsAddons) >= %{_kf5_bugfix_version} BuildRequires: cmake(KF5WindowSystem) >= %{_kf5_bugfix_version} BuildRequires: cmake(KF5XmlGui) >= %{_kf5_bugfix_version} -BuildRequires: cmake(Phonon4Qt5) BuildRequires: cmake(Qt5DBus) >= 5.12.0 BuildRequires: cmake(Qt5Test) >= 5.12.0 BuildRequires: cmake(Qt5TextToSpeech) >= 5.12.0 BuildRequires: cmake(Qt5Widgets) >= 5.12.0 +BuildRequires: pkgconfig(libcanberra) %description KNotifyConfig provides a configuration dialog for desktop notifications which ++++++ knotifyconfig-5.68.0.tar.xz -> knotifyconfig-5.69.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/CMakeLists.txt new/knotifyconfig-5.69.0/CMakeLists.txt --- old/knotifyconfig-5.68.0/CMakeLists.txt 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/CMakeLists.txt 2020-04-05 01:02:51.000000000 +0200 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.68.0") # handled by release scripts -set(KF5_DEP_VERSION "5.68.0") # handled by release scripts +set(KF5_VERSION "5.69.0") # handled by release scripts +set(KF5_DEP_VERSION "5.69.0") # handled by release scripts project(KNotifyConfig VERSION ${KF5_VERSION}) # Dependencies include(FeatureSummary) -find_package(ECM 5.68.0 NO_MODULE) +find_package(ECM 5.69.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -25,13 +25,27 @@ include(KDEInstallDirs) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) -find_package(Phonon4Qt5 4.6.60 NO_MODULE) find_package(KF5Completion ${KF5_DEP_VERSION} REQUIRED) find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED) find_package(KF5I18n ${KF5_DEP_VERSION} REQUIRED) find_package(KF5KIO ${KF5_DEP_VERSION} REQUIRED) +find_package(Canberra) +set_package_properties(Canberra PROPERTIES + PURPOSE "Needed to preview notification sounds" + TYPE OPTIONAL) +if (Canberra_FOUND) + add_definitions(-DHAVE_CANBERRA) +else() + # This is REQUIRED since you cannot tell CMake "either one of those two optional ones are required" + find_package(Phonon4Qt5 4.6.60 NO_MODULE REQUIRED) + set_package_properties(Phonon4Qt5 PROPERTIES + DESCRIPTION "Qt-based audio library" + PURPOSE "Needed to preview notification sounds when Canberra isn't available") + add_definitions(-DHAVE_PHONON4QT5) +endif() + # Includes include(GenerateExportHeader) @@ -51,7 +65,7 @@ option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) -add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054300) +add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400) # Subdirectories add_definitions(-DTRANSLATION_DOMAIN=\"knotifyconfig5\") if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/po/fi/knotifyconfig5.po new/knotifyconfig-5.69.0/po/fi/knotifyconfig5.po --- old/knotifyconfig-5.68.0/po/fi/knotifyconfig5.po 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/po/fi/knotifyconfig5.po 2020-04-05 01:02:51.000000000 +0200 @@ -12,7 +12,6 @@ # Mikko Piippo <pii...@cc.helsinki.fi>, 2007. # Teemu Rytilahti <t...@d5k.net>, 2008. # Tommi Nieminen <transla...@legisign.org>, 2009, 2010, 2011. -# Tommi Nieminen <tommi.niemi...@legisign.org>, 2009. # Jorma Karvonen <karvonen.jo...@gmail.com>, 2010. # Lasse Liehu <lasse.li...@gmail.com>, 2006, 2010, 2011, 2012, 2013, 2014, 2015. # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/po/nb/knotifyconfig5.po new/knotifyconfig-5.69.0/po/nb/knotifyconfig5.po --- old/knotifyconfig-5.68.0/po/nb/knotifyconfig5.po 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/po/nb/knotifyconfig5.po 2020-04-05 01:02:51.000000000 +0200 @@ -14,7 +14,7 @@ "POT-Creation-Date: 2020-01-24 02:58+0100\n" "PO-Revision-Date: 2015-04-30 08:41+0200\n" "Last-Translator: Bjørn Steensrud <bjor...@skogkatt.homelinux.org>\n" -"Language-Team: Norwegian Bokmål <i18n...@lister.ping.uio.no>\n" +"Language-Team: Norwegian Bokmål <l10n...@lister.huftis.org>\n" "Language: nb\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/po/nn/knotifyconfig5.po new/knotifyconfig-5.69.0/po/nn/knotifyconfig5.po --- old/knotifyconfig-5.68.0/po/nn/knotifyconfig5.po 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/po/nn/knotifyconfig5.po 2020-04-05 01:02:51.000000000 +0200 @@ -11,7 +11,7 @@ "POT-Creation-Date: 2020-01-24 02:58+0100\n" "PO-Revision-Date: 2015-06-03 19:17+0100\n" "Last-Translator: Karl Ove Hufthammer <k...@huftis.org>\n" -"Language-Team: Norwegian Nynorsk <i18n...@lister.ping.uio.no>\n" +"Language-Team: Norwegian Nynorsk <l10n...@lister.huftis.org>\n" "Language: nn\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/po/se/knotifyconfig5.po new/knotifyconfig-5.69.0/po/se/knotifyconfig5.po --- old/knotifyconfig-5.68.0/po/se/knotifyconfig5.po 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/po/se/knotifyconfig5.po 2020-04-05 01:02:51.000000000 +0200 @@ -8,7 +8,7 @@ "POT-Creation-Date: 2020-01-24 02:58+0100\n" "PO-Revision-Date: 2012-05-30 23:19+0200\n" "Last-Translator: Børre Gaup <boe...@skolelinux.no>\n" -"Language-Team: Northern Sami <i18n-...@lister.ping.uio.no>\n" +"Language-Team: Northern Sami <l10n...@lister.huftis.org>\n" "Language: se\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/po/zh_CN/knotifyconfig5.po new/knotifyconfig-5.69.0/po/zh_CN/knotifyconfig5.po --- old/knotifyconfig-5.68.0/po/zh_CN/knotifyconfig5.po 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/po/zh_CN/knotifyconfig5.po 2020-04-05 01:02:51.000000000 +0200 @@ -15,7 +15,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-01-24 02:58+0100\n" -"PO-Revision-Date: 2020-01-20 21:48\n" +"PO-Revision-Date: 2020-03-25 19:51\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/src/CMakeLists.txt new/knotifyconfig-5.69.0/src/CMakeLists.txt --- old/knotifyconfig-5.68.0/src/CMakeLists.txt 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/src/CMakeLists.txt 2020-04-05 01:02:51.000000000 +0200 @@ -29,11 +29,10 @@ KF5::KIOWidgets # KUrlRequester Qt5::DBus) -if(HAVE_PHONON) - target_link_libraries(KF5NotifyConfig - PRIVATE - Phonon::phonon4qt5 - ) +if(Canberra_FOUND) + target_link_libraries(KF5NotifyConfig PRIVATE Canberra::Canberra) +elseif (Phonon4Qt5_FOUND) + target_link_libraries(KF5NotifyConfig PRIVATE Phonon::phonon4qt5) endif() set_target_properties(KF5NotifyConfig PROPERTIES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/src/knotifyconfigactionswidget.cpp new/knotifyconfig-5.69.0/src/knotifyconfigactionswidget.cpp --- old/knotifyconfig-5.68.0/src/knotifyconfigactionswidget.cpp 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/src/knotifyconfigactionswidget.cpp 2020-04-05 01:02:51.000000000 +0200 @@ -18,10 +18,14 @@ #include "knotifyconfigactionswidget.h" #include "knotifyconfigelement.h" +#include <QDebug> #include <QStandardPaths> #include "knotify-config.h" -#if HAVE_PHONON + +#if defined(HAVE_CANBERRA) +#include <canberra.h> +#elif defined(HAVE_PHONON) #include <phonon/mediaobject.h> #endif @@ -63,7 +67,16 @@ m_ui.TTS_select->setVisible(false); m_ui.TTS_combo->setVisible(false); } +} +KNotifyConfigActionsWidget::~KNotifyConfigActionsWidget() +{ +#ifdef HAVE_CANBERRA + if (m_context) { + ca_context_destroy(m_context); + } + m_context = nullptr; +#endif } void KNotifyConfigActionsWidget::setConfigElement(KNotifyConfigElement *config) @@ -149,7 +162,49 @@ } soundURL.clear(); } -#if HAVE_PHONON + +#if defined(HAVE_CANBERRA) + if (!m_context) { + int ret = ca_context_create(&m_context); + if (ret != CA_SUCCESS) { + qWarning() << "Failed to initialize canberra context for audio notification:" << ca_strerror(ret); + m_context = nullptr; + return; + } + + QString desktopFileName = QGuiApplication::desktopFileName(); + // handle apps which set the desktopFileName property with filename suffix, + // due to unclear API dox (https://bugreports.qt.io/browse/QTBUG-75521) + if (desktopFileName.endsWith(QLatin1String(".desktop"))) { + desktopFileName.chop(8); + } + ret = ca_context_change_props(m_context, + CA_PROP_APPLICATION_NAME, qUtf8Printable(qApp->applicationDisplayName()), + CA_PROP_APPLICATION_ID, qUtf8Printable(desktopFileName), + CA_PROP_APPLICATION_ICON_NAME, qUtf8Printable(qApp->windowIcon().name()), + nullptr); + if (ret != CA_SUCCESS) { + qWarning() << "Failed to set application properties on canberra context for audio notification:" << ca_strerror(ret); + } + } + + ca_proplist *props = nullptr; + ca_proplist_create(&props); + + // We'll also want this cached for a time. volatile makes sure the cache is + // dropped after some time or when the cache is under pressure. + ca_proplist_sets(props, CA_PROP_MEDIA_FILENAME, QFile::encodeName(soundURL.toLocalFile()).constData()); + ca_proplist_sets(props, CA_PROP_CANBERRA_CACHE_CONTROL, "volatile"); + + int ret = ca_context_play_full(m_context, 0, props, nullptr, nullptr); + + ca_proplist_destroy(props); + + if (ret != CA_SUCCESS) { + qWarning() << "Failed to play sound with canberra:" << ca_strerror(ret); + return; + } +#elif defined(HAVE_PHONON) Phonon::MediaObject *media = Phonon::createPlayer(Phonon::NotificationCategory, soundURL); media->play(); connect(media, SIGNAL(finished()), media, SLOT(deleteLater())); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifyconfig-5.68.0/src/knotifyconfigactionswidget.h new/knotifyconfig-5.69.0/src/knotifyconfigactionswidget.h --- old/knotifyconfig-5.68.0/src/knotifyconfigactionswidget.h 2020-03-07 10:51:03.000000000 +0100 +++ new/knotifyconfig-5.69.0/src/knotifyconfigactionswidget.h 2020-04-05 01:02:51.000000000 +0200 @@ -23,6 +23,10 @@ #include <QWidget> #include "ui_knotifyconfigactionswidgetbase.h" +#ifdef HAVE_CANBERRA +struct ca_context; +#endif + class KNotifyConfigElement; /** @@ -35,7 +39,7 @@ Q_OBJECT public: explicit KNotifyConfigActionsWidget(QWidget *parent); - ~KNotifyConfigActionsWidget() {} + ~KNotifyConfigActionsWidget() override; void setConfigElement(KNotifyConfigElement *config); void save(KNotifyConfigElement *config); @@ -46,6 +50,9 @@ void slotTTSComboChanged(); private: Ui::KNotifyConfigActionsWidgetBase m_ui; +#ifdef HAVE_CANBERRA + ca_context *m_context = nullptr; +#endif }; #endif // KNOTIFYCONFIGACTIONSWIDGET_H