Hello community, here is the log from the commit of package knotifications for openSUSE:Factory checked in at 2014-12-21 11:58:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2014-11-11 01:09:41.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.knotifications.new/knotifications.changes 2014-12-21 11:58:26.000000000 +0100 @@ -1,0 +2,9 @@ +Sat Dec 6 12:53:43 UTC 2014 - [email protected] + +- Update to 5.5.0 + * Make KNotificationPlugin a public class + * KPassivePopup - Set default hide delay + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.5.0.php + +------------------------------------------------------------------- Old: ---- knotifications-5.4.0.tar.xz New: ---- knotifications-5.5.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ knotifications.spec ++++++ --- /var/tmp/diff_new_pack.NF1kua/_old 2014-12-21 11:58:27.000000000 +0100 +++ /var/tmp/diff_new_pack.NF1kua/_new 2014-12-21 11:58:27.000000000 +0100 @@ -18,11 +18,11 @@ %define lname libKF5Notifications5 Name: knotifications -Version: 5.4.0 +Version: 5.5.0 Release: 0 %define kf5_version %{version} BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 1.4.0 +BuildRequires: extra-cmake-modules >= 1.5.0 BuildRequires: fdupes BuildRequires: kcodecs-devel >= %{kf5_version} BuildRequires: kconfig-devel >= %{kf5_version} @@ -43,7 +43,7 @@ License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/stable/frameworks/5.4/%{name}-%{version}.tar.xz +Source: http://download.kde.org/stable/frameworks/5.5/%{name}-%{version}.tar.xz Source1: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -96,6 +96,7 @@ %defattr(-,root,root) %doc COPYING* %{_kf5_libdir}/libKF5Notifications.so.* +%{_kf5_servicetypesdir}/ %files devel %defattr(-,root,root) ++++++ knotifications-5.4.0.tar.xz -> knotifications-5.5.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/CMakeLists.txt new/knotifications-5.5.0/CMakeLists.txt --- old/knotifications-5.4.0/CMakeLists.txt 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/CMakeLists.txt 2014-12-06 13:42:22.000000000 +0100 @@ -3,7 +3,7 @@ project(KNotifications) # ECM setup -find_package(ECM 1.4.0 REQUIRED NO_MODULE) +find_package(ECM 1.5.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.4.0") # handled by release scripts -set(KF5_DEP_VERSION "5.4.0") # handled by release scripts +set(KF5_VERSION "5.5.0") # handled by release scripts +set(KF5_DEP_VERSION "5.5.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.4.0/po/fi/knotifications5_qt.po new/knotifications-5.5.0/po/fi/knotifications5_qt.po --- old/knotifications-5.4.0/po/fi/knotifications5_qt.po 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/po/fi/knotifications5_qt.po 2014-12-06 13:42:22.000000000 +0100 @@ -29,7 +29,7 @@ "POT-Creation-Date: 2014-03-23 01:50+0000\n" "PO-Revision-Date: 2014-03-30 00:13+0200\n" "Last-Translator: Lasse Liehu <[email protected]>\n" -"Language-Team: Finnish <[email protected]>\n" +"Language-Team: Finnish <[email protected]>\n" "Language: fi\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/knotifications-5.4.0/po/it/knotifications5_qt.po new/knotifications-5.5.0/po/it/knotifications5_qt.po --- old/knotifications-5.4.0/po/it/knotifications5_qt.po 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/po/it/knotifications5_qt.po 2014-12-06 13:42:22.000000000 +0100 @@ -23,8 +23,8 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 1.5\n" "X-Qt-Contexts: true\n" #: knotificationrestrictions.cpp:184 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/po/lt/knotifications5_qt.po new/knotifications-5.5.0/po/lt/knotifications5_qt.po --- old/knotifications-5.4.0/po/lt/knotifications5_qt.po 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/po/lt/knotifications5_qt.po 2014-12-06 13:42:22.000000000 +0100 @@ -12,7 +12,7 @@ "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: 2014-03-16 20:46+0200\n" +"PO-Revision-Date: 2014-11-11 00:15+0200\n" "Last-Translator: Liudas Ališauskas <[email protected]>\n" "Language-Team: Lithuanian <[email protected]>\n" "Language: lt\n" @@ -25,43 +25,32 @@ "X-Qt-Contexts: true\n" #: knotificationrestrictions.cpp:184 -#, fuzzy -#| msgid "Unknown Application" msgctxt "KNotificationRestrictions|" msgid "Unknown Application" msgstr "Nežinoma programa" #: kstatusnotifieritem.cpp:459 kstatusnotifieritem.cpp:899 -#, fuzzy -#| msgid "&Minimize" msgctxt "KStatusNotifierItem|" msgid "&Minimize" msgstr "Sum&ažinti" #: kstatusnotifieritem.cpp:724 -#, fuzzy -#| msgid "Quit" msgctxt "KStatusNotifierItem|" msgid "Quit" -msgstr "Išjungti" +msgstr "Išeiti" #: kstatusnotifieritem.cpp:897 -#, fuzzy -#| msgid "&Restore" msgctxt "KStatusNotifierItem|" msgid "&Restore" msgstr "&Atstatyti" #: kstatusnotifieritem.cpp:911 -#, 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>Ar tikrai norite nutraukti <b>%1</b>?</qt>" #: kstatusnotifieritem.cpp:914 -#, fuzzy -#| msgid "Confirm Quit From System Tray" msgctxt "KStatusNotifierItem|" msgid "Confirm Quit From System Tray" msgstr "Patvirtinti nutraukimą sistemos dėkle" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/po/tr/knotifications5_qt.po new/knotifications-5.5.0/po/tr/knotifications5_qt.po --- old/knotifications-5.4.0/po/tr/knotifications5_qt.po 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/po/tr/knotifications5_qt.po 2014-12-06 13:42:22.000000000 +0100 @@ -16,20 +16,21 @@ # Ozan Çağlayan <[email protected]>, 2010, 2011. # Serdar SOYTETİR <[email protected]>, 2010, 2012. # Volkan Gezer <[email protected]>, 2013, 2014. +# Kaan Ozdincer <[email protected]>, 2014. 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: 2014-03-30 14:13+0200\n" -"Last-Translator: Volkan Gezer <[email protected]>\n" +"PO-Revision-Date: 2014-11-12 00:33+0200\n" +"Last-Translator: Kaan Ozdincer <[email protected]>\n" "Language-Team: Turkish <[email protected]>\n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 1.4\n" "X-Qt-Contexts: true\n" #: knotificationrestrictions.cpp:184 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/CMakeLists.txt new/knotifications-5.5.0/src/CMakeLists.txt --- old/knotifications-5.4.0/src/CMakeLists.txt 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/CMakeLists.txt 2014-12-06 13:42:22.000000000 +0100 @@ -11,7 +11,7 @@ knotificationrestrictions.cpp knotifyconfig.cpp - knotifyplugin.cpp + knotificationplugin.cpp notifybypopup.cpp imageconverter.cpp #needed to marshal images for sending over dbus by NotifyByPopup notifybypopupgrowl.cpp @@ -88,6 +88,7 @@ KPassivePopup KStatusNotifierItem KNotificationRestrictions + KNotificationPlugin REQUIRED_HEADERS KNotifications_HEADERS ) @@ -110,6 +111,11 @@ DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} RENAME kf5_org.kde.StatusNotifierWatcher.xml) +install(FILES + knotificationplugin.desktop + DESTINATION ${SERVICETYPES_INSTALL_DIR}) + include(ECMGeneratePriFile) ecm_generate_pri_file(BASE_NAME KNotifications LIB_NAME KF5Notifications DEPS "widgets" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KF5_INCLUDE_INSTALL_DIR}/KNotifications) install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotification.cpp new/knotifications-5.5.0/src/knotification.cpp --- old/knotifications-5.4.0/src/knotification.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/knotification.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -1,5 +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]> code from KNotify/KNotifyClient Copyright (c) 1997 Christian Esken ([email protected]) @@ -40,6 +41,7 @@ #include <QTabWidget> #include <QFile> #include <QStringList> +#include <QDebug> struct KNotification::Private { QString eventId; @@ -124,7 +126,7 @@ void KNotification::setWidget(QWidget *wid) { d->widget = wid; - setParent(wid); +// setParent(wid); if (wid && d->flags & CloseWhenWidgetActivated) { wid->installEventFilter(this); } @@ -413,8 +415,10 @@ bool KNotification::eventFilter(QObject *watched, QEvent *event) { if (watched == d->widget) { + qDebug() << "event occured:" << event->type(); if (event->type() == QEvent::WindowActivate) { if (d->flags & CloseWhenWidgetActivated) { + qDebug() << "closing"; QTimer::singleShot(500, this, SLOT(close())); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotification.h new/knotifications-5.5.0/src/knotification.h --- old/knotifications-5.4.0/src/knotification.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/knotification.h 2014-12-06 13:42:22.000000000 +0100 @@ -1,5 +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]> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -122,7 +123,7 @@ * </pre> * These are the default settings for each notifiable event. * Action is the string representing the action. Actions can be added to - * the KNotify daemon as plugins, by deriving from KNotifyPlugin. + * KNotification as plugins, by deriving from KNotificationPlugin. * At the time of writing, the following actions are available: Taskbar, * Sound, Popup, Logfile, KTTS, Execute. * Actions can be combined by seperating them with '|'. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotificationmanager.cpp new/knotifications-5.5.0/src/knotificationmanager.cpp --- old/knotifications-5.4.0/src/knotificationmanager.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/knotificationmanager.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -29,7 +29,7 @@ #include <kservicetypetrader.h> #include "knotifyconfig.h" -#include "knotifyplugin.h" +#include "knotificationplugin.h" #include "notifybypopup.h" #include "notifybyaudio.h" #include "notifybylogfile.h" @@ -40,7 +40,7 @@ struct KNotificationManager::Private { QHash<int, KNotification *> notifications; - QHash<QString, KNotifyPlugin *> notifyPlugins; + QHash<QString, KNotificationPlugin *> notifyPlugins; // incremental ids for notifications int notifyIdCounter; @@ -77,13 +77,13 @@ #endif // addPlugin(new NotifyByKTTS(this)); - KService::List offers = KServiceTypeTrader::self()->query("KNotify/NotifyMethod"); + KService::List offers = KServiceTypeTrader::self()->query("KNotification/NotifyPlugin"); QVariantList args; QString error; Q_FOREACH (const KService::Ptr service, offers) { - KNotifyPlugin *plugin = service->createInstance<KNotifyPlugin>(this, args, &error); + KNotificationPlugin *plugin = service->createInstance<KNotificationPlugin>(this, args, &error); if (plugin) { addPlugin(plugin); } else { @@ -97,7 +97,7 @@ delete d; } -void KNotificationManager::addPlugin(KNotifyPlugin *notifyPlugin) +void KNotificationManager::addPlugin(KNotificationPlugin *notifyPlugin) { d->notifyPlugins[notifyPlugin->optionName()] = notifyPlugin; connect(notifyPlugin, SIGNAL(finished(KNotification*)), this, SLOT(notifyPluginFinished(KNotification*))); @@ -139,7 +139,7 @@ KNotification *n = d->notifications.take(id); qDebug() << "Closing notification" << id; - Q_FOREACH (KNotifyPlugin *plugin, d->notifyPlugins) { + Q_FOREACH (KNotificationPlugin *plugin, d->notifyPlugins) { plugin->close(n); } } @@ -166,7 +166,7 @@ continue; } - KNotifyPlugin *notifyPlugin = d->notifyPlugins[action]; + KNotificationPlugin *notifyPlugin = d->notifyPlugins[action]; n->ref(); qDebug() << "Calling notify on" << notifyPlugin->optionName(); notifyPlugin->notify(n, notifyConfig); @@ -186,7 +186,7 @@ KNotifyConfig notifyConfig(n->appName(), n->contexts(), n->eventId()); - Q_FOREACH (KNotifyPlugin *p, d->notifyPlugins) { + Q_FOREACH (KNotificationPlugin *p, d->notifyPlugins) { p->update(n, ¬ifyConfig); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotificationmanager_p.h new/knotifications-5.5.0/src/knotificationmanager_p.h --- old/knotifications-5.4.0/src/knotificationmanager_p.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/knotificationmanager_p.h 2014-12-06 13:42:22.000000000 +0100 @@ -25,7 +25,7 @@ class KNotification; class QPixmap; class QStringList; -class KNotifyPlugin; +class KNotificationPlugin; /** * @internal @@ -38,7 +38,7 @@ static KNotificationManager *self(); ~KNotificationManager(); - void addPlugin(KNotifyPlugin *notifyPlugin); + void addPlugin(KNotificationPlugin *notifyPlugin); /** * send the dbus call to the knotify server diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotificationplugin.cpp new/knotifications-5.5.0/src/knotificationplugin.cpp --- old/knotifications-5.4.0/src/knotificationplugin.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/knotifications-5.5.0/src/knotificationplugin.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -0,0 +1,54 @@ +/* + Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see <http://www.gnu.org/licenses/>. + + */ + +#include <KPluginFactory> + +#include "knotificationplugin.h" + +KNotificationPlugin::KNotificationPlugin(QObject *parent, const QVariantList &args) + : QObject(parent), + d(0) +{ + Q_UNUSED(args); +} + + +KNotificationPlugin::~KNotificationPlugin() +{ +} + + +void KNotificationPlugin::update(KNotification *notification, KNotifyConfig *config) +{ + Q_UNUSED(notification); + Q_UNUSED(config); +} + +void KNotificationPlugin::close(KNotification *notification) +{ + emit finished(notification); +} + +void KNotificationPlugin::finish(KNotification *notification) +{ + emit finished(notification); +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotificationplugin.desktop new/knotifications-5.5.0/src/knotificationplugin.desktop --- old/knotifications-5.4.0/src/knotificationplugin.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/knotifications-5.5.0/src/knotificationplugin.desktop 2014-12-06 13:42:22.000000000 +0100 @@ -0,0 +1,3 @@ +[Desktop Entry] +Type=ServiceType +X-KDE-ServiceType=KNotification/NotifyPlugin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotificationplugin.h new/knotifications-5.5.0/src/knotificationplugin.h --- old/knotifications-5.4.0/src/knotificationplugin.h 1970-01-01 01:00:00.000000000 +0100 +++ new/knotifications-5.5.0/src/knotificationplugin.h 2014-12-06 13:42:22.000000000 +0100 @@ -0,0 +1,110 @@ +/* + Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see <http://www.gnu.org/licenses/>. + + */ + +#ifndef KNOTIFICATIONPLUGIN_H +#define KNOTIFICATIONPLUGIN_H + +#include <QtCore/QObject> +#include <KPluginFactory> + +#include "knotifications_export.h" + +class KNotification; +class KNotificationPluginPrivate; +class KNotifyConfig; + +/** + * @brief abstract class for KNotification actions + * + * A KNotificationPlugin is responsible of notification presentation. + * You can subclass it to have your own presentation of a notification. + * + * You should reimplement the KNotificationPlugin::notify method to display the notification. + * + * @author Olivier Goffart <ogoffart at kde.org> +*/ +class KNOTIFICATIONS_EXPORT KNotificationPlugin : public QObject +{ + Q_OBJECT + +public: + KNotificationPlugin(QObject *parent = 0, const QVariantList &args = QVariantList()); + virtual ~KNotificationPlugin(); + + /** + * @brief return the name of this plugin. + * + * this is the name that should appear in the .notifyrc file, + * in the field Action=... if a notification is set to use this plugin + */ + virtual QString optionName() = 0; + + /** + * This function is called when the notification is sent. + * (or re-sent) + * You should implement this function to display a notification + * + * for each call to this function (even for re-notification), you MUST call finish(KNotification*) + * + * @param notification is the KNotification object + * @param notifyConfig is the configuration of the notification + */ + virtual void notify(KNotification *notification, KNotifyConfig *notifyConfig) = 0; + + /** + * This function is called when the notification has changed (such as the text or the icon) + */ + virtual void update(KNotification *notification, KNotifyConfig *config); + + /** + * This function is called when the notification has been closed + */ + virtual void close(KNotification *notification); + +protected: + /** + * emit the finished signal + * you MUST call this function for each call to notify(), even if you do nothing there + * + * call it when the presentation is finished (because the user closed the popup or the sound is finished) + * + * If your presentation is synchronous, you can even call this function from the notify() call itself + */ + void finish(KNotification *notification); + +Q_SIGNALS: + /** + * the presentation is finished. + */ + void finished(KNotification *notification); + /** + * emit this signal if one action was invoked + * @param id is the id of the notification + * @param action is the action number. zero for the default action + */ + void actionInvoked(int id , int action); + +private: + KNotificationPluginPrivate *const d; + +}; + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotifyplugin.cpp new/knotifications-5.5.0/src/knotifyplugin.cpp --- old/knotifications-5.4.0/src/knotifyplugin.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/knotifyplugin.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,56 +0,0 @@ -/* - Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see <http://www.gnu.org/licenses/>. - - */ - -#include <KPluginFactory> - -#include "knotifyplugin.h" - -KNotifyPlugin::KNotifyPlugin(QObject *parent, const QVariantList &args) - : QObject(parent), - d(0) -{ - Q_UNUSED(args); -} - - -KNotifyPlugin::~KNotifyPlugin() -{ -} - - -void KNotifyPlugin::update(KNotification *notification, KNotifyConfig *config) -{ - Q_UNUSED(notification); - Q_UNUSED(config); -} - -void KNotifyPlugin::close(KNotification *notification) -{ - emit finished(notification); -} - -void KNotifyPlugin::finish(KNotification *notification) -{ - emit finished(notification); -} - -#include "knotifyplugin.moc" - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/knotifyplugin.h new/knotifications-5.5.0/src/knotifyplugin.h --- old/knotifications-5.4.0/src/knotifyplugin.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/knotifyplugin.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,116 +0,0 @@ -/* - Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see <http://www.gnu.org/licenses/>. - - */ - - - -#ifndef KNOTIFYPLUGIN_H -#define KNOTIFYPLUGIN_H - -#include <QtCore/QObject> -#include <KPluginFactory> - -#include "knotifications_export.h" - -class KNotification; -class KNotifyPluginPrivate; -class KNotifyConfig; - - -/** - * @brief abstract class for KNotify actions - * - * A KNotifyPlugin is responsible of one presentation. You can subclass it to have your own knotify presentation. - * - * You should reimplement the KNotifyPlugin::notify method to display the notification. - * - * @author Olivier Goffart <ogoffart at kde.org> -*/ -class KNOTIFICATIONS_EXPORT KNotifyPlugin : public QObject -{ - Q_OBJECT - -public: - KNotifyPlugin(QObject *parent = 0, const QVariantList &args = QVariantList()); - virtual ~KNotifyPlugin(); - - /** - * @brief return the name of this plugin. - * - * this is the name that should appear in the .knotifyrc file, - * in the field Action=... if a notification is set to use this plugin - */ - virtual QString optionName() = 0; - - /** - * This function is called when the notification is sent. - * (or re-sent) - * You should implement this function to display a notification - * - * for each call to this function (even for re-notification), you MUST call finish(int) - * - * @param notification is the KNotification object - * @param notifyConfig is the configuration of the notification - */ - virtual void notify(KNotification *notification, KNotifyConfig *notifyConfig) = 0; - - /** - * This function is called when the notification has changed (such as the text or the icon) - */ - virtual void update(KNotification *notification, KNotifyConfig *config); - - /** - * This function is called when the notification has been closed - */ - virtual void close(KNotification *notification); - -protected: - /** - * emit the finished signal - * you MUST call this function for each call to notify(), even if you do nothing there - * - * call it when the presentation is finished (because the user closed the popup or the sound is finished) - * - * If your presentation is synchronous, you can even call this function from the notify() call itself - */ - void finish(KNotification *notification); - -Q_SIGNALS: - /** - * the presentation is finished. - */ - void finished(KNotification *notification); - /** - * emit this signal if one action was invoked - * @param id is the id of the notification - * @param action is the action number. zero for the default action - */ - void actionInvoked(int id , int action); - -private: - KNotifyPluginPrivate *const d; - -}; - -#define K_EXPORT_KNOTIFY_METHOD(libname,classname) \ -K_PLUGIN_FACTORY(KNotifyMethodPluginFactory, registerPlugin<classname>();) \ -K_EXPORT_PLUGIN(KNotifyMethodPluginFactory("knotify_method_" #libname)) - -#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/kpassivepopup.cpp new/knotifications-5.5.0/src/kpassivepopup.cpp --- old/knotifications-5.4.0/src/kpassivepopup.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/kpassivepopup.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -349,7 +349,7 @@ void KPassivePopup::setTimeout(int delay) { - d->hideDelay = delay; + d->hideDelay = delay < 0 ? DEFAULT_POPUP_TIME : delay; if (d->hideTimer->isActive()) { if (delay) { d->hideTimer->start(delay); @@ -553,7 +553,7 @@ pop->setPopupStyle(popupStyle); pop->setAutoDelete(true); pop->setView(caption, text, icon); - pop->d->hideDelay = timeout; + pop->d->hideDelay = timeout < 0 ? DEFAULT_POPUP_TIME : timeout; if (p.isNull()) { pop->show(); } else { @@ -581,7 +581,7 @@ pop->setPopupStyle(popupStyle); pop->setAutoDelete(true); pop->setView(caption, text, icon); - pop->d->hideDelay = timeout; + pop->d->hideDelay = timeout < 0 ? DEFAULT_POPUP_TIME : timeout; if (p.isNull()) { pop->show(); } else { @@ -598,7 +598,7 @@ pop->setPopupStyle(popupStyle); pop->setAutoDelete(true); pop->setView(caption, text, icon); - pop->d->hideDelay = timeout; + pop->d->hideDelay = timeout < 0 ? DEFAULT_POPUP_TIME : timeout; QPoint pos = pop->d->calculateNearbyPoint(parent->geometry()); pop->show(pos); pop->moveNear(parent->geometry()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/kstatusnotifieritem.h new/knotifications-5.5.0/src/kstatusnotifieritem.h --- old/knotifications-5.4.0/src/kstatusnotifieritem.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/kstatusnotifieritem.h 2014-12-06 13:42:22.000000000 +0100 @@ -291,7 +291,7 @@ //ToolTip handling /** * Sets a new toolTip or this icon, a toolTip is composed of an icon, - * a title ad a text, all fields are optional. + * a title and a text, all fields are optional. * * @param iconName a QIcon::fromTheme compatible name for the tootip icon * @param title tootip title diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybyaudio.cpp new/knotifications-5.5.0/src/notifybyaudio.cpp --- old/knotifications-5.4.0/src/notifybyaudio.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybyaudio.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -36,7 +36,7 @@ #include <phonon/audiooutput.h> NotifyByAudio::NotifyByAudio(QObject *parent) - : KNotifyPlugin(parent) + : KNotificationPlugin(parent) { m_audioOutput = new Phonon::AudioOutput(Phonon::NotificationCategory, this); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybyaudio.h new/knotifications-5.5.0/src/notifybyaudio.h --- old/knotifications-5.4.0/src/notifybyaudio.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybyaudio.h 2014-12-06 13:42:22.000000000 +0100 @@ -23,7 +23,7 @@ #ifndef NOTIFYBYAUDIO_H #define NOTIFYBYAUDIO_H -#include "knotifyplugin.h" +#include "knotificationplugin.h" #include <phonon/MediaObject> @@ -35,7 +35,7 @@ class KNotification; -class NotifyByAudio : public KNotifyPlugin +class NotifyByAudio : public KNotificationPlugin { Q_OBJECT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybyexecute.cpp new/knotifications-5.5.0/src/notifybyexecute.cpp --- old/knotifications-5.4.0/src/notifybyexecute.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybyexecute.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -32,7 +32,7 @@ #include <kmacroexpander.h> NotifyByExecute::NotifyByExecute(QObject *parent) - : KNotifyPlugin(parent) + : KNotificationPlugin(parent) { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybyexecute.h new/knotifications-5.5.0/src/notifybyexecute.h --- old/knotifications-5.4.0/src/notifybyexecute.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybyexecute.h 2014-12-06 13:42:22.000000000 +0100 @@ -24,9 +24,9 @@ #ifndef NOTIFYBYEXECUTE_H #define NOTIFYBYEXECUTE_H -#include "knotifyplugin.h" +#include "knotificationplugin.h" -class NotifyByExecute : public KNotifyPlugin +class NotifyByExecute : public KNotificationPlugin { Q_OBJECT public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybyktts.cpp new/knotifications-5.5.0/src/notifybyktts.cpp --- old/knotifications-5.4.0/src/notifybyktts.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybyktts.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -28,7 +28,7 @@ #include <klocale.h> #include <knotifyconfig.h> -NotifyByKTTS::NotifyByKTTS(QObject *parent) : KNotifyPlugin(parent),m_kspeech(0), tryToStartKttsd( false ) +NotifyByKTTS::NotifyByKTTS(QObject *parent) : KNotificationPlugin(parent),m_kspeech(0), tryToStartKttsd( false ) { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybyktts.h new/knotifications-5.5.0/src/notifybyktts.h --- old/knotifications-5.4.0/src/notifybyktts.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybyktts.h 2014-12-06 13:42:22.000000000 +0100 @@ -25,11 +25,11 @@ #ifndef NOTIFYBYKTTS_H #define NOTIFYBYKTTS_H -#include "knotifyplugin.h" +#include "knotificationplugin.h" #include "kspeechinterface.h" -class NotifyByKTTS : public KNotifyPlugin +class NotifyByKTTS : public KNotificationPlugin { Q_OBJECT public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybylogfile.cpp new/knotifications-5.5.0/src/notifybylogfile.cpp --- old/knotifications-5.4.0/src/notifybylogfile.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybylogfile.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -33,7 +33,7 @@ #include "knotification.h" NotifyByLogfile::NotifyByLogfile(QObject *parent) - : KNotifyPlugin(parent) + : KNotificationPlugin(parent) { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybylogfile.h new/knotifications-5.5.0/src/notifybylogfile.h --- old/knotifications-5.4.0/src/notifybylogfile.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybylogfile.h 2014-12-06 13:42:22.000000000 +0100 @@ -24,11 +24,11 @@ #ifndef NOTIFYBYLOGFILE_H #define NOTIFYBYLOGFILE_H -#include "knotifyplugin.h" +#include "knotificationplugin.h" class KNotification; -class NotifyByLogfile : public KNotifyPlugin +class NotifyByLogfile : public KNotificationPlugin { Q_OBJECT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybypopup.cpp new/knotifications-5.5.0/src/notifybypopup.cpp --- old/knotifications-5.4.0/src/notifybypopup.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybypopup.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -155,7 +155,7 @@ //--------------------------------------------------------------------------------------- NotifyByPopup::NotifyByPopup(QObject *parent) - : KNotifyPlugin(parent), + : KNotificationPlugin(parent), d(new NotifyByPopupPrivate(this)) { d->animationTimer = 0; @@ -314,7 +314,7 @@ void NotifyByPopup::timerEvent(QTimerEvent *event) { if (event->timerId() != d->animationTimer) { - return KNotifyPlugin::timerEvent(event); + return KNotificationPlugin::timerEvent(event); } bool cont = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybypopup.h new/knotifications-5.5.0/src/notifybypopup.h --- old/knotifications-5.4.0/src/notifybypopup.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybypopup.h 2014-12-06 13:42:22.000000000 +0100 @@ -24,7 +24,7 @@ #ifndef NOTIFYBYPOPUP_H #define NOTIFYBYPOPUP_H -#include "knotifyplugin.h" +#include "knotificationplugin.h" #include <QStringList> @@ -33,7 +33,7 @@ class QDBusPendingCallWatcher; class NotifyByPopupPrivate; -class NotifyByPopup : public KNotifyPlugin +class NotifyByPopup : public KNotificationPlugin { Q_OBJECT public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybysound.cpp new/knotifications-5.5.0/src/notifybysound.cpp --- old/knotifications-5.4.0/src/notifybysound.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybysound.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -146,7 +146,7 @@ }; -NotifyBySound::NotifyBySound(QObject *parent) : KNotifyPlugin(parent),d(new Private) +NotifyBySound::NotifyBySound(QObject *parent) : KNotificationPlugin(parent),d(new Private) { d->signalmapper = new QSignalMapper(this); connect(d->signalmapper, SIGNAL(mapped(int)), this, SLOT(slotSoundFinished(int))); @@ -275,7 +275,7 @@ d->playerPool.clear(); return; } - KNotifyPlugin::timerEvent(e); + KNotificationPlugin::timerEvent(e); } void NotifyBySound::slotSoundFinished(int id) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybysound.h new/knotifications-5.5.0/src/notifybysound.h --- old/knotifications-5.4.0/src/notifybysound.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybysound.h 2014-12-06 13:42:22.000000000 +0100 @@ -23,10 +23,10 @@ #ifndef NOTIFYBYSOUND_H #define NOTIFYBYSOUND_H -#include "knotifyplugin.h" +#include "knotificationplugin.h" -class NotifyBySound : public KNotifyPlugin +class NotifyBySound : public KNotificationPlugin { Q_OBJECT public: NotifyBySound(QObject *parent=0l); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybytaskbar.cpp new/knotifications-5.5.0/src/notifybytaskbar.cpp --- old/knotifications-5.4.0/src/notifybytaskbar.cpp 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybytaskbar.cpp 2014-12-06 13:42:22.000000000 +0100 @@ -30,7 +30,7 @@ #include <KWindowSystem> NotifyByTaskbar::NotifyByTaskbar(QObject *parent) - : KNotifyPlugin(parent) + : KNotificationPlugin(parent) { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.4.0/src/notifybytaskbar.h new/knotifications-5.5.0/src/notifybytaskbar.h --- old/knotifications-5.4.0/src/notifybytaskbar.h 2014-11-02 13:16:10.000000000 +0100 +++ new/knotifications-5.5.0/src/notifybytaskbar.h 2014-12-06 13:42:22.000000000 +0100 @@ -24,9 +24,9 @@ #ifndef NOTIFYBYTASKBAR_H #define NOTIFYBYTASKBAR_H -#include "knotifyplugin.h" +#include "knotificationplugin.h" -class NotifyByTaskbar : public KNotifyPlugin +class NotifyByTaskbar : public KNotificationPlugin { Q_OBJECT public: -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
