-# Copyright 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>.
# Create the executable and add the resources.
-add_executable(privacy-browser resources.qrc)
+add_executable(privacybrowser resources.qrc)
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
main.cpp
)
# Add the Qt logging category. This will create the `debug.h` header file.
-ecm_qt_declare_logging_category(privacy-browser
+ecm_qt_declare_logging_category(privacybrowser
HEADER debug.h
IDENTIFIER PRIVACYBROWSER
CATEGORY_NAME "privacybrowser"
)
# Include the KConfig controller file.
-kconfig_add_kcfg_files(privacy-browser settings/Settings.kcfgc)
+kconfig_add_kcfg_files(privacybrowser settings/Settings.kcfgc)
# Use KDE Frameworks to handle internationalization of the following UI files.
-ki18n_wrap_ui(privacy-browser
+ki18n_wrap_ui(privacybrowser
uis/AddOrEditCookieDialog.ui
uis/AddTabWidget.ui
uis/CookiesDialog.ui
)
# Link the following libraries.
-target_link_libraries(privacy-browser
+target_link_libraries(privacybrowser
Qt5::Core
Qt5::Gui
Qt5::Sql
add_subdirectory(windows)
# Install Privacy Browser using the default KDE arguments.
-install(TARGETS privacy-browser ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS privacybrowser ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
# Install Privacy Browser according to the instructions in the desktop file, specifying the permissions.
install(PROGRAMS com.stoutner.privacybrowser.desktop DESTINATION ${KDE_INSTALL_APPDIR} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
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})
+ecm_install_icons(ICONS icons/sc-apps-privacybrowser.svg DESTINATION ${KDE_INSTALL_ICONDIR})
Categories=Network;WebBrowser;
# Set the icon.
-Icon=privacy-browser.svg
+Icon=privacybrowser.svg
# Set the executable with the optional URL argument.
-Exec=privacy-browser %u
+Exec=privacybrowser %u
# Specify the WM class, which groups windows of the same application together.
-StartupWMClass=privacy-browser
+StartupWMClass=privacybrowser
# TODO. Set the document path.
X-DocPath=privacybrowser/index.html
-# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
CookiesDatabase.cpp
DomainsDatabase.cpp
)
-# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
ViewOnlyDelegate.cpp
)
-# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
AddOrEditCookieDialog.cpp
CookiesDialog.cpp
DomainSettingsDialog.cpp
-# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
MouseEventFilter.cpp
)
-# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
SearchEngineHelper.cpp
UserAgentHelper.cpp
)
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-<!--
- Copyright © 2016-2017,2021-2022 Soren Stoutner <soren@stoutner.com>.
-
- This file is derived from `security` and `language`, which are part of the Android Material icon set. They are released under the Apache License 2.0. <https://fonts.google.com/icons>
-
- This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
-
- Privacy Browser PC 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 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser PC is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>. -->
-
-<svg
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 256 256" >
-
- <!-- Inner Shield. -->
- <g transform="translate(0,160)" >
- <path
- style="fill:#0d47a1"
- d="m 128,-147.2 -94.254546,41.89091 v 62.836368 c 0,58.123635 40.215273,112.477091 94.254546,125.672721 54.03928,-13.19563 94.25454,-67.549086 94.25454,-125.672721 v -62.836368 z" />
- </g>
-
- <!-- Outer Shield. -->
- <g transform="translate(0,160)" >
- <path
- style="fill:#1976d2"
- d="m 128,-160 -104.727273,46.54546 v 69.818182 C 23.272727,20.945459 67.956363,81.338188 128,95.999999 188.04364,81.338188 232.72727,20.945459 232.72727,-43.636358 v -69.818182 z m 0,127.883641 h 81.45454 C 203.28728,15.825464 171.28727,58.530919 128,71.912739 V -31.999996 H 46.545455 V -98.327268 L 128,-134.51636 Z" />
- </g>
-
- <!-- Globe. -->
- <g transform="translate(0,232)" >
- <path
- style="fill:#ffffff"
- d="m 127.92021,-183.78553 c -44.041614,0 -79.705747,35.74391 -79.705747,79.78553 0,44.041617 35.664133,79.785537 79.705747,79.785537 44.1214,0 79.86533,-35.74392 79.86533,-79.785537 0,-44.04162 -35.74393,-79.78553 -79.86533,-79.78553 z m 55.29138,47.87132 h -23.53674 c -2.55313,-9.9732 -6.22326,-19.54746 -11.0104,-28.40365 14.68055,5.02648 26.88773,15.23903 34.54714,28.40365 z M 128,-167.50929 c 6.6222,9.57427 11.80825,20.18574 15.23903,31.59508 h -30.47807 c 3.43078,-11.40934 8.61684,-22.02081 15.23904,-31.59508 z M 66.245993,-88.042889 C 64.969425,-93.149168 64.171571,-98.494798 64.171571,-104 c 0,-5.5052 0.797855,-10.85083 2.074422,-15.95711 h 26.96751 c -0.63829,5.26585 -1.117,10.5317 -1.117,15.95711 0,5.425417 0.47872,10.691263 1.117,15.957111 z m 6.542412,15.957108 H 96.32514 c 2.553137,9.973191 6.22327,19.547449 11.0104,28.403644 C 92.655006,-48.708619 80.44782,-58.841391 72.788405,-72.085781 Z M 96.32514,-135.91421 H 72.788405 c 7.659415,-13.2444 19.866601,-23.37717 34.547135,-28.40365 -4.78713,8.85619 -8.457263,18.43045 -11.0104,28.40365 z M 128,-40.49071 c -6.6222,-9.574268 -11.80826,-20.185747 -15.23904,-31.595071 h 30.47807 C 139.80825,-60.676457 134.6222,-50.064978 128,-40.49071 Z m 18.66982,-47.552179 h -37.33964 c -0.71801,-5.265848 -1.27656,-10.531694 -1.27656,-15.957111 0,-5.42541 0.55854,-10.77105 1.27656,-15.95711 h 37.33964 c 0.71811,5.18606 1.27656,10.5317 1.27656,15.95711 0,5.425417 -0.55844,10.691263 -1.27656,15.957111 z m 1.99463,44.360752 c 4.78714,-8.856195 8.45727,-18.430453 11.0104,-28.403644 h 23.53674 c -7.65941,13.164605 -19.86659,23.377162 -34.54714,28.403644 z m 14.12204,-44.360752 c 0.63828,-5.265848 1.117,-10.531694 1.117,-15.957111 0,-5.42541 -0.47871,-10.69126 -1.117,-15.95711 h 26.96752 c 1.27656,5.10628 2.07441,10.45191 2.07441,15.95711 0,5.505202 -0.79784,10.850832 -2.07441,15.957111 z" />
- </g>
-</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!--
+ Copyright © 2016-2017,2021-2022 Soren Stoutner <soren@stoutner.com>.
+
+ This file is derived from `security` and `language`, which are part of the Android Material icon set. They are released under the Apache License 2.0. <https://fonts.google.com/icons>
+
+ This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+
+ Privacy Browser PC 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 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser PC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>. -->
+
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 256 256" >
+
+ <!-- Inner Shield. -->
+ <g transform="translate(0,160)" >
+ <path
+ style="fill:#0d47a1"
+ d="m 128,-147.2 -94.254546,41.89091 v 62.836368 c 0,58.123635 40.215273,112.477091 94.254546,125.672721 54.03928,-13.19563 94.25454,-67.549086 94.25454,-125.672721 v -62.836368 z" />
+ </g>
+
+ <!-- Outer Shield. -->
+ <g transform="translate(0,160)" >
+ <path
+ style="fill:#1976d2"
+ d="m 128,-160 -104.727273,46.54546 v 69.818182 C 23.272727,20.945459 67.956363,81.338188 128,95.999999 188.04364,81.338188 232.72727,20.945459 232.72727,-43.636358 v -69.818182 z m 0,127.883641 h 81.45454 C 203.28728,15.825464 171.28727,58.530919 128,71.912739 V -31.999996 H 46.545455 V -98.327268 L 128,-134.51636 Z" />
+ </g>
+
+ <!-- Globe. -->
+ <g transform="translate(0,232)" >
+ <path
+ style="fill:#ffffff"
+ d="m 127.92021,-183.78553 c -44.041614,0 -79.705747,35.74391 -79.705747,79.78553 0,44.041617 35.664133,79.785537 79.705747,79.785537 44.1214,0 79.86533,-35.74392 79.86533,-79.785537 0,-44.04162 -35.74393,-79.78553 -79.86533,-79.78553 z m 55.29138,47.87132 h -23.53674 c -2.55313,-9.9732 -6.22326,-19.54746 -11.0104,-28.40365 14.68055,5.02648 26.88773,15.23903 34.54714,28.40365 z M 128,-167.50929 c 6.6222,9.57427 11.80825,20.18574 15.23903,31.59508 h -30.47807 c 3.43078,-11.40934 8.61684,-22.02081 15.23904,-31.59508 z M 66.245993,-88.042889 C 64.969425,-93.149168 64.171571,-98.494798 64.171571,-104 c 0,-5.5052 0.797855,-10.85083 2.074422,-15.95711 h 26.96751 c -0.63829,5.26585 -1.117,10.5317 -1.117,15.95711 0,5.425417 0.47872,10.691263 1.117,15.957111 z m 6.542412,15.957108 H 96.32514 c 2.553137,9.973191 6.22327,19.547449 11.0104,28.403644 C 92.655006,-48.708619 80.44782,-58.841391 72.788405,-72.085781 Z M 96.32514,-135.91421 H 72.788405 c 7.659415,-13.2444 19.866601,-23.37717 34.547135,-28.40365 -4.78713,8.85619 -8.457263,18.43045 -11.0104,28.40365 z M 128,-40.49071 c -6.6222,-9.574268 -11.80826,-20.185747 -15.23904,-31.595071 h 30.47807 C 139.80825,-60.676457 134.6222,-50.064978 128,-40.49071 Z m 18.66982,-47.552179 h -37.33964 c -0.71801,-5.265848 -1.27656,-10.531694 -1.27656,-15.957111 0,-5.42541 0.55854,-10.77105 1.27656,-15.95711 h 37.33964 c 0.71811,5.18606 1.27656,10.5317 1.27656,15.95711 0,5.425417 -0.55844,10.691263 -1.27656,15.957111 z m 1.99463,44.360752 c 4.78714,-8.856195 8.45727,-18.430453 11.0104,-28.403644 h 23.53674 c -7.65941,13.164605 -19.86659,23.377162 -34.54714,28.403644 z m 14.12204,-44.360752 c 0.63828,-5.265848 1.117,-10.531694 1.117,-15.957111 0,-5.42541 -0.47871,-10.69126 -1.117,-15.95711 h 26.96752 c 1.27656,5.10628 2.07441,10.45191 2.07441,15.95711 0,5.505202 -0.79784,10.850832 -2.07441,15.957111 z" />
+ </g>
+</svg>
-# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
UrlRequestInterceptor.cpp
)
KAboutData::setApplicationData(aboutData);
// Set the window icon.
- application.setWindowIcon(QIcon::fromTheme(QStringLiteral("privacy-browser"), QIcon(QStringLiteral(":/icons/sc-apps-privacy-browser.svg"))));
+ application.setWindowIcon(QIcon::fromTheme(QStringLiteral("privacy-browser"), QIcon(QStringLiteral(":/icons/sc-apps-privacybrowser.svg"))));
// Create a command line parser.
QCommandLineParser commandLineParser;
--- /dev/null
+.\" Copyright 2023 Soren Stoutner <soren@stoutner.com>.
+.\"
+.\" This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+.\"
+.\" Privacy Browser PC 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 3 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" Privacy Browser PC is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>.
+
+.\" Title Header.
+.TH "Privacy Browser" 1 "15 February 2023" "version 0.1" "Privacy Browser User Manual"
+
+.\" Section Header - Name.
+.SH NAME
+Privacy Browser \- a web browser that respects your privacy
+
+
+.\" Section Header - Synopsis.
+.SH SYNOPSIS
+
+.\" Launching homepage. `.B` is "Bold".
+.B privacybrowser
+.br
+
+.\" Launching a URL. `.B` is "Bold". `.RI` is "Roman (not italic) alternating Italic (underlined)".
+.B privacybrowser
+.RI [ url ]
+.br
+
+.\" Options. `.B` is "Bold". `.RI` is "Roman (not italic) alternating Italic (underlined)".
+.B privacybrowser
+.RI [ option ]
+
+
+.\" Section Header - Description.
+.SH DESCRIPTION
+Privacy Browser is an open source web browser focused on user privacy. It uses Qt WebEngine, which is a modified version of Chromium’s rendering engine.
+
+
+.\" Section Header - Options.
+.SH OPTIONS
+
+.\" Help. `.TP` is "Tag Paragraph". `.BR` is "Bold alternating Roman (not bold)".
+.TP
+.BR -h ", " --help
+Displays help on commandline options.
+
+.\" Help all. `.TP` is "Tag Paragraph". `.B` is "Bold".
+.TP
+.B --help-all
+Displays help including Qt specific options.
+
+.\" Version. `.TP` is "Tag Paragraph". `.BR` is "Bold alternating Roman (not bold)".
+.TP
+.BR -v ", " --version
+Displays version information.
+
+.\" Author. `.TP` is "Tag Paragraph". `.B` is "Bold".
+.TP
+.B --author
+Show author information.
+
+.\" License. `.TP` is "Tag Paragraph". `.B` is "Bold".
+.TP
+.B --license
+Show license information.
+
+.\" Desktop File Name. `.TP` is "Tag Paragraph". `.Bi` is "Bold alternating Italic (underlined)".
+.TP
+.BI --desktopfile " file"
+The base file name of the desktop entry for this application.
+
+
+.\" Section Header - Bugs. `.TP` is "Tag Paragraph".
+.SH BUGS
+Privacy Browser is an early alpha release. As such, many features are not yet implemented. More information can be found at:
+.TP
+https://www.stoutner.com/privacy-browser-pc/
+.TP
+Bugs in currently implemented features may be reported at:
+.TP
+https://redmine.stoutner.com/projects/privacy-browser-pc/issues
+
+
+.\" Section Header - Author.
+.SH AUTHOR
+Soren Stoutner <soren@stoutner.com>
-# Copyright 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>.
[Global]
-IconName=sc-apps-privacy-browser
+IconName=sc-apps-privacybrowser
Name=Privacy Browser
Comment=A browser that respects your privacy.
DesktopEntry=com.stoutner.privacybrowser.desktop
<!--
- Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+ Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
<qresource>
<file>icons/javascript-warning.svg</file>
<file>icons/privacy-mode.svg</file>
- <file>icons/sc-apps-privacy-browser.svg</file>
+ <file>icons/sc-apps-privacybrowser.svg</file>
<file>licenses/GPLv3+.txt</file>
</qresource>
</RCC>
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
TabWidget.cpp
PrivacyWebEngineView.cpp
)
// Update the notification when the download progresses.
connect(webEngineDownloadItemPointer, &QWebEngineDownloadItem::downloadProgress, [fileDownloadNotificationPointer, saveFileName] (qint64 bytesReceived, qint64 totalBytes)
{
- // Calculate the download percentage.
- int downloadPercentage = 100 * bytesReceived / totalBytes;
-
// Set the new text. Total bytes will be 0 if the download size is unknown.
if (totalBytes > 0)
+ {
+ // Calculate the download percentage.
+ int downloadPercentage = 100 * bytesReceived / totalBytes;
+
+ // Set the file download notification text.
fileDownloadNotificationPointer->setText(i18nc("Download progress notification text", "%1\% of %2 downloaded (%3 of %4 bytes)", downloadPercentage, saveFileName,
bytesReceived, totalBytes));
+ }
else
+ {
+ // Set the file download notification text.
fileDownloadNotificationPointer->setText(i18nc("Download progress notification text", "%1: %2 bytes downloaded", saveFileName, bytesReceived));
+ }
// Display the updated notification.
fileDownloadNotificationPointer->update();
// Exit full screen browsing.
fullScreenActionPointer->trigger();
}
- else if (!findTextLineEditPointer->text().isEmpty()) // Find text is activated.
+ else if (!findTextLineEditPointer->text().isEmpty()) // Find text is populated.
{
// Clear the text in the line edit.
findTextLineEditPointer->clear();
// Clear the search in the WebEngine.
tabWidgetPointer->findText(QStringLiteral(""));
}
+ else if (findTextLineEditActionPointer->isVisible()) // Find text actions are visible.
+ {
+ // Hide the find text actions.
+ hideFindTextActions();
+ }
}
void BrowserWindow::fileNew() const
-# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+# Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
#
# List the sources to include in the executable.
-target_sources(privacy-browser PRIVATE
+target_sources(privacybrowser PRIVATE
BrowserWindow.cpp
)