]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/commitdiff
Add keyboard shortcuts for the URL toolbar actions. https://redmine.stoutner.com...
authorSoren Stoutner <soren@stoutner.com>
Fri, 28 Jul 2023 00:32:08 +0000 (17:32 -0700)
committerSoren Stoutner <soren@stoutner.com>
Fri, 28 Jul 2023 00:32:08 +0000 (17:32 -0700)
doc/index.docbook
src/ui.rcs/browserwindowui.rc
src/windows/BrowserWindow.cpp

index a784979be1cd1f0abe71604adf3f94cda282df5d..9a41b3ec06f60e286e614204eb8f65e93a25db87 100644 (file)
       <sect2>
         <title>On-The-Fly Settings</title>
 
+        <variablelist>
+          <!-- JavaScript. -->
+          <varlistentry id="on-the-fly-settings-javascript">
+            <term>
+              <menuchoice>
+                <shortcut>
+                  <keycombo action="simul">&Ctrl;<keycap>J</keycap></keycombo>
+                </shortcut>
+                <guimenu>On-The-Fly Settings</guimenu>
+                <guimenuitem>JavaScript</guimenuitem>
+              </menuchoice>
+            </term>
+
+            <listitem>
+              <para>
+                Toggle JavaScript in the current tab.
+              </para>
+            </listitem>
+          </varlistentry>
+
+          <!-- Local Storage. -->
+          <varlistentry id="on-the-fly-settings-local-storage">
+            <term>
+              <menuchoice>
+                <shortcut>
+                  <keycombo action="simul">&Ctrl;<keycap>L</keycap></keycombo>
+                </shortcut>
+                <guimenu>On-The-Fly Settings</guimenu>
+                <guimenuitem>Local Storage</guimenuitem>
+              </menuchoice>
+            </term>
+
+            <listitem>
+              <para>
+                Toggle local storage in the current tab.
+              </para>
+            </listitem>
+          </varlistentry>
+
+          <!-- DOM Storage. -->
+          <varlistentry id="on-the-fly-settings-dom-storage">
+            <term>
+              <menuchoice>
+                <shortcut>
+                  <keycombo action="simul">&Ctrl;<keycap>D</keycap></keycombo>
+                </shortcut>
+                <guimenu>On-The-Fly Settings</guimenu>
+                <guimenuitem>DOM Storage</guimenuitem>
+              </menuchoice>
+            </term>
+
+            <listitem>
+              <para>
+                Toggle DOM storage in the current tab.
+              </para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+
         <!-- User Agent. -->
         <sect3>
           <title>User Agent</title>
             <term>
               <menuchoice>
                 <shortcut>
-                  <keycombo action="simul">&Ctrl;<keycap>D</keycap></keycombo>
+                  <keycombo action="simul">&Ctrl;&Shift;<keycap>D</keycap></keycombo>
                 </shortcut>
                 <guimenu>Settings</guimenu>
                 <guimenuitem>Domain Settings</guimenuitem>
         <title>Other Commands</title>
 
         <variablelist>
+          <!-- Find Case Sensitive. -->
+          <varlistentry id="find-case-sensitive">
+            <term>
+              <command>
+                &Ctrl;+<keycap>S</keycap>
+              </command>
+            </term>
+
+            <listitem>
+              <para>
+                Toggle find case sensitive if the find toolbar is visible.
+              </para>
+            </listitem>
+          </varlistentry>
+
           <!-- Open link in new tab. -->
           <varlistentry id="new-tab">
             <term>
index 7a9e090b4742884ecdb0e91bacac8177a813971e..1a79d69cb1e888d80b578b34f998f1684ac5926d 100644 (file)
 
         <!-- On-the-fly Settings. -->
         <Menu name="on_the_fly_settings"> <text>On-The-Fly Settings</text>
+            <Action name="javascript" />
+            <Action name="local_storage" />
+            <Action name="dom_storage" />
+
             <Menu name="user_agent">
                 <Action name="user_agent_privacy_browser" />
                 <Action name="user_agent_webengine_default" />
index 1277e7718501be9be5ce21300b95e7cc6ff2b66b..b897aa9d4106658bc2801fb8220f7ba107604920 100644 (file)
@@ -181,7 +181,7 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
     localStorageActionPointer->setText(i18nc("The Local Storage action", "Local Storage"));
     domStorageActionPointer->setText(i18nc("DOM Storage action", "DOM Storage"));
     findCaseSensitiveActionPointer->setText(i18nc("Find Case Sensitive action", "Find Case Sensitive"));
