From 68f975aa8c92e6313323f8e0283198256a3ca853 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 29 Oct 2017 23:09:41 +0100 Subject: [PATCH] fix #89, allow copying file/folder path to clipboard --- .../filemanager/adapters/ItemsAdapter.kt | 13 +++++++++++++ app/src/main/res/menu/cab.xml | 4 ++++ app/src/main/res/values-cs/strings.xml | 2 ++ app/src/main/res/values-de/strings.xml | 2 ++ app/src/main/res/values-es/strings.xml | 2 ++ app/src/main/res/values-fr/strings.xml | 2 ++ app/src/main/res/values-hu/strings.xml | 2 ++ app/src/main/res/values-it/strings.xml | 2 ++ app/src/main/res/values-ja/strings.xml | 2 ++ app/src/main/res/values-ko-rKR/strings.xml | 2 ++ app/src/main/res/values-nl/strings.xml | 2 ++ app/src/main/res/values-pl/strings.xml | 2 ++ app/src/main/res/values-pt-rBR/strings.xml | 2 ++ app/src/main/res/values-pt/strings.xml | 2 ++ app/src/main/res/values-ru/strings.xml | 2 ++ app/src/main/res/values-sk/strings.xml | 2 ++ app/src/main/res/values-sv/strings.xml | 2 ++ app/src/main/res/values-tr/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ 19 files changed, 51 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt index 7c0e9ee6..02dfbec1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt @@ -1,5 +1,8 @@ package com.simplemobiletools.filemanager.adapters +import android.content.ClipData +import android.content.ClipboardManager +import android.content.Context import android.graphics.drawable.Drawable import android.net.Uri import android.os.Build @@ -107,6 +110,7 @@ class ItemsAdapter(val activity: SimpleActivity, var mItems: MutableList displayRenameDialog() R.id.cab_properties -> showProperties() R.id.cab_share -> shareFiles() + R.id.cab_copy_path -> copyPath() R.id.cab_copy_to -> copyMoveTo(true) R.id.cab_move_to -> copyMoveTo(false) R.id.cab_compress -> compressSelection() @@ -129,6 +133,7 @@ class ItemsAdapter(val activity: SimpleActivity, var mItems: MutableList() selectedPositions.forEach { files.add(File(mItems[it].path)) } diff --git a/app/src/main/res/menu/cab.xml b/app/src/main/res/menu/cab.xml index f8d3142d..1ed08c97 100644 --- a/app/src/main/res/menu/cab.xml +++ b/app/src/main/res/menu/cab.xml @@ -21,6 +21,10 @@ android:icon="@drawable/ic_share" android:title="@string/share" app:showAsAction="ifRoom"/> + Jít do domovské složky Nastavit jako domovskou složku Domovská složka aktualizována + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index a0ff5c7d..17d51c6e 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -7,6 +7,8 @@ Gehe zum Home Ordner Als Home Ordner setzen Home Ordner geupdated + Copy path to clipboard + Path copied Komprimieren diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 36c18a32..5a24b6b5 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -7,6 +7,8 @@ Ir a carpeta principal Establecer como carpeta principal Carpeta principal actualizada + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 9dd200d3..12b7fb91 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -7,6 +7,8 @@ Aller au dossier par défaut Définir en tant que dossier par défaut Dossier par défaut mis à jour + Copy path to clipboard + Path copied Compresser diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 6d0cba78..2a34a1c1 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -7,6 +7,8 @@ Ugrás a kezdőmappára Beállítás kezdőmappának Kezdőmappa frissítve + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 19445026..1a57de7a 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -7,6 +7,8 @@ Vai alla cartella home Imposta come cartella home Cartella home aggiornata + Copy path to clipboard + Path copied Comprimi diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 4ee041d8..39abd711 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -7,6 +7,8 @@ Go to home folder Set as home folder Home folder updated + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index fbbb0ac1..af3f4436 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -7,6 +7,8 @@ 홈 폴더 이동 홈 폴더 설정 홈 폴더 설정완료 + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index ee397c3e..bcc37e66 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -7,6 +7,8 @@ Go to home folder Set as home folder Home folder updated + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 2bb24600..72babba1 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -7,6 +7,8 @@ Przejdź do folderu głównego Ustaw jako folder główny Folder główny został zaktulizowany + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index d8087683..625f2521 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -7,6 +7,8 @@ Ir para a pasta pessoal Definir como pasta pessoal Pasta pessoal atualizada + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 17559b88..e2cf60cb 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -7,6 +7,8 @@ Ir para a pasta pessoal Definir como pasta pessoal Pasta pessoal atualizada + Copy path to clipboard + Path copied Comprimir diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index e1d4cd29..8bb775e5 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -7,6 +7,8 @@ Открыть домашнюю папку Сделать домашней Домашняя папка установлена + Copy path to clipboard + Path copied Сжать diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index f2e80195..f5bfd5b7 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -7,6 +7,8 @@ Ísť do domovského priečinka Nastaviť ako domovský priečinok Domovský priečinok bol nastavený + Kopírovať cestu do schránky + Cesta skopírovaná Komprimovať diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index d22b9d33..9ddc4fd6 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -7,6 +7,8 @@ Gå till hemmappen Ange som hemmapp Hemmappen har uppdaterats + Copy path to clipboard + Path copied Komprimera diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 3938902f..b5325d75 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -7,6 +7,8 @@ Go to home folder Set as home folder Home folder updated + Copy path to clipboard + Path copied Compress diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ee397c3e..bcc37e66 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -7,6 +7,8 @@ Go to home folder Set as home folder Home folder updated + Copy path to clipboard + Path copied Compress