Merge with develop
authorMagnus Sjoqvist <magnus.b.j.sjoqvist@gmail.com>
Fri, 17 Oct 2014 09:06:30 +0000 (11:06 +0200)
committerMagnus Sjoqvist <magnus.b.j.sjoqvist@gmail.com>
Fri, 17 Oct 2014 09:06:30 +0000 (11:06 +0200)
1  2 
res/values-it/strings.xml
res/values-sv/strings.xml
res/values/strings.xml
res/xml/preferences.xml
src/com/owncloud/android/ui/activity/Preferences.java
src/com/owncloud/android/ui/activity/Uploader.java

    <string name="prefs_recommend">Consiglia ad un amico</string>
    <string name="prefs_feedback">Segnalazioni</string>
    <string name="prefs_imprint">Imprint</string>
 +  <string name="prefs_remember_last_upload_location_summary">Salvare l\'ultimo percorso usata per l\'upload</string>
 +  <string name="prefs_remember_last_share_location">Salva la posizione</string>
    <string name="recommend_subject">Prova %1$s sul tuo smartphone!</string>
-   <string name="recommend_text">\"Vorrei invitarti ad usare %1$s sul tuo smartphone!\nScaricalo qui: %2$s\"\n\t</string>
+   <string name="recommend_text">Vorrei invitarti a usare %1$s sul tuo smartphone!\nScarica qui: %2$s</string>
    <string name="auth_check_server">Verifica server</string>
    <string name="auth_host_url">Indirizzo server https://...</string>
    <string name="auth_username">Nome utente</string>
    <string name="prefs_recommend">Rekommendera till en vän</string>
    <string name="prefs_feedback">Feedback</string>
    <string name="prefs_imprint">Imprint</string>
 +  <string name="prefs_remember_last_share_location">Kom ihåg uppladdningsplats</string>
 +  <string name="prefs_remember_last_upload_location_summary">Kom ihåg senaste uppladdningsplatsen för delning</string>
    <string name="recommend_subject">Försök %1$s på din smarttelefon!</string>
-   <string name="recommend_text">\"Jag vill bjuda in dig att använda %1$s på din smartphone\nLadda ner här: %2$s\"\n\t</string>
+   <string name="recommend_text">Jag skulle vilja bjuda in dig till att använda %1$s på din smartphone!\nLadda ner här: %2$s</string>
    <string name="auth_check_server">Kontrollera Server</string>
    <string name="auth_host_url">Serveradress https://...</string>
    <string name="auth_username">Användarnamn</string>
      <string name="prefs_recommend">Recommend to a friend</string>
      <string name="prefs_feedback">Feedback</string>
      <string name="prefs_imprint">Imprint</string>
 -    
 +    <string name="prefs_remember_last_share_location">Remember share location</string>
 +    <string name="prefs_remember_last_upload_location_summary">Remember last share upload location</string>
 +
-     <string name="recommend_subject">"Try %1$s on your smartphone!"</string>
-       <string name="recommend_text">"I want to invite you to use %1$s on your smartphone!\nDownload here: %2$s"
-       </string>
+       <string name="recommend_subject">"Try %1$s on your smartphone!"</string>
+       <string name="recommend_text">"I want to invite you to use %1$s on your smartphone!\nDownload here: %2$s"</string>
  
      <string name="auth_check_server">Check Server</string>
      <string name="auth_host_url">Server address https://…</string>
        <string name="network_error_socket_timeout_exception">An error occurred while waiting for the server, the operation couldn\'t have been done</string>
        <string name="network_error_connect_timeout_exception">An error occurred while waiting for the server, the operation couldn\'t have been done</string>
        <string name="network_host_not_available">The operation couldn\'t be completed, server is unavailable</string>
 -
