aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.classpath9
-rw-r--r--.project33
-rw-r--r--AndroidManifest.xml6
-rw-r--r--LICENSE2
-rw-r--r--default.properties11
-rw-r--r--res/layout/about.xml6
-rw-r--r--src/cgeo/geocaching/cgeoabout.java6
-rw-r--r--src/cgeo/geocaching/mapcommon/cgeomap.java42
-rw-r--r--src/cgeo/geocaching/mapsforge/mfMapView.java14
9 files changed, 102 insertions, 27 deletions
diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..36145f6
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="lib" path="libs/libGoogleAnalytics.jar"/>
+ <classpathentry kind="lib" path="libs/mapsforge-map-0.2.4.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/.project b/.project
new file mode 100644
index 0000000..80a267b
--- /dev/null
+++ b/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>cgeo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 928a0b8..9760fc9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- android:versionCode="2"
- android:versionName="2.26 RC1a"
+ android:versionName="2.26 RC3"
+ android:versionCode="4"
package="cgeo.geocaching"
name="c:geo"
- android:installLocation="auto" >
+ android:installLocation="auto">
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
diff --git a/LICENSE b/LICENSE
index c43dd4b..d02d74c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2011
+Copyright 2011 - c:geo
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/default.properties b/default.properties
new file mode 100644
index 0000000..420db56
--- /dev/null
+++ b/default.properties
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=Google Inc.:Google APIs:8
diff --git a/res/layout/about.xml b/res/layout/about.xml
index e32445e..1c7e0a5 100644
--- a/res/layout/about.xml
+++ b/res/layout/about.xml
@@ -69,18 +69,18 @@
android:gravity="center_horizontal" >
<Button style="@style/button"
android:id="@+id/donation_more"
- android:layout_width="180dip"
+ android:layout_width="280dip"
android:singleLine="false"
android:lines="2"
android:onClick="donateMore"
android:text="@string/about_donation_more" />
- <Button style="@style/button"
+ <!-- Button style="@style/button"
android:id="@+id/donation_less"
android:layout_width="100dip"
android:singleLine="false"
android:lines="2"
android:onClick="donateLess"
- android:text="@string/about_donation_less" />
+ android:text="@string/about_donation_less" /-->
</LinearLayout>
<RelativeLayout style="@style/separator_horizontal_layout" >
<View style="@style/separator_horizontal" />
diff --git a/src/cgeo/geocaching/cgeoabout.java b/src/cgeo/geocaching/cgeoabout.java
index fe11660..06ac46b 100644
--- a/src/cgeo/geocaching/cgeoabout.java
+++ b/src/cgeo/geocaching/cgeoabout.java
@@ -71,12 +71,14 @@ public class cgeoabout extends Activity {
}
public void donateMore(View view) {
- activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N2FKGNCPPRUVE")));
+ activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMLNN8GXZKJEE")));
+ //activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N2FKGNCPPRUVE")));
//activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2Z69QWLRCBE9N&lc=US&item_name=c%3ageo&currency_code=EUR&amount=15&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted")));
}
public void donateLess(View view) {
- activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4PRD9CX4Y8XR6")));
+ activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMLNN8GXZKJEE")));
+ //activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4PRD9CX4Y8XR6")));
//activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2Z69QWLRCBE9N&lc=US&item_name=c%3ageo&currency_code=EUR&amount=7&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted")));
}
diff --git a/src/cgeo/geocaching/mapcommon/cgeomap.java b/src/cgeo/geocaching/mapcommon/cgeomap.java
index a57d954..1910882 100644
--- a/src/cgeo/geocaching/mapcommon/cgeomap.java
+++ b/src/cgeo/geocaching/mapcommon/cgeomap.java
@@ -689,6 +689,9 @@ public class cgeomap extends MapBase {
if (geo.latitudeNow != null && geo.longitudeNow != null) {
if (followMyLocation == true) {
myLocationInMiddle();
+ } else {
+ // move blue arrow
+ mapView.invalidate();
}
}
@@ -977,10 +980,15 @@ public class cgeomap extends MapBase {
//2. fetch and draw(in another thread) and then insert into the db caches from geocaching.com - dont draw/insert if exist in memory?
// stage 1 - pull and render from the DB only
- if (!live || settings.maplive == 0) {
- searchId = app.getStoredInViewport(centerLat, centerLon, spanLat, spanLon, settings.cacheType);
- } else {
- searchId = app.getCachedInViewport(centerLat, centerLon, spanLat, spanLon, settings.cacheType);
+
+ if (fromDetailIntent) {
+ searchId = searchIdIntent;
+ } else {
+ if (!live || settings.maplive == 0) {
+ searchId = app.getStoredInViewport(centerLat, centerLon, spanLat, spanLon, settings.cacheType);
+ } else {
+ searchId = app.getCachedInViewport(centerLat, centerLon, spanLat, spanLon, settings.cacheType);
+ }
}
if (searchId != null) {
@@ -995,6 +1003,30 @@ public class cgeomap extends MapBase {
}
caches = app.getCaches(searchId);
+
+ //if in live map and stored caches are found / disables are also shown.
+ if (live && settings.maplive >= 1) {
+ // I know code is crude, but temporary fix
+ int i = 0;
+ boolean excludeMine = settings.excludeMine > 0;
+ boolean excludeDisabled = settings.excludeDisabled > 0;
+
+ while (i < caches.size())
+ {
+ boolean remove = false;
+ if ((caches.get(i).found) && (excludeMine))
+ remove = true;
+ if ((caches.get(i).own) && (excludeMine))
+ remove = true;
+ if ((caches.get(i).disabled) && (excludeDisabled))
+ remove = true;
+ if (remove)
+ caches.remove(i);
+ else
+ i++;
+ }
+
+ }
if (stop) {
displayHandler.sendEmptyMessage(0);
@@ -1171,7 +1203,7 @@ public class cgeomap extends MapBase {
if (cacheOne.latitude == null && cacheOne.longitude == null) {
continue;
}
-
+
final cgCoord coord = new cgCoord(cacheOne);
coordinates.add(coord);
diff --git a/src/cgeo/geocaching/mapsforge/mfMapView.java b/src/cgeo/geocaching/mapsforge/mfMapView.java
index e2908a5..67b0ed7 100644
--- a/src/cgeo/geocaching/mapsforge/mfMapView.java
+++ b/src/cgeo/geocaching/mapsforge/mfMapView.java
@@ -138,18 +138,6 @@ public class mfMapView extends MapView implements MapViewImpl {
setScaleBar(b);
}
- /**
- * Checks whether a given file is a valid map file.
- *
- * @param file
- * the path to the map file that should be tested.
- * @return true if the file is a valid map file, false otherwise.
- */
- public static boolean isValidMapFile(String file) {
- return MapDatabase.isValidMapFile(file);
- }
-
-
@Override
public void setMapSource(cgSettings settings) {
@@ -163,7 +151,7 @@ public class mfMapView extends MapView implements MapViewImpl {
setMapViewMode(MapViewMode.OSMARENDER_TILE_DOWNLOAD);
break;
case mapsforgeOffline:
- if (isValidMapFile(settings.getMapFile())) {
+ if (MapDatabase.isValidMapFile(settings.getMapFile())) {
setMapViewMode(MapViewMode.CANVAS_RENDERER);
super.setMapFile(settings.getMapFile());
}