]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Add a context menu option to copy link text. https://redmine.stoutner.com/issues... master
authorSoren Stoutner <soren@stoutner.com>
Wed, 25 Sep 2024 19:08:00 +0000 (12:08 -0700)
committerSoren Stoutner <soren@stoutner.com>
Wed, 25 Sep 2024 19:08:00 +0000 (12:08 -0700)
app/build.gradle
app/src/main/assets/fr/about_changelog.html
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.kt
app/src/main/res/values-es/strings.xml
app/src/main/res/values-fr/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values-ru/strings.xml
app/src/main/res/values/strings.xml
build.gradle
fastlane/metadata/android/fr-FR/changelogs/75.txt [new file with mode: 0644]

index c2f97b402c1027d5783c32e3a43d3bd4763ef2ab..b81126cb59c51ebb248a86c17ee847616c9ee7c3 100644 (file)
@@ -82,7 +82,7 @@ android {
 
 dependencies {
     // Include the following AndroidX libraries.
-    implementation "androidx.activity:activity-ktx:1.9.1"
+    implementation "androidx.activity:activity-ktx:1.9.2"
     implementation 'androidx.arch.core:core-common:2.2.0'
     implementation 'androidx.arch.core:core-runtime:2.2.0'
     implementation 'androidx.appcompat:appcompat:1.7.0'
@@ -90,15 +90,15 @@ dependencies {
     implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
     implementation 'androidx.core:core-ktx:1.13.1'
     implementation 'androidx.drawerlayout:drawerlayout:1.2.0'
-    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.4'
+    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6'
     implementation 'androidx.preference:preference-ktx:1.2.1'
     implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
     implementation 'androidx.viewpager:viewpager:1.0.0'
-    implementation 'androidx.webkit:webkit:1.11.0'
+    implementation 'androidx.webkit:webkit:1.12.0'
 
     // Include the Kotlin standard library.  This should be the same version number listed in project build.gradle.
     implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.20'
 
     // Include the Google material library.
-    implementation 'com.google.android.material:material:1.13.0-alpha05'
+    implementation 'com.google.android.material:material:1.13.0-alpha06'
 }
index 6716a51375801fd4560f4cc6f64906e57f1641b1..f1da42af2e77ad1d13af00ea33086ec04163c56f 100644 (file)
@@ -33,7 +33,7 @@
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-18-1/">3.18.1</a> (version du code 75)</h3>
         <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=bc4a87300d0ba4c50b040234a1608259a7f3aefd">22 Juillet 2024</a> - API minimale : 26, API optimale : 34</p>
         <ul>
-            <li>Fix a bug with the items in the Navigation Drawer <a href="https://redmine.stoutner.com/issues/1208">not properly displaying if they are enabled</a>.</li>
+            <li>Correction d'un bug avec les éléments du tiroir de navigation <a href="https://redmine.stoutner.com/issues/1208">qui ne s'affichaient pas correctement lorsqu'ils étaient activés</a>.</li>
         </ul>
 
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-18/">3.18</a> (version du code 74)</h3>
index 8c44ac15ee55417b5bb972f8a21c099443a01781..45731697d13288afa5cc5b278ad769557422d988 100644 (file)
@@ -2449,6 +2449,15 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
                 // Set the target URL as the context menu title.
                 contextMenu.setHeaderTitle(linkUrl)
 
+                // Get a new message from the WebView handler.
+                val hrefMessage = currentWebView!!.handler.obtainMessage()
+
+                // Request the focus node href.
+                currentWebView!!.requestFocusNodeHref(hrefMessage)
+
+                // Get the link text from the href message.
+                val linkText = hrefMessage.data.getString("title")
+
                 // Add an open in new tab entry.
                 contextMenu.add(R.string.open_in_new_tab).setOnMenuItemClickListener {
                     // Load the link URL in a new tab and move to it.
@@ -2530,6 +2539,20 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
                     true
                 }
 
+                // Add a Copy Text entry if the link text is not null.
+                if (linkText != null) {
+                    contextMenu.add(R.string.copy_text).setOnMenuItemClickListener {
+                        // Save the link URL in a clip data.
+                        val srcAnchorTypeTextClipData = ClipData.newPlainText(getString(R.string.copy_text), linkText)
+
+                        // Set the clip data as the clipboard's primary clip.
+                        clipboardManager.setPrimaryClip(srcAnchorTypeTextClipData)
+
+                        // Consume the event.
+                        true
+                    }
+                }
+
                 // Add an empty cancel entry, which by default closes the context menu.
                 contextMenu.add(R.string.cancel)
             }
@@ -2794,6 +2817,15 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
                 // Set the target URL as the title of the context menu.
                 contextMenu.setHeaderTitle(linkUrl)
 
+                // Get a new message from the WebView handler.
+                val hrefMessage = currentWebView!!.handler.obtainMessage()
+
+                // Request the focus node href.
+                currentWebView!!.requestFocusNodeHref(hrefMessage)
+
+                // Get the link text from the href message.
+                val linkText = hrefMessage.data.getString("title")
+
                 // Add a write email entry.
                 contextMenu.add(R.string.write_email).setOnMenuItemClickListener {
                     // Use `ACTION_SENDTO` instead of `ACTION_SEND` so that only email programs are launched.
@@ -2829,6 +2861,20 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
                     true
                 }
 
+                // Add a Copy Text entry if the link text is not null.
+                if (linkText != null) {
+                    contextMenu.add(R.string.copy_text).setOnMenuItemClickListener {
+                        // Save the link URL in a clip data.
+                        val srcEmailTypeTextClipData = ClipData.newPlainText(getString(R.string.copy_text), linkText)
+
+                        // Set the clip data as the clipboard's primary clip.
+                        clipboardManager.setPrimaryClip(srcEmailTypeTextClipData)
+
+                        // Consume the event.
+                        true
+                    }
+                }
+
                 // Add an empty cancel entry, which by default closes the context menu.
                 contextMenu.add(R.string.cancel)
             }
