From: David A. Velasco Date: Wed, 16 Apr 2014 17:31:27 +0000 (+0200) Subject: Merge branch 'develop' into videoInstandUploads X-Git-Tag: oc-android-1.7.0_signed~332^2~5 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/33b0909e7bdcab690cd307829b0a49e26a7e69da?hp=e8d969f03282ff8fb1bcad8130e5e55b825d8805 Merge branch 'develop' into videoInstandUploads --- diff --git a/.travis.yml b/.travis.yml index 7ec196c7..4429520a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq libstdc++6:i386 lib32z1 - export COMPONENTS=build-tools-18.1.0,android-14,android-17,android-19,sysimg-19,extra-android-support - - curl -L https://raw.github.com/embarkmobile/android-sdk-installer/master/android-sdk-installer | bash /dev/stdin --install=$COMPONENTS + - curl -3L https://raw.github.com/embarkmobile/android-sdk-installer/version-1/android-sdk-installer | bash /dev/stdin --install=$COMPONENTS - source ~/.android-sdk-installer/env - rm pom.xml - ./setup_env.sh diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index 5ad0b6c8..a0cdf810 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -29,6 +29,7 @@ Comentaris Imprint Proveu %1$s a un telèfon avançat! + \"Vull convidar-te a usar l\'aplicació %1$s al teu telèfon avançat!\nBaixa\'l aquí: %2$s\" Comprova el servidor Adreça del servidor https://… Nom d\'usuari @@ -37,6 +38,7 @@ Fitxers Connecta Puja + Seleccioneu la carpeta de pujada: No s\'ha trobat el compte No hi ha comptes %1$s en el dispositiu. Configureu un compte primer Configura @@ -94,6 +96,8 @@ Es mantenent els arxius a sincronitzar erronis El contingut de %1$d arxius no es va poder sincronitzar (%2$d conflictes) S\'han oblidat alguns fitxers locals + %1$d fitxers no s\'han pogut copiar dins de %2$s carpetes + Des de la versió 1.3.16, els fitxers pujats des d\'aquest dispositiu es copien a la carpeta local %1$s per prevenir pèrdues de dades quan es sincronitza un únic fitxer amb diversos comptes.\n\nDegut a aquest canvi, tots els fitxers pujats en versions anteriors d\'aquesta aplicació es copiaven a la carpeta %2$s. Malgrat tot, un error impedia aquesta operació durant la sinconització del compte. Podeu deixar els fitxer(s) tal i com estan i eliminar l\'enllaç a %3$s, o moure els fitxer(s) a la carpeta %1$s i retenir l\'enllaç a %4$s.\n\nA baix hi ha els fitxers local(s) i els fitxer(s) remots a %5$s als que estaven enllaçats. La carpeta %1$s ja no existeix Mou-los tots S\'han mogut tots els fitxers @@ -129,6 +133,7 @@ Botó de rebobinat Botó de reproducció o pausa Botó de reproducció ràpida + S\'està autenticant... S\'està intentant acreditar-vos... Sense connexió de xarxa La connexió segura no està disponible. @@ -157,6 +162,7 @@ S\'està connectant a un servidor d\'autenticació... El serivdor no permet aquest mètode d\'autenticació %1$s no permet comptes múltiples + El servidor no retorna una id d\'usuari correcta, contacteu amb l\'administrador. No es pot autenticar en aquest servidor Mantén el fitxer actualitzat Reanomena @@ -174,6 +180,7 @@ El canvi de nom no s\'ha pogut completar L\'arxiu remot no ha pogut ser comprovat Contingut de l\'arxiu ja sincronitzat + La carpeta no s\'ha pogut crear Caràcters no permesos: / \\ < > : \" | ? * Espereu S\'ha produït un problema inesperat; proveu una altra aplicació per seleccionar el fitxer @@ -220,6 +227,7 @@ No el pugis Visualització prèvia d\'imatge Auquesta imatge no es pot mostrar + %1$s no s\'ha pogut copiar a la carpeta local %2$s La pujada instantània ha fallat Fallada de pujades instantànies Resum de totes les pujades instantànies que han fallat @@ -231,6 +239,7 @@ no facis res, no estàs en lína per la pujada instantània Missatge d\'Error: Comproveu la configuració del servidor, potser heu excedit la quota. + La compartició no es troba disponible al vostre servidor. Contacteu amb l\'administrador. No es pot compartir aquest fitxer o carpeta. Assegureu-vos que existeix S\'ha produït un error en intentar compartir aquest fitxer o carpeta No es pot deixar de compartir aquest fitxer o carpeta. No existeix. @@ -238,4 +247,5 @@ Envia Copia l\'enllaç S\'ha copiat al porta-retalls + Error crític: no es poden realitzar operacions diff --git a/res/values-cs-rCZ/strings.xml b/res/values-cs-rCZ/strings.xml index 004dc811..8362648f 100644 --- a/res/values-cs-rCZ/strings.xml +++ b/res/values-cs-rCZ/strings.xml @@ -157,7 +157,7 @@ Připojuji se k přihlašovacímu serveru... Server nepodporuje tuto přihlašovací metodu %1$s nepodporuje více účtů - Není možné provést ověření + Není možné provést ověření vůči tomuto serveru Udržovat soubor aktuální Přejmenovat Odstranit diff --git a/res/values-de-rDE/strings.xml b/res/values-de-rDE/strings.xml index d86403c7..d7c209da 100644 --- a/res/values-de-rDE/strings.xml +++ b/res/values-de-rDE/strings.xml @@ -29,6 +29,7 @@ Rückmeldungen Impressum Probieren Sie %1$s auf Ihrem Smartphone! + \"Ich möchte Sie zum Benutzen von %1$s auf Ihrem Smartphone einladen!\nLaden Sie es hier herunter: %2$s\" Server überprüfen Server-Adresse https://… Benutzername @@ -132,6 +133,7 @@ Zurückspulen Button Abspielen oder Pausieren Button Vorspulen Button + Autorisierung empfangen... Anmeldungsversuch... Keine Netzwerkverbindung Sichere Verbindung nicht verfügbar. @@ -160,6 +162,7 @@ Verbinde mit dem Authentifizierung-Server… Der Server unterstützt diese Authentifizierung-Methode nicht %1$s unterstützt nicht mehrere Benutzerkonten + Ihr Server gibt keine korrekte Benutzer-ID zurück, bitte kontaktieren Sie einen Administrator\n⇥ Die Authentifizierung gegenüber dem Server konnte nicht durchgeführt werden Datei aktuell halten Umbenennen @@ -236,6 +239,7 @@ Nicht durchgeführt - Nicht online für sofortigen Upload Fehlermeldung: Bitte überprüfen Sie Ihre Serverkonfiguration. Vielleicht ist Ihr Nutzungslimit überschritten. + Entschuldigung, Freigaben sind auf Ihrem Server nicht aktiviert. Bitte kontaktieren Sie Ihren\n⇥⇥Administrator. Die Freigabe der Datei oder des Ordners ist nicht möglich. Bitte stellen Sie sicher, dass diese existiert. Es ist ein Fehler beim Freigeben der Datei oder des Ordners aufgetreten. Das Entfernen der Freigabe für die Datei oder den Ordner ist nicht möglich. Diese existieren nicht. @@ -243,4 +247,5 @@ Senden Link kopieren In die Zwischenablage kopiert + Kritischer Fehler: Operationen können nicht ausgeführt werden diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 56fd4b43..70d656e8 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -29,6 +29,7 @@ Rückmeldungen Impressum Probiere %1$s auf Deinem Smartphone! + \"Ich möchte Dich zum Benutzen von %1$s auf Deinem Smartphone einladen!\nLade es hier herunter: %2$s\" Überprüfe den Server Server-Adresse https://… Benutzername @@ -132,6 +133,7 @@ Zurückspielen Knopf Play-/Pause Knopf Vorspulen Knopf + Autorisierung empfangen... Anmeldungsversuch... Keine Netzwerkverbindung Sichere Verbindung nicht verfügbar. @@ -160,6 +162,7 @@ Verbinde mit dem Authentifizierung-Server… Der Server unterstützt diese Authentifizierung-Methode nicht %1$s unterstützt nicht mehrere Benutzerkonten + Dein Server gibt keine korrekte Benutzer-ID zurück, bitte kontaktiere einen Administrator\n Die Authentifizierung gegenüber dem Server konnte nicht durchgeführt werden Datei aktuell halten Umbenennen @@ -236,6 +239,7 @@ Nicht durchgeführt - Nicht online für sofortigen Upload Fehlermeldung: Bitte überprüfe Deine Servereinstellungen. Eventuell ist Dein Nutzungslimit überschritten. + Entschuldigung, Freigaben sind auf Deinem Server nicht aktiviert. Bitte kontaktiere Deinen\n⇥⇥Administrator. Die Freigabe der Datei oder des Ordners ist nicht möglich. Bitte stelle sicher, dass diese existiert. Es ist ein Fehler beim Freigeben der Datei oder des Ordners aufgetreten. Das Entfernen der Freigabe für die Datei oder den Ordner ist nicht möglich. Diese existieren nicht. @@ -243,4 +247,5 @@ Senden Link kopieren In die Zwischenablage kopiert + Kritischer Fehler: Operationen können nicht ausgeführt werden diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 0180642d..731c8657 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -29,6 +29,7 @@ Commentaires Empreinte Essayez %1$s sur votre smartphone ! + J\'aimerais vous inviter à utiliser %1$s sur votre smartphone !\nTéléchargez-le ici : %2$s Vérifier le serveur Adresse du serveur https://... Nom d\'utilisateur @@ -96,6 +97,7 @@ Le contenu de %1$d fichiers n\'a put être synchronisé (%2$d conflits) Certains fichiers locaux ont été oubliés %1$d fichiers du dossier %2$s n\'ont pas pu être copiés dans + Depuis la version 1.3.16, les fichiers envoyé depuis ce périphérique sont copiés dans le dossier local %1$s pour éviter une perte de données lorsqu\'un même fichier est synchronisé avec plusieurs comptes.\n\nEn raison de cette modification, tous les fichiers envoyés avec des versions antérieures de cette application ont été copiés dans le dossier %2$s. Cependant une erreur a empêché l\'achèvement de cette opération pendant la synchronisation du compte. Vous pouvez soit laisser le(s) fichier(s) tels quels et supprimer le lien vers %3$s, soit déplacer le(s) fichier(s) dans le dossier %1$s et garder le lien vers %4$s.\n\nCi-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxquels ils sont liés. Le dossier %1$s n\'existe plus Tout déplacer Tous les fichiers ont été déplacés @@ -131,6 +133,7 @@ Bouton de rem-bobinage Bouton de Lecture ou de Pause Bouton d\'avance rapide + Demande d\'autorisation... Tentative de connexion … Pas de connexion réseau Connexion sécurisée non disponible @@ -159,6 +162,7 @@ Connexion au serveur d\'authentification... Le serveur ne supporte pas cette méthode d\'authentification %1$s ne supporte pas les comptes multiples + Votre serveur a retourné un identifiant d\'utilisateur incorrect. Veuillez prendre contact avec votre administrateur\n Impossible de s\'authentifier sur ce serveur Maintenir le fichier à jour Renommer @@ -235,6 +239,7 @@ Ne rien faire vous n\'êtes pas connecté pour le téléchargement instantané Message d\'échec: Veuillez vérifier la configuration de votre serveur, peut-être que votre quota est dépassé. + Désolé, le partage n\'est pas disponible sur votre serveur. Contactez votre administrateur, s\'il vous plait. Impossible de partager ce fichier ou répertoire. Vérifiez qu’il est bien présent Une erreur est survenue lors de la tentative de partage de ce fichier ou répertoire Impossible d’annuler le partage de ce fichier ou répertoire : il n’existe pas. @@ -242,4 +247,5 @@ Envoyer Copier le lien Copié dans le presse-papiers + Erreur critique : l\'opération n\'a pu être réalisée diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 6f4584a5..018dc4d9 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -29,6 +29,7 @@ Segnalazioni Imprint Prova %1$s sul tuo smartphone! + \"Vorrei invitarti ad usare %1$s sul tuo smartphone!\nScaricalo qui: %2$s\"\n\t Verifica server Indirizzo server https://... Nome utente @@ -37,7 +38,7 @@ File Connetti Carica - Scegliere la cartella da caricare: + Scegli la cartella da caricare: Nessun account trovato Non ci sono account %1$s sul tuo dispositivo. Configura prima un account. Configurazione @@ -95,8 +96,8 @@ Sincronizzazione dei file non riuscita I contenuti di %1$d file non possono essere sincronizzati (%2$d conflitti) Alcuni file locali sono stati trascurati - i file %1$d della cartella %2$s non possono essere copiati - Nella versione 1.3.16, i file caricati da questo dispositivo vengono copiati nella cartella locale %1$s per prevenire la perdita dei dati quando un singolo file è sincronizzato con diversi account.\n\nA causa di questo cambiamento, tutti i file caricati nelle versioni precedenti di quest\'applicazione sono stati copiati nella cartella %2$s. Tuttavia, un errore non ha permesso il completamento di questa operazione durante la sincronizzazione dell\'account. Puoi, dunque, sia lasciare i (il) file come sono e rimuovere il collegamento a %3$s, o spostare i (il) file nella cartella %1$s e mantenere il collegamento a %4$s.\n\nIn basso sono elencati i (il) file locali, e i (il) file rimossi in %5$s a cui sono collegati. + %1$d file della cartella %2$s non possono essere copiati + Nella versione 1.3.16, i file caricati da questo dispositivo vengono copiati nella cartella locale %1$s per evitare la perdita dei dati quando un singolo file è sincronizzato con diversi account.\n\nA causa di questo cambiamento, tutti i file caricati nelle versioni precedenti di questa applicazione sono stati copiati nella cartella %2$s. Tuttavia, un errore non ha permesso il completamento di questa operazione durante la sincronizzazione dell\'account. Puoi, dunque, sia lasciare i file come sono e rimuovere il collegamento a %3$s, o spostare i file nella cartella %1$s e mantenere il collegamento a %4$s.\n\nIn basso sono elencati i file locali e i file remoti in %5$s ai quali sono collegati. La cartella %1$s non esiste più Sposta tutto Tutti i file sono stati spostati @@ -132,6 +133,7 @@ Pulsante Riavvolgi Pulsante Riproduci o pausa Pulsante Avanti veloce + Autorizzazione in corso... Tentativo di accesso in corso... Nessuna connessione di rete Connessione sicura disponibile. @@ -160,6 +162,7 @@ Connessione al server di autenticazione in corso... Il server non supporta questo metodo di autenticazione %1$s non supporta account multipli + Il tuo server non ha restituito un id utente corretto, contatta un amministratore\n\t Impossibile eseguire l\'autenticazione su questo server Tieni aggiornato il file Rinomina @@ -177,7 +180,7 @@ La rinomina non può essere completata Il file remoto non può essere controllato Contenuti del file già sincronizzati - La cartella non potrebbe essere creata + La cartella non può essere creata Caratteri proibiti: / \\ < > : \" | ? * Attendi Problema inatteso; prova un\'altra applicazione per selezionare il file @@ -236,6 +239,7 @@ non fare niente, non sei collegato per i caricamenti istantanei Messaggio d\'errore: Controlla la configurazione del server, forse hai superato la tua quota. + Spiacenti, la condivisione non è abilitata sul tuo server. Contatta il tuo\n\t\tamministratore. Impossibile condividere il file o la cartella. Assicurati che esista. Si è verificato un errore durante il tentativo di condivisione del file o della cartella Impossibile rimuovere dalla condivisione il file o la cartella. Non esiste. @@ -243,4 +247,5 @@ Invia Copia collegamento Copiato negli appunti + Errore critico: impossibile eseguire le operazioni diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml index 0b821f58..bdf5a4f7 100644 --- a/res/values-pt-rBR/strings.xml +++ b/res/values-pt-rBR/strings.xml @@ -45,7 +45,7 @@ Sair Sem conteúdo para enviar Nenhum foi recebido. Nada para enviar. - %1$s não é permitido a acessar o conteúdo compartilhado + %1$s não é permitido acessar o conteúdo compartilhado Enviando Não existe arquivos nesta pasta\nNovos arquivos podem ser adicionados com a opção do menu \"Enviar\" Toque em um arquivo para mostrar informações adicionais. @@ -56,7 +56,7 @@ Download Atualizar arquivo Arquivo foi renomeado para %1$s durante o upload - Compartilher link + Compartilhar link Descompartilhar o link Sim Não @@ -162,7 +162,7 @@ Conectando ao servidor de autenticação ... O servidor não suporta este método de autenticação %1$s não suporta múltiplas contas - Seu servidor não está retornando um ID de usuário correto, por favor, entre em contato com um administrador \n⇥ + Seu servidor não está retornando um ID de usuário correto, por favor, entre em contato com um administrador\n⇥ Não foi possível autenticar neste servidor Manter arquivo atualizado Renomear @@ -230,7 +230,7 @@ %1$s não pôde ser copiado para pasta local %2$s Falha no EnvioInstantaneo Falhas nos envios imediatos - Sumario de todas as falhas nos envios imediatos + Sumário de todas as falhas nos envios imediatos selecionar tudo tentar novamente todos os selecionados excluir todos os selecionados da lista de envio @@ -238,7 +238,7 @@ Carregar mais Imagens não fazer nada voce não está conectado para envio instantâneo Mensagem de Falha: - Por favor verifique a configuração do servidor, talvez a sua cota esteja vencida. + Por favor, verifique a configuração do servidor, talvez a sua cota esteja vencida. Desculpe, o compartilhamento não está habilitado em seu servidor. Entre em contato com seu \n⇥⇥ administrador. Incapaz de compartilhar esse arquivo ou pasta. Por favor, certifique-se que existe Ocorreu um erro durante a tentativa de compartilhar esse arquivo ou pasta diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index cb370070..fb0e4fa7 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -1,6 +1,6 @@ /* ownCloud Android client application * Copyright (C) 2011 Bartek Przybylski - * Copyright (C) 2012-2013 ownCloud Inc. + * Copyright (C) 2012-2014 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -65,6 +65,11 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName private static final String MY_PACKAGE = OCFileListFragment.class.getPackage() != null ? OCFileListFragment.class.getPackage().getName() : "com.owncloud.android.ui.fragment"; private static final String EXTRA_FILE = MY_PACKAGE + ".extra.FILE"; + + private static final String KEY_INDEXES = "INDEXES"; + private static final String KEY_FIRST_POSITIONS= "FIRST_POSITIONS"; + private static final String KEY_TOPS = "TOPS"; + private static final String KEY_HEIGHT_CELL = "HEIGHT_CELL"; private OCFileListFragment.ContainerActivity mContainerActivity; @@ -73,6 +78,13 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName private Handler mHandler; private OCFile mTargetFile; + + // Save the state of the scroll in browsing + private ArrayList mIndexes; + private ArrayList mFirstPositions; + private ArrayList mTops; + + private int mHeightCell = 0; /** * {@inheritDoc} @@ -87,8 +99,8 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName throw new ClassCastException(activity.toString() + " must implement " + OCFileListFragment.ContainerActivity.class.getSimpleName()); } } - - + + /** * {@inheritDoc} */ @@ -99,7 +111,19 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName mAdapter = new FileListListAdapter(getActivity(), mContainerActivity); if (savedInstanceState != null) { mFile = savedInstanceState.getParcelable(EXTRA_FILE); + mIndexes = savedInstanceState.getIntegerArrayList(KEY_INDEXES); + mFirstPositions = savedInstanceState.getIntegerArrayList(KEY_FIRST_POSITIONS); + mTops = savedInstanceState.getIntegerArrayList(KEY_TOPS); + mHeightCell = savedInstanceState.getInt(KEY_HEIGHT_CELL); + + } else { + mIndexes = new ArrayList(); + mFirstPositions = new ArrayList(); + mTops = new ArrayList(); + mHeightCell = 0; + } + setListAdapter(mAdapter); registerForContextMenu(getListView()); @@ -116,9 +140,12 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName public void onSaveInstanceState (Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelable(EXTRA_FILE, mFile); + outState.putIntegerArrayList(KEY_INDEXES, mIndexes); + outState.putIntegerArrayList(KEY_FIRST_POSITIONS, mFirstPositions); + outState.putIntegerArrayList(KEY_TOPS, mTops); + outState.putInt(KEY_HEIGHT_CELL, mHeightCell); } - - + /** * Call this, when the user presses the up button. * @@ -156,11 +183,66 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName listDirectory(mFile); mContainerActivity.startSyncFolderOperation(mFile); + + // restore index and top position + restoreIndexAndTopPosition(); + } // else - should never happen now return moveCount; } + /* + * Restore index and position + */ + private void restoreIndexAndTopPosition() { + int index = mIndexes.get(mIndexes.size() - 1); + mIndexes.remove(mIndexes.size() - 1); + + int firstPosition = mFirstPositions.get(mFirstPositions.size() - 1); + mFirstPositions.remove(mFirstPositions.size() -1); + + int top = mTops.get(mTops.size() - 1); + mTops.remove(mTops.size() - 1); + + mList.setSelectionFromTop(firstPosition, top); + + // Move the scroll if the selection is not visible + int indexPosition = mHeightCell*index; + int height = mList.getHeight(); + + if (indexPosition > height) { + if (android.os.Build.VERSION.SDK_INT >= 11) + { + mList.smoothScrollToPosition(index); + } + else if (android.os.Build.VERSION.SDK_INT >= 8) + { + mList.setSelectionFromTop(index, 0); + } + + } + } + + /* + * Save index and top position + */ + private void saveIndexAndTopPosition(int index) { + + mIndexes.add(index); + + int firstPosition = mList.getFirstVisiblePosition(); + mFirstPositions.add(firstPosition); + + View view = mList.getChildAt(0); + int top = (view == null) ? 0 : view.getTop() ; + + mTops.add(top); + + // Save the height of a cell + mHeightCell = (view == null || mHeightCell != 0) ? mHeightCell : view.getHeight(); + } + @Override public void onItemClick(AdapterView l, View v, int position, long id) { OCFile file = (OCFile) mAdapter.getItem(position); @@ -170,6 +252,8 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName listDirectory(file); // then, notify parent activity to let it update its state and view, and other fragments mContainerActivity.onBrowsedDownTo(file); + // save index and top position + saveIndexAndTopPosition(position); } else { /// Click on a file if (PreviewImageFragment.canBePreviewed(file)) {