mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Preferences: Don't set icon in preview notification
This commit is contained in:
parent
224207b8d6
commit
c8345df3fe
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
||||
* QupZilla - Qt web browser
|
||||
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* 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);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
||||
* QupZilla - Qt web browser
|
||||
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* 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());
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user