From 3d95af5806f4afab037ff10ca2affa787dca91ce Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 22 Jan 2024 01:14:23 +0100 Subject: [PATCH] clipboard: Pinning Allow recent clips to be pinned. Pinned clips are put a different place and are persistent. The pane is split in two columns, the clipboard history and the pinned clips. Pinned clips are stored in a new preference file. Improved pinning layout clipboard: Remove history entry after pinning --- res/layout/clipboard_history_entry.xml | 5 + res/layout/clipboard_pane.xml | 12 +- res/layout/clipboard_pane_entry.xml | 4 - res/layout/clipboard_pin_entry.xml | 5 + res/values-cs/strings.xml | 1 + res/values-de/strings.xml | 1 + res/values-es/strings.xml | 1 + res/values-fa/strings.xml | 1 + res/values-fr/strings.xml | 1 + res/values-it/strings.xml | 1 + res/values-ko/strings.xml | 1 + res/values-lv/strings.xml | 1 + res/values-pl/strings.xml | 1 + res/values-pt/strings.xml | 1 + res/values-ro/strings.xml | 1 + res/values-ru/strings.xml | 1 + res/values-tr/strings.xml | 1 + res/values-uk/strings.xml | 1 + res/values-vi/strings.xml | 1 + res/values-zh-rCN/strings.xml | 1 + res/values/strings.xml | 1 + res/values/styles.xml | 10 ++ .../ClipboardHistoryService.java | 22 ++++ .../juloo.keyboard2/ClipboardHistoryView.java | 51 ++++---- srcs/juloo.keyboard2/ClipboardPinView.java | 112 ++++++++++++++++++ 25 files changed, 211 insertions(+), 27 deletions(-) create mode 100644 res/layout/clipboard_history_entry.xml delete mode 100644 res/layout/clipboard_pane_entry.xml create mode 100644 res/layout/clipboard_pin_entry.xml create mode 100644 srcs/juloo.keyboard2/ClipboardPinView.java diff --git a/res/layout/clipboard_history_entry.xml b/res/layout/clipboard_history_entry.xml new file mode 100644 index 0000000..901c402 --- /dev/null +++ b/res/layout/clipboard_history_entry.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/res/layout/clipboard_pane.xml b/res/layout/clipboard_pane.xml index 41be436..9929afa 100644 --- a/res/layout/clipboard_pane.xml +++ b/res/layout/clipboard_pane.xml @@ -1,6 +1,14 @@ - - + + + + + + + + + + diff --git a/res/layout/clipboard_pane_entry.xml b/res/layout/clipboard_pane_entry.xml deleted file mode 100644 index 9d767c3..0000000 --- a/res/layout/clipboard_pane_entry.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/res/layout/clipboard_pin_entry.xml b/res/layout/clipboard_pin_entry.xml new file mode 100644 index 0000000..7678cd0 --- /dev/null +++ b/res/layout/clipboard_pin_entry.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index ceff4fe..2766f9a 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -116,4 +116,5 @@ Tato aplikace neobsahuje žádné reklamy, nevyužívá připojení k síti a je Home End + diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 7b8295c..a7b73a6 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -116,4 +116,5 @@ Diese App enthält keine Werbung, benötigt keinen Netzwerkzugriff und ist quell Pos1 Ende + diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 303bcfd..87fd6b0 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -116,4 +116,5 @@ La misma no contiene ningún anuncio/publicidad, no realiza peticiones de red y Inicio Fin + diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index a5e6862..af1d5c9 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -116,4 +116,5 @@ This application contains no ads, doesn't make any network requests and is Open + diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 104ebde..72923db 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -116,4 +116,5 @@ Cette application ne contient pas de publicité, n'accède pas au réseau et est Début Fin + diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 18b0815..b37486a 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -116,4 +116,5 @@ This application contains no ads, doesn't make any network requests and is Open + diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 9513322..f78187a 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -116,4 +116,5 @@ This application contains no ads, doesn't make any network requests and is Open + diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml index 5926476..8d96434 100644 --- a/res/values-lv/strings.xml +++ b/res/values-lv/strings.xml @@ -118,4 +118,5 @@ Tagad lieliski piemērota izmantošanai ikdienā. Sākums Beigas + diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 3ea9435..22db90e 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -116,4 +116,5 @@ Aplikacja nie zawiera reklam, nie żąda dostępu do internetu, a jej kod źród Home End + diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index fedc8b3..4ed143e 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -116,4 +116,5 @@ Este aplicativo não contém anúncios, não faz nenhuma solicitação de rede e Home End + diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index f1c944e..9a32ee7 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -116,4 +116,5 @@ Această aplicație nu conține publicitate, nu folosește rețeaua deloc și e + diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index dff0a35..76d48d3 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -116,4 +116,5 @@ Home End + diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index a7ee01e..c6a8991 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -116,4 +116,5 @@ Bu uygulama açık kaynaklıdır. Reklam içermez ve internete bağlanmaz."BAŞ(Sol yön tuşu) SON(Sağ yön tuşu) + diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index 2abacc0..aeb1fbe 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -116,4 +116,5 @@ Home End + diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index fedfd3d..2ef5213 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -116,4 +116,5 @@ Bây giờ đã hoàn hảo cho việc sử dụng hàng ngày. + diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 8de622f..ff730ba 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -116,4 +116,5 @@ Home End + diff --git a/res/values/strings.xml b/res/values/strings.xml index 253321d..c67c3e7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -116,4 +116,5 @@ This application contains no ads, doesn't make any network requests and is Open Home End Recently copied text + Pinned diff --git a/res/values/styles.xml b/res/values/styles.xml index d57322c..e47ec47 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -18,6 +18,9 @@ +