Skip to content

Commit

Permalink
Merge branch 'master' into v203
Browse files Browse the repository at this point in the history
Conflicts:
	FileManager/res/values/strings.xml
	FileManager/src/org/openintents/filemanager/FileManagerActivity.java
	FileManager/src/org/openintents/filemanager/util/FileUtils.java
  • Loading branch information
friedger committed Feb 14, 2014
2 parents ea88d9e + 10698a6 commit c822928
Show file tree
Hide file tree
Showing 14 changed files with 283 additions and 137 deletions.
36 changes: 31 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
*/bin
*/gen
*/build-private.properties
*/local.properties
*/release
build-private.properties
local.properties
release
out
*.iml
.idea
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/

# Ignore gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/


121 changes: 84 additions & 37 deletions FileManager/res/layout/filelist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,91 @@
android:outAnimation="@anim/fade_out"
android:isScrollContainer="true" >

<LinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">

<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/scanning" />
</LinearLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" >

<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/scanning" />
</LinearLayout>

<LinearLayout
android:layout_height="match_parent">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/list_container"
android:orientation="vertical"
android:gravity="center"
android:layout_above="@+id/clipboard_info">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fastScrollEnabled="true"
android:layout_marginLeft="@dimen/list_margin"
android:layout_marginRight="@dimen/list_margin"
android:background="?attr/listBackground" >
</ListView>

<TextView
android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/this_folder_is_empty"
android:textAppearance="?android:attr/textAppearanceMedium" />

</FrameLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:padding="@dimen/list_margin"
android:orientation="horizontal"
android:id="@+id/clipboard_info"
android:background="?org.openintents.filemanager:attr/pathBarBackground">

<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >

<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fastScrollEnabled="true"
android:layout_marginLeft="@dimen/list_margin"
android:layout_marginRight="@dimen/list_margin"
android:background="?attr/listBackground" >
</ListView>

<TextView
android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/this_folder_is_empty"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
android:layout_height="wrap_content"
android:id="@+id/clipboard_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/navbar_details"
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/clipboard_separator"
android:layout_centerVertical="true" />
<TextView
android:layout_width="2dp"
android:layout_height="wrap_content"
android:padding="@dimen/list_margin"
android:background="@color/navbar_details"
android:id="@+id/clipboard_separator"
android:layout_toLeftOf="@+id/clipboard_action"
android:layout_margin="@dimen/list_margin"
android:layout_centerVertical="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/clipboard_action"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/navbar_details"
android:layout_alignParentEnd="true"
android:clickable="true"
android:layout_centerVertical="true" />
</RelativeLayout>

</RelativeLayout>

</ViewFlipper>
10 changes: 7 additions & 3 deletions FileManager/res/menu-v11/simple_file_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
<item
android:id="@+id/menu_paste"
android:alphabeticShortcut="p"
android:icon="@drawable/ic_action_paste"
android:showAsAction="ifRoom"
android:title="@string/menu_paste" />
android:icon="@drawable/ic_action_paste"
android:showAsAction="ifRoom"
android:menuCategory="container"
android:orderInCategory="1"
android:title="@string/menu_paste" />
<item
android:id="@+id/menu_create_folder"
android:alphabeticShortcut="c"
android:icon="@drawable/ic_action_create_folder"
android:showAsAction="ifRoom"
android:menuCategory="container"
android:orderInCategory="10"
android:title="@string/menu_create_folder">
</item>
<item
Expand Down
5 changes: 5 additions & 0 deletions FileManager/res/menu/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@
android:alphabeticShortcut="b"
android:icon="@drawable/ic_action_bookmarks"
android:showAsAction="ifRoom"
android:menuCategory="container"
android:orderInCategory="10"
android:title="@string/menu_bookmarks">
</item>
<item
android:id="@+id/menu_search"
android:alphabeticShortcut="s"
android:icon="@drawable/ic_action_search"
android:showAsAction="ifRoom"
android:menuCategory="container"
android:orderInCategory="10"
android:title="@string/menu_search">
</item>
<item
android:id="@+id/menu_settings"
android:icon="@drawable/ic_action_settings"
android:showAsAction="never"
android:menuCategory="container"
android:title="@string/menu_settings">
</item>
<item
Expand Down
10 changes: 7 additions & 3 deletions FileManager/res/menu/simple_file_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
<item
android:id="@+id/menu_paste"
android:alphabeticShortcut="p"
android:icon="@drawable/ic_action_paste"
android:showAsAction="ifRoom"
android:title="@string/menu_paste" />
android:icon="@drawable/ic_action_paste"
android:showAsAction="ifRoom"
android:menuCategory="container"
android:orderInCategory="1"
android:title="@string/menu_paste" />
<item
android:id="@+id/menu_create_folder"
android:alphabeticShortcut="c"
android:icon="@drawable/ic_action_create_folder"
android:showAsAction="ifRoom"
android:menuCategory="container"
android:orderInCategory="10"
android:title="@string/menu_create_folder">
</item>
<item
Expand Down
24 changes: 18 additions & 6 deletions FileManager/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
-->
<resources>

