Merge branch 'develop' into send_file_pr311_with_develop
authormasensio <masensio@solidgear.es>
Mon, 17 Feb 2014 08:20:45 +0000 (09:20 +0100)
committermasensio <masensio@solidgear.es>
Mon, 17 Feb 2014 08:20:45 +0000 (09:20 +0100)
res/values/strings.xml
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
src/com/owncloud/android/ui/preview/PreviewImageFragment.java

index bd672b2..822cb2a 100644 (file)
        <string name="share_link_file_error">An error occurred while trying to share this file or folder</string>
        <string name="unshare_link_file_no_exist">Unable to unshare this file or folder. It does not exist.</string>
        <string name="unshare_link_file_error">An error occurred while trying to unshare this file or folder</string>
+       
+       <string name="send_file_title_intent">Send</string>
 </resources>
index deb981e..5c6817e 100644 (file)
@@ -222,7 +222,7 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName
             toHide.add(R.id.action_cancel_upload);
             toHide.add(R.id.action_sync_file);
             toHide.add(R.id.action_see_details);
-            toHide.add(R.id.action_share_file);
+            toHide.add(R.id.action_send_file);
             if (    mContainerActivity.getFileDownloaderBinder().isDownloading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile) ||
                     mContainerActivity.getFileUploaderBinder().isUploading(AccountUtils.getCurrentOwnCloudAccount(getActivity()), targetFile)           ) {
                 toDisable.add(R.id.action_rename_file);
@@ -365,8 +365,8 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName
                 Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
                 // set MimeType
                 sharingIntent.setType(mTargetFile.getMimetype());
-                sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+mTargetFile.getStoragePath()));
-                startActivity(Intent.createChooser(sharingIntent, "Share via")); 
+                sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + mTargetFile.getStoragePath()));
+                startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.send_file_title_intent))); 
                 return true;
             }
             default:
index 5a34686..80d5d1e 100644 (file)
@@ -311,7 +311,7 @@ public class PreviewImageFragment extends FileFragment implements   OnRemoteOper
                 return true;
             }
             case R.id.action_send_file: {
-                shareFile();
+                sendFile();
                 return true;
             }
             
@@ -320,12 +320,12 @@ public class PreviewImageFragment extends FileFragment implements   OnRemoteOper
         }
     }
     
-    private void shareFile(){
+    private void sendFile(){
         Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
         // set MimeType
         sharingIntent.setType(getFile().getMimetype());
         sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+getFile().getStoragePath()));
-        startActivity(Intent.createChooser(sharingIntent, "Share via"));
+        startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.send_file_title_intent)));
     }