++
+       <string name="empty"></string>
+       
+       <string name="forbidden_permissions">You do not have permission %s</string>
+       <string name="forbidden_permissions_rename">to rename this file</string>
+       <string name="forbidden_permissions_delete">to delete this file</string>
+       <string name="share_link_forbidden_permissions">to share this file</string>
+       <string name="unshare_link_forbidden_permissions">to unshare this file</string>
+       <string name="forbidden_permissions_create">to create the file</string>
+       <string name="uploader_upload_forbidden_permissions">to upload in this folder</string>
+       <string name="downloader_download_file_not_found">The file is no longer available on the server</string>
+       <string name="prefs_category_accounts">Accounts</string>
+       <string name="prefs_add_account">Add account</string>
+       <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected through an unsecured route.</string>
+       <string name="actionbar_logger">Logs</string>
+       <string name="log_send_history_button">Send History</string>
+       <string name="log_mail_subject">ownCloud Android app logs</string>
+       <string name="log_progress_dialog_text">Loading data...</string>
+       <string name="saml_authentication_required_text">Authentication required</string>
+       <string name="saml_authentication_wrong_pass">Wrong password</string>
+       <string name="actionbar_move">Move</string>
+       <string name="file_list_empty_moving">Nothing in here. You can add a folder!</string>
+       <string name="move_choose_button_text">Choose</string>
+       <string name="move_file_not_found">Unable to move. Please check whether the file exists</string>
+       <string name="move_file_invalid_into_descendent">It is not possible to move a folder into a descendant</string>
+       <string name="move_file_invalid_overwrite">The file exists already in the destination folder</string>
+       <string name="move_file_error">An error occurred while trying to move this file or folder</string>
+       <string name="forbidden_permissions_move">to move this file</string>
  </resources>
Simple merge
@@@ -35,12 -46,14 +46,15 @@@ import com.actionbarsherlock.app.Action
  import com.actionbarsherlock.app.SherlockPreferenceActivity;
  import com.actionbarsherlock.view.Menu;
  import com.actionbarsherlock.view.MenuItem;
+ import com.owncloud.android.MainApp;
  import com.owncloud.android.R;
  import com.owncloud.android.authentication.AccountUtils;
+ import com.owncloud.android.authentication.AuthenticatorActivity;
  import com.owncloud.android.db.DbHandler;
 +import com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle;
+ import com.owncloud.android.lib.common.utils.Log_OC;
+ import com.owncloud.android.ui.LongClickableCheckBoxPreference;
  import com.owncloud.android.utils.DisplayUtils;
- import com.owncloud.android.utils.Log_OC;
  
  
  /**
   * @author Bartek Przybylski
   * @author David A. Velasco
   */
- public class Preferences extends SherlockPreferenceActivity {
+ public class Preferences extends SherlockPreferenceActivity implements AccountManagerCallback<Boolean> {
      
      private static final String TAG = "OwnCloudPreferences";
      private DbHandler mDbHandler;
      private CheckBoxPreference pCode;
-     //private CheckBoxPreference pLogging;
-     //private Preference pLoggingHistory;
 +    private CheckBoxPreference pSaveLocation;
      private Preference pAboutApp;
  
+     private PreferenceCategory mAccountsPrefCategory = null;
+     private final Handler mHandler = new Handler();
+     private String mAccountName;
+     private boolean mShowContextMenu = false;
  
      @SuppressWarnings("deprecation")
      @Override
              
          }
  
-                         appPrefs.apply();
 +        pSaveLocation = (CheckBoxPreferenceWithLongTitle) findPreference("save_last_upload_location");
 +        if(pSaveLocation != null){
 +            pSaveLocation.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
 +                @Override
 +                public boolean onPreferenceChange(Preference preference, Object newValue) {
 +                    //The saved path is removed when the preference is turned off
 +                    if( newValue instanceof Boolean  && !(Boolean) newValue) {
 +                        SharedPreferences.Editor appPrefs = PreferenceManager
 +                                       .getDefaultSharedPreferences(getApplicationContext()).edit();
 +                        appPrefs.remove("last_upload_path");
++                        appPrefs.commit();
 +                    }
 +                    return true;
 +                }
 +            });
 +        }
 +
++
          PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("more");
          
          boolean helpEnabled = getResources().getBoolean(R.bool.help_enabled);