index 98c7c554ff3cdeb3e75109fd42e57673fa7a6bc0..9ea9f5a14eb9c84ddc03bc697dfbde00495e60d1 100644 (file)
         <string name="display_additional_app_bar_icons">Mostrar iconos adicionales en la barra de aplicación</string>
         <string name="display_additional_app_bar_icons_summary">Mostrar iconos en la barra de aplicaciones para refrescar el WebView y, si hay espacio,
             para abrir el cajón de marcadores y cambiar las cookies. Al cambiar esta configuración se reiniciará Navegador Privado.</string>
+        <string name="sort_bookmarks_alphabetically">Ordenar favoritos alfabéticamente</string>
+        <string name="sort_bookmarks_alphabetically_summary">Ordenar los favoritos alfabéticamente, mostrando las carpetas encima de los favoritos. Esto desactiva la ordenación manual de los favoritos.</string>
         <string name="app_theme">Tema de la app</string>
         <string-array name="app_theme_entries">
             <item>Por defecto del sistema</item>
index 0bc640e2ad53066f6a535d3dc4d856de5d9eb7ae..a26b43010457cec31ea322681710355627e791b8 100644 (file)
         <string name="display_additional_app_bar_icons">Icônes supplémentaires dans la barre d\'applications</string>
         <string name="display_additional_app_bar_icons_summary">Afficher les icônes dans la barre des applications pour actualiser WebView et, s\'il y a de la place,
             pour ouvrir les signets et la gestion des cookies. La modification de ce paramètre entraîne le redémarrage de Privacy Browser.</string>
+        <string name="sort_bookmarks_alphabetically">Trier les favoris par ordre alphabétique</string>
+        <string name="sort_bookmarks_alphabetically_summary">Trier les favoris par ordre alphabétique, avec les dossiers affichés avant les favoris. Cela désactive le tri manuel des favoris.</string>
         <string name="app_theme">Thème de l\'application</string>
         <string-array name="app_theme_entries">
             <item>Par défaut</item>
index 07d8d8d374215d1873a0ea1394e4808abd0ecfc9..3d5099917eeeab62b0042d984275ae26ce84d9f7 100644 (file)
         <string name="display_additional_app_bar_icons">Mostra icone addizionali nella barra dell\'applicazione</string>
         <string name="display_additional_app_bar_icons_summary">Mostra nella barra dell\'applicazione le icone per l\'aggiornamento della pagina e, se lo spazio è disponibile,
             per aprire i preferiti e per abilitare o disabilitare i cookie. La modifica di questa impostazione provocherà il riavvio di Privacy Browser.</string>
+        <string name="sort_bookmarks_alphabetically">Elenca i segnalibri alfabeticamente</string>
+        <string name="sort_bookmarks_alphabetically_summary">Elenca i segnalibri in ordine alfabetico, con le cartelle mostrate al di sopra dei segnalibri.
+            Questo disabilita l\'ordinamento manuale dei segnalibri.</string>
         <string name="app_theme">Tema Applicazione</string>
         <string-array name="app_theme_entries">
             <item>Predefinito</item>
index ece1858585dd30f022f63bdc993c24c4bb054716..59ef4304bb4d7337c76d5697d66d172e77cb96a0 100644 (file)
         <string name="display_additional_app_bar_icons">Отображать дополнительные значки на панели приложения</string>
         <string name="display_additional_app_bar_icons_summary">Показывать в панели приложения значки для обновления WebView и, если есть место, для открытия окна закладок и переключения cookie.
             Изменение этой настройки приведет к перезапуску Privacy Browser.</string>
+        <string name="sort_bookmarks_alphabetically">Сортировка закладок по алфавиту</string>
+        <string name="sort_bookmarks_alphabetically_summary">Отсортировать закладки в алфавитном порядке с отображением папок над закладками. Это отключит ручное упорядочивание закладок.</string>
         <string name="app_theme">Тема приложения</string>
         <string-array name="app_theme_entries">
             <item>По умолчанию</item>
index 230916f600734d43a73f1e12e693e19f2ab6b1f0..eeaa5a237cd4f40062d922162e1ce2d68c5c1fea 100644 (file)
     <string name="open_image_in_new_tab">Open Image in New Tab</string>
     <string name="share_image">Share Image</string>
     <string name="copy_url">Copy URL</string>
+    <string name="copy_text">Copy Text</string>
     <string name="email_address">Email Address</string>
     <string name="copy_email_address">Copy Email Address</string>
     <string name="write_email">Write Email</string>
index 28ca9f778730d4f4f9a3509dbe07f55427a8c803..027a715dbccf6fe709a723443c4fa4ac2a3f2834 100644 (file)
@@ -26,7 +26,7 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:8.5.2'
+        classpath 'com.android.tools.build:gradle:8.6.1'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"
 
         // NOTE: Do not place your application dependencies here; they belong
diff --git a/fastlane/metadata/android/fr-FR/changelogs/75.txt b/fastlane/metadata/android/fr-FR/changelogs/75.txt
new file mode 100644 (file)
index 0000000..c6f7ee2
--- /dev/null
@@ -0,0 +1 @@
+• Correction d'un bug avec les éléments du tiroir de navigation qui ne s'affichaient pas correctement lorsqu'ils étaient activés.
\ No newline at end of file