From 9e33ea0d954d0b1a45a719d51267850d4fad5513 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Fri, 10 Mar 2023 14:10:06 -0700 Subject: [PATCH] Fix shortcut creation. --- CMakeLists.txt | 6 +-- src/com.stoutner.privacybrowser.appdata.xml | 28 +++++++++---- src/com.stoutner.privacybrowser.desktop | 7 ++-- src/privacybrowser.1 | 2 +- src/windows/BrowserWindow.cpp | 44 ++++++++++----------- 5 files changed, 51 insertions(+), 36 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a5dee4..7f2eac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,9 +70,9 @@ find_package(KF5 ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED COMPONENTS add_subdirectory(doc) add_subdirectory(src) -# Make it possible to use the PO files fetched by the fetch-translations step. -ki18n_install(po) -kdoctools_install(po) +# Install the PO files. These should be enabled once there are PO translations. +#ki18n_install(po) +#kdoctools_install(po) # Generate a summary. feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/src/com.stoutner.privacybrowser.appdata.xml b/src/com.stoutner.privacybrowser.appdata.xml index 6142514..7d8e677 100644 --- a/src/com.stoutner.privacybrowser.appdata.xml +++ b/src/com.stoutner.privacybrowser.appdata.xml @@ -1,7 +1,7 @@ + com.stoutner.privacybrowser @@ -21,7 +22,14 @@ Privacy Browser - A web browser that respects your privacy. + A web browser that respects your privacy + + +

+ Privacy Browser is a web browser based on Qt WebEngine with a focus on privacy and security. + Features like JavaScript and cookies are disabled by default but are easy to automatically enable on-the-fly or by domain. +

+
Network @@ -36,24 +44,30 @@ com.stoutner.privacybrowser.desktop - - + + +

Initial release.

+
+
- privacy-browser + privacybrowser GPL-3.0-or-later Soren Stoutner - - + https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blob_plain;f=doc/privacybrowser.png;hb=HEAD + The main Privacy Browser window. soren@stoutner.com + + +
diff --git a/src/com.stoutner.privacybrowser.desktop b/src/com.stoutner.privacybrowser.desktop index ddf69a3..a2eff84 100644 --- a/src/com.stoutner.privacybrowser.desktop +++ b/src/com.stoutner.privacybrowser.desktop @@ -1,4 +1,4 @@ -# Copyright 2022 Soren Stoutner . +# Copyright 2022-2023 Soren Stoutner . # # This file is part of Privacy Browser PC . # @@ -16,6 +16,7 @@ # along with Privacy Browser PC. If not, see . # The specification for the .desktop file can be found at . +# The file can be validated by running `desktop-file-validate com.stoutner.privacybrowser.desktop`. [Desktop Entry] # Set the type. Type=Application @@ -30,7 +31,7 @@ GenericName=Web Browser Categories=Network;WebBrowser; # Set the icon. -Icon=privacybrowser.svg +Icon=privacybrowser # Set the executable with the optional URL argument. Exec=privacybrowser %u @@ -38,7 +39,7 @@ Exec=privacybrowser %u # Specify the WM class, which groups windows of the same application together. StartupWMClass=privacybrowser -# TODO. Set the document path. +# Set the handbook docbook path. X-DocPath=privacybrowser/index.html # Enumerate the supported MIME types. diff --git a/src/privacybrowser.1 b/src/privacybrowser.1 index 6b78a38..4da7859 100644 --- a/src/privacybrowser.1 +++ b/src/privacybrowser.1 @@ -20,7 +20,7 @@ .\" Section Header - Name. .SH NAME -Privacy Browser \- a web browser that respects your privacy +privacybrowser \- a web browser that respects your privacy .\" Section Header - Synopsis. diff --git a/src/windows/BrowserWindow.cpp b/src/windows/BrowserWindow.cpp index f1dd59e..1649688 100644 --- a/src/windows/BrowserWindow.cpp +++ b/src/windows/BrowserWindow.cpp @@ -223,28 +223,28 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow() QKeySequence ctrlSemicolonKeySequence = QKeySequence(i18nc("The cookies dialog key sequence.", "Ctrl+;")); // Set the action key sequences. - newTabActionPointer->setShortcut(ctrlTKeySequence); - newWindowActionPointer->setShortcut(ctrlNKeySequence); - printPreviewActionPointer->setShortcut(ctrlShiftPKeySequence); - userAgentPrivacyBrowserActionPointer->setShortcut(ctrlAltPKeySequence); - userAgentWebEngineDefaultActionPointer->setShortcut(ctrlAltWKeySequence); - userAgentFirefoxLinuxActionPointer->setShortcut(ctrlAltFKeySequence); - userAgentChromiumLinuxActionPointer->setShortcut(ctrlAltCKeySequence); - userAgentFirefoxWindowsActionPointer->setShortcut(ctrlAltShiftFKeySequence); - userAgentChromeWindowsActionPointer->setShortcut(ctrlAltShiftCKeySequence); - userAgentEdgeWindowsActionPointer->setShortcut(ctrlAltEKeySequence); - userAgentSafariMacosActionPointer->setShortcut(ctrlAltSKeySequence); - userAgentCustomActionPointer->setShortcut(altShiftCKeySequence); - zoomFactorActionPointer->setShortcut(ctrlAltZKeySequence); - searchEngineMojeekActionPointer->setShortcut(ctrlShiftMKeySequence); - searchEngineMonoclesActionPointer->setShortcut(ctrlShiftOKeySequence); - searchEngineMetagerActionPointer->setShortcut(ctrlShiftEKeySequence); - searchEngineGoogleActionPointer->setShortcut(ctrlShiftGKeySequence); - searchEngineBingActionPointer->setShortcut(ctrlShiftBKeySequence); - searchEngineYahooActionPointer->setShortcut(ctrlShiftYKeySequence); - searchEngineCustomActionPointer->setShortcut(ctrlShiftCKeySequence); - domainSettingsActionPointer->setShortcut(ctrlDKeySequence); - cookiesActionPointer->setShortcut(ctrlSemicolonKeySequence); + actionCollectionPointer->setDefaultShortcut(newTabActionPointer, ctrlTKeySequence); + actionCollectionPointer->setDefaultShortcut(newWindowActionPointer, ctrlNKeySequence); + actionCollectionPointer->setDefaultShortcut(printPreviewActionPointer, ctrlShiftPKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentPrivacyBrowserActionPointer, ctrlAltPKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentWebEngineDefaultActionPointer, ctrlAltWKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentFirefoxLinuxActionPointer, ctrlAltFKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentChromiumLinuxActionPointer, ctrlAltCKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentFirefoxWindowsActionPointer, ctrlAltShiftFKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentChromeWindowsActionPointer, ctrlAltShiftCKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentEdgeWindowsActionPointer, ctrlAltEKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentSafariMacosActionPointer, ctrlAltSKeySequence); + actionCollectionPointer->setDefaultShortcut(userAgentCustomActionPointer, altShiftCKeySequence); + actionCollectionPointer->setDefaultShortcut(zoomFactorActionPointer, ctrlAltZKeySequence); + actionCollectionPointer->setDefaultShortcut(searchEngineMojeekActionPointer, ctrlShiftMKeySequence); + actionCollectionPointer->setDefaultShortcut(searchEngineMonoclesActionPointer, ctrlShiftOKeySequence); + actionCollectionPointer->setDefaultShortcut(searchEngineMetagerActionPointer, ctrlShiftEKeySequence); + actionCollectionPointer->setDefaultShortcut(searchEngineGoogleActionPointer, ctrlShiftGKeySequence); + actionCollectionPointer->setDefaultShortcut(searchEngineBingActionPointer, ctrlShiftBKeySequence); + actionCollectionPointer->setDefaultShortcut(searchEngineYahooActionPointer, ctrlShiftYKeySequence); + actionCollectionPointer->setDefaultShortcut(searchEngineCustomActionPointer, ctrlShiftCKeySequence); + actionCollectionPointer->setDefaultShortcut(domainSettingsActionPointer, ctrlDKeySequence); + actionCollectionPointer->setDefaultShortcut(cookiesActionPointer, ctrlSemicolonKeySequence); // Execute the actions. connect(newTabActionPointer, SIGNAL(triggered()), tabWidgetPointer, SLOT(addTab())); -- 2.43.0