X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fstatusnotifieritem.cpp;h=ce3d3d88fdd68073c60989325e6201def9f5c7fd;hp=791bd28d27ce954a097dacff377f7acdc867531a;hb=d61e228c1d7bccaa117c7559fd8ca1975c6637cc;hpb=ccb52c8272c65ec0f07fe79c763035a71b98d264 diff --git a/src/qtui/statusnotifieritem.cpp b/src/qtui/statusnotifieritem.cpp index 791bd28d..ce3d3d88 100644 --- a/src/qtui/statusnotifieritem.cpp +++ b/src/qtui/statusnotifieritem.cpp @@ -5,10 +5,10 @@ * This contains code from KStatusNotifierItem, part of the KDE libs * * Copyright (C) 2009 Marco Martin * * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) version 3. * + * This file is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Library General Public License (LGPL) * + * as published by the Free Software Foundation; either version 2 of the * + * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -105,6 +105,7 @@ void StatusNotifierItem::init() { if(_notificationsClient->isValid()) { QStringList desktopCapabilities = _notificationsClient->GetCapabilities(); _notificationsClientSupportsMarkup = desktopCapabilities.contains("body-markup"); + _notificationsClientSupportsActions = desktopCapabilities.contains("actions"); } StatusNotifierItemParent::init(); @@ -274,7 +275,9 @@ void StatusNotifierItem::showMessage(const QString &title, const QString &messag if(_notificationsClientSupportsMarkup) message = Qt::escape(message); - QStringList actions = QStringList() << "activate" << "View"; + QStringList actions; + if(_notificationsClientSupportsActions) + actions << "activate" << "View"; // we always queue notifications right now QDBusReply reply = _notificationsClient->Notify(title, 0, "quassel", title, message, actions, QVariantMap(), timeout);