From: Soren Stoutner Date: Fri, 16 Jun 2023 23:25:46 +0000 (-0700) Subject: Fix download notification not clearing on Xfce. https://redmine.stoutner.com/issues... X-Git-Tag: v0.5~13 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=c8dd222118f460f3cbcd15678597c3a3f4f986b2;p=PrivacyBrowserPC.git Fix download notification not clearing on Xfce. https://redmine.stoutner.com/issues/1017 --- diff --git a/src/widgets/TabWidget.cpp b/src/widgets/TabWidget.cpp index f8044e2..e19244e 100644 --- a/src/widgets/TabWidget.cpp +++ b/src/widgets/TabWidget.cpp @@ -903,15 +903,15 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin // Set the notification text. fileDownloadNotificationPointer->setText(i18nc("Downloading notification text", "Downloading %1", saveFileName)); + // Get the download icon from the theme. + QIcon downloadIcon = QIcon::fromTheme(QLatin1String("download"), QIcon::fromTheme(QLatin1String("document-save"))); + // Set the notification icon. - fileDownloadNotificationPointer->setIconName(QLatin1String("download")); + fileDownloadNotificationPointer->setIconName(downloadIcon.name()); // Set the action list cancel button. fileDownloadNotificationPointer->setActions(QStringList({i18nc("Download notification action","Cancel")})); - // Set the notification to display indefinitely. - fileDownloadNotificationPointer->setFlags(KNotification::Persistent); - // Prevent the notification from being autodeleted if it is closed. Otherwise, the updates to the notification below cause a crash. fileDownloadNotificationPointer->setAutoDelete(false); diff --git a/src/windows/BrowserWindow.cpp b/src/windows/BrowserWindow.cpp index de6c6b1..b5d062b 100644 --- a/src/windows/BrowserWindow.cpp +++ b/src/windows/BrowserWindow.cpp @@ -1055,7 +1055,7 @@ void BrowserWindow::updateLocalStorageAction(const bool &isEnabled) // Update the icon. On Gnome, the toolbar icons don't pick up unless the size is explicit, probably because the toolbar ends up being an intermediate size. if (localStorageEnabled) - localStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("disk-quota-high"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/actions/filesaveas.png")))); + localStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("disk-quota-high"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/actions/document-save-as.png")))); else localStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("disk-quota"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/apps/kfm.png"))));