Loading res/menu/actions.xml +4 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,10 @@ android:id="@+id/mnu_actions_add_to_bookmarks" android:showAsAction="ifRoom" android:title="@string/actions_menu_add_to_bookmarks"/> <item android:id="@+id/mnu_actions_open_parent_folder" android:showAsAction="ifRoom" android:title="@string/actions_menu_open_parent_folder"/> </group> </menu> No newline at end of file res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -493,6 +493,8 @@ <string name="actions_menu_properties">Properties</string> <!-- Actions Dialog * Menu * Add to bookmarks --> <string name="actions_menu_add_to_bookmarks">Add to bookmarks</string> <!-- Actions Dialog * Menu * Open parent folder --> <string name="actions_menu_open_parent_folder">Open parent</string> <!-- Actions * Ask user prior to do an undone operation --> <string name="actions_ask_undone_operation"> Loading src/com/cyanogenmod/explorer/activities/NavigationActivity.java +9 −1 Original line number Diff line number Diff line Loading @@ -767,6 +767,14 @@ public class NavigationActivity extends Activity this.getCurrentNavigationView().onDeselectAll(); } /** * {@inheritDoc} */ @Override public void onNavigateTo(Object o) { // Ignored } /** * {@inheritDoc} */ Loading Loading @@ -1182,7 +1190,7 @@ public class NavigationActivity extends Activity } // Show the dialog ActionsDialog dialog = new ActionsDialog(this, fso, global); ActionsDialog dialog = new ActionsDialog(this, fso, global, false); dialog.setOnRequestRefreshListener(this); dialog.setOnSelectionListener(getCurrentNavigationView()); dialog.show(); Loading src/com/cyanogenmod/explorer/activities/SearchActivity.java +22 −9 Original line number Diff line number Diff line Loading @@ -500,7 +500,7 @@ public class SearchActivity extends Activity } //Close search activity back(true, null); back(true, null, false); } }); dialog.show(); Loading Loading @@ -762,7 +762,7 @@ public class SearchActivity extends Activity public boolean onKeyUp(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_BACK: back(true, null); back(true, null, false); return true; default: return super.onKeyUp(keyCode, event); Loading @@ -776,7 +776,7 @@ public class SearchActivity extends Activity public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: back(true, null); back(true, null, false); return true; default: return super.onOptionsItemSelected(item); Loading @@ -792,15 +792,15 @@ public class SearchActivity extends Activity SearchResult result = ((SearchResultAdapter)parent.getAdapter()).getItem(position); FileSystemObject fso = result.getFso(); if (fso instanceof Directory) { back(false, fso); back(false, fso, false); } else if (fso instanceof Symlink) { Symlink symlink = (Symlink)fso; if (symlink.getLinkRef() != null && symlink.getLinkRef() instanceof Directory) { back(false, symlink.getLinkRef()); back(false, symlink.getLinkRef(), false); } } else { // Open the file with the preferred registered app back(false, fso); back(false, fso, false); } } catch (Throwable ex) { ExceptionUtil.translateException(this.mSearchListView.getContext(), ex); Loading Loading @@ -868,7 +868,7 @@ public class SearchActivity extends Activity return; } ActionsDialog dialog = new ActionsDialog(this, fso, false); ActionsDialog dialog = new ActionsDialog(this, fso, false, true); dialog.setOnRequestRefreshListener(this); dialog.show(); } Loading Loading @@ -934,6 +934,16 @@ public class SearchActivity extends Activity } } /** * {@inheritDoc} */ @Override public void onNavigateTo(Object o) { if (o instanceof FileSystemObject) { back(false, (FileSystemObject)o, true); } } /** * Method that returns to previous activity. * Loading @@ -941,7 +951,7 @@ public class SearchActivity extends Activity * @param item The fso * @hide */ void back(final boolean canceled, FileSystemObject item) { void back(final boolean canceled, FileSystemObject item, boolean isChecked) { Intent intent = new Intent(); if (canceled) { if (SearchActivity.this.mDrawingSearchResultTask != null Loading @@ -957,7 +967,10 @@ public class SearchActivity extends Activity } else { // Check that the bookmark exists try { FileSystemObject fso = CommandHelper.getFileInfo(this, item.getFullPath(), null); FileSystemObject fso = item; if (!isChecked) { fso = CommandHelper.getFileInfo(this, item.getFullPath(), null); } if (fso != null) { if (FileHelper.isDirectory(fso)) { intent.putExtra(NavigationActivity.EXTRA_SEARCH_ENTRY_SELECTION, fso); Loading src/com/cyanogenmod/explorer/listeners/OnRequestRefreshListener.java +7 −0 Original line number Diff line number Diff line Loading @@ -34,4 +34,11 @@ public interface OnRequestRefreshListener { * @param o The object that was removed */ void onRequestRemove(Object o); /** * Invoked when the object need to navigate to. * * @param o The object where to navigate to */ void onNavigateTo(Object o); } Loading
res/menu/actions.xml +4 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,10 @@ android:id="@+id/mnu_actions_add_to_bookmarks" android:showAsAction="ifRoom" android:title="@string/actions_menu_add_to_bookmarks"/> <item android:id="@+id/mnu_actions_open_parent_folder" android:showAsAction="ifRoom" android:title="@string/actions_menu_open_parent_folder"/> </group> </menu> No newline at end of file
res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -493,6 +493,8 @@ <string name="actions_menu_properties">Properties</string> <!-- Actions Dialog * Menu * Add to bookmarks --> <string name="actions_menu_add_to_bookmarks">Add to bookmarks</string> <!-- Actions Dialog * Menu * Open parent folder --> <string name="actions_menu_open_parent_folder">Open parent</string> <!-- Actions * Ask user prior to do an undone operation --> <string name="actions_ask_undone_operation"> Loading
src/com/cyanogenmod/explorer/activities/NavigationActivity.java +9 −1 Original line number Diff line number Diff line Loading @@ -767,6 +767,14 @@ public class NavigationActivity extends Activity this.getCurrentNavigationView().onDeselectAll(); } /** * {@inheritDoc} */ @Override public void onNavigateTo(Object o) { // Ignored } /** * {@inheritDoc} */ Loading Loading @@ -1182,7 +1190,7 @@ public class NavigationActivity extends Activity } // Show the dialog ActionsDialog dialog = new ActionsDialog(this, fso, global); ActionsDialog dialog = new ActionsDialog(this, fso, global, false); dialog.setOnRequestRefreshListener(this); dialog.setOnSelectionListener(getCurrentNavigationView()); dialog.show(); Loading
src/com/cyanogenmod/explorer/activities/SearchActivity.java +22 −9 Original line number Diff line number Diff line Loading @@ -500,7 +500,7 @@ public class SearchActivity extends Activity } //Close search activity back(true, null); back(true, null, false); } }); dialog.show(); Loading Loading @@ -762,7 +762,7 @@ public class SearchActivity extends Activity public boolean onKeyUp(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_BACK: back(true, null); back(true, null, false); return true; default: return super.onKeyUp(keyCode, event); Loading @@ -776,7 +776,7 @@ public class SearchActivity extends Activity public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: back(true, null); back(true, null, false); return true; default: return super.onOptionsItemSelected(item); Loading @@ -792,15 +792,15 @@ public class SearchActivity extends Activity SearchResult result = ((SearchResultAdapter)parent.getAdapter()).getItem(position); FileSystemObject fso = result.getFso(); if (fso instanceof Directory) { back(false, fso); back(false, fso, false); } else if (fso instanceof Symlink) { Symlink symlink = (Symlink)fso; if (symlink.getLinkRef() != null && symlink.getLinkRef() instanceof Directory) { back(false, symlink.getLinkRef()); back(false, symlink.getLinkRef(), false); } } else { // Open the file with the preferred registered app back(false, fso); back(false, fso, false); } } catch (Throwable ex) { ExceptionUtil.translateException(this.mSearchListView.getContext(), ex); Loading Loading @@ -868,7 +868,7 @@ public class SearchActivity extends Activity return; } ActionsDialog dialog = new ActionsDialog(this, fso, false); ActionsDialog dialog = new ActionsDialog(this, fso, false, true); dialog.setOnRequestRefreshListener(this); dialog.show(); } Loading Loading @@ -934,6 +934,16 @@ public class SearchActivity extends Activity } } /** * {@inheritDoc} */ @Override public void onNavigateTo(Object o) { if (o instanceof FileSystemObject) { back(false, (FileSystemObject)o, true); } } /** * Method that returns to previous activity. * Loading @@ -941,7 +951,7 @@ public class SearchActivity extends Activity * @param item The fso * @hide */ void back(final boolean canceled, FileSystemObject item) { void back(final boolean canceled, FileSystemObject item, boolean isChecked) { Intent intent = new Intent(); if (canceled) { if (SearchActivity.this.mDrawingSearchResultTask != null Loading @@ -957,7 +967,10 @@ public class SearchActivity extends Activity } else { // Check that the bookmark exists try { FileSystemObject fso = CommandHelper.getFileInfo(this, item.getFullPath(), null); FileSystemObject fso = item; if (!isChecked) { fso = CommandHelper.getFileInfo(this, item.getFullPath(), null); } if (fso != null) { if (FileHelper.isDirectory(fso)) { intent.putExtra(NavigationActivity.EXTRA_SEARCH_ENTRY_SELECTION, fso); Loading
src/com/cyanogenmod/explorer/listeners/OnRequestRefreshListener.java +7 −0 Original line number Diff line number Diff line Loading @@ -34,4 +34,11 @@ public interface OnRequestRefreshListener { * @param o The object that was removed */ void onRequestRemove(Object o); /** * Invoked when the object need to navigate to. * * @param o The object where to navigate to */ void onNavigateTo(Object o); }