diff --git a/kdeplasma-addons/applets/timer/timer.cpp b/kdeplasma-addons/applets/timer/timer.cpp
index e9c54816..3b132014 100644
--- a/kdeplasma-addons/applets/timer/timer.cpp
+++ b/kdeplasma-addons/applets/timer/timer.cpp
@@ -353,13 +353,12 @@ void Timer::setSeconds(int secs)
void Timer::slotCountDone()
{
if (m_showMessage){
- QPixmap icon = KIconLoader::global()->loadIcon("chronometer", KIconLoader::Dialog);
-
- KNotification *notification = KNotification::event(KNotification::Notification);
- notification->setPixmap(icon);
+ KNotification *notification = new KNotification();
+ notification->setEventID("kde/notification");
+ notification->setIcon("chronometer");
notification->setTitle(i18n("Plasma Timer Applet"));
notification->setText(m_title->isVisible() ? m_title->text() + " - " + m_message : m_message);
- notification->sendEvent();
+ notification->send();
}
if (m_runCommand && !m_command.isEmpty()){
diff --git a/kget/CMakeLists.txt b/kget/CMakeLists.txt
index 01ee2685..2f61a9e7 100644
--- a/kget/CMakeLists.txt
+++ b/kget/CMakeLists.txt
@@ -210,7 +210,6 @@ target_link_libraries(kget
KDE4::kdeui
KDE4::kio
KDE4::kcmutils
- KDE4::knotifyconfig
KDE4::kpasswdstore
kgetcore
)
@@ -228,7 +227,7 @@ install(
install(
FILES kget.notifyrc
- DESTINATION ${KDE4_DATA_INSTALL_DIR}/kget
+ DESTINATION ${KDE4_CONFIG_INSTALL_DIR}/notifications
)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/kget/core/kget.cpp b/kget/core/kget.cpp
index e1177660..2f5dbd55 100644
--- a/kget/core/kget.cpp
+++ b/kget/core/kget.cpp
@@ -244,7 +244,7 @@ TransferHandler * KGet::addTransfer(KUrl srcUrl, QString destDir, QString sugges
TransferHandler *transfer = createTransfer(srcUrl, destUrl, groupName, start);
if (transfer) {
- KGet::showNotification(m_mainWindow, "added",
+ KGet::showNotification(m_mainWindow, "kget/added",
i18n("
The following transfer has been added to the download list:
%1
", transfer->source().pathOrUrl()),
"kget", i18n("Download added"));
}
@@ -343,7 +343,7 @@ const QList KGet::addTransfer(KUrl::List srcUrls, QString des
message = i18n("The following transfers have been added to the download list:
");
}
const QString content = QString("%1
").arg(urls);
- KGet::showNotification(m_mainWindow, "added", message + content, "kget", i18n("Download added"));
+ KGet::showNotification(m_mainWindow, "kget/added", message + content, "kget", i18n("Download added"));
}
return transfers;
@@ -569,7 +569,7 @@ void KGet::save( QString filename, bool plain ) // krazy:exclude=passbyvalue
if ( !file.open( QIODevice::WriteOnly ) )
{
// kWarning() << "Unable to open output file when saving";
- KGet::showNotification(m_mainWindow, "error",
+ KGet::showNotification(m_mainWindow, "kget/error",
i18n("Unable to save to: %1", filename));
return;
}
@@ -881,7 +881,7 @@ QList KGet::createTransfers(const QList &dataIte
}
content = QString("%1
").arg(content);
- KGet::showNotification(m_mainWindow, "error", message + content, "dialog-error", i18n("Protocol unsupported"));
+ KGet::showNotification(m_mainWindow, "kget/error", message + content, "dialog-error", i18n("Protocol unsupported"));
}
//add the created transfers to the model and start them if specified
@@ -982,14 +982,14 @@ bool KGet::isValidSource(const KUrl &source)
{
// Check if the URL is well formed
if (!source.isValid()) {
- KGet::showNotification(m_mainWindow, "error",
+ KGet::showNotification(m_mainWindow, "kget/error",
i18n("Malformed URL:\n%1", source.prettyUrl()));
return false;
}
// Check if the URL contains the protocol
if (source.protocol().isEmpty()){
- KGet::showNotification(m_mainWindow, "error",
+ KGet::showNotification(m_mainWindow, "kget/error",
i18n("Malformed URL, protocol missing:\n%1", source.prettyUrl()));
return false;
@@ -1194,12 +1194,12 @@ void KGet::setHasNetworkConnection(bool hasConnection)
if (initialState != finalState) {
if (hasConnection) {
- KGet::showNotification(m_mainWindow, "notification",
+ KGet::showNotification(m_mainWindow, "kget/notification",
i18n("Internet connection established, resuming transfers."),
"dialog-info");
} else {
- KGet::showNotification(m_mainWindow, "notification",
+ KGet::showNotification(m_mainWindow, "kget/notification",
i18n("No internet connection, stopping transfers."),
"dialog-info");
}
@@ -1214,7 +1214,7 @@ KGetPlugin * KGet::createPluginFromService( const KService::Ptr &service )
if (!factory)
{
- KGet::showNotification(m_mainWindow, "error",
+ KGet::showNotification(m_mainWindow, "kget/error",
i18n("Plugin loader could not load the plugin: %1.", service->library()),
"dialog-info");
kError() << "KPluginFactory could not load the plugin:" << service->library() << loader.errorString();
@@ -1232,7 +1232,7 @@ bool KGet::safeDeleteFile( const KUrl& url )
QFileInfo info( url.toLocalFile() );
if ( info.isDir() )
{
- KGet::showNotification(m_mainWindow, "notification",
+ KGet::showNotification(m_mainWindow, "kget/notification",
i18n("Not deleting\n%1\nas it is a directory.", url.prettyUrl()),
"dialog-info");
return false;
@@ -1242,7 +1242,7 @@ bool KGet::safeDeleteFile( const KUrl& url )
}
else
- KGet::showNotification(m_mainWindow, "notification",
+ KGet::showNotification(m_mainWindow, "kget/notification",
i18n("Not deleting\n%1\nas it is not a local file.", url.prettyUrl()),
"dialog-info");
return false;
@@ -1251,7 +1251,7 @@ bool KGet::safeDeleteFile( const KUrl& url )
KNotification *KGet::showNotification(QWidget *parent, const QString &eventType,
const QString &text, const QString &icon, const QString &title, const KNotification::NotificationFlags &flags)
{
- return KNotification::event(eventType, title, text, KIcon(icon).pixmap(KIconLoader::SizeMedium), parent, flags);
+ return KNotification::event(eventType, title, text, icon, parent, flags);
}
GenericObserver::GenericObserver(QObject *parent)
@@ -1353,23 +1353,36 @@ void GenericObserver::transfersChangedEvent(QMapstatus() == Job::Finished) && (transfer->startStatus() != Job::Finished)) {
- KGet::showNotification(KGet::m_mainWindow, "finished",
- i18n("The following file has finished downloading:
%1
", transfer->dest().fileName()),
- "kget", i18n("Download completed"));
+ KGet::showNotification(
+ KGet::m_mainWindow, "kget/finished",
+ i18n("The following file has finished downloading:
%1
", transfer->dest().fileName()),
+ "kget", i18n("Download completed")
+ );
} else if (transfer->status() == Job::Running) {
- KGet::showNotification(KGet::m_mainWindow, "started",
- i18n("The following transfer has been started:
%1
", transfer->source().pathOrUrl()),
- "kget", i18n("Download started"));
+ KGet::showNotification(
+ KGet::m_mainWindow, "kget/started",
+ i18n("The following transfer has been started:
%1
", transfer->source().pathOrUrl()),
+ "kget", i18n("Download started")
+ );
} else if (transfer->status() == Job::Aborted && transfer->error().type != Job::AutomaticRetry) {
- KNotification * notification = KNotification::event("error", i18n("Error"), i18n("There has been an error in the following transfer:
%1
"
- "The error message is:
%2
", transfer->source().pathOrUrl(), transfer->error().text),
- transfer->error().pixmap, KGet::m_mainWindow, KNotification::CloseOnTimeout);
+ KNotification* notification = new KNotification(this);
+ notification->setEventID("kget/error");
+ notification->setTitle(i18n("Error"));
+ notification->setText(
+ i18n(
+ "There has been an error in the following transfer:
%1
"
+ "The error message is:
%2
", transfer->source().pathOrUrl(), transfer->error().text
+ )
+ );
+ notification->setIcon("kget");
+ notification->setWidget(KGet::m_mainWindow);
if (transfer->error().type == Job::ManualSolve) {
m_notifications.insert(notification, transfer);
notification->setActions(QStringList() << i18n("Resolve"));
connect(notification, SIGNAL(action1Activated()), SLOT(slotResolveTransferError()));
connect(notification, SIGNAL(closed()), SLOT(slotNotificationClosed()));
}
+ notification->send();
}
}
@@ -1418,18 +1431,18 @@ void GenericObserver::transfersChangedEvent(QMapAll transfers have been finished."),
"kget", i18n("Downloads completed"));
}
diff --git a/kget/core/urlchecker.cpp b/kget/core/urlchecker.cpp
index b046653a..c7a592d4 100644
--- a/kget/core/urlchecker.cpp
+++ b/kget/core/urlchecker.cpp
@@ -166,7 +166,7 @@ UrlChecker::UrlError UrlChecker::checkSource(const KUrl &src, bool showNotificat
if (showNotification && (error != NoError)) {
kDebug() << "Source:" << src << "has error:" << error;
- KGet::showNotification(KGet::m_mainWindow, "error", message(src, Source, error));
+ KGet::showNotification(KGet::m_mainWindow, "kget/error", message(src, Source, error));
}
return error;
@@ -194,7 +194,7 @@ UrlChecker::UrlError UrlChecker::checkDestination(const KUrl &destination, bool
if (showNotification && (error != NoError)) {
kDebug() << "Destination:" << destination << "has error:" << error;
- KGet::showNotification(KGet::m_mainWindow, "error", message(destination, Destination, error));
+ KGet::showNotification(KGet::m_mainWindow, "kget/error", message(destination, Destination, error));
}
return error;
@@ -225,7 +225,7 @@ UrlChecker::UrlError UrlChecker::checkFolder(const KUrl &folder, bool showNotifi
if (showNotification && (error != NoError)) {
kDebug() << "Folder:" << folder << "has error:" << error;
- KGet::showNotification(KGet::m_mainWindow, "error", message(folder, Folder, error));
+ KGet::showNotification(KGet::m_mainWindow, "kget/error", message(folder, Folder, error));
}
return error;
@@ -847,7 +847,7 @@ void UrlChecker::displayErrorMessages()
}
if (!m.isEmpty()) {
- KGet::showNotification(KGet::m_mainWindow, "error", m);
+ KGet::showNotification(KGet::m_mainWindow, "kget/error", m);
}
}
}
diff --git a/kget/extensions/webinterface/httpserver.cpp b/kget/extensions/webinterface/httpserver.cpp
index d848da35..4dbdb835 100644
--- a/kget/extensions/webinterface/httpserver.cpp
+++ b/kget/extensions/webinterface/httpserver.cpp
@@ -40,19 +40,19 @@ HttpServer::HttpServer(QWidget *parent)
const QString pwd = m_passwdstore->getPasswd("Webinterface", parent->winId());
if (!setAuthenticate(usr.toUtf8(), pwd.toUtf8())) {
KGet::showNotification(parent,
- "error", i18nc("@info", "Unable to set the WebInterface authorization: %1", errorString())
+ "kget/error", i18nc("@info", "Unable to set the WebInterface authorization: %1", errorString())
);
return;
}
if (!start(QHostAddress::Any, Settings::webinterfacePort())) {
KGet::showNotification(parent,
- "error", i18nc("@info", "Unable to start WebInterface: %1", errorString())
+ "kget/error", i18nc("@info", "Unable to start WebInterface: %1", errorString())
);
return;
}
} else {
KGet::showNotification(parent,
- "error", i18n("Unable to start WebInterface: Could not open KPasswdStore")
+ "kget/error", i18n("Unable to start WebInterface: Could not open KPasswdStore")
);
}
}
@@ -71,14 +71,14 @@ void HttpServer::settingsChanged()
if (!setAuthenticate(usr.toUtf8(), pwd.toUtf8())) {
KGet::showNotification(
parentwidget,
- "error", i18nc("@info", "Unable to set the WebInterface authorization: %1", errorString())
+ "kget/error", i18nc("@info", "Unable to set the WebInterface authorization: %1", errorString())
);
return;
}
if (!start(QHostAddress::Any, Settings::webinterfacePort())) {
KGet::showNotification(
parentwidget,
- "error", i18nc("@info", "Unable to restart WebInterface: %1", errorString())
+ "kget/error", i18nc("@info", "Unable to restart WebInterface: %1", errorString())
);
return;
}
diff --git a/kget/kget.notifyrc b/kget/kget.notifyrc
index 39b84d73..815661b8 100644
--- a/kget/kget.notifyrc
+++ b/kget/kget.notifyrc
@@ -1,4 +1,4 @@
-[Global]
+[kget]
IconName=kget
Comment=KGet Download Manager
Comment[bg]=Изтегляне на файлове (KGet)
@@ -54,7 +54,7 @@ Comment[x-test]=xxKGet Download Managerxx
Comment[zh_CN]=KGet 下载管理器
Comment[zh_TW]=KGet 下載管理員
-[Event/added]
+[kget/added]
Name=Transfer Added
Name[ar]=التحويل أضيف
Name[ast]=Tresferencia Amestada
@@ -180,9 +180,9 @@ Comment[zh_CN]=添加了新下载
Comment[zh_HK]=已新增新的下載
Comment[zh_TW]=已新增新的傳輸
Sound=KDE-K3B-Insert-Medium.ogg
-Action=None
+Actions=
-[Event/started]
+[kget/started]
Name=Download Started
Name[ar]=التنزيل بدأ
Name[ast]=Anicióse Baxada
@@ -312,9 +312,9 @@ Comment[zh_CN]=下载已开始
Comment[zh_HK]=下載已開始
Comment[zh_TW]=下載已開始
Sound=KDE-K3B-Insert-Medium.ogg
-Action=None
+Actions=
-[Event/finished]
+[kget/finished]
Name=Download Finished
Name[ar]=التنزيل انتهى
Name[ast]=Baxada finada
@@ -442,9 +442,9 @@ Comment[zh_CN]=下载已完成
Comment[zh_HK]=下載已完成
Comment[zh_TW]=下載已完成
Sound=KDE-K3B-Finish-Success.ogg
-Action=Popup
+Actions=Popup
-[Event/finishedall]
+[kget/finishedall]
Name=All Downloads Finished
Name[ar]=كل التنزيلات انتهت
Name[ast]=Fináronse toles baxaes
@@ -571,9 +571,9 @@ Comment[zh_CN]=所有下载都已完成
Comment[zh_HK]=所有下載已完成
Comment[zh_TW]=所有下載均已完成
Sound=KDE-K3B-Finish-Success.ogg
-Action=Popup
+Actions=Popup
-[Event/error]
+[kget/error]
Name=Error Occurred
Name[ast]=Hebo un Fallu
Name[bg]=Възникна грешка
@@ -684,9 +684,9 @@ Comment[x-test]=xxAn Error has Occurredxx
Comment[zh_CN]=发生了一个错误
Comment[zh_TW]=發生錯誤
Sound=KDE-Sys-App-Error.ogg
-Action=Popup|Sound
+Actions=Popup,Sound
-[Event/notification]
+[kget/notification]
Name=Information
Name[ar]=معلومة
Name[ast]=Información
@@ -804,4 +804,4 @@ Comment[x-test]=xxUser Notified of Informationxx
Comment[zh_CN]=用户收到消息通知
Comment[zh_TW]=使用者資訊通知
Sound=KDE-Sys-App-Message.ogg
-Action=Popup|Sound
+Actions=Popup,Sound
diff --git a/kget/mainwindow.cpp b/kget/mainwindow.cpp
index ad594f4f..066d543b 100644
--- a/kget/mainwindow.cpp
+++ b/kget/mainwindow.cpp
@@ -42,7 +42,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -915,7 +915,7 @@ void MainWindow::slotDeleteFinished()
void MainWindow::slotConfigureNotifications()
{
- KNotifyConfigWidget::configure(this);
+ KNotificationConfigWidget::configure("kget", this);
}
void MainWindow::slotNewToolbarConfig()
diff --git a/kget/plasma/runner/kgetrunner.cpp b/kget/plasma/runner/kgetrunner.cpp
index 50d18158..ba8248ff 100644
--- a/kget/plasma/runner/kgetrunner.cpp
+++ b/kget/plasma/runner/kgetrunner.cpp
@@ -77,12 +77,10 @@ void KGetRunner::run(const Plasma::RunnerContext& /*context*/, const Plasma::Que
connection->startService(KGET_DBUS_SERVICE);
if(connection->lastError().type() != QDBusError::NoError) {
KNotification::event(
- KNotification::Error,
- i18n(
- "KGet Runner could not communicate with KGet.
Response from DBus:
%1
",
- connection->lastError().message()
- ),
- KIcon("dialog-warning").pixmap(KIconLoader::SizeSmall)
+ "kget/error",
+ i18n("KGet Runner"),
+ i18n("Could not communicate with KGet, response from DBus:
%1
", connection->lastError().message()),
+ "dialog-warning"
);
return;
}
@@ -109,9 +107,12 @@ void KGetRunner::callFinished(QDBusPendingCallWatcher* call)
// TODO Remove the check for QDBusError::NoReply when NewTransferDialog is fixed to show asynchronously.
if(!reply.isValid() && (reply.error().type() != QDBusError::NoReply)) {
// Send a notification about the error to the user.
- KNotification::event(KNotification::Error,
- i18n("KGet Runner could not communicate with KGet.
Response from DBus:
%1
", reply.error().message()),
- KIcon("dialog-warning").pixmap(KIconLoader::SizeSmall)/*, 0, KNotification::Persistent*/);
+ KNotification::event(
+ "kget/error",
+ i18n("KGet Runner"),
+ i18n("Could not communicate with KGet, response from DBus:
%1
", reply.error().message()),
+ "dialog-warning"
+ );
}
}
diff --git a/kmix/apps/kmix.cpp b/kmix/apps/kmix.cpp
index 47667688..46466cc0 100644
--- a/kmix/apps/kmix.cpp
+++ b/kmix/apps/kmix.cpp
@@ -923,7 +923,7 @@ KMixWindow::unplugged(const QString& udi)
if (mixer->udi() == udi)
{
kDebug() << "Unplugged Match: Removing udi=" << udi << "\n";
- //KMixToolBox::notification("MasterFallback", "aaa");
+ //KMixToolBox::notification("kmix/MasterFallback", "aaa");
bool globalMasterMixerDestroyed = (mixer == Mixer::getGlobalMasterMixer());
// Part 1) Remove Tab
for (int i = 0; i < m_wsMixers->count(); ++i)
@@ -958,7 +958,7 @@ KMixWindow::unplugged(const QString& udi)
"The soundcard containing the master device was unplugged. Changing to control %1 on card %2.",
master->readableName(),
((Mixer::mixers())[0])->readableName());
- KMixToolBox::notification("MasterFallback", text);
+ KMixToolBox::notification("kmix/MasterFallback", text);
}
}
}
@@ -966,7 +966,7 @@ KMixWindow::unplugged(const QString& udi)
{
QString text;
text = i18n("The last soundcard was unplugged.");
- KMixToolBox::notification("MasterFallback", text);
+ KMixToolBox::notification("kmix/MasterFallback", text);
}
recreateGUI(true);
break;
diff --git a/kmix/apps/kmixd.cpp b/kmix/apps/kmixd.cpp
index 82da9f60..e02709ee 100644
--- a/kmix/apps/kmixd.cpp
+++ b/kmix/apps/kmixd.cpp
@@ -228,7 +228,7 @@ void KMixD::unplugged( const QString& udi)
// kDebug(67100) << "Try Match with:" << mixer->udi() << "\n";
if (mixer->udi() == udi ) {
kDebug(67100) << "Unplugged Match: Removing udi=" <removeMixer(mixer);
@@ -248,14 +248,14 @@ void KMixD::unplugged( const QString& udi)
master->readableName(),
((Mixer::mixers())[0])->readableName()
);
-// KMixToolBox::notification("MasterFallback", text);
+// KMixToolBox::notification("kmix/MasterFallback", text);
}
}
}
if ( Mixer::mixers().count() == 0 ) {
QString text;
text = i18n("The last soundcard was unplugged.");
-// KMixToolBox::notification("MasterFallback", text);
+// KMixToolBox::notification("kmix/MasterFallback", text);
}
break;
}
diff --git a/kmix/gui/kmixtoolbox.cpp b/kmix/gui/kmixtoolbox.cpp
index 07e0df8c..591f9064 100644
--- a/kmix/gui/kmixtoolbox.cpp
+++ b/kmix/gui/kmixtoolbox.cpp
@@ -78,14 +78,12 @@ void KMixToolBox::notification(const char *notificationName, const QString &text
const QStringList &actions, QObject *receiver,
const char *actionSlot)
{
- KNotification *notification = new KNotification(notificationName);
- //notification->setComponentData(componentData());
+ KNotification *notification = new KNotification();
+ notification->setEventID(notificationName);
notification->setText(text);
- //notification->setPixmap(...);
- notification->addContext(QLatin1String("Application"), KGlobal::mainComponent().componentName());
if (!actions.isEmpty() && receiver && actionSlot) {
notification->setActions(actions);
QObject::connect(notification, SIGNAL(activated(uint)), receiver, actionSlot);
}
- notification->sendEvent();
+ notification->send();
}
diff --git a/kmix/kmix.notifyrc b/kmix/kmix.notifyrc
index 80dcb3fe..ea6f59d7 100644
--- a/kmix/kmix.notifyrc
+++ b/kmix/kmix.notifyrc
@@ -1,4 +1,4 @@
-[Global]
+[kmix]
IconName=kmix
Comment=Sound Mixer
Comment[bg]=Звуков смесител
@@ -52,7 +52,7 @@ Comment[x-test]=xxSound Mixerxx
Comment[zh_CN]=混音器
Comment[zh_TW]=音效混音器
-[Event/MasterFallback]
+[kmix/MasterFallback]
Name=Audio Device Fallback
Name[bg]=Резервно звуково устройство
Name[bs]=Rezervni zvučni uređaj
@@ -152,5 +152,4 @@ Comment[uk]=Сповіщення про автоматичне повернен
Comment[x-test]=xxNotification on automatic fallback if the preferred device is unavailablexx
Comment[zh_CN]=如果首选设备不可用,在自动使用备用设备时进行通知
Comment[zh_TW]=若是選用的裝置無法使用時,通知會自動使用預設的裝置
-Contexts=Application
-Action=Popup
+Actions=Popup
diff --git a/krdc/CMakeLists.txt b/krdc/CMakeLists.txt
index 30a57370..5b8eeeeb 100644
--- a/krdc/CMakeLists.txt
+++ b/krdc/CMakeLists.txt
@@ -63,7 +63,7 @@ add_executable(krdc ${krdc_SRCS})
target_link_libraries(krdc
KDE4::kfile
KDE4::kio
- KDE4::knotifyconfig
+ KDE4::kdeui
KDE4::kcmutils
krdccore
)
diff --git a/krdc/mainwindow.cpp b/krdc/mainwindow.cpp
index 4ae2acd8..5f535c08 100644
--- a/krdc/mainwindow.cpp
+++ b/krdc/mainwindow.cpp
@@ -45,7 +45,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -940,7 +940,7 @@ void MainWindow::quit(bool systemEvent)
void MainWindow::configureNotifications()
{
- KNotifyConfigWidget::configure(this);
+ KNotificationConfigWidget::configure("krdc", this);
}
void MainWindow::showMenubar()
diff --git a/krfb/krfb/CMakeLists.txt b/krfb/krfb/CMakeLists.txt
index 0d28b1dc..c0902984 100644
--- a/krfb/krfb/CMakeLists.txt
+++ b/krfb/krfb/CMakeLists.txt
@@ -96,6 +96,6 @@ install(
install(
FILES krfb.notifyrc
- DESTINATION ${KDE4_DATA_INSTALL_DIR}/krfb
+ DESTINATION ${KDE4_CONFIG_INSTALL_DIR}/notifications
)
diff --git a/krfb/krfb/invitationsrfbclient.cpp b/krfb/krfb/invitationsrfbclient.cpp
index eae71b1e..6de87996 100644
--- a/krfb/krfb/invitationsrfbclient.cpp
+++ b/krfb/krfb/invitationsrfbclient.cpp
@@ -63,15 +63,20 @@ void PendingInvitationsRfbClient::processNewClient()
if (d->askOnConnect == false) {
- KNotification::event("NewConnectionAutoAccepted",
- i18n("Accepted connection from %1", host));
+ KNotification::event(
+ "krfb/NewConnectionAutoAccepted",
+ QString(),
+ i18n("Accepted connection from %1", host)
+ );
accept(new InvitationsRfbClient(m_rfbClient, parent()));
} else {
- KNotification::event("NewConnectionOnHold",
- i18n("Received connection from %1, on hold (waiting for confirmation)",
- host));
+ KNotification::event(
+ "krfb/NewConnectionOnHold",
+ QString(),
+ i18n("Received connection from %1, on hold (waiting for confirmation)", host)
+ );
InvitationsConnectionDialog *dialog = new InvitationsConnectionDialog(0);
dialog->setRemoteHost(host);
diff --git a/krfb/krfb/invitationsrfbserver.cpp b/krfb/krfb/invitationsrfbserver.cpp
index 6b29101e..3e384358 100644
--- a/krfb/krfb/invitationsrfbserver.cpp
+++ b/krfb/krfb/invitationsrfbserver.cpp
@@ -26,7 +26,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff --git a/krfb/krfb/krfb.notifyrc b/krfb/krfb/krfb.notifyrc
index bfb5e73a..593dbc16 100644
--- a/krfb/krfb/krfb.notifyrc
+++ b/krfb/krfb/krfb.notifyrc
@@ -1,4 +1,4 @@
-[Global]
+[krfb]
IconName=krfb
Comment=Desktop Sharing
Comment[af]=Werkskerm Deeling
@@ -72,7 +72,7 @@ Comment[zh_CN]=桌面共享
Comment[zh_HK]=桌面分享
Comment[zh_TW]=桌面分享
-[Event/UserAcceptsConnection]
+[krfb/UserAcceptsConnection]
Name=User Accepts Connection
Name[ar]=المستخدم يقبل الاتصال
Name[ast]=L'usuariu aceuta la conexón
@@ -203,9 +203,9 @@ Comment[x-test]=xxUser accepts connectionxx
Comment[zh_CN]=用户接受连接
Comment[zh_HK]=用戶接受連線
Comment[zh_TW]=使用者接受連線
-Action=Popup
+Actions=Popup
-[Event/UserRefusesConnection]
+[krfb/UserRefusesConnection]
Name=User Refuses Connection
Name[ar]=المستخدم يرفض الاتصال
Name[ast]=L'usuariu refuga la conexón
@@ -336,9 +336,9 @@ Comment[x-test]=xxUser refuses connectionxx
Comment[zh_CN]=用户拒绝连接
Comment[zh_HK]=用戶拒絕連線
Comment[zh_TW]=使用者拒絕連線使用者
-Action=Popup
+Actions=Popup
-[Event/ConnectionClosed]
+[krfb/ConnectionClosed]
Name=Connection Closed
Name[ar]=الاتصال أغلق
Name[ast]=Conexón zarrada
@@ -475,9 +475,9 @@ Comment[x-test]=xxConnection closedxx
Comment[zh_CN]=连接关闭
Comment[zh_HK]=連線已關閉
Comment[zh_TW]=連線已關閉
-Action=Popup
+Actions=Popup
-[Event/InvalidPassword]
+[krfb/InvalidPassword]
Name=Invalid Password
Name[ar]=كلمة المرور غير صحيحة
Name[ast]=Contraseña incorreuta
@@ -617,9 +617,9 @@ Comment[x-test]=xxInvalid passwordxx
Comment[zh_CN]=无效密码
Comment[zh_HK]=無效的密碼
Comment[zh_TW]=不正確的密碼
-Action=Popup
+Actions=Popup
-[Event/InvalidPasswordInvitations]
+[krfb/InvalidPasswordInvitations]
Name=Invalid Password Invitations
Name[ar]=كلمة المرور الدعوات غير صحيحة
Name[ast]=Contraseñas d'invitaciones incorreutes
@@ -748,9 +748,9 @@ Comment[x-test]=xxThe invited party sent an invalid password. Connection refused
Comment[zh_CN]=受邀请方发送的密码不对。连接被拒绝。
Comment[zh_HK]=被邀請的一方送出無效的密碼。已拒絕連線。
Comment[zh_TW]=邀請的人送出了不合法的密碼邀請。連線已拒絕。
-Action=Popup
+Actions=Popup
-[Event/NewConnectionOnHold]
+[krfb/NewConnectionOnHold]
Name=New Connection on Hold
Name[ar]=اتصال جديد على التوقف
Name[ast]=Conexón nueva a la espera
@@ -879,9 +879,9 @@ Comment[x-test]=xxConnection requested, user must acceptxx
Comment[zh_CN]=连接已请求,用户必须接受
Comment[zh_HK]=已請求連線,用戶必須接受
Comment[zh_TW]=連線已要求,必須等使用者接受
-Action=Popup
+Actions=Popup
-[Event/NewConnectionAutoAccepted]
+[krfb/NewConnectionAutoAccepted]
Name=New Connection Auto Accepted
Name[ar]=اتصال جديد مقبول تلقائيا
Name[ast]=Conexón nueva aceutada automáticamente
@@ -1010,9 +1010,9 @@ Comment[x-test]=xxNew connection automatically establishedxx
Comment[zh_CN]=自动建立新连接
Comment[zh_HK]=已自動建立新連線
Comment[zh_TW]=新連線自動建立
-Action=Popup
+Actions=Popup
-[Event/TooManyConnections]
+[krfb/TooManyConnections]
Name=Too Many Connections
Name[ar]=اتصالات عديدة
Name[ast]=Abondes conexones
@@ -1144,9 +1144,9 @@ Comment[x-test]=xxBusy, connection refusedxx
Comment[zh_CN]=对方处于忙碌状态,连接被拒绝
Comment[zh_HK]=忙碌,已拒絕連線
Comment[zh_TW]=忙碌,連線被拒
-Action=Popup
+Actions=Popup
-[Event/UnexpectedConnection]
+[krfb/UnexpectedConnection]
Name=Unexpected Connection
Name[ar]=الاتصال غير متوقّع
Name[ast]=Conexón inesperada
@@ -1275,4 +1275,4 @@ Comment[x-test]=xxReceived unexpected connection, abortxx
Comment[zh_CN]=收到意外连接,已中止
Comment[zh_HK]=接收到非預期的連線,中止
Comment[zh_TW]=已接收到未知的連線,中止。
-Action=Popup
+Actions=Popup
diff --git a/krfb/krfb/main.cpp b/krfb/krfb/main.cpp
index c3266db7..831dccb8 100644
--- a/krfb/krfb/main.cpp
+++ b/krfb/krfb/main.cpp
@@ -27,7 +27,6 @@
#include
#include
#include
-#include
#include
#include
diff --git a/krfb/krfb/rfbclient.cpp b/krfb/krfb/rfbclient.cpp
index 08e90372..f35bd76a 100644
--- a/krfb/krfb/rfbclient.cpp
+++ b/krfb/krfb/rfbclient.cpp
@@ -24,7 +24,6 @@
#include "events.h"
#include
#include
-#include
#include
#include //for bzero()
diff --git a/krfb/krfb/rfbservermanager.cpp b/krfb/krfb/rfbservermanager.cpp
index 8025a1b2..a59ae8ae 100644
--- a/krfb/krfb/rfbservermanager.cpp
+++ b/krfb/krfb/rfbservermanager.cpp
@@ -212,8 +212,11 @@ void RfbServerManager::addClient(RfbClient* cc)
}
d->clients.insert(cc);
- KNotification::event("UserAcceptsConnection",
- i18n("The remote user %1 is now connected.", cc->name()));
+ KNotification::event(
+ "krfb/UserAcceptsConnection",
+ QString(),
+ i18n("The remote user %1 is now connected.", cc->name())
+ );
Q_EMIT clientConnected(cc);
}
@@ -227,7 +230,11 @@ void RfbServerManager::removeClient(RfbClient* cc)
d->rfbUpdateTimer.stop();
}
- KNotification::event("ConnectionClosed", i18n("The remote user %1 disconnected.", cc->name()));
+ KNotification::event(
+ "krfb/ConnectionClosed",
+ QString(),
+ i18n("The remote user %1 disconnected.", cc->name())
+ );
Q_EMIT clientDisconnected(cc);
}