aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/res/values-de/strings.xml1
-rw-r--r--main/res/values/changelog_master.xml6
-rw-r--r--main/res/values/strings.xml3
-rw-r--r--main/src/cgeo/geocaching/files/SimpleDirChooser.java42
4 files changed, 50 insertions, 2 deletions
diff --git a/main/res/values-de/strings.xml b/main/res/values-de/strings.xml
index bf11f2c..deacfb1 100644
--- a/main/res/values-de/strings.xml
+++ b/main/res/values-de/strings.xml
@@ -622,6 +622,7 @@
<string name="file_title_searching">Suche</string>
<string name="simple_dir_chooser_title">Verzeichnis wählen</string>
<string name="simple_dir_chooser_current_path">Pfad:</string>
+ <string name="simple_dir_chooser_invalid_path">Ungültiger Pfad</string>
<string name="gpx_import_loading_caches">Lade Caches aus GPX-Datei</string>
<string name="gpx_import_loading_waypoints">Lade Wegpunkte aus GPX-Datei</string>
<string name="gpx_import_store_static_maps">Schreibe statische Karten</string>
diff --git a/main/res/values/changelog_master.xml b/main/res/values/changelog_master.xml
index 096ba60..d53158b 100644
--- a/main/res/values/changelog_master.xml
+++ b/main/res/values/changelog_master.xml
@@ -4,11 +4,13 @@
<string name="changelog_master" translatable="false">
<b>Next feature release</b>\n
<b>New Features:</b>\n
+ · Browse pocket queries online (long press on nearby)\n
· Popup on map shows date of event caches\n
· Show cache where a Geokrety is currently placed\n
- · Editable twitter templates\n
+ · Configurable twitter templates\n
· Creating a new WP the type will be preset depending on the cache type\n
· Show event date for OC event caches in search results\n
+ · Sorting caches by favorite point percentage\n
\n
<b>Bugfixes:</b>\n
· Cache type filter was not applied for OC nearby search\n
@@ -18,7 +20,9 @@
· Disallow deletion of all caches incl. list if a filter is in use\n
· OC authorization page not shown in light theme\n
· DirChooser not showing all dirs on some devices\n
+ · Allow manual path input in dirchooser\n
· Network timeout reduced to 30 seconds to avoid long waiting time\n
+ · Show as list also possible when map is not live\n
\n
</string>
</resources>
diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml
index 172076d..280bc44 100644
--- a/main/res/values/strings.xml
+++ b/main/res/values/strings.xml
@@ -717,7 +717,8 @@
<!-- simple_dir_chooser -->
<string name="simple_dir_chooser_title">Choose directory</string>
<string name="simple_dir_chooser_current_path">Path:</string>
-
+ <string name="simple_dir_chooser_invalid_path">Invalid Path</string>
+
<!-- gpx -->
<string name="gpx_import_loading_caches">Loading caches from .gpx file</string>
<string name="gpx_import_loading_waypoints">Loading waypoints file</string>
diff --git a/main/src/cgeo/geocaching/files/SimpleDirChooser.java b/main/src/cgeo/geocaching/files/SimpleDirChooser.java
index e59287d..3f6182c 100644
--- a/main/src/cgeo/geocaching/files/SimpleDirChooser.java
+++ b/main/src/cgeo/geocaching/files/SimpleDirChooser.java
@@ -7,11 +7,14 @@ import cgeo.geocaching.activity.ActivityMixin;
import org.apache.commons.lang3.StringUtils;
+import android.app.AlertDialog;
import android.content.Context;
+import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
+import android.text.InputType;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -73,6 +76,45 @@ public class SimpleDirChooser extends AbstractListActivity {
finish();
}
});
+
+ EditText pathField = (EditText) findViewById(R.id.simple_dir_chooser_path);
+ pathField.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ editPath();
+ }
+
+ });
+ }
+
+ public void editPath() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(SimpleDirChooser.this);
+ builder.setTitle(R.string.simple_dir_chooser_current_path);
+ final EditText input = new EditText(SimpleDirChooser.this);
+ input.setInputType(InputType.TYPE_CLASS_TEXT);
+ input.setText(currentDir.getPath());
+ builder.setView(input);
+ builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ String pathText = input.getText().toString();
+ File newPathDir = new File(pathText);
+ if (newPathDir.exists() && newPathDir.isDirectory()) {
+ currentDir = newPathDir;
+ fill(currentDir);
+ } else {
+ showToast(SimpleDirChooser.this.getResources().getString(R.string.simple_dir_chooser_invalid_path));
+ }
+ }
+ });
+ builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.cancel();
+ }
+ });
+
+ builder.show();
}
/**