From 06a69a2d38bf73c0c5219f94c345b19142bb1646 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Sat, 31 Dec 2022 13:09:18 -0700 Subject: [PATCH] Enable downloading of files that require login cookies. https://redmine.stoutner.com/issues/871 --- CMakeLists.txt | 3 +- src/CMakeLists.txt | 6 +- src/com.stoutner.privacybrowser.appdata.xml | 4 +- src/com.stoutner.privacybrowser.desktop | 2 +- src/dialogs/DomainSettingsDialog.cpp | 12 +- src/dialogs/DomainSettingsDialog.h | 4 + src/dialogs/DurableCookiesDialog.h | 2 +- src/dialogs/SaveDialog.cpp | 40 +-- src/dialogs/SaveDialog.h | 8 +- src/helpers/UserAgentHelper.cpp | 58 ++-- src/helpers/UserAgentHelper.h | 31 ++- src/icons/javascript-warning.svg | 2 +- src/icons/privacy-mode.svg | 2 +- src/icons/sc-apps-privacy-browser.svg | 2 +- src/privacybrowser.notifyrc | 27 ++ src/resources.qrc | 2 +- src/settings/Settings.kcfg | 2 +- src/ui.rcs/CMakeLists.txt | 4 +- ...rowser_window_ui.rc => browserwindowui.rc} | 4 +- src/uis/AddOrEditCookieDialog.ui | 2 +- src/uis/AddTabWidget.ui | 4 +- src/uis/CookiesDialog.ui | 4 +- src/uis/DomainSettingsDialog.ui | 4 +- src/uis/DurableCookiesDialog.ui | 2 +- src/uis/SaveDialog.ui | 2 +- src/uis/SettingsGeneral.ui | 2 +- src/uis/SettingsPrivacy.ui | 2 +- src/uis/TabWidget.ui | 2 +- src/widgets/TabWidget.cpp | 255 ++++++++++++++---- src/widgets/TabWidget.h | 8 +- src/windows/BrowserWindow.cpp | 21 +- 31 files changed, 363 insertions(+), 160 deletions(-) create mode 100644 src/privacybrowser.notifyrc rename src/ui.rcs/{browser_window_ui.rc => browserwindowui.rc} (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff4b909..528e6ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright © 2022 Soren Stoutner . +# Copyright 2022 Soren Stoutner . # # This file is part of Privacy Browser PC . # @@ -61,6 +61,7 @@ find_package(KF5 ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED COMPONENTS DBusAddons DocTools I18n + Notifications KIO XmlGui ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d80c89d..8278a21 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright © 2022 Soren Stoutner . +# Copyright 2022 Soren Stoutner . # # This file is part of Privacy Browser PC . # @@ -61,6 +61,7 @@ target_link_libraries(privacy-browser KF5::DBusAddons KF5::DocTools KF5::I18n + KF5::Notifications KF5::KIOCore KF5::KIOWidgets KF5::XmlGui @@ -86,5 +87,8 @@ install(PROGRAMS com.stoutner.privacybrowser.desktop DESTINATION ${KDE_INSTALL_A # Install Privacy Browser's metadata file. install(FILES com.stoutner.privacybrowser.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) +# Install Privacy Browser's notifyrc file. +install(FILES privacybrowser.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR}) + # Install Privacy Browser's icon. ecm_install_icons(ICONS icons/sc-apps-privacy-browser.svg DESTINATION ${KDE_INSTALL_ICONDIR}) diff --git a/src/com.stoutner.privacybrowser.appdata.xml b/src/com.stoutner.privacybrowser.appdata.xml index 49704a9..3b74d25 100644 --- a/src/com.stoutner.privacybrowser.appdata.xml +++ b/src/com.stoutner.privacybrowser.appdata.xml @@ -1,9 +1,9 @@