diff --git a/src/lib/notifications/desktopnotification.cpp b/src/lib/notifications/desktopnotification.cpp index c904ea716..31d80d586 100644 --- a/src/lib/notifications/desktopnotification.cpp +++ b/src/lib/notifications/desktopnotification.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2014 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * 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 @@ -47,6 +47,7 @@ DesktopNotification::DesktopNotification(bool setPosition) void DesktopNotification::show() { ui->icon->setPixmap(m_icon); + ui->icon->setVisible(!m_icon.isNull()); ui->heading->setText(m_heading); ui->text->setText(m_text); diff --git a/src/lib/notifications/desktopnotificationsfactory.cpp b/src/lib/notifications/desktopnotificationsfactory.cpp index 54d42b273..193607b07 100644 --- a/src/lib/notifications/desktopnotificationsfactory.cpp +++ b/src/lib/notifications/desktopnotificationsfactory.cpp @@ -1,6 +1,6 @@ /* ============================================================ -* QupZilla - WebKit based browser -* Copyright (C) 2010-2014 David Rosca +* QupZilla - Qt web browser +* Copyright (C) 2010-2017 David Rosca * * 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 @@ -101,15 +101,11 @@ void DesktopNotificationsFactory::showNotification(const QPixmap &icon, const QS void DesktopNotificationsFactory::nativeNotificationPreview() { #if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS) - QFile tmp(DataPaths::path(DataPaths::Temp) + "/qupzilla_notif.png"); - tmp.open(QFile::WriteOnly); - QPixmap(":icons/preferences/dialog-question.png").save(tmp.fileName()); - QDBusInterface dbus("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", QDBusConnection::sessionBus()); QVariantList args; args.append(QLatin1String("qupzilla")); args.append(m_uint); - args.append(tmp.fileName()); + args.append(QString()); args.append(QObject::tr("Native System Notification")); args.append(QString()); args.append(QStringList()); diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index 44ed987c7..acc853d96 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -587,7 +587,6 @@ void Preferences::setNotificationPreviewVisible(bool state) } m_notification = new DesktopNotification(true); - m_notification.data()->setPixmap(QPixmap(":icons/preferences/stock_dialog-question.png")); m_notification.data()->setHeading(tr("OSD Notification")); m_notification.data()->setText(tr("Drag it on the screen to place it where you want.")); m_notification.data()->move(m_notifPosition);