-    hideFindTextActionPointer->setText(i18nc("Hide Find Text action", "Hide Find Text"));
+    hideFindTextActionPointer->setText(i18nc("Hide Find Text action (the text should include the language-specific escape keyboard shortcut).", "Hide Find Text (Esc)"));
 
     // Set the action icons.  Gnome doesn't contain some of the icons that KDE has.
     // The toolbar icons don't pick up unless the size is explicit, probably because the toolbar ends up being an intermediate size.
@@ -224,6 +224,10 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
     QKeySequence ctrlUKeySequence = QKeySequence(i18nc("The view source key sequence.", "Ctrl+U"));
     QKeySequence ctrlShiftUKeySequence = QKeySequence(i18nc("The view source in new tab key sequence.", "Ctrl+Shift+U"));
     QKeySequence ctrlShiftPKeySequence = QKeySequence(i18nc("The print preview key sequence.", "Ctrl+Shift+P"));
+    QKeySequence ctrlJKeySequence = QKeySequence(i18nc("The JavaScript key sequence.", "Ctrl+J"));
+    QKeySequence ctrlLKeySequence = QKeySequence(i18nc("The local storage key sequence.", "Ctrl+L"));
+    QKeySequence ctrlDKeySequence = QKeySequence(i18nc("The DOM storage key sequence.", "Ctrl+D"));
+    QKeySequence ctrlSKeySequence = QKeySequence(i18nc("The find case sensitive key sequence.", "Ctrl+S"));
     QKeySequence ctrlAltPKeySequence = QKeySequence(i18nc("The Privacy Browser user agent key sequence.", "Ctrl+Alt+P"));
     QKeySequence ctrlAltWKeySequence = QKeySequence(i18nc("The WebEngine Default user agent key sequence.", "Ctrl+Alt+W"));
     QKeySequence ctrlAltFKeySequence = QKeySequence(i18nc("The Firefox on Linux user agent key sequence.", "Ctrl+Alt+F"));
@@ -241,7 +245,7 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
     QKeySequence ctrlShiftBKeySequence = QKeySequence(i18nc("The Bing search engine key sequence.", "Ctrl+Shift+B"));
     QKeySequence ctrlShiftYKeySequence = QKeySequence(i18nc("The Yahoo search engine key sequence.", "Ctrl+Shift+Y"));
     QKeySequence ctrlShiftCKeySequence = QKeySequence(i18nc("The custom search engine key sequence.", "Ctrl+Shift+C"));
-    QKeySequence ctrlDKeySequence = QKeySequence(i18nc("The domain settings key sequence.", "Ctrl+D"));
+    QKeySequence ctrlShiftDKeySequence = QKeySequence(i18nc("The domain settings key sequence.", "Ctrl+Shift+D"));
     QKeySequence ctrlSemicolonKeySequence = QKeySequence(i18nc("The cookies dialog key sequence.", "Ctrl+;"));
 
     // Set the action key sequences.
@@ -252,6 +256,10 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
     actionCollectionPointer->setDefaultShortcut(viewSourceActionPointer, ctrlUKeySequence);
     actionCollectionPointer->setDefaultShortcut(viewSourceInNewTabActionPointer, ctrlShiftUKeySequence);
     actionCollectionPointer->setDefaultShortcut(printPreviewActionPointer, ctrlShiftPKeySequence);
+    actionCollectionPointer->setDefaultShortcut(javaScriptActionPointer, ctrlJKeySequence);
+    actionCollectionPointer->setDefaultShortcut(localStorageActionPointer, ctrlLKeySequence);
+    actionCollectionPointer->setDefaultShortcut(domStorageActionPointer, ctrlDKeySequence);
+    actionCollectionPointer->setDefaultShortcut(findCaseSensitiveActionPointer, ctrlSKeySequence);
     actionCollectionPointer->setDefaultShortcut(userAgentPrivacyBrowserActionPointer, ctrlAltPKeySequence);
     actionCollectionPointer->setDefaultShortcut(userAgentWebEngineDefaultActionPointer, ctrlAltWKeySequence);
     actionCollectionPointer->setDefaultShortcut(userAgentFirefoxLinuxActionPointer, ctrlAltFKeySequence);
@@ -269,7 +277,7 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
     actionCollectionPointer->setDefaultShortcut(searchEngineBingActionPointer, ctrlShiftBKeySequence);
     actionCollectionPointer->setDefaultShortcut(searchEngineYahooActionPointer, ctrlShiftYKeySequence);
     actionCollectionPointer->setDefaultShortcut(searchEngineCustomActionPointer, ctrlShiftCKeySequence);
-    actionCollectionPointer->setDefaultShortcut(domainSettingsActionPointer, ctrlDKeySequence);
+    actionCollectionPointer->setDefaultShortcut(domainSettingsActionPointer, ctrlShiftDKeySequence);
     actionCollectionPointer->setDefaultShortcut(cookiesActionPointer, ctrlSemicolonKeySequence);
 
     // Execute the actions.