mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: use the global group comment as application name for the notification
questionable but the old implementation was doing it, as for why it is questionable - it is more like a description rather than application name (e.g. "Crash notifier" rather than "kcrash") Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
ed513261b3
commit
eef26737e5
1 changed files with 7 additions and 2 deletions
|
@ -84,13 +84,14 @@ void KNotificationManager::send(KNotification *notification, const bool persiste
|
|||
return;
|
||||
}
|
||||
KConfigGroup globalgroup(&m_config, spliteventid.at(0));
|
||||
const QString globalcomment = globalgroup.readEntry("Comment");
|
||||
KConfigGroup eventgroup(&m_config, eventid);
|
||||
QString eventtitle = notification->title();
|
||||
if (eventtitle.isEmpty()) {
|
||||
eventtitle = eventgroup.readEntry("Comment");
|
||||
}
|
||||
if (eventtitle.isEmpty()) {
|
||||
eventtitle = globalgroup.readEntry("Comment");
|
||||
eventtitle = globalcomment;
|
||||
}
|
||||
|
||||
QString eventtext = notification->text();
|
||||
|
@ -145,11 +146,15 @@ void KNotificationManager::send(KNotification *notification, const bool persiste
|
|||
actionscounter++;
|
||||
}
|
||||
QVariantMap eventhints;
|
||||
QString eventapp = globalcomment;
|
||||
if (eventapp.isEmpty()) {
|
||||
eventapp = KGlobal::mainComponent().componentName();
|
||||
}
|
||||
// NOTE: has to be set to be configurable via plasma notifications applet
|
||||
eventhints.insert("x-kde-appname", spliteventid.at(0));
|
||||
QDBusReply<uint> notifyreply = m_notificationsiface->call(
|
||||
QString::fromLatin1("Notify"),
|
||||
KGlobal::mainComponent().componentName(),
|
||||
eventapp,
|
||||
eventid,
|
||||
eventicon,
|
||||
eventtitle,
|
||||
|
|
Loading…
Add table
Reference in a new issue