<!--
***************************
About information
***************************
***************************
-->


Expand All @@ -32,7 +32,7 @@
<!--
***************************
Applicatio-specific strings
***************************
***************************
-->
<!-- Name of application. Can be localized. OI = OpenIntents should stay unmodified. -->
<string name="app_name">OI File Manager</string>
Expand Down Expand Up @@ -89,7 +89,7 @@
<!--
***************************
Preferences
***************************
***************************
-->
<!-- Menu item for Settings -->
<string name="settings">Settings</string>
Expand Down Expand Up @@ -125,7 +125,7 @@
<!--
***************************
Strings for the 'Save as' feature
***************************
***************************
-->
<string name="saveas_no_file_picked">You haven\'t picked any file.</string>
<string name="saveas_error">An error occured.</string>
Expand All @@ -134,7 +134,7 @@
<!--
***************************
Strings for the 'Compressing' and 'Extracting' feature
***************************
***************************
-->
<string name="compressing_success">Item compressed successfully</string>
<string name="compressing_error">Could not compress the item</string>
Expand Down Expand Up @@ -213,4 +213,16 @@
<string name="move_error">Some or all items couldn\'t be moved!</string>
<string name="nothing_to_paste">Nothing to paste. Copy or cut files first.</string>

<plurals name="clipboard_info_items_to_copy">
<item quantity="one">%1$d item to copy</item>
<item quantity="other">%1$d items to copy</item>
</plurals>
<plurals name="clipboard_info_items_to_move">
<item quantity="one">%1$d item to move</item>
<item quantity="other">%1$d items to move</item>
</plurals>

<string name="clipboard_undo">Undo</string>
<string name="clipboard_dismiss">Dismiss</string>

</resources>
Expand Down
2 changes: 1 addition & 1 deletion FileManager/res/xml/mimetypes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

<!-- Text types -->
<type extension=".txt" mimetype="text/plain" icon="@drawable/ic_launcher_text_plain" />
<type extension=".csv" mimetype="text/comma-separated-values" icon="@drawable/ic_launcher_text_csv" />
<type extension=".csv" mimetype="text/csv" icon="@drawable/ic_launcher_text_csv" />
<type extension=".xml" mimetype="text/xml" icon="@drawable/ic_launcher_text_xml" />

<!-- Android specific -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,9 @@ private File resolveIntentData(){
if(data == null)
return null;

if(data.isFile()){
FileHolder fileholder = new FileHolder(data, this);
if ("*/*".equals(fileholder.getMimeType())){
Toast.makeText(this.getApplicationContext(), R.string.application_not_available, Toast.LENGTH_SHORT).show();
} else {
FileUtils.openFile(fileholder, this);
}
if(data.isFile() && ! getIntent().getBooleanExtra(FileManagerIntents.EXTRA_FROM_OI_FILEMANAGER, false)){
FileUtils.openFile(new FileHolder(data, this), this);

finish();
return null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package org.openintents.filemanager;

import android.content.Intent;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.os.Environment;
import android.support.v4.app.FragmentActivity;
import android.view.KeyEvent;

import java.io.File;

import org.openintents.filemanager.lists.FileListFragment;
Expand All @@ -9,14 +17,6 @@
import org.openintents.filemanager.util.UIUtils;
import org.openintents.intents.FileManagerIntents;

import android.content.Intent;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.os.Environment;
import android.support.v4.app.FragmentActivity;
import android.view.KeyEvent;

public class IntentFilterActivity extends FragmentActivity {
private FileListFragment mFragment;

Expand Down Expand Up @@ -93,11 +93,9 @@ private void chooseListType(Intent intent, Bundle extras) {
}
}
// Item pickers
else if (intent.getAction().equals(
FileManagerIntents.ACTION_PICK_DIRECTORY)
|| intent.getAction().equals(
FileManagerIntents.ACTION_PICK_FILE)
|| intent.getAction().equals(Intent.ACTION_GET_CONTENT)) {
else if ( FileManagerIntents.ACTION_PICK_DIRECTORY.equals(intent.getAction())
|| FileManagerIntents.ACTION_PICK_FILE.equals(intent.getAction())
|| Intent.ACTION_GET_CONTENT.equals(intent.getAction())){
if (intent.hasExtra(FileManagerIntents.EXTRA_TITLE))
setTitle(intent.getStringExtra(FileManagerIntents.EXTRA_TITLE));
else
Expand Down
Loading

0 comments on commit c822928

Please sign in to comment.