aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--LICENSE209
-rw-r--r--NOTICE10
-rw-r--r--cgeo-calendar/.classpath2
-rw-r--r--cgeo-calendar/ant.properties5
-rw-r--r--cgeo-calendar/build.xml98
-rw-r--r--cgeo-calendar/proguard-project.txt32
-rw-r--r--cgeo-calendar/proguard.cfg48
-rw-r--r--cgeo-calendar/project.properties3
-rw-r--r--cgeo-calendar/res/values-fr/strings.xml12
-rw-r--r--main/AndroidManifest.xml36
-rw-r--r--main/build.xml8
-rw-r--r--main/proguard-project.txt2
-rwxr-xr-xmain/project/settings/makeicons1res.sh59
-rw-r--r--main/project/settings/svgs/arrow.svg152
-rw-r--r--main/project/settings/svgs/basic.svg155
-rw-r--r--main/project/settings/svgs/cloud.svg66
-rw-r--r--main/project/settings/svgs/details.svg82
-rw-r--r--main/project/settings/svgs/eye.svg66
-rw-r--r--main/project/settings/svgs/info_icon.svg68
-rw-r--r--main/project/settings/svgs/map.svg227
-rw-r--r--main/project/settings/svgs/nut.svg151
-rw-r--r--main/project/settings/svgs/pen.svg65
-rw-r--r--main/project/settings/svgs/sdcard.svg72
-rw-r--r--main/res/drawable-hdpi/ic_menu_start_conversation.pngbin1650 -> 2717 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_start_conversation.pngbin1104 -> 1715 bytes
-rw-r--r--main/res/drawable-mdpi/settings_arrow_black.pngbin0 -> 543 bytes
-rw-r--r--main/res/drawable-mdpi/settings_arrow_white.pngbin0 -> 550 bytes
-rw-r--r--main/res/drawable-mdpi/settings_cloud_black.pngbin0 -> 427 bytes
-rw-r--r--main/res/drawable-mdpi/settings_cloud_white.pngbin0 -> 431 bytes
-rw-r--r--main/res/drawable-mdpi/settings_details_black.pngbin0 -> 323 bytes
-rw-r--r--main/res/drawable-mdpi/settings_details_white.pngbin0 -> 325 bytes
-rw-r--r--main/res/drawable-mdpi/settings_eye_black.pngbin0 -> 501 bytes
-rw-r--r--main/res/drawable-mdpi/settings_eye_white.pngbin0 -> 514 bytes
-rw-r--r--main/res/drawable-mdpi/settings_info_icon_black.pngbin0 -> 590 bytes
-rw-r--r--main/res/drawable-mdpi/settings_info_icon_white.pngbin0 -> 606 bytes
-rw-r--r--main/res/drawable-mdpi/settings_map_black.pngbin0 -> 685 bytes
-rw-r--r--main/res/drawable-mdpi/settings_map_white.pngbin0 -> 831 bytes
-rw-r--r--main/res/drawable-mdpi/settings_nut_black.pngbin0 -> 537 bytes
-rw-r--r--main/res/drawable-mdpi/settings_nut_white.pngbin0 -> 549 bytes
-rw-r--r--main/res/drawable-mdpi/settings_pen_black.pngbin0 -> 346 bytes
-rw-r--r--main/res/drawable-mdpi/settings_pen_white.pngbin0 -> 351 bytes
-rw-r--r--main/res/drawable-mdpi/settings_sdcard_black.pngbin0 -> 547 bytes
-rw-r--r--main/res/drawable-mdpi/settings_sdcard_white.pngbin0 -> 552 bytes
-rw-r--r--main/res/layout-land/compass_activity.xml2
-rw-r--r--main/res/layout/about_activity.xml19
-rw-r--r--main/res/layout/cachedetail_description_page.xml8
-rw-r--r--main/res/layout/compass_activity.xml199
-rw-r--r--main/res/layout/fieldnote_export_dialog.xml1
-rw-r--r--main/res/layout/fragment_edit_note.xml4
-rw-r--r--main/res/layout/log_signature_preference_dialog.xml33
-rw-r--r--main/res/layout/logcache_activity.xml23
-rw-r--r--main/res/layout/logs_page.xml (renamed from main/res/layout/cachedetail_logs_page.xml)0
-rw-r--r--main/res/layout/main_activity.xml66
-rw-r--r--main/res/layout/main_activity_connectorstatus.xml4
-rw-r--r--main/res/layout/preference_info_icon.xml5
-rw-r--r--main/res/layout/settings_activity.xml853
-rw-r--r--main/res/layout/simple_dir_chooser.xml2
-rw-r--r--main/res/layout/text_preference.xml22
-rw-r--r--main/res/layout/trackable_logs_view.xml13
-rw-r--r--main/res/layout/wp_threshold_preference.xml26
-rw-r--r--main/res/menu/map_activity.xml5
-rw-r--r--main/res/menu/settings_activity_options.xml10
-rw-r--r--main/res/values-cs/strings.xml65
-rw-r--r--main/res/values-da/strings.xml24
-rw-r--r--main/res/values-de/strings.xml190
-rw-r--r--main/res/values-es/strings.xml36
-rw-r--r--main/res/values-fr/strings.xml2118
-rw-r--r--main/res/values-hu/strings.xml56
-rw-r--r--main/res/values-it/strings.xml88
-rw-r--r--main/res/values-ja/strings.xml422
-rw-r--r--main/res/values-nb/strings.xml24
-rw-r--r--main/res/values-nl/strings.xml61
-rw-r--r--main/res/values-pl/strings.xml183
-rw-r--r--main/res/values-pt/strings.xml331
-rw-r--r--main/res/values-sk/strings.xml57
-rw-r--r--main/res/values-sv/strings.xml89
-rw-r--r--main/res/values/.gitignore1
-rw-r--r--main/res/values/attrs.xml16
-rw-r--r--main/res/values/changelog_master.xml55
-rw-r--r--main/res/values/changelog_release.xml99
-rw-r--r--main/res/values/preference_keys.xml89
-rw-r--r--main/res/values/strings.xml313
-rw-r--r--main/res/values/strings_not_translatable.xml275
-rw-r--r--main/res/values/styles.xml15
-rw-r--r--main/res/values/themes.xml36
-rw-r--r--main/res/xml/preferences.xml433
-rw-r--r--main/src/cgeo/geocaching/AboutActivity.java14
-rw-r--r--main/src/cgeo/geocaching/AbstractLoggingActivity.java11
-rw-r--r--main/src/cgeo/geocaching/AbstractPopupActivity.java9
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java732
-rw-r--r--main/src/cgeo/geocaching/CachePopup.java1
-rw-r--r--main/src/cgeo/geocaching/CompassActivity.java36
-rw-r--r--main/src/cgeo/geocaching/DirectionProvider.java2
-rw-r--r--main/src/cgeo/geocaching/EditWaypointActivity.java11
-rw-r--r--main/src/cgeo/geocaching/Geocache.java105
-rw-r--r--main/src/cgeo/geocaching/GpxFileListActivity.java1
-rw-r--r--main/src/cgeo/geocaching/IBasicCache.java46
-rw-r--r--main/src/cgeo/geocaching/ICache.java38
-rw-r--r--main/src/cgeo/geocaching/IGeoData.java1
-rw-r--r--main/src/cgeo/geocaching/ImageSelectActivity.java2
-rw-r--r--main/src/cgeo/geocaching/ImagesActivity.java4
-rw-r--r--main/src/cgeo/geocaching/LogCacheActivity.java27
-rw-r--r--main/src/cgeo/geocaching/LogEntry.java7
-rw-r--r--main/src/cgeo/geocaching/LogTrackableActivity.java3
-rw-r--r--main/src/cgeo/geocaching/MainActivity.java225
-rw-r--r--main/src/cgeo/geocaching/NavigateAnyPointActivity.java14
-rw-r--r--main/src/cgeo/geocaching/PersonalNote.java106
-rw-r--r--main/src/cgeo/geocaching/SearchActivity.java7
-rw-r--r--main/src/cgeo/geocaching/SearchResult.java29
-rw-r--r--main/src/cgeo/geocaching/SelectMapfileActivity.java3
-rw-r--r--main/src/cgeo/geocaching/Settings.java1494
-rw-r--r--main/src/cgeo/geocaching/SettingsActivity.java1069
-rw-r--r--main/src/cgeo/geocaching/StaticMapsActivity.java24
-rw-r--r--main/src/cgeo/geocaching/StaticMapsProvider.java52
-rw-r--r--main/src/cgeo/geocaching/StatusFragment.java2
-rw-r--r--main/src/cgeo/geocaching/StoredList.java6
-rw-r--r--main/src/cgeo/geocaching/TrackableActivity.java195
-rw-r--r--main/src/cgeo/geocaching/activity/AbstractActivity.java29
-rw-r--r--main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java4
-rw-r--r--main/src/cgeo/geocaching/activity/ActivityMixin.java34
-rw-r--r--main/src/cgeo/geocaching/apps/AbstractApp.java7
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/GoogleNavigationApp.java14
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java35
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java8
-rw-r--r--main/src/cgeo/geocaching/cgData.java227
-rw-r--r--main/src/cgeo/geocaching/cgeoapplication.java4
-rw-r--r--main/src/cgeo/geocaching/cgeocaches.java158
-rw-r--r--main/src/cgeo/geocaching/compatibility/AndroidLevel13.java5
-rw-r--r--main/src/cgeo/geocaching/compatibility/AndroidLevel13Emulation.java5
-rw-r--r--main/src/cgeo/geocaching/compatibility/AndroidLevel13Interface.java2
-rw-r--r--main/src/cgeo/geocaching/compatibility/Compatibility.java4
-rw-r--r--main/src/cgeo/geocaching/connector/AbstractConnector.java29
-rw-r--r--main/src/cgeo/geocaching/connector/ConnectorFactory.java40
-rw-r--r--main/src/cgeo/geocaching/connector/IConnector.java20
-rw-r--r--main/src/cgeo/geocaching/connector/ILoggingManager.java13
-rw-r--r--main/src/cgeo/geocaching/connector/NoLoggingManager.java2
-rw-r--r--main/src/cgeo/geocaching/connector/capability/ILogin.java57
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCConnector.java62
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCConstants.java11
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCLoggingManager.java6
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCMap.java17
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCParser.java91
-rw-r--r--main/src/cgeo/geocaching/connector/gc/IconDecoder.java18
-rw-r--r--main/src/cgeo/geocaching/connector/gc/Login.java69
-rw-r--r--main/src/cgeo/geocaching/connector/gc/Tile.java9
-rw-r--r--main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java36
-rw-r--r--main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java6
-rw-r--r--main/src/cgeo/geocaching/connector/oc/OCConnector.java4
-rw-r--r--main/src/cgeo/geocaching/connector/oc/OkapiClient.java187
-rw-r--r--main/src/cgeo/geocaching/connector/oc/OkapiLoggingManager.java14
-rw-r--r--main/src/cgeo/geocaching/connector/oc/UserInfo.java41
-rw-r--r--main/src/cgeo/geocaching/connector/ox/OXConnector.java2
-rw-r--r--main/src/cgeo/geocaching/connector/trackable/TravelBugConnector.java18
-rw-r--r--main/src/cgeo/geocaching/enumerations/CacheType.java2
-rw-r--r--main/src/cgeo/geocaching/export/FieldnoteExport.java52
-rw-r--r--main/src/cgeo/geocaching/export/GpxExport.java240
-rw-r--r--main/src/cgeo/geocaching/export/GpxSerializer.java255
-rw-r--r--main/src/cgeo/geocaching/files/GPXImporter.java65
-rw-r--r--main/src/cgeo/geocaching/files/GPXParser.java54
-rw-r--r--main/src/cgeo/geocaching/files/LocalStorage.java7
-rw-r--r--main/src/cgeo/geocaching/filter/AbstractFilter.java6
-rw-r--r--main/src/cgeo/geocaching/filter/AbstractRangeFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/DifficultyFilter.java14
-rw-r--r--main/src/cgeo/geocaching/filter/FilterUserInterface.java10
-rw-r--r--main/src/cgeo/geocaching/filter/IFilter.java6
-rw-r--r--main/src/cgeo/geocaching/filter/IFilterFactory.java2
-rw-r--r--main/src/cgeo/geocaching/filter/OriginFilter.java6
-rw-r--r--main/src/cgeo/geocaching/filter/SizeFilter.java4
-rw-r--r--main/src/cgeo/geocaching/filter/StateFilter.java22
-rw-r--r--main/src/cgeo/geocaching/filter/TerrainFilter.java14
-rw-r--r--main/src/cgeo/geocaching/filter/TrackablesFilter.java2
-rw-r--r--main/src/cgeo/geocaching/gcvote/GCVote.java2
-rw-r--r--main/src/cgeo/geocaching/geopoint/DistanceParser.java3
-rw-r--r--main/src/cgeo/geocaching/geopoint/Geopoint.java34
-rw-r--r--main/src/cgeo/geocaching/geopoint/Units.java34
-rw-r--r--main/src/cgeo/geocaching/loaders/AddressGeocacheListLoader.java2
-rw-r--r--main/src/cgeo/geocaching/loaders/CoordsGeocacheListLoader.java7
-rw-r--r--main/src/cgeo/geocaching/loaders/HistoryGeocacheListLoader.java2
-rw-r--r--main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java2
-rw-r--r--main/src/cgeo/geocaching/loaders/NextPageGeocacheListLoader.java2
-rw-r--r--main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java2
-rw-r--r--main/src/cgeo/geocaching/loaders/OwnerGeocacheListLoader.java2
-rw-r--r--main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java2
-rw-r--r--main/src/cgeo/geocaching/loaders/UsernameGeocacheListLoader.java2
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java38
-rw-r--r--main/src/cgeo/geocaching/maps/CachesOverlay.java2
-rw-r--r--main/src/cgeo/geocaching/maps/MapProviderFactory.java2
-rw-r--r--main/src/cgeo/geocaching/maps/PositionOverlay.java2
-rw-r--r--main/src/cgeo/geocaching/maps/google/GoogleMapView.java2
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java2
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java2
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java2
-rw-r--r--main/src/cgeo/geocaching/network/Network.java14
-rw-r--r--main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java1
-rw-r--r--main/src/cgeo/geocaching/network/StatusUpdater.java9
-rw-r--r--main/src/cgeo/geocaching/settings/AuthorizeOcDePreference.java45
-rw-r--r--main/src/cgeo/geocaching/settings/AuthorizeTwitterPreference.java45
-rw-r--r--main/src/cgeo/geocaching/settings/CheckBoxWithPopupPreference.java93
-rw-r--r--main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java123
-rw-r--r--main/src/cgeo/geocaching/settings/EditPasswordPreference.java29
-rw-r--r--main/src/cgeo/geocaching/settings/InfoPreference.java107
-rw-r--r--main/src/cgeo/geocaching/settings/LogSignaturePreference.java60
-rw-r--r--main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java122
-rw-r--r--main/src/cgeo/geocaching/settings/Settings.java995
-rw-r--r--main/src/cgeo/geocaching/settings/SettingsActivity.java549
-rw-r--r--main/src/cgeo/geocaching/settings/TextPreference.java86
-rw-r--r--main/src/cgeo/geocaching/settings/WpThresholdPreference.java73
-rw-r--r--main/src/cgeo/geocaching/speech/SpeechService.java9
-rw-r--r--main/src/cgeo/geocaching/speech/TextFactory.java82
-rw-r--r--main/src/cgeo/geocaching/twitter/Twitter.java71
-rw-r--r--main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java2
-rw-r--r--main/src/cgeo/geocaching/ui/AbstractUserClickListener.java76
-rw-r--r--main/src/cgeo/geocaching/ui/CacheListAdapter.java24
-rw-r--r--main/src/cgeo/geocaching/ui/CompassMiniView.java2
-rw-r--r--main/src/cgeo/geocaching/ui/CompassView.java44
-rw-r--r--main/src/cgeo/geocaching/ui/DistanceView.java4
-rw-r--r--main/src/cgeo/geocaching/ui/EditNoteDialog.java60
-rw-r--r--main/src/cgeo/geocaching/ui/HtmlImageCounter.java19
-rw-r--r--main/src/cgeo/geocaching/ui/IndexOutOfBoundsAvoidingTextView.java55
-rw-r--r--main/src/cgeo/geocaching/ui/LoggingUI.java2
-rw-r--r--main/src/cgeo/geocaching/ui/OwnerActionsClickListener.java31
-rw-r--r--main/src/cgeo/geocaching/ui/UserActionsClickListener.java26
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java46
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/DateDialog.java12
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java2
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java30
-rw-r--r--main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java112
-rw-r--r--main/src/cgeo/geocaching/ui/logs/LogViewHolder.java (renamed from main/src/cgeo/geocaching/LogViewHolder.java)3
-rw-r--r--main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java175
-rw-r--r--main/src/cgeo/geocaching/ui/logs/TrackableLogsViewCreator.java70
-rw-r--r--main/src/cgeo/geocaching/utils/GeoDirHandler.java7
-rw-r--r--main/src/cgeo/geocaching/utils/Log.java6
-rw-r--r--main/src/cgeo/geocaching/utils/LogTemplateProvider.java96
-rw-r--r--main/src/cgeo/geocaching/utils/ProcessUtils.java52
-rw-r--r--main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java86
-rw-r--r--main/src/cgeo/geocaching/utils/SimpleHandler.java65
-rw-r--r--main/src/cgeo/geocaching/utils/TextUtils.java4
-rw-r--r--main/src/cgeo/geocaching/utils/TranslationUtils.java2
-rw-r--r--main/templates/ocpl_okapi.xml5
-rw-r--r--main/templates/private.properties7
-rw-r--r--tests/AndroidManifest.xml4
-rw-r--r--tests/src/cgeo/geocaching/GeocacheTest.java4
-rw-r--r--tests/src/cgeo/geocaching/PersonalNoteTest.java68
-rw-r--r--tests/src/cgeo/geocaching/SearchResultTest.java58
-rw-r--r--tests/src/cgeo/geocaching/SettingsTest.java1
-rw-r--r--tests/src/cgeo/geocaching/StaticMapsProviderTest.java14
-rw-r--r--tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java19
-rw-r--r--tests/src/cgeo/geocaching/cgDataTest.java65
-rw-r--r--tests/src/cgeo/geocaching/cgeoApplicationTest.java26
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java7
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCParserTest.java2
-rw-r--r--tests/src/cgeo/geocaching/connector/trackable/TravelBugConnectorTest.java31
-rw-r--r--tests/src/cgeo/geocaching/export/GpxSerializerTest.java37
-rw-r--r--tests/src/cgeo/geocaching/files/GPXImporterTest.java11
-rw-r--r--tests/src/cgeo/geocaching/geopoint/GeopointTest.java8
-rw-r--r--tests/src/cgeo/geocaching/geopoint/UnitsTest.java54
-rw-r--r--tests/src/cgeo/geocaching/settings/TestSettings.java42
-rw-r--r--tests/src/cgeo/geocaching/speech/TextFactoryTest.java158
-rw-r--r--tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java17
-rw-r--r--tests/src/cgeo/geocaching/test/mock/GC2CJPF.java4
-rw-r--r--tests/src/cgeo/geocaching/test/mock/MockedCache.java2
-rw-r--r--tests/src/cgeo/geocaching/twitter/TwitterTest.java26
-rw-r--r--tests/src/cgeo/geocaching/utils/ProcessUtilsTest.java21
-rw-r--r--tests/src/cgeo/test/Compare.java2
265 files changed, 10939 insertions, 7855 deletions
diff --git a/.gitignore b/.gitignore
index c58fc75..3bf3b22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@ gen/
/main/project/localization/*.missing
/main/project/attributes/drawable-mdpi/
/main/project/attributes/iconlist1res.html
+/main/project/settings/drawable-mdpi/
/main/local.properties
/main/private.properties
/main/res/values/mapsapikey.xml
diff --git a/LICENSE b/LICENSE
index 7e857de..d645695 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,13 +1,202 @@
-Copyright 2011-2013 - c:geo
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
- http://www.apache.org/licenses/LICENSE-2.0
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-Unless required by applicable law or agreed to in writing, software
-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.
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ 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.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..d37863d
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,10 @@
+ c:geo
+ Copyright 2011-2013 c:geo contributors
+
+ This product includes software developed by
+ the c:geo team and contributors. See main/res/values/strings_not_translatable.xml
+ for details.
+
+ Portions of this software were developed elsewhere. See the files in main/thirdparty
+ and the notices therein and the references in main/res/values/strings_not_translatable.xml
+ for details.
diff --git a/cgeo-calendar/.classpath b/cgeo-calendar/.classpath
index fba8f51..2f1c26a 100644
--- a/cgeo-calendar/.classpath
+++ b/cgeo-calendar/.classpath
@@ -7,7 +7,7 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry combineaccessrules="false" kind="src" path="/cgeo"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
diff --git a/cgeo-calendar/ant.properties b/cgeo-calendar/ant.properties
index 2537ef3..9d4723d 100644
--- a/cgeo-calendar/ant.properties
+++ b/cgeo-calendar/ant.properties
@@ -15,9 +15,12 @@
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.
-proguard.config=proguard.cfg
proguard.jar=../main/support/proguard.jar
+#jar.libs.dir=../main/libs
+#external.libs.dir=../main/libs
+#source.dir=src;../main/src
+
# The following line is needed to resolve the dependency to cgeo.calendar.ICalendar in the main project
extensible.classpath=../main/bin/classes
diff --git a/cgeo-calendar/build.xml b/cgeo-calendar/build.xml
index a4c8db4..b7aecaa 100644
--- a/cgeo-calendar/build.xml
+++ b/cgeo-calendar/build.xml
@@ -4,7 +4,7 @@
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
- <property file="local.properties" />
+ <loadproperties srcFile="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
@@ -38,7 +38,7 @@
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
-
+
<!-- The private.properties file sets api-keys as well as keystore,
certificate and passwords (if you want).
See /templates/private.properties for more information. -->
@@ -46,11 +46,10 @@
<!-- quick check on sdk.dir -->
<fail
- message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
unless="sdk.dir"
/>
-
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
@@ -68,6 +67,95 @@
<target name="-post-compile">
</target>
-->
+
+ <!-- modified to be able to change compiler arguments -->
+ <property name="generated.dir" value="annotation_gen" />
+ <property name="generated.absolute.dir" location="${generated.dir}" />
+ <property name="java.compilerargs" value="-s &apos;${generated.absolute.dir}&apos;" />
+ <target name="-pre-compile">
+ <mkdir dir="${generated.absolute.dir}" />
+ </target>
+ <target name="-compile" depends="-pre-build, -build-setup, -code-gen, -pre-compile">
+ <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping...">
+ <!-- merge the project's own classpath and the main project's classpath -->
+ <path id="project.javac.classpath">
+ <path refid="project.all.jars.path" />
+ <path refid="tested.project.classpath" />
+ <path path="${java.compiler.classpath}" />
+ <fileset dir="../main/compile-libs" includes="*.jar"/> <!-- added -->
+ <fileset dir="../main/libs" includes="*.jar"/> <!-- added -->
+ <path path="../main/bin/classes" /> <!-- added -->
+ </path>
+ <javac encoding="${java.encoding}"
+ source="${java.source}" target="${java.target}"
+ debug="true" extdirs="" includeantruntime="false"
+ destdir="${out.classes.absolute.dir}"
+ bootclasspathref="project.target.class.path"
+ verbose="${verbose}"
+ classpathref="project.javac.classpath"
+ fork="${need.javac.fork}">
+ <src path="${source.absolute.dir}" />
+ <src path="${gen.absolute.dir}" />
+ <compilerarg line="${java.compilerargs}" />
+ </javac>
+
+ <!-- if the project is instrumented, intrument the classes -->
+ <if condition="${build.is.instrumented}">
+ <then>
+ <echo level="info">Instrumenting classes from ${out.absolute.dir}/classes...</echo>
+
+ <!-- build the filter to remove R, Manifest, BuildConfig -->
+ <getemmafilter
+ appPackage="${project.app.package}"
+ libraryPackagesRefId="project.library.packages"
+ filterOut="emma.default.filter"/>
+
+ <!-- define where the .em file is going. This may have been
+ setup already if this is a library -->
+ <property name="emma.coverage.absolute.file" location="${out.absolute.dir}/coverage.em" />
+
+ <!-- It only instruments class files, not any external libs -->
+ <emma enabled="true">
+ <instr verbosity="${verbosity}"
+ mode="overwrite"
+ instrpath="${out.absolute.dir}/classes"
+ outdir="${out.absolute.dir}/classes"
+ metadatafile="${emma.coverage.absolute.file}">
+ <filter excludes="${emma.default.filter}" />
+ <filter value="${emma.filter}" />
+ </instr>
+ </emma>
+ </then>
+ </if>
+
+ <!-- if the project is a library then we generate a jar file -->
+ <if condition="${project.is.library}">
+ <then>
+ <echo level="info">Creating library output jar file...</echo>
+ <property name="out.library.jar.file" location="${out.absolute.dir}/classes.jar" />
+ <if>
+ <condition>
+ <length string="${android.package.excludes}" trim="true" when="greater" length="0" />
+ </condition>
+ <then>
+ <echo level="info">Custom jar packaging exclusion: ${android.package.excludes}</echo>
+ </then>
+ </if>
+
+ <propertybyreplace name="project.app.package.path" input="${project.app.package}" replace="." with="/" />
+
+ <jar destfile="${out.library.jar.file}">
+ <fileset dir="${out.classes.absolute.dir}"
+ includes="**/*.class"
+ excludes="${project.app.package.path}/R.class ${project.app.package.path}/R$*.class ${project.app.package.path}/BuildConfig.class"/>
+ <fileset dir="${source.absolute.dir}" excludes="**/*.java ${android.package.excludes}" />
+ </jar>
+ </then>
+ </if>
+
+ </do-only-if-manifest-hasCode>
+ </target>
+ <!-- end of modifications for compiler arguments -->
<!-- Import the actual build file.
@@ -87,7 +175,7 @@
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
- <!-- version-tag: 1 -->
+ <!-- version-tag: custom -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>
diff --git a/cgeo-calendar/proguard-project.txt b/cgeo-calendar/proguard-project.txt
new file mode 100644
index 0000000..453d1a6
--- /dev/null
+++ b/cgeo-calendar/proguard-project.txt
@@ -0,0 +1,32 @@
+# We use the general android proguard config. See project.properties for details.
+
+# Suppress notes about classes from the general config, which we don't use at all.
+-dontnote **.ILicensingService
+
+-optimizationpasses 2
+-dontobfuscate
+-allowaccessmodification
+-optimizations !code/simplification/arithmetic,!code/allocation/variable
+
+# apache.commons.collections has some bean related collections, which are undefined in Android
+-dontwarn java.beans.*
+
+#-dontnote org.apache.commons.logging.**
+
+-keep public class cgeo.geocaching.*
+-dontwarn cgeo.geocaching.utils.Log
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keep public class * extends android.view.View {
+ public <init>(android.content.Context);
+ public <init>(android.content.Context, android.util.AttributeSet);
+ public <init>(android.content.Context, android.util.AttributeSet, int);
+ public void set*(...);
+} \ No newline at end of file
diff --git a/cgeo-calendar/proguard.cfg b/cgeo-calendar/proguard.cfg
deleted file mode 100644
index a6b8658..0000000
--- a/cgeo-calendar/proguard.cfg
+++ /dev/null
@@ -1,48 +0,0 @@
--optimizationpasses 2
--dontpreverify
--dontobfuscate
--allowaccessmodification
--optimizations !code/simplification/arithmetic,!code/allocation/variable
-
--dontwarn java.beans.*
--dontwarn org.mapsforge.android.maps.Test*
--dontwarn android.support.v4.**
-
--keep public class * extends android.app.Activity
--keep public class * extends android.app.Application
--keep public class * extends android.app.Service
--keep public class * extends android.content.BroadcastReceiver
--keep public class * extends android.content.ContentProvider
--keep public class cgeo.geocaching.*
-
--keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet);
-}
-
--keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet, int);
-}
-
--keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
-}
-
--keep class * implements android.os.Parcelable {
- public static final android.os.Parcelable$Creator *;
-}
-
--keepclassmembers class **.R$* {
- public static <fields>;
-}
-
--keepclassmembers class cgeo.geocaching.** {
- public void *(android.view.View);
-}
-
--keep public class * extends android.view.View {
- public <init>(android.content.Context);
- public <init>(android.content.Context, android.util.AttributeSet);
- public <init>(android.content.Context, android.util.AttributeSet, int);
- public void set*(...);
-} \ No newline at end of file
diff --git a/cgeo-calendar/project.properties b/cgeo-calendar/project.properties
index b120021..54e1b7d 100644
--- a/cgeo-calendar/project.properties
+++ b/cgeo-calendar/project.properties
@@ -6,6 +6,9 @@
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=Google Inc.:Google APIs:4
diff --git a/cgeo-calendar/res/values-fr/strings.xml b/cgeo-calendar/res/values-fr/strings.xml
index 0f62a7b..8e3af6a 100644
--- a/cgeo-calendar/res/values-fr/strings.xml
+++ b/cgeo-calendar/res/values-fr/strings.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.net-->
<resources>
-
- <string name="calendars">Calendriers</string>
- <string name="event_success">Cache évènement ajoutée à l\'agenda</string>
- <string name="event_fail">Échec d\'ajout de la cache événement à l\'agenda</string>
-
-</resources> \ No newline at end of file
+ <string name="app_name">c:geo - agenda (add-on)</string>
+ <string name="calendars">Calendriers</string>
+ <string name="event_success">Cache évènement ajoutée à l\'agenda</string>
+ <string name="event_fail">Échec d\'ajout de la cache événement à l\'agenda</string>
+</resources>
diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml
index 004ecc0..ff18da5 100644
--- a/main/AndroidManifest.xml
+++ b/main/AndroidManifest.xml
@@ -6,7 +6,7 @@
android:versionName="developer build" >
<uses-sdk
- android:minSdkVersion="4"
+ android:minSdkVersion="7"
android:targetSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
@@ -18,6 +18,9 @@
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
+ <uses-feature
+ android:name="android.hardware.screen.portrait"
+ android:required="false" />
<supports-screens
android:anyDensity="true"
@@ -127,16 +130,34 @@
android:label="@string/search_address_result"
android:windowSoftInputMode="stateHidden" >
</activity>
- <activity
- android:name=".SettingsActivity"
- android:configChanges="keyboardHidden|orientation"
- android:label="@string/settings"
- android:windowSoftInputMode="stateHidden" >
+ <activity
+ android:name=".settings.SettingsActivity"
+ android:label="@string/settings_titlebar"
+ android:theme="@style/settings"
+ android:configChanges="keyboardHidden|orientation" >
</activity>
<activity
android:name=".cgeocaches"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" >
+
+ <!-- intent filter for local gpx files -->
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+
+ <data android:mimeType="*/*" />
+ <data android:scheme="file" />
+ <data android:host="*" />
+ <data android:pathPattern=".*\\.gpx" />
+ <!-- path pattern does not match dots correctly: http://stackoverflow.com/q/3400072/44089 -->
+ <data android:pathPattern=".*\\..*\\.gpx" />
+ <data android:pathPattern=".*\\..*\\..*\\.gpx" />
+ <data android:pathPattern=".*\\..*\\..*\\..*\\.gpx" />
+ <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.gpx" />
+ </intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@@ -300,6 +321,7 @@
</activity>
<activity
android:name=".CompassActivity"
+ android:configChanges="orientation"
android:label="@string/compass_title" >
</activity>
<activity
@@ -346,4 +368,4 @@
</activity>
</application>
-</manifest> \ No newline at end of file
+</manifest>
diff --git a/main/build.xml b/main/build.xml
index 2444787..b6f5170 100644
--- a/main/build.xml
+++ b/main/build.xml
@@ -89,7 +89,13 @@
<filter token="ocde.okapi.consumer.secret" value="${ocde.okapi.consumer.secret}"/>
</filterset>
</copy>
- </target>
+ <copy file="./templates/ocpl_okapi.xml" todir="./res/values/" overwrite="true">
+ <filterset>
+ <filter token="ocpl.okapi.consumer.key" value="${ocpl.okapi.consumer.key}"/>
+ <filter token="ocpl.okapi.consumer.secret" value="${ocpl.okapi.consumer.secret}"/>
+ </filterset>
+ </copy>
+ </target>
<!-- start of modifications for android annotations, see https://github.com/excilys/androidannotations/wiki/Building-Project-Ant -->
<property name="generated.dir" value="annotation_gen" />
diff --git a/main/proguard-project.txt b/main/proguard-project.txt
index cf4ed33..d4991f6 100644
--- a/main/proguard-project.txt
+++ b/main/proguard-project.txt
@@ -3,6 +3,8 @@
# Suppress notes about classes from the general config, which we don't use at all.
-dontnote **.ILicensingService
+-printusage usage.txt
+
-optimizationpasses 2
-dontobfuscate
-allowaccessmodification
diff --git a/main/project/settings/makeicons1res.sh b/main/project/settings/makeicons1res.sh
new file mode 100755
index 0000000..4d762cf
--- /dev/null
+++ b/main/project/settings/makeicons1res.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+# creates attribute icons in one resolution only
+
+require () {
+ hash $1 2>&- || { echo >&2 "I require $1 but it's not installed. Aborting."; exit 1; }
+}
+
+require optipng
+#part of ImageMagick package
+require convert
+#part of ImageMagick package
+require composite
+require sed
+
+# directory for icons
+ICONDIR="./drawable-mdpi"
+# size of the image itself (inside border)
+IMGSIZE=24
+# size of the whole icon
+ICONSIZE=48
+
+# create output directory if missing
+[ -d $ICONDIR ] || mkdir $ICONDIR
+
+if [ $# -gt 0 ]; then
+ svgs="$@"
+else
+ svgs="svgs/*.svg"
+fi
+
+convert -size ${ICONSIZE}x${ICONSIZE} xc:none canvas.png
+
+for s in $svgs; do
+ n=$ICONDIR/settings_`basename "$s" | sed "s/\.svg//"`
+
+ # don't draw icons if svg is older than icon
+ [ -f "${n}.png" ] && [ "$s" -ot "${n}.png" ] && continue
+
+ echo "drawing $n"
+
+ # white
+
+ sed -e "s/fill:#....../fill:#ffffff/g" "$s" > tmp.svg
+ convert -density 200 -background none tmp.svg -fill black -resize ${IMGSIZE}x${IMGSIZE} tmp.png
+ composite -gravity center tmp.png canvas.png "${n}_white.png"
+ optipng -quiet "${n}_white.png"
+
+ # black
+
+ sed -e "s/fill:#....../fill:#000000/g" "$s" > tmp.svg
+ convert -density 200 -background none tmp.svg -fill black -resize ${IMGSIZE}x${IMGSIZE} tmp.png
+ composite -gravity center tmp.png canvas.png "${n}_black.png"
+ optipng -quiet "${n}_black.png"
+done
+
+
+rm canvas.png tmp.png tmp.svg
+
diff --git a/main/project/settings/svgs/arrow.svg b/main/project/settings/svgs/arrow.svg
new file mode 100644
index 0000000..35ad995
--- /dev/null
+++ b/main/project/settings/svgs/arrow.svg
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ width="67.395424"
+ height="67.395424"
+ viewBox="0 0 567.39533 567.06225"
+ enable-background="new 0 0 841.89 595.28"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="map.svg"><metadata
+ id="metadata156"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs154">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </defs><sodipodi:namedview
+ pagecolor="#077f08"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0.85490196"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ id="namedview152"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:zoom="3.21"
+ inkscape:cx="90.346711"
+ inkscape:cy="20.161507"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2"
+ showguides="true"
+ inkscape:guide-bbox="true"><sodipodi:guide
+ orientation="1,0"
+ position="42.536548,22.334056"
+ id="guide3419" /><sodipodi:guide
+ orientation="0,1"
+ position="63.408822,77.692311"
+ id="guide3421" /><sodipodi:guide
+ orientation="1,0"
+ position="17.536548,27.941532"
+ id="guide3423" /><sodipodi:guide
+ orientation="1,0"
+ position="67.536548,40.402591"
+ id="guide3425" /><sodipodi:guide
+ orientation="0,1"
+ position="5.7764226,54.732809"
+ id="guide3427" /><sodipodi:guide
+ orientation="0,1"
+ position="54.063028,7.3807841"
+ id="guide3429" /></sodipodi:namedview>
+
+
+
+
+
+
+<path
+ style="fill:#ffffff;stroke:none"
+ d="M 567.39535,-0.16857693 0,269.57371 l 285.50585,12.14721 12.14721,285.50585 z"
+ id="path3431"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" /></svg> \ No newline at end of file
diff --git a/main/project/settings/svgs/basic.svg b/main/project/settings/svgs/basic.svg
new file mode 100644
index 0000000..e1c0c7a
--- /dev/null
+++ b/main/project/settings/svgs/basic.svg
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ width="75.013184"
+ height="56.17062"
+ viewBox="0 0 631.52849 472.61722"
+ enable-background="new 0 0 841.89 595.28"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="arrow.svg"><metadata
+ id="metadata156"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs154">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </defs><sodipodi:namedview
+ pagecolor="#077f08"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0.85490196"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ id="namedview152"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:zoom="3.21"
+ inkscape:cx="97.823347"
+ inkscape:cy="16.519043"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2"
+ showguides="true"
+ inkscape:guide-bbox="true"><sodipodi:guide
+ orientation="1,0"
+ position="50.013183,18.691593"
+ id="guide3419" /><sodipodi:guide
+ orientation="0,1"
+ position="70.885457,74.049848"
+ id="guide3421" /><sodipodi:guide
+ orientation="1,0"
+ position="25.013183,24.299069"
+ id="guide3423" /><sodipodi:guide
+ orientation="1,0"
+ position="75.013183,36.760128"
+ id="guide3425" /><sodipodi:guide
+ orientation="0,1"
+ position="13.253058,51.090346"
+ id="guide3427" /><sodipodi:guide
+ orientation="0,1"
+ position="61.539663,3.7383207"
+ id="guide3429" /></sodipodi:namedview>
+
+
+
+
+
+
+<rect
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ id="rect3452"
+ width="631.5285"
+ height="472.89484"
+ x="0"
+ y="-0.16654"
+ ry="123.67085"
+ rx="108.58752" /></svg> \ No newline at end of file
diff --git a/main/project/settings/svgs/cloud.svg b/main/project/settings/svgs/cloud.svg
new file mode 100644
index 0000000..7f39fe7
--- /dev/null
+++ b/main/project/settings/svgs/cloud.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="537.15625"
+ height="360"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="Neues Dokument 1">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#008a0c"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.89019608"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="150"
+ inkscape:cy="294.29407"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(160,-466.65625)">
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ d="m 20,466.65625 c -99.411255,0 -180,80.58874 -180,180 0,99.41125 80.588745,180 180,180 148.70266,0 160.93607,0 238.5625,0 65.48519,0 118.59375,-53.10856 118.59375,-118.59375 0,-65.48519 -53.10856,-118.5625 -118.59375,-118.5625 -23.08394,0 -44.62343,6.58915 -62.84375,18 C 177.84235,526.91745 105.96345,466.65625 20,466.65625 z"
+ id="path2985"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ssccsscs" />
+ </g>
+</svg>
diff --git a/main/project/settings/svgs/details.svg b/main/project/settings/svgs/details.svg
new file mode 100644
index 0000000..70a9e9a
--- /dev/null
+++ b/main/project/settings/svgs/details.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="568.57141"
+ height="475.71429"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="cloud.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#008a0c"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.89019608"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="318.57143"
+ inkscape:cy="252.86549"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(328.57143,-309.5134)">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ id="rect3013"
+ width="568.57141"
+ height="88.571426"
+ x="-168.57143"
+ y="-157.14285"
+ transform="translate(-160,466.65625)" />
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ id="rect3013-3"
+ width="568.57141"
+ height="88.571426"
+ x="-328.57141"
+ y="503.08484" />
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ id="rect3013-4"
+ width="568.57141"
+ height="88.571426"
+ x="-328.57141"
+ y="696.65625" />
+ </g>
+</svg>
diff --git a/main/project/settings/svgs/eye.svg b/main/project/settings/svgs/eye.svg
new file mode 100644
index 0000000..eb87b56
--- /dev/null
+++ b/main/project/settings/svgs/eye.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="593.09375"
+ height="334.28729"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="eye.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#008a0c"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.89019608"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="463.69643"
+ inkscape:cy="224.30745"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(473.69643,-422.38236)">
+ <path
+ style="fill:#ffffff;stroke:none"
+ d="m 147.375,112.875 c -135.24807,1.36352 -249.90871,70.74439 -292.5,167.125 43.00916,97.35564 159.54151,167.15625 296.5625,167.15625 137.01925,0 253.52076,-69.80256 296.53125,-167.15625 -43.0184,-97.34208 -159.52242,-167.125 -296.53125,-167.125 -1.35606,0 -2.71051,-0.0136 -4.0625,0 z m 4.0625,58.5625 C 211.39984,171.4375 260,220.03766 260,280 260,339.96234 211.39984,388.59375 151.4375,388.59375 91.47516,388.59375 42.84375,339.96234 42.84375,280 c 0,-59.96234 48.63141,-108.5625 108.59375,-108.5625 z"
+ transform="translate(-328.57143,309.5134)"
+ id="path3061"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/main/project/settings/svgs/info_icon.svg b/main/project/settings/svgs/info_icon.svg
new file mode 100644
index 0000000..df15b96
--- /dev/null
+++ b/main/project/settings/svgs/info_icon.svg
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="754.28125"
+ height="754.28125"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="info_icon.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#008a0c"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.89019608"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="775.69643"
+ inkscape:cy="441.44584"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1317"
+ inkscape:window-height="744"
+ inkscape:window-x="49"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(1145.6964,123.33035)">
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ d="m -397.15625,-380 c -208.29025,0 -377.125,168.83475 -377.125,377.125 0,208.29025 168.83475,377.15625 377.125,377.15625 C -188.866,374.28125 -20,205.41525 -20,-2.875 -20,-211.16525 -188.866,-380 -397.15625,-380 z m 0,114.28125 c 34.71504,0 62.875,28.12871 62.875,62.84375 0,34.71504 -28.15996,62.875 -62.875,62.875 -34.71504,0 -62.84375,-28.15996 -62.84375,-62.875 0,-34.71504 28.12871,-62.84375 62.84375,-62.84375 z M -460,-68.5625 l 125.71875,0 0,328.5625 -125.71875,0 0,-328.5625 z"
+ transform="translate(-371.41518,256.66965)"
+ id="path2984"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/main/project/settings/svgs/map.svg b/main/project/settings/svgs/map.svg
new file mode 100644
index 0000000..5d75947
--- /dev/null
+++ b/main/project/settings/svgs/map.svg
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ width="82.53125"
+ height="68.21875"
+ viewBox="0 0 694.82234 573.98968"
+ enable-background="new 0 0 841.89 595.28"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="noun_project_5132.svg"><metadata
+ id="metadata156"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs154">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </defs><sodipodi:namedview
+ pagecolor="#077f08"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0.85490196"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ id="namedview152"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:zoom="3.21"
+ inkscape:cx="47.810164"
+ inkscape:cy="12.469196"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+<path
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ d="M 0,-0.17482998 0,574.152 l 694.82234,0 0,-574.32682998 -694.82234,0 z m 57.616847,56.30139398 579.588643,0 0,461.724046 -579.588643,0 0,-461.724046 z"
+ id="rect3379"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 89.713903,92.43307 0,112.86588 0.526181,0 5.261813,2.10472 4.735633,-0.26309 0.52618,-3.94636 4.99872,-1.31545 6.84036,0.26309 4.47254,2.10473 0.26309,11.57598 2.894,7.36654 2.36781,-0.26309 0.78927,-3.94636 1.57855,-10.78671 1.31545,-9.47127 7.62963,-8.15581 10.52362,-7.89272 4.20945,-12.62835 2.10473,0 -1.05236,5.26182 2.89399,-0.52618 2.63091,-4.20945 7.62963,-10.78672 8.15581,-1.31545 3.94636,-6.31418 10.78671,-6.31417 7.62963,-1.84164 -0.26309,3.68327 -3.94636,2.36782 0.26309,2.10472 2.10473,0.26309 0,-1.57854 2.36781,-1.84164 8.94508,-1.84163 0.26309,-3.42018 -6.05108,-2.89399 -0.52618,-5.26182 2.6309,-2.89399 0.78928,-1.57855 -8.4189,0.52618 -9.99745,5.52491 -1.57854,0 0,-2.36782 15.25925,-9.20817 10.78672,-0.26309 1.57854,1.57854 5.52491,-0.26309 13.68071,-6.57726 2.36781,-4.47254 -0.78927,-3.68327 -6.57726,-14.996169 -0.26309,-4.472541 -39.98978,0 -0.26309,0.263091 -0.78927,6.051084 -7.62963,4.735635 -6.84036,12.62835 -6.31417,0.78927 0,-4.47254 2.894,-6.05109 0,-3.68327 -4.47254,-0.52618 -5.788,-5.787991 -6.05108,-3.946359 -56.564487,0 z m 6.840356,147.06766 -6.840356,1.05236 0,15.25926 6.840356,-12.10217 0,-4.20945 z m -6.840356,22.3627 0,12.62835 1.052363,1.84164 2.367815,4.20945 0.526182,4.20945 2.367815,3.15708 5.787992,3.94636 6.57727,6.05109 3.68327,-0.52618 0.52618,-3.68327 1.84163,-1.31545 1.57855,0.26309 1.31545,1.31545 1.05236,3.68327 0.26309,4.73563 -0.26309,11.83908 -8.4189,8.68199 -2.10472,9.47126 0,5.5249 2.89399,0 -0.26309,2.10473 -3.42018,3.68327 0.2631,8.68199 6.05108,3.94636 1.84163,4.99872 1.84164,3.42018 3.68327,7.10344 2.89399,5.26182 4.47254,6.05108 7.89272,8.68199 4.20945,3.42018 7.10345,6.31417 1.57854,2.894 1.57855,6.05109 0.52618,5.78799 0.78927,6.84036 0.78927,7.10344 0.78927,5.788 0.78928,5.5249 0.26309,12.10217 2.36781,4.20945 0.26309,11.3129 -0.78927,0.52618 -0.78927,9.20817 1.31545,3.94636 0.78927,4.73563 0.52619,3.42018 29.20306,0 0.52618,-0.26309 4.20945,-1.57855 1.31545,-3.68327 -1.57854,-1.05236 0,-2.10472 3.68326,-1.31546 4.73564,-0.26309 2.89399,-3.94636 3.15709,-5.26181 -8.4189,-10.52362 3.42018,0.26309 7.62963,4.73563 2.89399,-0.26309 3.94636,-5.52491 3.68327,-9.47126 3.42018,-10.26053 1.31545,-14.2069 9.20817,-5.78799 11.04981,-4.20945 2.10473,-9.20817 4.20945,-13.15453 0,-9.20818 -1.84164,-7.62962 12.62835,-17.36398 -2.10472,-14.2069 -4.20945,0 -10.52363,-6.31417 -7.10345,-0.78928 -9.73435,-3.94635 -3.42018,-1.84164 -2.89399,-3.68327 -2.894,0.78927 -1.05236,3.94636 -2.894,2.36782 -3.94636,0 0,-1.31545 0,-1.31546 1.84164,0 2.10472,-0.78927 1.05236,-2.10472 0,-1.57855 -0.52618,-1.57854 -2.894,-0.26309 -1.57854,1.05236 -4.73563,2.36782 0,1.84163 -1.84163,0 -0.2631,-1.57854 2.10473,-3.15709 2.10472,-2.894 1.31546,-4.73563 -2.10473,-6.57726 -3.94636,-4.73564 -4.20945,-4.47254 -12.10217,-2.6309 -4.99872,-5.52491 -3.42018,-2.89399 -4.73563,-4.47254 -2.6309,-4.73563 -1.57855,-0.52619 -2.89399,0.52619 -3.94636,1.57854 -6.31418,-1.31545 -8.15581,-6.57727 -2.6309,-0.26309 -2.36782,4.73563 0,6.57727 -2.894,1.05236 -2.10472,-1.84164 0.26309,-3.42017 1.31545,-1.31546 0.52618,-2.6309 2.10473,-1.57855 0.26309,-2.36781 -1.84163,-0.52618 -3.68327,2.6309 -5.26182,3.15709 -4.99872,1.31545 -3.15709,9.20818 -3.15708,0 -0.26309,-1.31546 -1.84164,-2.36781 -2.36781,-1.05237 -2.894,1.57855 -3.42018,1.31545 -3.68327,-2.10472 -1.57854,-3.42018 -3.15709,-1.31546 0,-6.84035 2.10473,-14.73308 -13.943807,-0.26309 z"
+ id="polygon7"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 226.49768,122.82507 2.67079,-0.88943 0.53366,1.77886 -1.77886,4.80542 1.77886,2.31252 0.71154,5.69485 -0.89194,4.9833 -4.62252,-2.4904 -3.38234,-1.95925 -5.33657,0 -1.42559,-4.09137 0,-1.78136 z"
+ id="polygon17"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 105.31487,234.75781 3.7356,-2.13964 13.52433,0.53617 15.12781,10.49776 0,2.13714 -0.53366,0.88943 -10.85604,0 1.06982,-2.66829 -1.95674,-1.42559 -3.56023,-2.67079 -2.67079,-3.55772 -13.8801,-0.17538 z"
+ id="polygon39"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 127.7385,251.12581 -0.35577,3.20445 -3.56022,0 -1.95675,-1.06731 0.17539,-1.95675 z"
+ id="polygon41"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 134.67605,251.83986 0.18039,1.2452 4.80291,0.17789 4.09138,0.71154 1.2477,0.53115 3.56022,-1.77886 6.76217,-0.70903 0,-1.95925 -3.73811,-0.35578 -4.09137,-3.20444 -5.1637,0.89193 -2.4904,0.35577 0.71154,3.20445 -5.51446,0.17538"
+ id="polyline43"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 164.03973,252.01775 1.42308,2.13212 -4.80542,0.71405 -1.77886,-1.24771 1.77886,-1.42058 z"
+ id="polygon45"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 173.47018,258.9578 1.60097,4.09137 2.66829,-0.71405 0.18039,-2.3075 -1.4256,-1.24771 -3.20194,-0.53366"
+ id="polyline47"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 177.38617,264.47225 0.17788,6.4064 -2.13462,-0.35828 -0.71405,-2.66578 0,-3.38234 z"
+ id="polygon49"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 356.40189,122.11353 -1.42308,-0.89194 1.2452,-3.55521 3.20194,-5.34158 4.09388,-1.77886 3.7356,0 1.95925,0.53617 -2.13714,4.62503 -1.95674,4.80542 -4.27176,5.33908 -1.59847,-0.17789 -1.24771,-1.06731 -1.60097,0.53365 -1.42308,0 z"
+ id="polygon55"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 377.7557,97.557776 -1.06731,1.423086 2.84617,1.245198 1.2452,2.4904 -3.02406,1.60599 0.35577,2.48789 2.31252,3.91599 1.95925,4.80292 2.13463,4.09388 3.91348,0.53366 -0.17788,2.66828 -2.4904,3.38234 -5.69485,1.60097 -7.11794,1.06982 -5.69485,1.24269 0.35577,-2.13463 4.09388,-1.2452 0,-1.77885 -1.2452,-1.60098 1.77886,-4.09387 4.09388,-2.84868 0.17788,-4.26926 -2.67079,-0.71405 -4.09388,-4.44714 0,-5.69485 2.49291,-4.802919 5.51696,-0.353266 z"
+ id="polygon57"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 401.47629,92.959251 0,2.630907 2.36782,2.893996 3.68327,-0.26309 1.31545,-1.841635 1.84164,-0.26309 3.15708,-1.841635 0,2.630907 1.31546,-0.263091 0,3.94636 2.10472,1.84163 1.05236,3.42018 0.78928,3.68327 3.42017,0 1.05237,-2.10472 2.10472,-1.05237 1.84164,-2.10472 0,-2.10473 1.84163,-4.735628 2.63091,-4.472541 -30.51852,0 z m 57.35376,0 -1.31545,0.789272 -3.15709,0 -6.57727,0.526181 1.05237,4.20945 0,2.367816 -2.63091,1.05236 -0.78927,-1.05236 -2.36782,0 -1.57854,2.10473 -1.84164,4.99872 -1.31545,4.47254 -1.84163,0.52618 -2.63091,-1.05236 -4.20945,0.26309 -3.42018,0.26309 -4.20945,1.57854 -3.42018,0 -4.73563,-0.52618 -2.36781,-1.05236 0,-3.42018 1.57854,-1.84163 0,-3.94636 -0.78927,-3.15709 -2.63091,0.52618 -2.89399,1.84163 0.26309,3.42018 0.52618,6.05109 -1.05236,3.94636 -4.99873,1.57854 -3.68326,1.05236 0.26309,5.52491 -1.31546,0 -0.52618,-2.36782 -2.10472,1.31545 -1.84164,2.63091 -2.6309,1.05236 -6.84036,7.10345 -3.15709,0 -1.57854,-2.10473 -2.894,0 1.05236,1.57855 -0.52618,2.89399 -6.57726,0 0.52618,2.63091 1.05236,1.05236 3.68327,1.84164 3.94636,2.36781 0.26309,6.05109 -1.84163,3.15708 1.05236,2.63091 -3.68327,1.84164 -2.894,-0.52619 -6.05108,-1.31545 -6.31418,0 -3.94636,1.05236 -0.52618,4.20945 0,19.46871 2.10473,1.57854 2.6309,0.52618 3.68327,1.84164 4.20945,-0.52618 2.63091,-0.78927 3.42018,1.31545 2.36781,0.26309 4.20945,-6.84036 3.42018,-7.62962 9.20817,-7.62963 0.78927,-3.68327 4.47254,-1.84164 1.84164,1.84164 3.42018,-0.52618 3.68327,-4.20945 2.6309,-1.05237 2.36782,1.84164 1.31545,2.894 3.42018,5.5249 2.36781,1.31545 3.94636,0.26309 2.894,2.36782 2.894,3.15709 2.36781,2.89399 0.26309,4.99872 1.57855,0 1.05236,-1.57854 0.52618,-6.31417 1.05236,0 1.57855,1.84163 1.31545,0 -1.31545,-2.894 -2.10473,-2.10472 -4.20945,-2.894 0,-2.36781 -3.42018,-1.31546 -3.94635,-1.84163 -0.52619,-2.10473 -1.84163,-3.42017 -1.84163,-1.84164 0.78927,-2.894 1.84163,0 1.05236,1.84164 2.10473,2.10472 3.42018,1.57855 5.5249,4.99872 3.68327,2.63091 3.15709,3.94635 2.36781,5.52491 1.84164,2.89399 3.15708,1.57855 -2.10472,0.52618 0,4.99872 2.63091,2.63091 3.94635,-0.78927 0,-6.84036 0,-1.84163 0.52619,-4.47255 1.05236,-2.6309 4.73563,-1.05236 2.36782,1.57854 2.36781,0 4.20945,-3.68327 -1.57854,-2.63091 0,-4.73563 2.6309,-4.73563 2.36782,-6.57726 4.20945,-1.84164 2.36781,-0.78927 0.78928,1.31545 1.57854,5.26182 2.36782,2.36781 2.36781,0 3.42018,-2.10472 0,-2.36782 -2.10473,-2.10472 7.36654,-3.68327 1.84164,-0.78927 2.10472,0.52618 0,1.57854 -1.84163,1.05236 -2.63091,2.36782 -0.52618,2.894 1.84163,1.84163 3.68327,2.10472 1.84164,1.84164 2.6309,2.10472 2.10473,0 2.10472,1.84164 -1.05236,1.84163 0.26309,3.42018 -5.5249,0.26309 -3.42018,-0.52618 -3.15709,-0.78927 -4.20945,-0.78927 -2.89399,-1.57855 -4.47254,0 -2.36782,1.84164 -2.10473,1.31545 -1.57854,1.84163 -4.20945,0.52619 -2.63091,0 -1.57854,1.05236 -1.84163,2.10472 -3.15709,0 1.57854,5.788 1.57855,5.78799 2.36781,2.63091 6.05109,-0.26309 5.78799,-0.78928 4.99872,0.2631 6.84036,-0.52619 0,1.57855 -1.05236,1.05236 0,4.20945 0,2.894 -1.57855,5.5249 -1.31545,3.68327 -2.10473,3.42018 -1.57854,-1.05237 -3.15709,-0.52618 -2.36781,0 -5.52491,1.05237 -3.15708,1.57854 -4.73563,0 -5.26182,-3.15709 -3.94636,-2.89399 -3.15708,-2.36782 -5.52491,1.31545 -3.68327,2.10473 -0.26309,3.15709 1.31546,0 -0.26309,2.36781 -2.63091,0 -7.10345,-1.05236 -4.47254,-2.63091 -1.05236,-4.47254 -1.84163,-0.52618 -5.788,-0.52618 -3.94636,-1.57854 -3.42018,-2.894 -0.78927,-2.10473 2.10473,-5.26181 0.26309,-4.20945 -8.15581,-0.52618 -6.84036,0 -4.73563,1.05236 -4.73563,1.05236 -8.4189,1.84164 -9.73435,3.68327 -4.20945,0.26309 -3.42018,-1.84164 -2.36782,0 -3.42018,5.788 -2.10472,2.89399 -6.05108,3.94636 -1.05237,3.15709 -1.05236,5.788 -7.10345,8.68199 -3.15708,0 -4.73564,5.26181 -8.68199,17.36398 -0.78927,7.36654 0.26309,9.20817 -2.36781,8.68199 0,8.68199 3.42018,7.62963 10.78671,13.41762 14.73308,15.78544 6.57726,1.05236 16.8378,-5.26181 13.68071,-3.42018 6.05109,-0.78927 5.78799,8.4189 5.52491,0 4.99872,0.52618 -0.26309,4.47254 -2.10473,6.05108 -1.84163,7.10345 9.20817,13.68071 4.99872,10.52363 2.894,17.62707 -6.57727,12.36526 0,14.46998 6.84036,15.52235 1.31545,6.57727 1.84164,13.41762 8.4189,14.99616 0.78927,8.94509 4.99872,3.68326 1.05236,1.84164 2.36782,0.52618 4.20945,-3.42018 8.68199,-2.10472 6.84035,-1.05237 6.57727,-4.99872 8.4189,-9.73435 6.05108,-11.57599 0,-2.894 8.15581,-5.5249 0.26309,-8.68199 -1.84163,-8.68199 6.57727,-5.5249 7.89271,-6.57727 7.36654,-7.89272 -0.52618,-6.57726 -3.94636,-24.20434 0.78927,-12.62835 8.4189,-10.26053 10.78672,-11.04981 9.20817,-12.10217 10.52363,-25.78288 -0.52619,-2.894 -5.78799,1.05236 -11.3129,3.68327 -6.84035,1.84164 -3.15709,-0.52618 0.26309,-7.36654 -4.73563,-5.26181 -5.26181,-5.26182 -2.10473,-1.31545 -1.84163,-7.89272 -7.36654,-7.62963 -0.26309,-6.31417 -5.5249,-8.94508 -6.84036,-13.15453 -2.10472,-5.52491 -0.78928,-3.42017 3.68327,0 0,1.05236 1.05236,0.52618 1.84164,-2.10473 3.68327,9.99745 13.68071,21.31034 8.94508,12.10217 1.57855,11.57598 1.57854,3.15709 3.94636,6.05109 3.68327,-0.78928 12.36526,-2.89399 4.47254,-3.15709 4.73563,-4.47254 6.31417,-4.47254 3.42018,-2.10473 4.99872,-4.47254 4.99873,-6.31417 3.42017,-10.26054 -1.31545,-2.10472 -2.10472,-1.05236 -3.68327,-0.78928 -2.894,-1.31545 -0.52618,-2.894 0,-4.47254 -3.42018,0 -2.10472,3.94636 -2.10473,2.63091 -4.73563,-0.52618 -2.63091,-0.52618 0,-4.99872 -1.57854,-1.57855 -2.63091,1.57855 -1.84163,-0.52619 -0.52618,-2.6309 -2.10473,-1.05236 -2.10472,-3.94636 -4.20945,-3.94636 -0.52618,-1.57855 2.10472,-2.6309 3.94636,-0.26309 3.42018,3.42017 6.05108,6.05109 2.894,2.6309 5.5249,0 2.10473,-2.10472 3.94636,-0.52618 2.6309,2.10472 0,3.42018 4.73563,1.84164 3.94636,1.31545 21.57344,0.26309 3.94635,3.68327 1.05237,1.84163 0,-139.438029 -141.80585,0 z"
+ id="polygon59"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 406.76361,159.30418 0.35327,3.56273 0,1.24269 2.67079,0 0.71154,-1.06731 0,-3.37983 -1.2452,-3.20445 z"
+ id="polygon61"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 407.65053,166.60251 2.49291,-0.53366 0.17538,1.42309 -0.88943,2.66578 0.71405,0.53867 -1.06982,2.48789 -1.42309,0.35577 -0.88692,-0.88692 -0.71405,-2.84868 0.17789,-1.95674 z"
+ id="polygon63"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 420.10755,178.88164 3.37983,2.31251 2.66828,2.31252 3.20445,-0.35577 0.35828,-3.73811 -1.78136,-1.95424 -2.84868,0 -5.33658,0.35577 z"
+ id="polygon65"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 453.02644,187.06438 3.20444,1.24771 6.22851,-0.18039 0.53366,1.2477 -3.20194,1.60098 -1.95925,-1.24771 -2.13463,-0.53115 -2.67079,-0.88943 z"
+ id="polygon67"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 482.92377,187.06438 5.34159,-1.59846 0.53115,1.95674 -1.77886,2.31001 -3.02656,1.78136 -1.78137,0.17789 -1.24269,-1.60097 z"
+ id="polygon69"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 524.2083,398.28996 -1.24269,-0.53366 1.95424,-7.29582 5.15868,-3.91349 3.02406,-2.31502 2.67079,-4.26925 6.76467,-7.29583 1.42059,-0.35827 0.18039,5.33907 0.17788,11.03393 -6.76216,18.50764 -4.09138,15.1253 -6.76216,2.31502 -3.7356,0.17538 -2.85118,-6.22851 -0.35327,-6.05062 4.26675,-9.43295 z"
+ id="polygon99"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 559.97838,408.60984 1.95423,1.24771 2.31252,0 0.35577,-1.60098 -2.66829,-2.13462 -2.31251,0 z"
+ id="polygon101"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.7117936"
+ d="m 569.58671,402.56172 0.53116,2.13714 -1.06732,1.77886 -1.78136,-0.18039 1.06982,-3.73561 z"
+ id="polygon103"
+ inkscape:connector-curvature="0" />
+<g
+ id="Calque_5"
+ style="fill:#ffffff"
+ transform="translate(312.02548,171.53509)">
+</g>
+<g
+ id="Calque_3"
+ style="fill:#ffffff"
+ transform="translate(312.02548,171.53509)">
+</g>
+<g
+ id="Calque_4"
+ style="fill:#ffffff"
+ transform="translate(312.02548,171.53509)">
+</g>
+<g
+ id="Calque_1"
+ style="fill:#ffffff"
+ transform="translate(312.02548,171.53509)">
+</g>
+<g
+ id="Calque_6"
+ style="fill:#ffffff"
+ transform="translate(312.02548,171.53509)">
+</g>
+</svg> \ No newline at end of file
diff --git a/main/project/settings/svgs/nut.svg b/main/project/settings/svgs/nut.svg
new file mode 100644
index 0000000..f2c1d83
--- /dev/null
+++ b/main/project/settings/svgs/nut.svg
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ width="108.53139"
+ height="93.999878"
+ viewBox="0 0 913.71496 790.911"
+ enable-background="new 0 0 841.89 595.28"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="basic.svg"><metadata
+ id="metadata156"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs154">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </defs><sodipodi:namedview
+ pagecolor="#077f08"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0.85490196"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ id="namedview152"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:zoom="3.21"
+ inkscape:cx="62.378103"
+ inkscape:cy="18.962269"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2"
+ showguides="true"
+ inkscape:guide-bbox="true"><sodipodi:guide
+ orientation="1,0"
+ position="14.567939,21.134819"
+ id="guide3419" /><sodipodi:guide
+ orientation="0,1"
+ position="35.440213,76.493074"
+ id="guide3421" /><sodipodi:guide
+ orientation="1,0"
+ position="-10.432061,26.742295"
+ id="guide3423" /><sodipodi:guide
+ orientation="1,0"
+ position="39.567939,39.203354"
+ id="guide3425" /><sodipodi:guide
+ orientation="0,1"
+ position="-22.192186,53.533572"
+ id="guide3427" /><sodipodi:guide
+ orientation="0,1"
+ position="26.094419,6.1815466"
+ id="guide3429" /></sodipodi:namedview>
+
+
+
+
+
+
+<path
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ d="m 685.35166,-0.1388057 -456.989,0.15156 L 0,395.54848 228.49479,791.1605 685.35224,791.23678 913.71494,395.70105 685.35166,-0.1388057 z M 555.25335,225.19808 c 94.08172,54.31811 126.3489,174.74085 72.03079,268.82258 -54.31811,94.08173 -174.74085,126.3489 -268.82258,72.03079 C 264.37983,511.73334 232.11265,391.3106 286.43076,297.22887 340.74887,203.14715 461.17162,170.87996 555.25335,225.19808 z"
+ id="path3475"
+ inkscape:connector-curvature="0" /></svg> \ No newline at end of file
diff --git a/main/project/settings/svgs/pen.svg b/main/project/settings/svgs/pen.svg
new file mode 100644
index 0000000..9a69a47
--- /dev/null
+++ b/main/project/settings/svgs/pen.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="565.43353"
+ height="565.43353"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="pen.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#008a0c"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.89019608"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="361.93719"
+ inkscape:cy="198.12064"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(371.93719,-165.0493)">
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ d="m 41.795291,165.0493 -400.377121,400.37711 -1.23508,0.0907 -0.0907,1.23508 -0.33146,0.33145 0.28608,0.28609 -11.9842,163.11311 163.13219,-11.96513 0.26701,0.26701 0.30936,-0.30936 1.27625,-0.0938 0.0938,-1.27625 L 193.49637,316.75037 41.795291,165.0493 z"
+ id="rect3107"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/main/project/settings/svgs/sdcard.svg b/main/project/settings/svgs/sdcard.svg
new file mode 100644
index 0000000..7177dce
--- /dev/null
+++ b/main/project/settings/svgs/sdcard.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="565.6875"
+ height="754.28125"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="sdcard.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#008a0c"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.89019608"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="361.41518"
+ inkscape:cy="478.5887"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1301"
+ inkscape:window-height="744"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:guide-bbox="true">
+ <sodipodi:guide
+ orientation="1,0"
+ position="500,280"
+ id="guide3029" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(371.41518,-256.66965)">
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ d="M 42.84375 0 C 19.100893 0 0 19.100892 0 42.84375 L 0 711.40625 C 0 735.1491 19.100893 754.28125 42.84375 754.28125 L 522.84375 754.28125 C 546.58661 754.28125 565.6875 735.1491 565.6875 711.40625 L 565.6875 127.8125 L 437.875 0 L 42.84375 0 z M 97.125 57.125 C 114.53643 57.125 128.5625 71.151071 128.5625 88.5625 L 128.5625 157.125 C 128.5625 174.53643 114.53643 188.5625 97.125 188.5625 C 79.713571 188.5625 65.6875 174.53643 65.6875 157.125 L 65.6875 88.5625 C 65.6875 71.151071 79.713571 57.125 97.125 57.125 z M 220 57.125 C 237.41143 57.125 251.40625 71.151071 251.40625 88.5625 L 251.40625 157.125 C 251.40625 174.53643 237.41143 188.5625 220 188.5625 C 202.58857 188.5625 188.5625 174.53643 188.5625 157.125 L 188.5625 88.5625 C 188.5625 71.151071 202.58857 57.125 220 57.125 z M 342.84375 57.125 C 360.25518 57.125 374.28125 71.151071 374.28125 88.5625 L 374.28125 157.125 C 374.28125 174.53643 360.25518 188.5625 342.84375 188.5625 C 325.43232 188.5625 311.40625 174.53643 311.40625 157.125 L 311.40625 88.5625 C 311.40625 71.151071 325.43232 57.125 342.84375 57.125 z M 468.5625 117.125 C 485.9739 117.125 500 131.15107 500 148.5625 L 500 217.125 C 500 234.53643 485.9739 248.5625 468.5625 248.5625 C 451.1511 248.5625 437.125 234.53643 437.125 217.125 L 437.125 148.5625 C 437.125 131.15107 451.1511 117.125 468.5625 117.125 z M 110 502.84375 L 455.6875 502.84375 C 479.43036 502.84375 498.5625 521.94464 498.5625 545.6875 L 498.5625 642.84375 C 498.5625 666.58661 479.43036 685.6875 455.6875 685.6875 L 110 685.6875 C 86.257143 685.6875 67.125 666.58661 67.125 642.84375 L 67.125 545.6875 C 67.125 521.94464 86.257143 502.84375 110 502.84375 z "
+ transform="translate(-371.41518,256.66965)"
+ id="rect3133" />
+ </g>
+</svg>
diff --git a/main/res/drawable-hdpi/ic_menu_start_conversation.png b/main/res/drawable-hdpi/ic_menu_start_conversation.png
index 395a5ec..d63d3a7 100644
--- a/main/res/drawable-hdpi/ic_menu_start_conversation.png
+++ b/main/res/drawable-hdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_start_conversation.png b/main/res/drawable-mdpi/ic_menu_start_conversation.png
index 24b6540..aadcc2f 100644
--- a/main/res/drawable-mdpi/ic_menu_start_conversation.png
+++ b/main/res/drawable-mdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_arrow_black.png b/main/res/drawable-mdpi/settings_arrow_black.png
new file mode 100644
index 0000000..486f456
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_arrow_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_arrow_white.png b/main/res/drawable-mdpi/settings_arrow_white.png
new file mode 100644
index 0000000..4d36438
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_arrow_white.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_cloud_black.png b/main/res/drawable-mdpi/settings_cloud_black.png
new file mode 100644
index 0000000..e162a32
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_cloud_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_cloud_white.png b/main/res/drawable-mdpi/settings_cloud_white.png
new file mode 100644
index 0000000..385623c
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_cloud_white.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_details_black.png b/main/res/drawable-mdpi/settings_details_black.png
new file mode 100644
index 0000000..e40ed0a
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_details_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_details_white.png b/main/res/drawable-mdpi/settings_details_white.png
new file mode 100644
index 0000000..84c5145
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_details_white.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_eye_black.png b/main/res/drawable-mdpi/settings_eye_black.png
new file mode 100644
index 0000000..785cd4d
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_eye_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_eye_white.png b/main/res/drawable-mdpi/settings_eye_white.png
new file mode 100644
index 0000000..5edb416
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_eye_white.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_info_icon_black.png b/main/res/drawable-mdpi/settings_info_icon_black.png
new file mode 100644
index 0000000..f0e31af
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_info_icon_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_info_icon_white.png b/main/res/drawable-mdpi/settings_info_icon_white.png
new file mode 100644
index 0000000..0fdca9d
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_info_icon_white.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_map_black.png b/main/res/drawable-mdpi/settings_map_black.png
new file mode 100644
index 0000000..db326da
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_map_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_map_white.png b/main/res/drawable-mdpi/settings_map_white.png
new file mode 100644
index 0000000..b2a95ab
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_map_white.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_nut_black.png b/main/res/drawable-mdpi/settings_nut_black.png
new file mode 100644
index 0000000..e69d180
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_nut_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_nut_white.png b/main/res/drawable-mdpi/settings_nut_white.png
new file mode 100644
index 0000000..75481b8
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_nut_white.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_pen_black.png b/main/res/drawable-mdpi/settings_pen_black.png
new file mode 100644
index 0000000..dde10bb
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_pen_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_pen_white.png b/main/res/drawable-mdpi/settings_pen_white.png
new file mode 100644
index 0000000..50a8644
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_pen_white.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_sdcard_black.png b/main/res/drawable-mdpi/settings_sdcard_black.png
new file mode 100644
index 0000000..b1c371b
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_sdcard_black.png
Binary files differ
diff --git a/main/res/drawable-mdpi/settings_sdcard_white.png b/main/res/drawable-mdpi/settings_sdcard_white.png
new file mode 100644
index 0000000..693f555
--- /dev/null
+++ b/main/res/drawable-mdpi/settings_sdcard_white.png
Binary files differ
diff --git a/main/res/layout-land/compass_activity.xml b/main/res/layout-land/compass_activity.xml
index e433814..00e12bf 100644
--- a/main/res/layout-land/compass_activity.xml
+++ b/main/res/layout-land/compass_activity.xml
@@ -120,4 +120,4 @@
android:padding="4dip" />
</LinearLayout>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/main/res/layout/about_activity.xml b/main/res/layout/about_activity.xml
index 7d7d0b6..6925c63 100644
--- a/main/res/layout/about_activity.xml
+++ b/main/res/layout/about_activity.xml
@@ -218,14 +218,27 @@
</RelativeLayout>
<TextView
- android:id="@+id/changelog"
+ android:id="@+id/changelog_master"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_margin="7dip"
android:linksClickable="true"
android:paddingLeft="3dip"
- android:text="@string/changelog"
+ android:text="@string/changelog_master"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="12sp" />
+
+ <TextView
+ android:id="@+id/changelog_release"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_margin="7dip"
+ android:linksClickable="true"
+ android:paddingLeft="3dip"
+ android:text="@string/changelog_release"
android:textColor="?text_color"
android:textColorLink="?text_color_link"
android:textSize="12sp" />
@@ -254,4 +267,4 @@
</LinearLayout>
</ScrollView>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/main/res/layout/cachedetail_description_page.xml b/main/res/layout/cachedetail_description_page.xml
index 5c05c20..dba6789 100644
--- a/main/res/layout/cachedetail_description_page.xml
+++ b/main/res/layout/cachedetail_description_page.xml
@@ -11,7 +11,7 @@
<!-- Short description -->
- <TextView
+ <cgeo.geocaching.ui.IndexOutOfBoundsAvoidingTextView
android:id="@+id/shortdesc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -25,7 +25,7 @@
<!-- Long description -->
- <TextView
+ <cgeo.geocaching.ui.IndexOutOfBoundsAvoidingTextView
android:id="@+id/longdesc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -134,6 +134,10 @@
android:id="@+id/edit_personalnote"
style="@style/button_small"
android:text="@string/cache_personal_note_edit" />
+ <Button
+ android:id="@+id/upload_personalnote"
+ style="@style/button_small"
+ android:text="@string/cache_personal_note_upload" />
</LinearLayout>
</LinearLayout>
diff --git a/main/res/layout/compass_activity.xml b/main/res/layout/compass_activity.xml
index b994b70..49990fd 100644
--- a/main/res/layout/compass_activity.xml
+++ b/main/res/layout/compass_activity.xml
@@ -1,115 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
android:orientation="vertical" >
- <LinearLayout
- android:id="@+id/info1"
+ <include layout="@layout/actionbar" />
+
+ <RelativeLayout
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="fill_parent"
android:orientation="vertical" >
-
- <TextView
- android:id="@+id/destination"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:textColor="?text_color"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/cacheinfo"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:textColor="?text_color"
- android:textSize="14sp" />
-
- <RelativeLayout
+
+ <LinearLayout
+ android:id="@+id/info1"
android:layout_width="fill_parent"
- android:layout_height="30dip" >
-
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
<TextView
- android:id="@+id/heading"
+ android:id="@+id/destination"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_gravity="left"
- android:layout_marginLeft="3dip"
- android:text="@null"
+ android:layout_gravity="center"
android:textColor="?text_color"
- android:textSize="26sp" />
-
+ android:textSize="14sp" />
+
<TextView
- android:id="@+id/distance"
+ android:id="@+id/cacheinfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_gravity="right"
- android:layout_marginRight="3dip"
- android:text="@null"
+ android:layout_gravity="center"
android:textColor="?text_color"
- android:textSize="26sp" />
- </RelativeLayout>
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/info2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_marginLeft="6dip"
- android:layout_marginRight="6dip"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/nav_location"
- style="@style/location_current"
- android:text="@string/loc_trying" />
-
- <RelativeLayout
+ android:textSize="14sp" />
+
+ <RelativeLayout
+ android:layout_width="fill_parent"
+ android:layout_height="30dip" >
+
+ <TextView
+ android:id="@+id/heading"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_gravity="left"
+ android:layout_marginLeft="3dip"
+ android:text="@null"
+ android:textColor="?text_color"
+ android:textSize="26sp" />
+
+ <TextView
+ android:id="@+id/distance"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_gravity="right"
+ android:layout_marginRight="3dip"
+ android:text="@null"
+ android:textColor="?text_color"
+ android:textSize="26sp" />
+ </RelativeLayout>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/info2"
android:layout_width="fill_parent"
- android:layout_height="16dip" >
-
- <TextView
- android:id="@+id/nav_type"
- style="@style/location_current_type"
- android:textColor="?text_color_grey"
- android:textIsSelectable="false" />
-
- <TextView
- android:id="@+id/nav_accuracy"
- style="@style/location_current_accuracy"
- android:textColor="?text_color_grey"
- android:textIsSelectable="false" />
-
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_marginLeft="6dip"
+ android:layout_marginRight="6dip"
+ android:orientation="vertical" >
+
<TextView
- android:id="@+id/nav_satellites"
- style="@style/location_current_satellites"
- android:textColor="?text_color_grey"
- android:textIsSelectable="false" />
- </RelativeLayout>
- </LinearLayout>
-
- <view
- android:id="@+id/rose"
- android:layout_width="fill_parent"
- android:layout_height="295dip"
- android:layout_above="@id/info2"
- android:layout_below="@id/info1"
- android:layout_centerInParent="true"
- android:layout_gravity="center_horizontal"
- android:layout_marginBottom="1dip"
- android:layout_marginLeft="1dip"
- android:layout_marginRight="1dip"
- android:layout_marginTop="6dip"
- class="cgeo.geocaching.ui.CompassView"
- android:gravity="center"
- android:keepScreenOn="true"
- android:minHeight="289dip"
- android:minWidth="289dip"
- android:padding="4dip" />
+ android:id="@+id/nav_location"
+ style="@style/location_current"
+ android:text="@string/loc_trying" />
+
+ <RelativeLayout
+ android:layout_width="fill_parent"
+ android:layout_height="16dip" >
+
+ <TextView
+ android:id="@+id/nav_type"
+ style="@style/location_current_type"
+ android:textColor="?text_color_grey"
+ android:textIsSelectable="false" />
+
+ <TextView
+ android:id="@+id/nav_accuracy"
+ style="@style/location_current_accuracy"
+ android:textColor="?text_color_grey"
+ android:textIsSelectable="false" />
+
+ <TextView
+ android:id="@+id/nav_satellites"
+ style="@style/location_current_satellites"
+ android:textColor="?text_color_grey"
+ android:textIsSelectable="false" />
+ </RelativeLayout>
+ </LinearLayout>
+
+ <view
+ android:id="@+id/rose"
+ android:layout_width="fill_parent"
+ android:layout_height="295dip"
+ android:layout_above="@id/info2"
+ android:layout_below="@id/info1"
+ android:layout_centerInParent="true"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="1dip"
+ android:layout_marginLeft="1dip"
+ android:layout_marginRight="1dip"
+ android:layout_marginTop="6dip"
+ class="cgeo.geocaching.ui.CompassView"
+ android:gravity="center"
+ android:keepScreenOn="true"
+ android:minHeight="289dip"
+ android:minWidth="289dip"
+ android:padding="4dip" />
+
+ </RelativeLayout>
-</RelativeLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/main/res/layout/fieldnote_export_dialog.xml b/main/res/layout/fieldnote_export_dialog.xml
index 02ab182..9859b0f 100644
--- a/main/res/layout/fieldnote_export_dialog.xml
+++ b/main/res/layout/fieldnote_export_dialog.xml
@@ -19,7 +19,6 @@
<CheckBox
android:id="@+id/onlynew"
style="@style/checkbox_full"
- android:enabled="false"
android:text="@string/export_fieldnotes_onlynew" />
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/fragment_edit_note.xml b/main/res/layout/fragment_edit_note.xml
index 1ed5e84..1e9fbf9 100644
--- a/main/res/layout/fragment_edit_note.xml
+++ b/main/res/layout/fragment_edit_note.xml
@@ -9,7 +9,7 @@
android:id="@+id/note"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:imeOptions="actionDone"
- android:inputType="text" />
+ android:inputType="textMultiLine"
+ android:lines="8" />
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/log_signature_preference_dialog.xml b/main/res/layout/log_signature_preference_dialog.xml
new file mode 100644
index 0000000..a5048a4
--- /dev/null
+++ b/main/res/layout/log_signature_preference_dialog.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="8dp"
+ android:orientation="vertical" >
+
+ <TextView
+ android:text="@string/init_signature_help_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="8dp"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+
+ <EditText
+ android:id="@+id/signature_dialog_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/init_signature"
+ android:inputType="textMultiLine|textCapSentences"
+ android:gravity="top|left"
+ android:minLines="3"
+ android:singleLine="false" />
+
+ <Button
+ android:id="@+id/signature_templates"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ android:layout_gravity="right"
+ android:text="@string/init_signature_template_button" />
+
+</LinearLayout>
diff --git a/main/res/layout/logcache_activity.xml b/main/res/layout/logcache_activity.xml
index e0294da..4bbb441 100644
--- a/main/res/layout/logcache_activity.xml
+++ b/main/res/layout/logcache_activity.xml
@@ -58,6 +58,29 @@
android:singleLine="false" />
<LinearLayout
+ android:id="@+id/log_password_box"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="5dip"
+ android:orientation="vertical"
+ android:visibility="gone" >
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="left"
+ android:padding="10dip"
+ android:text="@string/log_password_title"
+ android:textColor="?text_color"
+ android:textSize="22sp" />
+ <EditText
+ android:id="@+id/log_password"
+ style="@style/edittext_full"
+ android:hint="@string/log_hint_log_password"
+ android:inputType="text"
+ android:singleLine="true" />
+ </LinearLayout>
+
+ <LinearLayout
android:id="@+id/tweet_box"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
diff --git a/main/res/layout/cachedetail_logs_page.xml b/main/res/layout/logs_page.xml
index 9aafd83..9aafd83 100644
--- a/main/res/layout/cachedetail_logs_page.xml
+++ b/main/res/layout/logs_page.xml
diff --git a/main/res/layout/main_activity.xml b/main/res/layout/main_activity.xml
index 11827a4..581dab4 100644
--- a/main/res/layout/main_activity.xml
+++ b/main/res/layout/main_activity.xml
@@ -36,18 +36,11 @@
android:orientation="vertical" >
<LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_margin="4dip"
- android:gravity="center_horizontal"
- android:orientation="horizontal" >
+ style="@style/icon_mainscreen_row" >
<LinearLayout
- android:layout_width="74dip"
- android:layout_height="wrap_content"
- android:layout_margin="4dip"
- android:onClick="cgeoFindOnMap"
- android:orientation="vertical" >
+ style="@style/icon_mainscreen_cell"
+ android:onClick="cgeoFindOnMap" >
<ImageView
android:id="@+id/map"
@@ -60,10 +53,7 @@
</LinearLayout>
<LinearLayout
- android:layout_width="74dip"
- android:layout_height="wrap_content"
- android:layout_margin="4dip"
- android:orientation="vertical" >
+ style="@style/icon_mainscreen_cell" >
<ImageView
android:id="@+id/nearest"
@@ -87,10 +77,7 @@
android:textIsSelectable="false" />
<LinearLayout
- android:layout_width="74dip"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:orientation="vertical" >
+ style="@style/icon_mainscreen_cell_counter" >
<ImageView
android:id="@+id/search_offline"
@@ -105,18 +92,11 @@
</LinearLayout>
<LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_margin="4dip"
- android:gravity="center_horizontal"
- android:orientation="horizontal" >
+ style="@style/icon_mainscreen_row" >
<LinearLayout
- android:layout_width="74dip"
- android:layout_height="wrap_content"
- android:layout_margin="4dip"
- android:onClick="cgeoSearch"
- android:orientation="vertical" >
+ style="@style/icon_mainscreen_cell"
+ android:onClick="cgeoSearch" >
<ImageView
android:id="@+id/advanced_button"
@@ -129,11 +109,8 @@
</LinearLayout>
<LinearLayout
- android:layout_width="74dip"
- android:layout_height="wrap_content"
- android:layout_margin="4dip"
- android:onClick="cgeoPoint"
- android:orientation="vertical" >
+ style="@style/icon_mainscreen_cell"
+ android:onClick="cgeoPoint" >
<ImageView
android:id="@+id/any_button"
@@ -146,11 +123,8 @@
</LinearLayout>
<LinearLayout
- android:layout_width="74dip"
- android:layout_height="wrap_content"
- android:layout_margin="4dip"
- android:onClick="cgeoFilter"
- android:orientation="vertical" >
+ style="@style/icon_mainscreen_cell"
+ android:onClick="cgeoFilter" >
<ImageView
android:id="@+id/filter_button"
@@ -175,17 +149,11 @@
android:onClick="cgeoNavSettings"
android:orientation="vertical" >
- <TextView
- android:id="@+id/user_info_gc"
- style="@style/location_current"
- android:text="@string/init_login_popup_working"
- android:visibility="gone" />
-
- <TextView
- android:id="@+id/user_info_ocde"
- style="@style/location_current"
- android:text="@string/init_login_popup_working"
- android:visibility="gone" />
+ <LinearLayout
+ android:id="@+id/info_area"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" />
<TextView
android:id="@+id/nav_location"
diff --git a/main/res/layout/main_activity_connectorstatus.xml b/main/res/layout/main_activity_connectorstatus.xml
new file mode 100644
index 0000000..33c4d79
--- /dev/null
+++ b/main/res/layout/main_activity_connectorstatus.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/location_current"
+ android:text="@string/init_login_popup_working" />
diff --git a/main/res/layout/preference_info_icon.xml b/main/res/layout/preference_info_icon.xml
new file mode 100644
index 0000000..4de0a15
--- /dev/null
+++ b/main/res/layout/preference_info_icon.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:src="?attr/settings_info_icon" />
diff --git a/main/res/layout/settings_activity.xml b/main/res/layout/settings_activity.xml
deleted file mode 100644
index ae70fa7..0000000
--- a/main/res/layout/settings_activity.xml
+++ /dev/null
@@ -1,853 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="?background_color"
- android:orientation="vertical" >
-
- <include layout="@layout/actionbar" />
-
- <ScrollView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_geocaching" />
- </RelativeLayout>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_margin="3dip"
- android:orientation="horizontal"
- android:padding="3dip" >
-
- <CheckBox
- android:id="@+id/gc_option"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:gravity="center"
- android:padding="1dip" />
-
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:gravity="left"
- android:paddingRight="3dip"
- android:text="@string/init_gc_activate"
- android:textColor="?text_color"
- android:textSize="14sp" />
- </LinearLayout>
-
- <TextView
- android:id="@+id/legal_note"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/legal_note"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <EditText
- android:id="@+id/username"
- style="@style/edittext_full"
- android:hint="@string/init_username" />
-
- <EditText
- android:id="@+id/password"
- style="@style/edittext_full"
- android:hint="@string/init_password"
- android:inputType="textPassword" />
-
- <Button
- android:id="@+id/log_me_in"
- style="@style/button_full"
- android:lines="2"
- android:scrollHorizontally="false"
- android:singleLine="false"
- android:text="@string/init_login" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_oc" />
- </RelativeLayout>
-
- <CheckBox
- android:id="@+id/oc_option"
- style="@style/checkbox_full"
- android:text="@string/init_oc_activate" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:padding="3dip"
- android:text="@string/init_oc_de_description"
- android:textColor="?text_color"
- android:textSize="14sp" />
-
- <Button
- android:id="@+id/register_oc_de"
- style="@style/button_full"
- android:text="@string/init_register_oc_de" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_gcvote" />
- </RelativeLayout>
-
- <EditText
- android:id="@+id/passvote"
- style="@style/edittext_full"
- android:hint="@string/init_passvote"
- android:inputType="textPassword" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_twitter" />
- </RelativeLayout>
-
- <TextView
- android:id="@+id/about_twitter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/about_twitter"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <Button
- android:id="@+id/authorize_twitter"
- style="@style/button_full"
- android:text="@string/init_twitter_authorize" />
-
- <CheckBox
- android:id="@+id/twitter_option"
- style="@style/checkbox_full"
- android:text="@string/init_twitter_publish" />
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_signature" />
- </RelativeLayout>
-
- <EditText
- android:id="@+id/signature"
- style="@style/edittext_full"
- android:layout_height="wrap_content"
- android:hint="@string/init_signature"
- android:inputType="textMultiLine|textCapSentences"
- android:minLines="3"
- android:singleLine="false" />
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/signature_template"
- style="@style/button_full"
- android:layout_width="wrap_content"
- android:layout_weight="2"
- android:text="@string/init_signature_template_button"
- android:textSize="14sp" />
-
- <Button
- android:id="@+id/signature_help"
- style="@style/button_full"
- android:layout_width="wrap_content"
- android:layout_weight="1"
- android:text="@string/init_signature_help_button"
- android:textSize="14sp" />
- </LinearLayout>
-
- <CheckBox
- android:id="@+id/sigautoinsert"
- style="@style/checkbox_full"
- android:text="@string/init_sigautoinsert" />
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_details" />
- </RelativeLayout>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_margin="3dip"
- android:orientation="vertical"
- android:padding="3dip" >
-
- <CheckBox
- android:id="@+id/autoload"
- style="@style/checkbox_full"
- android:text="@string/init_autoload" />
-
- <CheckBox
- android:id="@+id/ratingwanted"
- style="@style/checkbox_full"
- android:text="@string/init_ratingwanted" />
-
- <CheckBox
- android:id="@+id/elevationwanted"
- style="@style/checkbox_full"
- android:text="@string/init_elevationwanted" />
-
- <CheckBox
- android:id="@+id/friendlogswanted"
- style="@style/checkbox_full"
- android:text="@string/init_friendlogswanted" />
-
- <CheckBox
- android:id="@+id/openlastdetailspage"
- style="@style/checkbox_full"
- android:text="@string/init_openlastdetailspage" />
-
- <CheckBox
- android:id="@+id/offline"
- style="@style/checkbox_full"
- android:text="@string/init_offline" />
-
- <CheckBox
- android:id="@+id/offline_wp"
- style="@style/checkbox_full"
- android:text="@string/init_offline_wp" />
-
- <CheckBox
- android:id="@+id/save_log_img"
- style="@style/checkbox_full"
- android:text="@string/init_save_log_img" />
- </LinearLayout>
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_other" />
- </RelativeLayout>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_margin="3dip"
- android:orientation="vertical"
- android:padding="3dip" >
-
- <CheckBox
- android:id="@+id/skin"
- style="@style/checkbox_full"
- android:text="@string/init_skin" />
-
- <CheckBox
- android:id="@+id/address"
- style="@style/checkbox_full"
- android:text="@string/init_address" />
-
- <CheckBox
- android:id="@+id/captcha"
- style="@style/checkbox_full"
- android:text="@string/init_captcha" />
-
- <CheckBox
- android:id="@+id/livelist"
- style="@style/checkbox_full"
- android:text="@string/init_livelist" />
-
- <CheckBox
- android:id="@+id/loaddirectionimg"
- style="@style/checkbox_full"
- android:text="@string/init_loaddirectionimg" />
-
- <CheckBox
- android:id="@+id/useenglish"
- style="@style/checkbox_full"
- android:text="@string/init_useenglish" />
-
- <CheckBox
- android:id="@+id/units"
- style="@style/checkbox_full"
- android:text="@string/init_units" />
-
- <CheckBox
- android:id="@+id/exclude"
- style="@style/checkbox_full"
- android:text="@string/init_exclude" />
-
- <CheckBox
- android:id="@+id/disabled"
- style="@style/checkbox_full"
- android:text="@string/init_disabled" />
-
- <CheckBox
- android:id="@+id/trackautovisit"
- style="@style/checkbox_full"
- android:text="@string/init_trackautovisit" />
-
- <CheckBox
- android:id="@+id/log_offline"
- style="@style/checkbox_full"
- android:text="@string/init_log_offline" />
-
- <CheckBox
- android:id="@+id/choose_list"
- style="@style/checkbox_full"
- android:text="@string/init_choose_list" />
-
- <CheckBox
- android:id="@+id/trail"
- style="@style/checkbox_full"
- android:text="@string/init_maptrail" />
-
- <CheckBox
- android:id="@+id/plain_logs"
- style="@style/checkbox_full"
- android:text="@string/init_plain_logs" />
-
- <CheckBox
- android:id="@+id/use_native_ua"
- style="@style/checkbox_full"
- android:text="@string/init_use_native_ua" />
- </LinearLayout>
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_showwaypoints" />
- </RelativeLayout>
-
- <EditText
- android:id="@+id/showwaypointsthreshold"
- style="@style/edittext_full"
- android:inputType="number"
- android:lines="1"
- android:scrollHorizontally="true"
- android:singleLine="true" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_showwaypoint_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
- <!-- maps -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_mapsources" />
- </RelativeLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:autoLink="web"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_mapsources_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <Spinner
- android:id="@+id/mapsource"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/init_mapsource_select" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:autoLink="web"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_map_directory_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <LinearLayout
- android:id="@+id/init_mapdir_group"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/select_map_directory"
- style="@style/button_full"
- android:layout_width="wrap_content"
- android:text="@string/init_select_map_directory" />
-
- <EditText
- android:id="@+id/map_directory"
- style="@style/edittext_full"
- android:inputType="textNoSuggestions"
- android:lines="1"
- android:scrollHorizontally="true"
- android:singleLine="true" />
- </LinearLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:gravity="left"
- android:padding="3dip"
- android:text="@string/init_rendertheme_folder"
- android:textColor="?text_color"
- android:textSize="14sp" />
-
- <LinearLayout
- android:id="@+id/init_themefilegroup"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/select_themefolder"
- style="@style/button_full"
- android:layout_width="wrap_content"
- android:text="@string/init_select_themefolder" />
-
- <EditText
- android:id="@+id/themefolder"
- style="@style/edittext_full"
- android:inputType="textNoSuggestions"
- android:lines="1"
- android:scrollHorizontally="true"
- android:singleLine="true" />
- </LinearLayout>
-
- <!-- GPX -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_gpx_exportdir" />
- </RelativeLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:autoLink="web"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_gpx_exportdir_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <LinearLayout
- android:id="@+id/init_gpx_export_group"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/select_gpx_exportdir"
- style="@style/button_full"
- android:layout_width="wrap_content"
- android:text="@string/init_select_gpx_exportdir" />
-
- <EditText
- android:id="@+id/gpx_exportdir"
- style="@style/edittext_full"
- android:inputType="textNoSuggestions"
- android:lines="1"
- android:scrollHorizontally="true"
- android:singleLine="true" />
- </LinearLayout>
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_gpx_importdir" />
- </RelativeLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:autoLink="web"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_gpx_importdir_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <LinearLayout
- android:id="@+id/init_gpx_import_group"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/select_gpx_importdir"
- style="@style/button_full"
- android:layout_width="wrap_content"
- android:text="@string/init_select_gpx_importdir" />
-
- <EditText
- android:id="@+id/gpx_importdir"
- style="@style/edittext_full"
- android:inputType="textNoSuggestions"
- android:lines="1"
- android:scrollHorizontally="true"
- android:singleLine="true" />
- </LinearLayout>
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_altitude" />
- </RelativeLayout>
-
- <EditText
- android:id="@+id/altitude"
- style="@style/edittext_full"
- android:inputType="numberSigned"
- android:lines="1"
- android:scrollHorizontally="true"
- android:singleLine="true" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_altitude_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_default_navigation_tool" />
- </RelativeLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_default_navigation_tool_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <Spinner
- android:id="@+id/default_navigation_tool"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/init_default_navigation_tool_select" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_default_navigation_tool_2_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <Spinner
- android:id="@+id/default_navigation_tool_2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/init_default_navigation_tool_select" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_sendToCgeo" />
- </RelativeLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_sendToCgeo_name"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <EditText
- android:id="@+id/webDeviceName"
- style="@style/edittext_full"
- android:inputType="textNoSuggestions"
- android:lines="1"
- android:maxLength="15"
- android:scrollHorizontally="true"
- android:singleLine="true" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:autoLink="web"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_sendToCgeo_description"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <Button
- android:id="@+id/sendToCgeo_register"
- style="@style/button_full"
- android:text="@string/init_sendToCgeo_register" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_backup" />
- </RelativeLayout>
-
- <TextView
- android:id="@+id/backup_last"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@null"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_margin="3dip"
- android:orientation="horizontal"
- android:padding="3dip" >
-
- <Button
- android:id="@+id/backup_backup"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:onClick="backup"
- android:text="@string/init_backup_backup" />
-
- <Button
- android:id="@+id/backup_restore"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:onClick="restore"
- android:text="@string/init_backup_restore" />
- </LinearLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_backup_note"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_dbonsdcard_title" />
- </RelativeLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_dbonsdcard_note"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <CheckBox
- android:id="@+id/dbonsdcard"
- style="@style/checkbox_full"
- android:text="@string/init_dbonsdcard" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/init_debug_title" />
- </RelativeLayout>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:linksClickable="true"
- android:padding="3dip"
- android:text="@string/init_debug_note"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <CheckBox
- android:id="@+id/debug"
- style="@style/checkbox_full"
- android:text="@string/init_debug" />
- </LinearLayout>
- </ScrollView>
-
-</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/simple_dir_chooser.xml b/main/res/layout/simple_dir_chooser.xml
index 7c9d95a..f7e03d8 100644
--- a/main/res/layout/simple_dir_chooser.xml
+++ b/main/res/layout/simple_dir_chooser.xml
@@ -34,7 +34,7 @@
</LinearLayout>
<ListView
- android:id="@+id/android:list"
+ android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="100" />
diff --git a/main/res/layout/text_preference.xml b/main/res/layout/text_preference.xml
new file mode 100644
index 0000000..818b2f3
--- /dev/null
+++ b/main/res/layout/text_preference.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/textPreferenceText"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ <TextView
+ android:id="@+id/textPreferenceSummary"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ android:visibility="gone"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+
+</LinearLayout>
diff --git a/main/res/layout/trackable_logs_view.xml b/main/res/layout/trackable_logs_view.xml
deleted file mode 100644
index 0f89c31..0000000
--- a/main/res/layout/trackable_logs_view.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ListView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:cacheColorHint="?background_color"
- android:divider="?background_color"
- android:fastScrollEnabled="true"
- android:focusable="false"
- android:footerDividersEnabled="false"
- android:headerDividersEnabled="false"
- android:listSelector="?background_color" >
-
-</ListView> \ No newline at end of file
diff --git a/main/res/layout/wp_threshold_preference.xml b/main/res/layout/wp_threshold_preference.xml
new file mode 100644
index 0000000..22ffe9a
--- /dev/null
+++ b/main/res/layout/wp_threshold_preference.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:paddingTop="8dp" >
+
+ <SeekBar
+ android:id="@+id/wp_threshold_seekbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:paddingRight="8dp"
+ android:layout_weight="1" />
+
+ <TextView
+ android:id="@+id/wp_threshold_value_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:layout_weight="5" />
+
+</LinearLayout>
diff --git a/main/res/menu/map_activity.xml b/main/res/menu/map_activity.xml
index df8fe09..d81a49b 100644
--- a/main/res/menu/map_activity.xml
+++ b/main/res/menu/map_activity.xml
@@ -39,6 +39,11 @@
android:title="@string/map_circles_hide">
</item>
<item
+ android:id="@+id/menu_mycaches_mode"
+ android:icon="@android:drawable/ic_menu_myplaces"
+ android:title="@string/map_mycaches_hide">
+ </item>
+ <item
android:id="@+id/menu_theme_mode"
android:icon="@drawable/ic_menu_preferences"
android:title="@string/map_theme_select">
diff --git a/main/res/menu/settings_activity_options.xml b/main/res/menu/settings_activity_options.xml
deleted file mode 100644
index d2baf9b..0000000
--- a/main/res/menu/settings_activity_options.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item
- android:id="@+id/menu_clear"
- android:icon="@drawable/ic_menu_delete"
- android:title="@string/init_clear">
- </item>
-
-</menu> \ No newline at end of file
diff --git a/main/res/values-cs/strings.xml b/main/res/values-cs/strings.xml
index e30f97b..2b7d195 100644
--- a/main/res/values-cs/strings.xml
+++ b/main/res/values-cs/strings.xml
@@ -2,13 +2,12 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo Kompas</string>
<!-- basics -->
<string name="cache">Keš</string>
<string name="detail">Detail</string>
<string name="search">Vyhledávání</string>
- <string name="settings">Nastavení</string>
+ <string name="settings_titlebar">c:geo Nastavení</string>
<string name="helpers">Užitečné aplikace</string>
<string name="about">O aplikaci</string>
<string name="latitude">Zeměpisná šířka</string>
@@ -166,7 +165,6 @@
<string name="err_auth_initialize">c:geo nedokázalo zahájit autorizační proces.</string>
<string name="err_auth_process">Autorizační proces selhal.</string>
<string name="err_cannot_log_visit">c:geo nemůže zapsat log. Prosím, zaloguj svou návštěvu z obrazovky detailů keše.</string>
- <string name="err_init_cleared">c:geo nemůže vymazat přihlašovací údaje.</string>
<string name="err_download_fail">c:geo nedokázalo stáhnout keš.</string>
<string name="err_dwld_details_failed">c:geo nedokázalo stáhnout detaily keše.</string>
<string name="err_load_descr_failed">c:geo nemůže načíst popis.</string>
@@ -353,26 +351,22 @@
<string name="about_contributors">Přispívající</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
- <string name="init_gc_activate">Aktivace Geocaching.com na Aktivní mapě a ve vyhledávání</string>
+ <string name="settings_title_gc">Geocaching.com</string>
+ <string name="settings_activate_gc">Aktivace</string>
<string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">Aktivace opencaching.de na Aktivní mapě a ve vyhledávání</string>
+ <string name="settings_activate_oc">Aktivace opencaching.de na Aktivní mapě a ve vyhledávání</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">Uživatelské jméno</string>
<string name="init_password">Heslo</string>
- <string name="init_passvote">Heslo</string>
- <string name="init_login">Zkontrolovat a uložit</string>
+ <string name="init_login">Zkontrolovat</string>
<string name="init_login_popup">Přihlášení</string>
<string name="init_login_popup_working">Přihlašování…</string>
<string name="init_login_popup_ok">Přihlášení bylo úspěšné</string>
<string name="init_login_popup_failed">Přihlášení selhalo</string>
<string name="init_login_popup_failed_reason">Přihlášení se nezdařilo, protože:</string>
<string name="init_twitter_authorize">Autorizovat c:geo</string>
- <string name="init_twitter_publish">Publikovat stav při nálezu keše</string>
<string name="init_signature">Podpis</string>
- <string name="init_signature_help_button">Nápověda</string>
- <string name="init_signature_help_title">Tipy a triky k podpisu</string>
<string name="init_signature_help_text">Zadej podpis k použití při logování.\nSpeciální řetězce, které můžeš použít jsou: [DATE] , [TIME], [DATETIME], [USER] &amp; [NUMBER].\nTyto řetězce budou nahrazeny při vkládání podpisu do Logu.</string>
<string name="init_signature_template_button">Vložit šablonu</string>
<string name="init_signature_template_date">Datum</string>
@@ -381,32 +375,42 @@
<string name="init_signature_template_user">Uživatel</string>
<string name="init_signature_template_number">Číslo nálezu</string>
<string name="init_signature_template_owner">Vlastník</string>
- <string name="init_details">Detaily keše</string>
<string name="init_ratingwanted">Načítat hodnocení keše z GCvote.com</string>
- <string name="init_elevationwanted">Načítat výšková data keše</string>
+ <string name="init_summary_ratingwanted">Načítat hodnocení keše z GCvote.com</string>
<string name="init_friendlogswanted">Načítat doplňkový Logbook s logy od kámošů</string>
+ <string name="init_summary_friendlogswanted">Načítat doplňkový Logbook s logy od kámošů</string>
<string name="init_openlastdetailspage">Otevřít detaily na naposledy použité stránce</string>
+ <string name="init_summary_openlastdetailspage">Otevřít detaily na naposledy použité stránce</string>
<string name="init_autoload">Automaticky načítat dlouhý popis</string>
- <string name="init_other">Další možnosti</string>
+ <string name="init_summary_autoload">Automaticky načítat dlouhý popis</string>
<string name="init_skin">Používat světlý vzhled\n(Vyžaduje restart)</string>
+ <string name="init_summary_skin">Používat světlý vzhled\n(Vyžaduje restart)</string>
<string name="init_address">Zobrazovat adresu na hlavní obrazovce</string>
+ <string name="init_summary_address">Zobrazovat adresu na hlavní obrazovce</string>
<string name="init_captcha">Zobrazit obrázek CAPTCHA, pokud je třeba (pouze Basic Member)</string>
+ <string name="init_summary_captcha">Zobrazit obrázek CAPTCHA, pokud je třeba (pouze Basic Member)</string>
<string name="init_useenglish">Používat angličtinu pro c:geo\n(Vyžaduje restart)</string>
+ <string name="init_summary_useenglish">Používat angličtinu pro c:geo\n(Vyžaduje restart)</string>
<string name="init_exclude">Nezobrazovat mé vlastní a nalezené keše</string>
+ <string name="init_summary_exclude">Nezobrazovat mé vlastní a nalezené keše</string>
<string name="init_showwaypoints">Zobrazovat body trasy na Aktivní mapě</string>
<string name="init_showwaypoint_description">Pokud je na mapě zobrazeno méně než zadaný počet keší, zobrazují se i jejich body trasy.</string>
<string name="init_disabled">Nezobrazovat deaktivované keše</string>
+ <string name="init_summary_disabled">Nezobrazovat deaktivované keše</string>
<string name="init_offline">Ukládat mapy pro offline použití</string>
+ <string name="init_summary_offline">Ukládat mapy pro offline použití</string>
<string name="init_offline_wp">Ukládat statické mapy k bodům trasy pro offline použití</string>
+ <string name="init_summary_offline_wp">Ukládat statické mapy k bodům trasy pro offline použití</string>
<string name="init_save_log_img">Ukládat obrázky z logů</string>
+ <string name="init_summary_save_log_img">Ukládat obrázky z logů</string>
<string name="init_units">Používat imperiální jednotky vzdálenosti</string>
+ <string name="init_summary_units">Používat imperiální jednotky vzdálenosti</string>
<string name="init_log_offline">Povolit Offline logování\n(Při logování nezobrazovat online logovací obrazovku a neodesílat Log na server)</string>
+ <string name="init_summary_log_offline">Povolit Offline logování\n(Při logování nezobrazovat online logovací obrazovku a neodesílat Log na server)</string>
<string name="init_choose_list">Ptát se na seznam pro uložení keše</string>
+ <string name="init_summary_choose_list">Ptát se na seznam pro uložení keše</string>
<string name="init_livelist">Zobrazovat směr v seznamu keší</string>
- <string name="init_altitude">Výšková korekce</string>
- <string name="init_altitude_description">Pokud Tvoje GPS špatně počítá výšku, můžeš ji korigovat zde. Stačí zadat kladné či záporné číslo v metrech.</string>
- <string name="init_clear">Smazat přihlašovací údaje</string>
- <string name="init_cleared">c:geo smazalo přihlašovací údaje.</string>
+ <string name="init_summary_livelist">Zobrazovat směr v seznamu keší</string>
<string name="init_backup">Záloha</string>
<string name="init_backup_backup">Zálohovat</string>
<string name="init_backup_running">Vytváření zálohy databáze keší…</string>
@@ -421,19 +425,18 @@
<string name="init_restore_confirm">Databáze je prázdná, chceš ji obnovit ze zálohy?</string>
<string name="init_backup_last">Dostupná záloha z</string>
<string name="init_backup_last_no">Nenalezen žádný soubor se zálohou.</string>
- <string name="init_mapsources">Mapové zdroje</string>
- <string name="init_mapsources_description">Zde můžeš vybrat zdroj map. Alternativou ke Google mapám jsou různé typy OpenStreetMap, jakož i offline mapové podklady (Více informací na <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a>).</string>
<string name="init_mapsource_select">Vyber mapový zdroj</string>
<string name="init_map_directory_description">Složka s offline mapami</string>
<string name="init_gpx_exportdir">Složka pro GPX export</string>
<string name="init_gpx_importdir">Složka pro GPX import</string>
- <string name="init_gpx_exportdir_description">Zde můžeš vybrat složku pro GPX exporty.</string>
- <string name="init_gpx_importdir_description">Zde můžeš vybrat složku pro GPX importy.</string>
<string name="init_maptrail">Zobrazit trasu na mapě</string>
+ <string name="init_summary_maptrail">Zobrazit trasu na mapě</string>
<string name="init_share_after_export">Po exportování GPX otevřít menu sdílení</string>
<string name="init_trackautovisit">Nastavit sledovatelné předměty na \"Navštíveno\" jako výchozí</string>
+ <string name="init_summary_trackautovisit">Nastavit sledovatelné předměty na \"Navštíveno\" jako výchozí</string>
<string name="init_sigautoinsert">Vkládat podpis automaticky</string>
<string name="init_loaddirectionimg">V případě potřeby stáhnout směrový obrázek (pouze Basic Member)</string>
+ <string name="init_summary_loaddirectionimg">V případě potřeby stáhnout směrový obrázek (pouze Basic Member)</string>
<string name="init_default_navigation_tool">Výchozí navigace</string>
<string name="init_default_navigation_tool_description">Zde můžeš vybrat preferovaný navigační nástroj.</string>
<string name="init_default_navigation_tool_select">Vyber nástroj</string>
@@ -443,14 +446,15 @@
<string name="init_debug">Generovat ladící informace</string>
<string name="init_dbonsdcard_title">Umístění databáze</string>
<string name="init_dbonsdcard_note">Databáze c:geo může být umístěna na SD kartě. Ušetříš tím část interní paměti, avšak za cenu případného snížení rychlosti aplikace. Bez SD karty aplikace nebude následně fungovat.</string>
- <string name="init_dbonsdcard">Databáze na SD kartě</string>
+ <string name="init_dbonsdcard">Na SD kartě</string>
<string name="init_dbmove_dbmove">Přesun databáze</string>
<string name="init_dbmove_running">Přesouvání databáze</string>
<string name="init_dbmove_success">Databáze úspěšně přesunuta.</string>
<string name="init_dbmove_failed">Přesun databáze selhal</string>
<string name="init_plain_logs">Zobrazovat logy bez barev</string>
+ <string name="init_summary_plain_logs">Zobrazovat logy bez barev</string>
<string name="init_use_native_ua">Identifikovat se jako webový prohlížeč Android. Řeší problémy v některých sítích.</string>
- <string name="init_rendertheme_folder">Složka s vlastními offline tématy map (nepovinné)</string>
+ <string name="init_summary_use_native_ua">Identifikovat se jako webový prohlížeč Android. Řeší problémy v některých sítích.</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Mapa</string>
@@ -459,7 +463,7 @@
<string name="map_source_osm_cyclemap">OSM: Cyclemap</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Poslat do c:geo</string>
- <string name="init_sendToCgeo_name">Název tvého zařízení:</string>
+ <string name="init_sendToCgeo_name">Název tvého zařízení</string>
<string name="init_sendToCgeo_description"><b>Send2cgeo</b> umožňuje stahovat keše přímo ze stránky Geocaching.com pomocí speciálního pluginu pro Firefox a Chrome. Před registrací si přečti <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Pokud chceš používat funkci send2cgeo, musíš se zaregistrovat. c:geo bude pracovat normálně i bez registrace.</string>
<string name="init_sendToCgeo_register">Požádat o registraci</string>
<string name="init_sendToCgeo_registering">Registrace tvého zařízení pro funkci Poslat do c:geo…</string>
@@ -483,6 +487,7 @@
<!-- cache -->
<plurals name="cache_counts">
<item quantity="one">Jedna keš</item>
+ <!-- please add an entry for "few" -->
<item quantity="other">%1$d keší</item>
</plurals>
@@ -525,6 +530,7 @@
<plurals name="waypoints">
<item quantity="one">1 bod trasy</item>
+ <!-- please add an entry for "few" -->
<item quantity="other">%d bodů trasy</item>
</plurals>
@@ -539,7 +545,6 @@
<string name="cache_dialog_loading_details_status_logs">Načítání logů</string>
<string name="cache_dialog_loading_details_status_waypoints">Zpracovávání bodů trasy</string>
<string name="cache_dialog_loading_details_status_gcvote">Načítání GCVote</string>
- <string name="cache_dialog_loading_details_status_elevation">Načítání údajů o nadmořské výšce</string>
<string name="cache_dialog_loading_details_status_cache">Ukládání do mezipaměti</string>
<string name="cache_dialog_loading_details_status_render">Vykreslování pohledu</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -620,7 +625,6 @@
<string name="cache_listed_on">Zveřejněno na %s</string>
<!-- editor dialog -->
- <string name="editor_save">Uložit</string>
<!-- file list base -->
<string name="file_searching_in">Hledání souborů\nv</string>
@@ -647,7 +651,6 @@
<string name="gpx_import_error_io">Nemohu načíst soubor</string>
<string name="gpx_import_error_parser">Formát souboru je chybný</string>
<string name="gpx_import_error_unexpected">Neočekávaná chyba</string>
- <string name="gpx_import_confirm">Chceš nahrát GPX soubor do c:geo?</string>
<string name="gpx_import_canceled">GPX import byl zrušen</string>
<string name="gpx_import_delete_title">Smazat soubor</string>
<string name="gpx_import_delete_message">Chceš smazat %s?</string>
@@ -1029,7 +1032,7 @@
<string name="attribute_unknown_no">Neznámý atribut negativní</string>
<!-- next things -->
- <string name="legal_note">Pro používání služeb Geocaching.com musíš souhlasit s podmínkami použití <a href="http://www.geocaching.com/about/termsofuse.aspx">společnosti Groundspeak</a></string>
+ <string name="settings_gc_legal_note">Pro používání služeb Geocaching.com musíš souhlasit s podmínkami použití společnosti Groundspeak</string>
<string name="quote">Učinit Geocaching lehčí a uživatelé línější.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -1048,11 +1051,13 @@
<string name="status_new_rc" tools:ignore="UnusedResources">Dostupný nový kandidát na vydání.\nKlepni pro instalaci.</string>
<string name="status_geocaching_change" tools:ignore="UnusedResources">Nedávné změny na geocaching.com rozbily c:geo.\nPracujeme na opravě, proveď kontrolu později.</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">Nedávné změny na geocaching.com rozbily Aktivní mapu c:geo.\nPracujeme na opravě, proveď kontrolu později.</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Pravděpodobně používáš Android starší než 2.1. Budoucí verze c:geo nemusí být k dispozici pro tvoje zařízení.</string>
<string name="clipboard_copy_ok">Zkopírováno do schránky</string>
<plurals name="days_ago">
<item quantity="one">včera</item>
+ <!-- please add an entry for "few" -->
<item quantity="other">před %d dny</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-da/strings.xml b/main/res/values-da/strings.xml
index 669db46..4b6562e 100644
--- a/main/res/values-da/strings.xml
+++ b/main/res/values-da/strings.xml
@@ -2,13 +2,12 @@
<resources>
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo kompas</string>
<!-- basics -->
<string name="cache">Cache</string>
<string name="detail">Detaljer</string>
<string name="search">Søg</string>
- <string name="settings">Indstillinger</string>
+ <string name="settings_titlebar">c:geo Indstillinger</string>
<string name="about">Om c:geo</string>
<!-- actionbar -->
@@ -29,7 +28,7 @@
<string name="lostfound">Lost &amp; found-cache</string>
<string name="ape">Project ape-cache</string>
<string name="gchq">Groundspeak hq</string>
- <string name="gps">GPS cache-udstilling</string>
+ <string name="gps">GPS adventures-udstilling</string>
<!-- waypoints -->
<string name="wp_final">Mål</string>
@@ -85,7 +84,6 @@
<string name="err_auth_initialize">Beklager, c:geo kan ikke gennemføre godkendelsen.</string>
<string name="err_auth_process">Godkendelse fejlede.</string>
<string name="err_cannot_log_visit">c:geo har ikke nok informationer til at logge besøg. Log fra "Alle detaljer".</string>
- <string name="err_init_cleared">Beklager, c:geo kan ikke slette login.</string>
<string name="err_download_fail">Beklager, c:geo kan ikke hente cachen pga. </string>
<string name="warn_save_nothing">Der er ikke noget at gemme.</string>
<string name="warn_no_cache_coord">Der er ingen cache med disse koordinater.</string>
@@ -131,26 +129,28 @@
<string name="about_donation_more">Donér\nudvikling</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">Brugernavn</string>
<string name="init_password">Password</string>
- <string name="init_passvote">Password</string>
- <string name="init_login">Check login</string>
<string name="init_twitter_authorize">Godkend c:geo</string>
- <string name="init_twitter_publish">Offentliggør status når cache er fundet</string>
<string name="init_signature">Signatur</string>
- <string name="init_other">Andre indstillinger</string>
<string name="init_skin">Light skin (genstart af c:geo nødvendig)</string>
+ <string name="init_summary_skin">Light skin (genstart af c:geo nødvendig)</string>
<string name="init_address">Vis adresse på hovedskærm</string>
+ <string name="init_summary_address">Vis adresse på hovedskærm</string>
<string name="init_exclude">Udelad egne og fundne cacher</string>
+ <string name="init_summary_exclude">Udelad egne og fundne cacher</string>
<string name="init_disabled">Udelad deaktiverede cacher</string>
+ <string name="init_summary_disabled">Udelad deaktiverede cacher</string>
<string name="init_offline">Gem kort til offlinebrug</string>
+ <string name="init_summary_offline">Gem kort til offlinebrug</string>
<string name="init_units">Benyt britiske afstandsmål</string>
+ <string name="init_summary_units">Benyt britiske afstandsmål</string>
<string name="init_autoload">Auto-indlæs lang cachebeskrivelse</string>
+ <string name="init_summary_autoload">Auto-indlæs lang cachebeskrivelse</string>
<string name="init_livelist">Vis retning til cacher i lister</string>
- <string name="init_cleared">c:geo slettede login-informationer.</string>
+ <string name="init_summary_livelist">Vis retning til cacher i lister</string>
<!-- auth -->
<string name="auth_twitter">Twitter</string>
@@ -282,7 +282,7 @@
<string name="navigation">Navigation</string>
<!-- next things -->
- <string name="legal_note">For at benytte Geocaching.com, skal betingelserne i <a href="http://www.geocaching.com/about/termsofuse.aspx">"Groundspeak disclaimer"</a> accepteres.</string>
+ <string name="settings_gc_legal_note">For at benytte Geocaching.com, skal betingelserne i "Groundspeak disclaimer" accepteres.</string>
<string name="support">Support: <a href="mailto:support@cgeo.org">support@cgeo.org</a></string>
<string name="website">Hjemmeside: <a href="http://cgeo.org/">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="http://www.facebook.com/pages/cgeo/297269860090">c:geo page</a></string>
@@ -291,4 +291,4 @@
<string name="about_auth_1">Med denne proces tillader du at <b>c:geo</b> får adgang til din Twitter.</string>
<string name="about_auth_2">Klik på \"godkend c:geo\" knappen for at starte godkendelsesprocessen. Det vil åbne Twitter i en webbrowser. Log ind på siden og tillad <b>c:geo</b> at tilgå din Twitter. Når godkendt, vil Twitter vise en PIN-kode. Denne PIN skal tastes ind i <b>c:geo</b> og bekræftes.</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-de/strings.xml b/main/res/values-de/strings.xml
index d8c0422..c675f4c 100644
--- a/main/res/values-de/strings.xml
+++ b/main/res/values-de/strings.xml
@@ -2,13 +2,11 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo Kompass</string>
<!-- basics -->
<string name="cache">Cache</string>
<string name="detail">Details</string>
<string name="search">Suche</string>
- <string name="settings">Einstellungen</string>
<string name="helpers">Nützliche Apps</string>
<string name="about">Über c:geo</string>
<string name="latitude">Breitengrad</string>
@@ -16,7 +14,8 @@
<!-- actionbar -->
<string name="action_bar_share_title">Link versenden</string>
-
+ <string name="settings_titlebar">c:geo Einstellungen</string>
+
<!-- caches -->
<string name="all_types">Alle Cachetypen</string>
<string name="traditional">Traditional-Cache</string>
@@ -33,7 +32,7 @@
<string name="lostfound">Lost &amp; Found</string>
<string name="ape">Project Ape-Cache</string>
<string name="gchq">Groundspeak HQ</string>
- <string name="gps">GPS Cache Exhibit</string>
+ <string name="gps">GPS Adventures Exhibit</string>
<string name="block">Groundspeak Block Party</string>
<string name="unknown">Unbekannter Typ</string>
@@ -128,7 +127,7 @@
<string name="log_image_caption">Überschrift</string>
<string name="log_image_description">Beschreibung</string>
<string name="log_image_scale">Skalierung</string>
-
+
<string-array name="log_image_scales">
<item>Keine Skalierung</item>
<item>512 px</item>
@@ -176,7 +175,6 @@
<string name="err_auth_initialize">c:geo konnte die Autorisierung nicht initialisieren.</string>
<string name="err_auth_process">Autorisierung fehlgeschlagen.</string>
<string name="err_cannot_log_visit">c:geo hat nicht genügend Informationen um den Besuch zu loggen. Bitte über die Cache-Details versuchen.</string>
- <string name="err_init_cleared">c:geo konnte die Anmeldedaten nicht entfernen.</string>
<string name="err_download_fail">c:geo konnte keine Caches laden, weil </string>
<string name="err_dwld_details_failed">Download der Cache-Details fehlgeschlagen.</string>
<string name="err_load_descr_failed">Laden der Cachebeschreibung fehlgeschlagen.</string>
@@ -361,29 +359,50 @@
<string name="about_donation_more">Spenden für\nEntwicklung</string>
<string name="about_contributors">Mitwirkende</string>
- <!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
- <string name="init_gc_activate">Geocaching.com auf Live-Karte und für die Suche aktivieren</string>
- <string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">Opencaching.de auf Live-Karte und für die Suche aktivieren</string>
- <string name="init_oc_de_description">Autorisiere c:geo dazu auf opencaching.de zuzugreifen um Caches zu suchen und nach deinen Funden zu filtern.</string>
+ <!-- settings -->
+ <string name="settings_title_services">Dienste</string>
+ <string name="settings_title_appearance">Erscheinungsbild</string>
+ <string name="settings_title_cachedetails">Cache-Details</string>
+ <string name="settings_title_offlinedata">Offline-Daten</string>
+ <string name="settings_title_logging">Loggen</string>
+ <string name="settings_title_map">Karte</string>
+ <string name="settings_title_map_data">Kartendaten</string>
+ <string name="settings_title_map_content">Karteninhalt</string>
+ <string name="settings_title_gpx">GPX</string>
+ <string name="settings_title_basicmembers">Basic Member</string>
+ <string name="settings_title_navigation">Navigation</string>
+ <string name="settings_title_system">System</string>
+
+ <string name="settings_category_browser">Browser</string>
+ <string name="settings_category_logging_other">Andere Log-Optionen</string>
+
+ <string name="settings_goto_url_button">mehr …</string>
+
+ <string name="settings_title_gc">Geocaching.com</string>
+ <string name="settings_activate_gc">Aktivieren</string>
+ <string name="settings_gc_legal_note">Um die Dienste von geocaching.com nutzen zu können, müssen die Groundspeak-Nutzungsbedingungen (englisch) akzeptiert werden.</string>
+ <string name="settings_info_facebook_login_title">Facebook-Login</string>
+ <string name="settings_info_facebook_login">c:geo kann sich zwar nicht per Facebook bei Geocaching.com einloggen, aber es gibt eine einfache Abhilfe …</string>
+ <string name="init_oc">Opencaching.de</string>
+ <string name="settings_activate_oc">Aktivieren</string>
+ <string name="init_oc_de_description">Autorisiere c:geo auf opencaching.de zuzugreifen um Caches zu suchen und nach deinen Funden zu filtern.</string>
<string name="init_register_oc_de">c:geo autorisieren</string>
+ <string name="init_reregister_oc_de">c:geo neu autorisieren</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
+ <string name="settings_activate_twitter">Aktivieren</string>
<string name="init_username">Benutzername</string>
<string name="init_password">Passwort</string>
- <string name="init_passvote">Passwort</string>
- <string name="init_login">Anmeldedaten überprüfen und speichern</string>
+ <string name="init_login">Anmeldedaten überprüfen</string>
<string name="init_login_popup">Login</string>
<string name="init_login_popup_working">Anmeldung…</string>
<string name="init_login_popup_ok">Login OK</string>
<string name="init_login_popup_failed">Login fehlgeschlagen</string>
<string name="init_login_popup_failed_reason">Login fehlgeschlagen:</string>
+ <string name="init_login_popup_not_authorized">Nicht autorisiert</string>
<string name="init_twitter_authorize">c:geo autorisieren</string>
- <string name="init_twitter_publish">Status veröffentlichen wenn ein Cache gefunden wurde</string>
+ <string name="init_twitter_reauthorize">c:geo neu autorisieren</string>
<string name="init_signature">Signatur</string>
- <string name="init_signature_help_button">Hilfe</string>
- <string name="init_signature_help_title">Tipps und Tricks für die Signatur</string>
<string name="init_signature_help_text">Verwendete Signatur für Logtexte.\nErlaubte Platzhalter sind: [DATE], [TIME], [DATETIME], [USER] &amp; [NUMBER]. Diese werden beim Einfügen der Signatur durch die entsprechenden Werte ersetzt.</string>
<string name="init_signature_template_button">Platzhalter einfügen</string>
<string name="init_signature_template_date">Datum</string>
@@ -392,32 +411,42 @@
<string name="init_signature_template_user">Benutzer</string>
<string name="init_signature_template_number">Nummer</string>
<string name="init_signature_template_owner">Besitzer</string>
- <string name="init_details">Cache Details</string>
- <string name="init_ratingwanted">Lade Cache-Bewertung von GCvote.com</string>
- <string name="init_elevationwanted">Lade Höhe des Caches</string>
- <string name="init_friendlogswanted">Lade zusätzliche Logbuch-Seite für Logs von Freunden</string>
- <string name="init_openlastdetailspage">Öffne Details mit zuletzt genutzter Seite</string>
- <string name="init_autoload">Ausführliche Beschreibung automatisch laden</string>
- <string name="init_other">Weitere Optionen</string>
- <string name="init_skin">Helle Oberfläche (Neustart erforderlich)</string>
- <string name="init_address">Ort statt Koordinaten im Startbildschirm anzeigen</string>
- <string name="init_captcha">Zeige CAPTCHA wenn notwendig (nur Basic Member)</string>
- <string name="init_useenglish">c:geo auf Englisch nutzen (Neustart erforderlich)</string>
- <string name="init_exclude">Eigene und gefundene Caches ausblenden</string>
- <string name="init_showwaypoints">Wegpunkte auf Karte zeigen</string>
+ <string name="init_ratingwanted">GCvote-Bewertung</string>
+ <string name="init_summary_ratingwanted">Lade Cache-Bewertung von GCvote.com</string>
+ <string name="init_friendlogswanted">Logs von Freunden</string>
+ <string name="init_summary_friendlogswanted">Lade zusätzliche Logbuch-Seite für Logs von Freunden</string>
+ <string name="init_openlastdetailspage">Zuletzt genutzte Seite</string>
+ <string name="init_summary_openlastdetailspage">Öffne Details mit zuletzt genutzter Seite</string>
+ <string name="init_autoload">Ausführliche Beschreibung</string>
+ <string name="init_summary_autoload">Ausführliche Beschreibung automatisch laden</string>
+ <string name="init_skin">Helle Oberfläche</string>
+ <string name="init_summary_skin">Helle Oberfläche (Neustart erforderlich)</string>
+ <string name="init_address">Ort statt Koordinaten</string>
+ <string name="init_summary_address">Ort statt Koordinaten im Startbildschirm anzeigen</string>
+ <string name="init_captcha">Zeige CAPTCHA</string>
+ <string name="init_summary_captcha">Zeige CAPTCHA wenn notwendig (nur Basic Member)</string>
+ <string name="init_useenglish">Auf Englisch</string>
+ <string name="init_summary_useenglish">c:geo auf Englisch nutzen (Neustart erforderlich)</string>
+ <string name="init_exclude">Eigene und gefundene Caches</string>
+ <string name="init_summary_exclude">Eigene und gefundene Caches ausblenden</string>
+ <string name="init_showwaypoints">Wegpunkte zeigen</string>
<string name="init_showwaypoint_description">Wenn weniger als die angegebene Anzahl an Caches auf der Karte sichtbar sind, werden zusätzlich deren Wegpunkte angezeigt.</string>
- <string name="init_disabled">Deaktivierte Caches ausblenden</string>
- <string name="init_offline">Statische Karten zum Cache für Offline-Verwendung speichern</string>
- <string name="init_offline_wp">Statische Karten zu Wegpunkten für Offline-Verwendung speichern</string>
- <string name="init_save_log_img">Logbilder abspeichern</string>
- <string name="init_units">Imperiale Einheiten (Meilen/Fuß)</string>
- <string name="init_log_offline">Offline loggen (Dialog für Online-Log nicht anzeigen)</string>
- <string name="init_choose_list">Beim Speichern von Caches nach Liste fragen</string>
- <string name="init_livelist">Richtung zum Cache in der Cache-Liste anzeigen</string>
- <string name="init_altitude">Höhenkorrektur</string>
- <string name="init_altitude_description">Falls das GPS eine falsche Höhe ermittelt, kann dies durch Angabe eines positiven oder negativen Wertes in Metern korrigiert werden.</string>
- <string name="init_clear">Login zurücksetzen</string>
- <string name="init_cleared">c:geo hat die Anmeldedaten gelöscht.</string>
+ <string name="init_disabled">Deaktivierte Caches</string>
+ <string name="init_summary_disabled">Deaktivierte Caches ausblenden</string>
+ <string name="init_offline">Statische Karten</string>
+ <string name="init_summary_offline">Statische Karten zum Cache für Offline-Verwendung speichern</string>
+ <string name="init_offline_wp">Statische Karten (WP)</string>
+ <string name="init_summary_offline_wp">Statische Karten zu Wegpunkten für Offline-Verwendung speichern</string>
+ <string name="init_save_log_img">Logbilder</string>
+ <string name="init_summary_save_log_img">Logbilder abspeichern</string>
+ <string name="init_units">Imperiale Einheiten</string>
+ <string name="init_summary_units">Imperiale Einheiten (Meilen/Fuß)</string>
+ <string name="init_log_offline">Offline loggen</string>
+ <string name="init_summary_log_offline">Offline loggen (Dialog für Online-Log nicht anzeigen)</string>
+ <string name="init_choose_list">Nach Liste fragen</string>
+ <string name="init_summary_choose_list">Beim Speichern von Caches nach Liste fragen</string>
+ <string name="init_livelist">Richtung zum Cache</string>
+ <string name="init_summary_livelist">Richtung zum Cache in der Cache-Liste anzeigen</string>
<string name="init_backup">Sicherung</string>
<string name="init_backup_backup">Sicherung</string>
<string name="init_backup_running">Erzeuge Sicherung der Cache-Datenbank…</string>
@@ -432,37 +461,43 @@
<string name="init_restore_confirm">Die Cache-Datenbank ist leer. Soll die vorhandene Sicherung wiederhergestellt werden?</string>
<string name="init_backup_last">Backup verfügbar von</string>
<string name="init_backup_last_no">Keine Datei mit Datenbanksicherung gefunden.</string>
- <string name="init_mapsources">Kartenherkunft</string>
- <string name="init_mapsources_description">Hier kann die Quelle der benutzten Karte gewählt werden. Alternativ zu Google Maps stehen verschiedene OpenStreetMap-Stile zur Verfügung und daneben auch Karten-Dateien für die Offline-Nutzung (siehe http://code.google.com/p/mapsforge/ für die Details).\nWeiterhin werden verschiedene Darstellungen(Themes) für Offline-Karten unterstützt.</string>
+ <string name="settings_info_offline_maps_title">Info zu Offline-Karten</string>
+ <string name="settings_info_offline_maps">c:geo ermöglicht es, Offline-Karten zu verwenden. Du kannst Karten bei mapsforge herunterladen oder sogar eigene Karten aus OSM-Daten erstellen.</string>
+ <string name="settings_info_themes_title">Info zu Karten-Themes</string>
+ <string name="settings_info_themes">c:geo kann eigene Karten-Themes für Offline-Karten verwenden. Du kannst sie dazu benutzen, um die Farbauswahl der Karte (z. B. für eine Nachtansicht) zu verändern oder um bestimmte Objekte wie z. B. Radwege oder Höhenlinien hervorzuheben.</string>
<string name="init_mapsource_select">Kartenquelle wählen</string>
<string name="init_map_directory_description">Verzeichnis mit Offline-Karten</string>
<string name="init_gpx_exportdir">Verzeichnis für GPX-Exporte</string>
<string name="init_gpx_importdir">Verzeichnis für GPX-Importe</string>
- <string name="init_gpx_exportdir_description">Hier kann das Verzeichnis für GPX-Exporte gewählt werden.</string>
- <string name="init_gpx_importdir_description">Hier kann das Verzeichnis für GPX-Importe gewählt werden.</string>
- <string name="init_maptrail">Zeige Spur auf Karte</string>
+ <string name="init_maptrail">Zeige Spur</string>
+ <string name="init_summary_maptrail">Zeige Spur auf Karte</string>
<string name="init_share_after_export">Weiterleiten nach dem Export</string>
- <string name="init_trackautovisit">Trackables automatisch auf \"besuchen\" setzen</string>
- <string name="init_sigautoinsert">Signatur automatisch einfügen</string>
- <string name="init_loaddirectionimg">Richtungs-Grafik laden wenn nötig (nur Basic Member)</string>
+ <string name="init_trackautovisit">TBs besuchen</string>
+ <string name="init_summary_trackautovisit">Trackables automatisch auf \"besuchen\" setzen</string>
+ <string name="init_sigautoinsert">Automatisch einfügen</string>
+ <string name="init_loaddirectionimg">Richtungs-Grafik</string>
+ <string name="init_summary_loaddirectionimg">Richtungs-Grafik laden wenn nötig (nur Basic Member)</string>
<string name="init_default_navigation_tool">Standardnavigation</string>
+ <string name="init_secondary_navigation_tool">Zweitnavigation</string>
<string name="init_default_navigation_tool_description">Hier kann das bevorzugte Navigationswerkzeug festgelegt werden.</string>
<string name="init_default_navigation_tool_select">Wähle Werkzeug</string>
- <string name="init_default_navigation_tool_2_description">Hier kannst das zweite bevorzugte Navigationswerkzeug festgelegt werden. Es ist durch langen Klick auf das Navigationssymbol in der Titelzeile eines Caches erreichbar.</string>
+ <string name="init_default_navigation_tool_2_description">Hier kann das zweite bevorzugte Navigationswerkzeug festgelegt werden. Es ist durch langen Klick auf das Navigationssymbol in der Titelzeile eines Caches erreichbar.</string>
<string name="init_debug_title">Fehlersuche</string>
<string name="init_debug_note">c:geo kann bei Bedarf viele Debuginformationen speichern. Im Normalfall ist dies nicht notwendig, jedoch kann es den Entwicklern bei der Fehlersuche helfen. In diesem Fall wird der Benutzer gebeten diese Einstellung zu aktivieren und später das Log-File zuzusenden.</string>
<string name="init_debug">Debug-Log aktivieren</string>
<string name="init_dbonsdcard_title">Datenspeicherung</string>
<string name="init_dbonsdcard_note">Die Datenbank von c:geo kann auf eine externe Speicherkarte verschoben werden. Hiermit kann interner Speicher gespart werden, allerdings wird sich die Leistung etwas reduzieren und c:geo funktioniert nicht mehr ohne verfügbare Speicherkarte.</string>
- <string name="init_dbonsdcard">Datenbank auf externer Karte</string>
+ <string name="init_dbonsdcard">Auf externe Karte</string>
<string name="init_dbmove_dbmove">Verschiebe Datenbank</string>
<string name="init_dbmove_running">Verschiebe Datenbank</string>
<string name="init_dbmove_success">Die Datenbank wurde erfolgreich verschoben.</string>
<string name="init_dbmove_failed">Fehler beim Verschieben der Datenbank.</string>
- <string name="init_plain_logs">Logeinträge ohne Farben anzeigen</string>
- <string name="init_use_native_ua">Als Android Browser identifizieren. Löst Login-Probleme einiger Netzanbieter.</string>
- <string name="init_rendertheme_folder">Verzeichnis mit Darstellungen für Offline-Karte (optional)</string>
-
+ <string name="init_plain_logs">Logs ohne Farben</string>
+ <string name="init_summary_plain_logs">Logeinträge ohne Farben anzeigen</string>
+ <string name="init_use_native_ua">Android-Browser</string>
+ <string name="init_summary_use_native_ua">Als Android-Browser identifizieren. Löst Login-Probleme einiger Netzanbieter.</string>
+ <string name="init_rendertheme_folder">Karten-Themes-Verzeichnis</string>
+
<!-- map sources -->
<string name="map_source_google_map">Google: Karte</string>
<string name="map_source_google_satellite">Google: Satellit</string>
@@ -470,7 +505,8 @@
<string name="map_source_osm_cyclemap">OSM: Radfahrerkarte</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Send to c:geo</string>
- <string name="init_sendToCgeo_name">Name des Endgerätes:</string>
+ <string name="settings_info_send2cgeo_title">Info zu send2cgeo</string>
+ <string name="init_sendToCgeo_name">Name des Endgerätes</string>
<string name="init_sendToCgeo_description">Send to c:geo erlaubt es, mit einem speziellen Plugin für Firefox oder Chrome, Caches direkt von der Geocachingseite zu empfangen. Bitte dazu die Details vor einer Registrierung auf <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a> durchlesen.</string>
<string name="init_sendToCgeo_register">Registrierung anfordern</string>
<string name="init_sendToCgeo_registering">Das Gerät wird für "Send to c:geo" registriert…</string>
@@ -533,6 +569,10 @@
<string name="cache_log_image_default_title">Bild</string>
<string name="cache_personal_note">Persönliche Notiz</string>
<string name="cache_personal_note_edit">Bearbeiten</string>
+ <string name="cache_personal_note_upload">Hochladen</string>
+ <string name="cache_personal_note_uploading">Persönliche Notizen werden gesendet</string>
+ <string name="cache_personal_note_upload_done">Persönliche Notizen wurden hochgeladen</string>
+ <string name="cache_personal_note_upload_cancelled">Hochladen der Notizen abgebrochen</string>
<string name="cache_personal_note_unstored">Cache noch nicht gespeichert</string>
<string name="cache_personal_note_store">Der Cache wird zunächst gespeichert, damit persönliche Notizen möglich sind.</string>
<string name="cache_description">Beschreibung</string>
@@ -568,7 +608,6 @@
<string name="cache_dialog_loading_details_status_logs">Lade Logs</string>
<string name="cache_dialog_loading_details_status_waypoints">Verarbeite Wegpunkte</string>
<string name="cache_dialog_loading_details_status_gcvote">Lade GCVote</string>
- <string name="cache_dialog_loading_details_status_elevation">Lade Höhe</string>
<string name="cache_dialog_loading_details_status_cache">Zwischenspeichern</string>
<string name="cache_dialog_loading_details_status_render">Erzeuge Darstellung</string>
<string name="cache_dialog_offline_save_title">Offline-Verwendung</string>
@@ -588,6 +627,7 @@
<string name="cache_menu_navigate">Navigieren</string>
<string name="cache_menu_navigation_drive">Navigation (Fahren)</string>
<string name="cache_menu_navigation_walk">Navigation (Gehen)</string>
+ <string name="cache_menu_navigation_bike">Navigation (Fahrrad)</string>
<string name="cache_menu_maps_directions">Google Maps Route</string>
<string name="cache_menu_radar">Radar</string>
<string name="cache_menu_map">Karte</string>
@@ -651,7 +691,6 @@
<string name="cache_listed_on">Geführt auf %s</string>
<!-- editor dialog -->
- <string name="editor_save">Speichern</string>
<!-- file list base -->
<string name="file_searching_in">Suche nach Dateien\nin</string>
@@ -678,11 +717,11 @@
<string name="gpx_import_error_io">Fehler beim Lesen der Datei</string>
<string name="gpx_import_error_parser">Dateiformat nicht ok</string>
<string name="gpx_import_error_unexpected">Unerwarteter Fehler</string>
- <string name="gpx_import_confirm">Soll die GPX-Datei importiert werden?</string>
<string name="gpx_import_canceled">Der GPX-Import wurde abgebrochen</string>
<string name="gpx_import_delete_title">Datei löschen</string>
<string name="gpx_import_delete_message">Datei %s löschen?</string>
-
+ <string name="gpx_import_select_list_title">Importiere GPX nach</string>
+
<!-- map file select -->
<string name="map_file_select_title">Kartendatei wählen</string>
@@ -1073,7 +1112,6 @@
<string name="attribute_geotour_no">Kein Teil einer GeoTour</string>
<!-- next things -->
- <string name="legal_note">Um die Dienste von geocaching.com nutzen zu können, müssen die <a href="http://www.geocaching.com/about/termsofuse.aspx">Groundspeak-Nutzungsbedingungen</a> (englisch) akzeptiert werden.</string>
<string name="quote">Um Geocachen einfacher zu machen, um es Anwendern bequemer zu machen.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -1090,15 +1128,33 @@
<string name="status_new_rc" tools:ignore="UnusedResources">Neuer Release Candidate verfügbar.\nKlicken zum Installieren.</string>
<string name="status_geocaching_change" tools:ignore="UnusedResources">Änderungen auf geocaching.com führen zu Problemen mit c:geo.\nWir arbeiten daran.</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">Änderungen auf geocaching.com führen zu Problemen mit der Live Map.\nWir arbeiten daran.</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Deine Android-Version scheint älter als 2.1 zu sein. Zukünftige Versionen von c:geo sind für dein Gerät vermutlich nicht mehr verfügbar.</string>
<!-- text-to-speech for compass view -->
<string name="tts_service">Sprechender Kompass</string>
<string name="tts_start">Starte Sprache</string>
<string name="tts_stop">Stoppe Sprache</string>
- <string name="tts_kilometers">%s Kilometer</string>
- <string name="tts_meters">%s Meter</string>
- <string name="tts_miles">%s Meilen</string>
- <string name="tts_feet">%s Fuß</string>
+ <string name="tts_one_kilometer">ein Kilometer</string>
+ <plurals name="tts_kilometers">
+ <item quantity="one">%s Kilometer</item>
+ <item quantity="other">%s Kilometer</item>
+ </plurals>
+ <string name="tts_one_meter">ein Meter</string>
+ <plurals name="tts_meters">
+ <item quantity="one">%s Meter</item>
+ <item quantity="other">%s Meter</item>
+ </plurals>
+ <string name="tts_one_mile">eine Meile</string>
+ <plurals name="tts_miles">
+ <item quantity="one">%s Meile</item>
+ <item quantity="other">%s Meilen</item>
+ </plurals>
+ <string name="tts_one_foot">ein Fuß</string>
+ <plurals name="tts_feet">
+ <item quantity="one">%s Fuß</item>
+ <item quantity="other">%s Fuß</item>
+ </plurals>
+ <string name="tts_one_oclock">ein Uhr</string>
<string name="tts_oclock">%s Uhr</string>
<!-- various -->
@@ -1109,4 +1165,4 @@
<item quantity="other">vor %d Tagen</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-es/strings.xml b/main/res/values-es/strings.xml
index ccc43e7..cf72f8e 100644
--- a/main/res/values-es/strings.xml
+++ b/main/res/values-es/strings.xml
@@ -2,13 +2,12 @@
<resources>
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo brújula</string>
<!-- basics -->
<string name="cache">Escondite</string>
<string name="detail">Detalle</string>
<string name="search">Buscar</string>
- <string name="settings">Ajustes</string>
+ <string name="settings_titlebar">c:geo Ajustes</string>
<string name="helpers">¿Qué instalar?</string>
<string name="about">Sobre c:geo</string>
<string name="latitude">Latitud</string>
@@ -162,7 +161,6 @@
<string name="err_auth_initialize">Lo siento, c:geo no ha podido iniciar el proceso de autorización.</string>
<string name="err_auth_process">El proceso de autorización ha fallado.</string>
<string name="err_cannot_log_visit">c:geo no tiene información suficiente para registrar la visita. Inténtalo de nuevo con más detalles sobre el escondite.</string>
- <string name="err_init_cleared">Lo siento, c:geo no puede borrar la información registrada.</string>
<string name="err_download_fail">Lo siento, c:geo no ha podido descargar escondites a causa de </string>
<string name="err_dwld_details_failed">Lo siento, c:geo no ha podido descargar los detalles del escondite.</string>
<string name="err_load_descr_failed">Lo siento, c:geo no ha podido cargar la descripción.</string>
@@ -316,12 +314,10 @@
<string name="about_contributors">Colaboradores</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">Usuario</string>
<string name="init_password">Contraseña</string>
- <string name="init_passvote">Contraseña</string>
<string name="init_login">Acceder</string>
<string name="init_login_popup">Acceso</string>
<string name="init_login_popup_working">Accediendo a Geocaching.com…</string>
@@ -329,32 +325,35 @@
<string name="init_login_popup_failed">Error en el acceso.</string>
<string name="init_login_popup_failed_reason">El acceso ha fallado debido a </string>
<string name="init_twitter_authorize">Autorizar a c:geo</string>
- <string name="init_twitter_publish">Publicar estado cuando se encuente un escondite</string>
<string name="init_signature">Firma</string>
- <string name="init_signature_help_button">Ayuda</string>
- <string name="init_signature_help_title">Trucos para la firma</string>
<string name="init_signature_help_text">Escribe la firma que quieres usar en los registros.\nLas palabras especiales que puedes usar son: [DATE], [TIME], [USER] y [NUMBER].\nSerán reemplazados por sus valores al insertar la firma.</string>
<string name="init_signature_template_button">Insertar plantilla</string>
<string name="init_signature_template_date">Fecha</string>
<string name="init_signature_template_time">Hora</string>
<string name="init_signature_template_user">Usuario</string>
<string name="init_signature_template_number">Número</string>
- <string name="init_other">Otras opciones</string>
<string name="init_skin">Fondo blanco (necesita reiniciar c:geo)</string>
+ <string name="init_summary_skin">Fondo blanco (necesita reiniciar c:geo)</string>
<string name="init_address">Mostrar dirección en lugar de posición en la pantalla principal</string>
+ <string name="init_summary_address">Mostrar dirección en lugar de posición en la pantalla principal</string>
<string name="init_captcha">Mostrar CAPTCHA si es necesario</string>
+ <string name="init_summary_captcha">Mostrar CAPTCHA si es necesario</string>
<string name="init_useenglish">Usar inglés interno (necesita reiniciar c:geo)</string>
+ <string name="init_summary_useenglish">Usar inglés interno (necesita reiniciar c:geo)</string>
<string name="init_exclude">Excluir encontrados y propios</string>
+ <string name="init_summary_exclude">Excluir encontrados y propios</string>
<string name="init_disabled">Excluir escondites desactivados</string>
+ <string name="init_summary_disabled">Excluir escondites desactivados</string>
<string name="init_offline">Guardar mapas para usar sin conexión</string>
+ <string name="init_summary_offline">Guardar mapas para usar sin conexión</string>
<string name="init_save_log_img">Guardar imágenes de los registros</string>
+ <string name="init_summary_save_log_img">Guardar imágenes de los registros</string>
<string name="init_units">Usar millas/pies (unidades imperiales)</string>
+ <string name="init_summary_units">Usar millas/pies (unidades imperiales)</string>
<string name="init_autoload">Autocargar descripción larga</string>
+ <string name="init_summary_autoload">Autocargar descripción larga</string>
<string name="init_livelist">Mostrar dirección a los escondites en su listado</string>
- <string name="init_altitude">Corrección de altitud</string>
- <string name="init_altitude_description">Si el GPS te indica una altitud errónea, puedes corregirla con un valor positivo o negativo. La corrección es siempre en metros.</string>
- <string name="init_clear">Borrar acceso</string>
- <string name="init_cleared">c:geo ha borrado la información de acceso.</string>
+ <string name="init_summary_livelist">Mostrar dirección a los escondites en su listado</string>
<string name="init_backup">Backup</string>
<string name="init_backup_backup">Copia de seguridad</string>
<string name="init_backup_note">Esta opción copia/restaura la base de datos de escondites y puntos de referencia, no la configuración. Los datos de acceso y contraseña no se guardarán.</string>
@@ -365,11 +364,10 @@
<string name="init_restore_failed">Restauración errónea</string>
<string name="init_backup_last">Copia guardada el</string>
<string name="init_backup_last_no">No hay ninguna copia de seguridad.</string>
- <string name="init_mapsources">Proveedor de mapas</string>
- <string name="init_mapsources_description">Aquí puedes seleccionar un proveedor de mapas. Como alternativa a Google Maps están disponibles varios estilos de OpenStreetMap e incluso mapas fuera de línea (mira <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a> para más información).</string>
<string name="init_mapsource_select">Elige proveedor de mapas</string>
<string name="init_trackautovisit">Convertir rastreables automáticamente a \"visita\"</string>
- <string name="init_sigautoinsert">Insertar firma automáticamente</string>
+ <string name="init_summary_trackautovisit">Convertir rastreables automáticamente a \"visita\"</string>
+ <string name="init_sigautoinsert">Insertar automáticamente</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Mapa</string>
@@ -378,7 +376,7 @@
<string name="map_source_osm_cyclemap">OSM: Cyclemap</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Enviar a c:geo</string>
- <string name="init_sendToCgeo_name">Nombre de tu dispositivo:</string>
+ <string name="init_sendToCgeo_name">Nombre de tu dispositivo</string>
<string name="init_sendToCgeo_description">Enviar a c:geo (send2cgeo)te permite recibir escondites automáticamente desde la web de geocaching usando un complemento especialpara Firefox o Chrome. Antes de registrarte, te sugerimos que leas <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Sólo necesitas registarte si vas a usar send2cgeo. C:geo funciona sin tener que registrar tu dispositivo.</string>
<string name="init_sendToCgeo_register">Solicitar registro</string>
<string name="init_sendToCgeo_registering">Registrando "Enviar a c:geo"…</string>
@@ -765,7 +763,7 @@
<string name="attribute_food_no">No hay comida cerca</string>
<!-- next things -->
- <string name="legal_note">Para utilizar los servicios de Geocaching.com, debes aceptar las <a href="http://www.geocaching.com/about/termsofuse.aspx">condiciones de Groundspeak</a>.</string>
+ <string name="settings_gc_legal_note">Para utilizar los servicios de Geocaching.com, debes aceptar las condiciones de Groundspeak.</string>
<string name="quote">Para hacer el geocaching más sencillo, para hacer a los usuarios más vagos.</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -778,4 +776,4 @@
<string name="about_auth_1">El siguiente proceso permite a <b>c:geo</b> acceder a Twitter - si estás de acuerdo.</string>
<string name="about_auth_2">Hacer clic en el botón \"autorizar c:geo\" iniciará el proceso. Este proceso abrirá un navegador con la web de Twitter. Identifícate y permite a <b>c:geo</b> acceder a tu cuenta. Si aceptas Twitter te mostrará un código PIN. Este PIN debe ser pegado en <b>c:geo</b> y ser confirmado. Eso es todo.</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-fr/strings.xml b/main/res/values-fr/strings.xml
index d0f742d..e18170d 100644
--- a/main/res/values-fr/strings.xml
+++ b/main/res/values-fr/strings.xml
@@ -1,1086 +1,1034 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.net-->
<resources xmlns:tools="http://schemas.android.com/tools">
-
- <string name="app_name">c:geo</string>
- <string name="app_name_compass">boussole c:geo</string>
-
- <!-- basics -->
- <string name="cache">Cache</string>
- <string name="detail">Détails</string>
- <string name="search">Rechercher</string>
- <string name="settings">Paramètres</string>
- <string name="helpers">Aide à l\'installation</string>
- <string name="about">À propos de c:geo</string>
- <string name="latitude">Latitude</string>
- <string name="longitude">Longitude</string>
-
- <!-- actionbar -->
- <string name="action_bar_share_title">Partager le lien vers la cache</string>
-
- <!-- caches -->
- <string name="all_types">Tous les genres</string>
- <string name="traditional">Traditionnelles</string>
- <string name="multi">Multiples</string>
- <string name="mystery">Inconnues</string>
- <string name="letterbox">Boîtes aux lettres hybrides</string>
- <string name="event">Événements</string>
- <string name="mega">Méga-événements</string>
- <string name="earth">Earthcache</string>
- <string name="cito">Cache in trash out</string>
- <string name="webcam">Webcams</string>
- <string name="virtual">Virtuelles</string>
- <string name="wherigo">Wherigo</string>
- <string name="lostfound">Perdues &amp; trouvées</string>
- <string name="ape">Project ape cache</string>
- <string name="gchq">Groundspeak hq</string>
- <string name="gps">GPS cache exhibit</string>
- <string name="block">Fête locale Groundspeak</string>
- <string name="unknown">Type inconnu</string>
-
- <!-- cache sizes -->
- <string name="cache_size_micro">micro</string>
- <string name="cache_size_small">petite</string>
- <string name="cache_size_regular">normale</string>
- <string name="cache_size_large">grande</string>
- <string name="cache_size_other">autre</string>
- <string name="cache_size_virtual">virtuelle</string>
- <string name="cache_size_notchosen">non renseignée</string>
- <string name="cache_size_unknown">inconnu</string>
-
- <!-- waypoints -->
- <string name="wp_final">Étape finale</string>
- <string name="wp_stage">Étape</string>
- <string name="wp_puzzle">Énigme</string>
- <string name="wp_pkg">Parking</string>
- <string name="wp_trailhead">Départ du sentier</string>
- <string name="wp_waypoint">Point de repère</string>
- <string name="wp_original">Coordonnées originales</string>
-
- <!-- logs -->
- <string name="log_found">Trouvée</string>
- <string name="log_dnf">Pas trouvée</string>
- <string name="log_note">Note</string>
- <string name="log_published">Publiée</string>
- <string name="log_enabled">Activée</string>
- <string name="log_disabled">Désactivée</string>
- <string name="log_attend">Participera</string>
- <string name="log_attended">A participé</string>
- <string name="log_retrieved">Récupéré</string>
- <string name="log_placed">Placé</string>
- <string name="log_grabbed">Pris ailleurs</string>
- <string name="log_movecollection">Ajouté à une collection</string>
- <string name="log_moveinventory">Ajouté à l\'inventaire</string>
- <string name="log_maintained">Maintenance effectuée</string>
- <string name="log_maintenance_needed">Nécessite une maintenance</string>
- <string name="log_update">Coordonnées mises à jour</string>
- <string name="log_archived">Archivée</string>
- <string name="log_unarchived">Désarchivée</string>
- <string name="log_needs_archived">Nécessite d\'être archivée</string>
- <string name="log_discovered">Découverte</string>
- <string name="log_reviewer">Note du relecteur</string>
- <string name="log_retractlisting">Retirer l\'entrée</string>
- <string name="log_marked_missing">Marquer comme absente</string>
- <string name="log_tb_nothing">Ne fait rien</string>
- <string name="log_tb_visit">Visité</string>
- <string name="log_tb_drop">Déposé ici</string>
- <string name="log_tb_changeall">Tout modifié</string>
- <string name="log_save">Enregistrer</string>
- <string name="log_saving">Enregistrement en cours…</string>
- <string name="log_saving_and_uploading">Envoi de la note et de l\'image…</string>
- <string name="log_clear">Effacer</string>
- <string name="log_post">Envoyer</string>
- <string name="log_post_rate">Envoyer &amp; noter</string>
- <string name="log_post_no_rate">Envoyer &amp; ne pas noter</string>
- <string name="log_post_not_possible">Chargement de la page…</string>
- <string name="log_add">Ajouter</string>
- <string name="log_rating">Note</string>
- <string name="log_no_rating">Pas de note</string>
- <string name="log_stars_1">1 étoile</string>
- <string name="log_stars_15">1,5 étoiles</string>
- <string name="log_stars_2">2 étoiles</string>
- <string name="log_stars_25">2,5 étoiles</string>
- <string name="log_stars_3">3 étoiles</string>
- <string name="log_stars_35">3,5 étoiles</string>
- <string name="log_stars_4">4 étoiles</string>
- <string name="log_stars_45">4,5 étoiles</string>
- <string name="log_stars_5">5 étoiles</string>
- <string name="log_stars_1_description">faible</string>
- <string name="log_stars_15_description">plutôt faible</string>
- <string name="log_stars_2_description">en dessous de la moyenne</string>
- <string name="log_stars_25_description">pas si mal</string>
- <string name="log_stars_3_description">dans la moyenne</string>
- <string name="log_stars_35_description">pas mal du tout</string>
- <string name="log_stars_4_description">plutôt bien</string>
- <string name="log_stars_45_description">très bien</string>
- <string name="log_stars_5_description">super</string>
- <string name="log_webcam">photo webcam prise</string>
- <string name="log_new_log">Carnet</string>
- <string name="log_new_log_text">Message</string>
- <string name="log_announcement">Annonce</string>
- <string name="log_today">Aujourd\'hui</string>
- <string name="log_yesterday">Hier</string>
- <string name="log_smilies">Sourillards</string>
- <string name="log_image">Image</string>
- <string name="log_image_attach">Ajouter une image</string>
- <string name="log_image_edit">Éditer l\'image</string>
- <string name="log_image_stored">Existante</string>
- <string name="log_image_camera">Nouvelle</string>
- <string name="log_image_caption">Légende</string>
- <string name="log_image_description">Description</string>
- <string name="log_image_scale">Mise à l\'échelle</string>
-
- <string-array name="log_image_scales">
- <item>Taille originale</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
-
- <!-- translation -->
- <string name="translate_to_sys_lang">Traduire en %s</string>
- <string name="translate_to_english">Traduire en anglais</string>
- <string name="translate_length_warning">La traduction d\'un texte trop long peut échouer.</string>
-
- <!-- errors, warnings, info toasts -->
- <string name="err_none">ok</string>
- <string name="err_start">Communication non démarrée</string>
- <string name="err_parse">Échec login lecture page</string>
- <string name="err_server">Échec de la connexion à Geocaching.com (probléme de serveur ou de connexion?)</string>
- <string name="err_login">Pas d\'utilisateur ou de mot de passe enregistré</string>
- <string name="err_login_failed">c:geo ne peut pas se connecter.</string>
- <string name="err_login_failed_toast">c:geo est en mode hors-ligne et ne peut pas se connecter. Vérifiez votre connexion Internet.</string>
- <string name="err_unknown">Erreur inconnue</string>
- <string name="err_comm">Erreur inconnue de communication</string>
- <string name="err_missing_auth">Nom d\'utilisateur ou mot de passe manquant.</string>
- <string name="err_wrong">Nom d\'utilisateur inconnu ou mauvais mot de passe</string>
- <string name="err_maintenance">Le site de Geocaching.com est en cours de maintenance, essayez plus tard. c:geo fonctionne en mode hors-ligne.</string>
- <string name="err_license">L\'utilisateur n\'a pas accepté les termes et les conditions d\'utilisation de Geocaching.com</string>
- <string name="err_unvalidated_account">Vous devez d\'abord confirmer votre compte sur le site web Geocaching.com</string>
- <string name="err_unpublished">La cache a été retirée de la publication</string>
- <string name="err_premium_only">La cache est réservée aux membres Premium de Geocaching.com</string>
- <string name="err_detail_open">c:geo ne peut pas ouvrir le détail de la cache.</string>
- <string name="err_detail_cache">c:geo ne peut pas afficher cette cache. Est-ce vraiment une géocache?</string>
- <string name="err_detail_cache_find">c:geo ne peut pas trouver de caches</string>
- <string name="err_detail_cache_find_some">c:geo ne peut pas trouver cette cache.</string>
- <string name="err_detail_cache_find_any">c:geo ne peut pas trouver de caches.</string>
- <string name="err_detail_cache_forgot">c:geo a oublié la cache demandée.</string>
- <string name="err_detail_google_maps_limit_reached">c:geo n\'a pas pu charger les cartes statiques. La limite de Google Maps est peut être temporairement atteinte.</string>
- <string name="err_detail_no_spoiler">c:geo n\'a pas trouvé d\'image indice pour cette cache.</string>
- <string name="err_detail_no_map_static">c:geo n\'a pas trouvé de cartes statiques pour cette cache.</string>
- <string name="err_detail_not_load_map_static">c:geo n\'a pas réussi à charger les cartes statiques.</string>
- <string name="err_detail_still_working">Autre tâche déjà en cours.</string>
- <string name="err_watchlist_still_managing">Liste de suivi toujours en traitement.</string>
- <string name="err_watchlist_failed">Échec lors du changement de votre liste de suivi.</string>
- <string name="err_application_no">c:geo ne trouve pas d\'application conforme.</string>
- <string name="err_auth_initialize">c:geo a échoué dans la demande d\'autorisation.</string>
- <string name="err_auth_process">Échec de la demande d\'autorisation.</string>
- <string name="err_cannot_log_visit">c:geo n\'a pas assez d\'information pour logger votre visite. Faites le depuis le détail de la cache, s\'il vous plait!</string>
- <string name="err_init_cleared">c:geo ne peux pas effacer votre nom d\'utilisateur.</string>
- <string name="err_download_fail">c:geo n\'a pas réussi à télécharger les caches car </string>
- <string name="err_dwld_details_failed">c:geo n\'a pas réussi à télécharger les détails de la cache.</string>
- <string name="err_load_descr_failed">c:geo ne peut pas charger la description.</string>
- <string name="err_location_unknown">c:geo ne connait pas la position de la cache.</string>
- <string name="err_missing_device_name">Veuillez saisir un nom pour votre appareil avant l\'enregistrement.</string>
- <string name="err_favorite_failed">c:geo ne peut pas changer le status de favori.</string>
- <string name="err_select_logimage_failed">La sélection d\'une image pour la note a échoué.</string>
- <string name="err_acquire_image_failed">L\'acquisition d\'une nouvelle image pour la note a échoué.</string>
- <string name="err_tb_display">"c:geo ne peut pas afficher l\'objet voyageur demandé. Est-ce vraiment un objet voyageur?</string>
- <string name="err_tb_details_open">c:geo ne peut pas ouvrir le détail de l\'objet voyageur.</string>
- <string name="err_tb_forgot_saw">c:geo a oublié quel objet voyageur vous avez vu.</string>
- <string name="err_tb_find">c:geo ne peut pas trouver d\'objet voyageur.</string>
- <string name="err_tb_find_that">c:geo ne peut pas trouver cet objet voyageur.</string>
- <string name="err_waypoint_cache_unknown">c:geo ne sait pas à quel cache vous voulez ajouter une étape.</string>
- <string name="err_waypoint_add_failed">c:geo n\'a pas réussi à afficher l\'étape.</string>
- <string name="err_point_unknown_position">c:geo ne peut pas savoir où vous êtes.</string>
- <string name="err_point_no_position_given_title">Information obligatoire</string>
- <string name="err_point_no_position_given">Remplissez au moins la latitude ou la longitude ou la distance et le relèvement. Vous pouvez aussi remplir tous les champs.</string>
- <string name="err_point_curr_position_unavailable">c:geo ne connaît pas encore votre position. Veuillez patienter…</string>
- <string name="err_point_bear_and_dist_title">Besoin d\'aide?</string>
- <string name="err_point_bear_and_dist">Remplissez le relèvement et la distance. Le relèvement est l\'angle de 0 à 360 degrés par rapport au Nord. La distance est avec ou sans les unités.</string>
- <string name="err_point_location_error">c:geo ne peut pas trouver la position de l\'étape.</string>
- <string name="err_log_load_data">c:geo ne peut pas charger les données pour enregistrer votre visite.</string>
- <string name="err_log_load_data_again">c:geo ne peut pas charger les données pour enregistrer votre visite. Essayer plus tard.</string>
- <string name="err_log_load_data_still">c:geo est en train de charger les données pour enregistrer votre visite. Veuillez patienter encore un peu.</string>
- <string name="err_log_failed_server">c:geo n\'a pas réussi à charger les données pour enregistrer votre visite car le serveur ne répond pas.</string>
- <string name="err_log_post_failed">Il semble que votre visite n\'a pas été enregistrée. Veuillez vérifier sur le site Geocaching.com.</string>
- <string name="err_logimage_post_failed">Il semble que l\'envoi de l\'image ait échoué. Veuillez vérifier sur le site Geocaching.com.</string>
- <string name="err_search_address_forgot">c:geo a oublié l\'adresse recherchée.</string>
- <string name="err_parse_lat">c:geo n\'arrive pas à lire la latitude.</string>
- <string name="err_parse_lon">c:geo n\'arrive pas à lire la longitude.</string>
- <string name="err_parse_dist">c:geo n\'arrive pas à lire la distance.</string>
- <string name="err_parse_lat_lon">c:geo n\'arrive pas à lire la latitude ou la longitude.</string>
- <string name="warn_save_nothing">Il n\'y a rien à sauver.</string>
- <string name="warn_no_cache_coord">Il n\'y pas de caches avec les coordonnées associées.</string>
- <string name="warn_no_coordinates">Aucune coordonnée associée.</string>
- <string name="warn_no_keyword">Pas de mot clé.</string>
- <string name="warn_no_username">Pas de nom d\'utilisateur.</string>
- <string name="warn_search_help_title">Besoin d\'aide?</string>
- <string name="warn_search_help_address">Veuillez remplir l\'adresse ou le lieu. Par exemple l\'adresse \"100 Avenue Montainge, Paris, France\", nom de la ville \"Berlin\" ou simplement \"Parc Yellowstone\".</string>
- <string name="warn_search_help_gccode">Veuillez remplir le code de la cache. Par exemple \"GC1VCAZ\".</string>
- <string name="warn_search_help_keyword">Veuillez saisir un mot censé se trouver dans le nom de la cache recherchée.</string>
- <string name="warn_search_help_user">Veuillez remplir le nom d\'utilisateur utilisé sur Geocaching.com.</string>
- <string name="warn_search_help_tb">Veuillez remplir le code de l\'objet voyageur. Par exemple \"TB29QMZ\".</string>
- <string name="warn_log_text_fill">Merci de saisir un texte pour votre visite.</string>
- <string name="warn_load_images">c:geo n\'a pas pu charger les images.</string>
- <string name="warn_invalid_mapfile">Le fichier sélectionné n\'est pas un fichier de carte mapsforge version 0.3.0.\nLes cartes hors-lignes ne sont pas disponibles.</string>
- <string name="warn_deprecated_mapfile">Vous utilisez un fichier de carte obsolète de version 0.2.4.\nVous devriez charger sans tarder une carte version 0.3.\nLe support des cartes 0.2.4 disparaîtra dans une prochaine version de c:geo.</string>
- <string name="warn_nonexistant_mapfile">Le fichier de carte spécifié n\'existe pas.\nLes cartes hors ligne ne sont pas disponibles.</string>
- <string name="warn_rendertheme_missing">Le thème de la carte n\'a pas été trouvé.</string>
- <string name="info_log_posted">Envoi de la visite réussi.</string>
- <string name="info_log_saved">Sauvegarde de la visite réussie.</string>
- <string name="info_log_cleared">La visite a été effacée.</string>
- <string name="info_log_type_changed">Le type de visite a changé!</string>
- <string name="info_select_logimage_cancelled">La sélection ou l\'acquisition de l\'image a été annulée.</string>
- <string name="info_stored_image">Nouvelle image sauvée dans :</string>
- <string name="info_storing_static_maps">Sauvegarde des cartes statiques</string>
-
- <!-- location service -->
- <string name="loc_last">Aucun</string>
- <string name="loc_net">Réseau</string>
- <string name="loc_gps">Gps</string>
- <string name="loc_sat">Satellites</string>
- <string name="loc_trying">Localisation en cours…</string>
- <string name="loc_no_addr">Adresse inconnue</string>
- <string name="loc_gps_disabled">GPS désactivé</string>
-
- <!-- standard menu -->
- <string name="menu_about">À propos de c:geo</string>
- <string name="menu_helpers">Utilitaires</string>
- <string name="menu_settings">Paramètres</string>
- <string name="menu_history">Historique</string>
- <string name="menu_filter">Filtre</string>
- <string name="menu_scan_geo">Scanner géocode</string>
-
- <!-- main screen -->
- <string name="live_map_button">Carte</string>
- <string name="caches_nearby_button">Proches</string>
- <string name="advanced_search_button">Recherche</string>
- <string name="stored_caches_button">Stockées</string>
- <string name="any_button">N\'importe</string>
- <string name="unknown_scan">Le scan ne trouve pas de géocode.</string>
-
- <!-- caches -->
- <string name="caches_no_cache">Aucune cache</string>
- <string name="caches_more_caches">Charger plus de caches</string>
- <string name="caches_more_caches_no">Pas d\'autres caches</string>
- <string name="caches_more_caches_loading">Chargement des caches…</string>
- <string name="caches_more_caches_currently">actuellement</string>
- <string name="caches_downloading">Téléchargement des caches…\nRestant: </string>
- <string name="caches_eta_ltm">Moins d\'une minute</string>
-
- <plurals name="caches_eta_mins">
- <item quantity="one">minute</item>
- <item quantity="other">minutes</item>
- </plurals>
-
- <string name="caches_store_offline">Stocker localement</string>
- <string name="caches_store_selected">Stocker la sélection</string>
- <string name="caches_history">Historique</string>
- <string name="caches_on_map">Voir sur la carte</string>
- <string name="caches_sort">Trier</string>
- <string name="caches_sort_title">Trier par</string>
- <string name="caches_sort_distance">distance</string>
- <string name="caches_sort_difficulty">difficulté</string>
- <string name="caches_sort_terrain">terrain</string>
- <string name="caches_sort_size">taille</string>
- <string name="caches_sort_favorites">popularité</string>
- <string name="caches_sort_name">nom</string>
- <string name="caches_sort_geocode">Geocode</string>
- <string name="caches_sort_rating">note</string>
- <string name="caches_sort_vote">vote (note perso)</string>
- <string name="caches_sort_inventory">nombre d\'objets dans l\'inventaire</string>
- <string name="caches_sort_date_hidden">date de création</string>
- <string name="caches_sort_date_logged">date du carnet</string>
- <string name="caches_sort_finds">trouvées</string>
- <string name="caches_sort_state">état</string>
- <string name="caches_sort_storage">date de sauvegarde dans l\'appareil</string>
- <string name="caches_select_mode">Mode sélection</string>
- <string name="caches_select_mode_exit">Sortir du mode sélection</string>
- <string name="caches_select_invert">Inverser la sélection</string>
- <string name="caches_nearby">Proches</string>
- <string name="caches_manage">Gérer</string>
- <string name="caches_drop_selected">Effacer les caches sélectionnées</string>
- <string name="caches_drop_selected_ask">Effacer les caches sélectionnées du téléphone ?</string>
- <string name="caches_drop_all">Tout effacer</string>
- <string name="caches_drop_all_ask">Effacer les caches de la liste courante ?</string>
- <string name="caches_drop_stored">Effacer les caches stockées</string>
- <string name="caches_drop_progress">Suppression des caches en cours</string>
- <string name="caches_drop_all_and_list">Suppression des caches et de la liste</string>
- <string name="caches_delete_events">Effacer les événements précédents</string>
- <string name="caches_refresh_selected">Rafraîchir les caches sélectionnées</string>
- <string name="caches_refresh_all">Tout rafraîchir</string>
- <string name="caches_move_selected">Déplacer les caches sélectionnées</string>
- <string name="caches_move_all">Tout déplacer</string>
- <string name="caches_map_locus">Locus</string>
- <string name="caches_map_locus_export">Exporter vers Locus</string>
- <string name="caches_recaptcha_title">reCAPTCHA</string>
- <string name="caches_recaptcha_explanation">Recopier le texte se trouvant dans l\'image pour charger les coordonnées des caches. Cette étape peut être désactivée dans les Paramètres.</string>
- <string name="caches_recaptcha_hint">Texte de l\'image</string>
- <string name="caches_recaptcha_continue">Continuer</string>
- <string name="caches_filter">Filtrer</string>
- <string name="caches_filter_title">Filtrer selon</string>
- <string name="caches_filter_size">taille</string>
- <string name="caches_filter_type">type</string>
- <string name="caches_filter_track">avec des trackables</string>
- <string name="caches_filter_clear">effacer les filtres</string>
- <string name="caches_filter_modified">Avec les coordonnées modifiées</string>
- <string name="caches_filter_origin">Avec les coordonées originales</string>
- <string name="caches_removing_from_history">Effacer de l\'historique…</string>
- <string name="caches_clear_offlinelogs">Effacer les entrées de carnet hors-ligne</string>
- <string name="caches_clear_offlinelogs_progress">Effacement des entrées de carnet hors-ligne</string>
-
- <!-- caches lists -->
- <string name="list_menu">Listes</string>
- <string name="list_menu_create">Nouvelle liste</string>
- <string name="list_menu_all_lists">Toutes les caches</string>
- <string name="list_menu_drop">Effacer la liste courante</string>
- <string name="list_menu_change">Changer de liste</string>
- <string name="list_menu_rename">Renommer la liste courante</string>
- <string name="list_title">Choisir une liste</string>
- <string name="list_inbox">Enregistrées</string>
- <string name="list_all_lists">Toutes les caches</string>
- <string name="list_dialog_create_title">Nouvelle liste</string>
- <string name="list_dialog_create">Créer</string>
- <string name="list_dialog_cancel">Annuler</string>
- <string name="list_dialog_create_ok">Nouvelle liste créée</string>
- <string name="list_dialog_create_err">c:geo n\'a pas pu créer la liste</string>
- <string name="list_dialog_remove_title">Supprimer la liste</string>
- <string name="list_dialog_remove_description">Voulez-vous supprimer la liste courante? Toutes les caches restantes seront déplacées dans \"Stockées\".</string>
- <string name="list_dialog_remove">Effacer</string>
- <string name="list_dialog_remove_ok">Liste supprimée</string>
- <string name="list_dialog_remove_err">c:geo n\'a pas réussi à supprimer la liste courante</string>
- <string name="list_dialog_rename_title">Renommer la liste</string>
- <string name="list_dialog_rename">Renommer</string>
-
- <!-- about -->
- <string name="about_version">Version</string>
- <string name="about_changelog">Versions</string>
- <string name="about_donate">Dons</string>
- <string name="about_detail">Détails</string>
- <string name="about_donation_more">Don\ndéveloppement</string>
- <string name="about_contributors">Contributeurs</string>
-
- <!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
- <string name="init_gc_activate">Utiliser Geocaching.com pour la carte active et les recherches.</string>
- <string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">Utiliser opencaching.de pour la carte active et les recherches.</string>
- <string name="init_gcvote">GCvote.com</string>
- <string name="init_twitter">Twitter</string>
- <string name="init_username">Identifiant</string>
- <string name="init_password">Mot de passe</string>
- <string name="init_passvote">Mot de passe</string>
- <string name="init_login">Vérification de l\'identifiant &amp; du format de date</string>
- <string name="init_login_popup">Connexion</string>
- <string name="init_login_popup_working">Connexion…</string>
- <string name="init_login_popup_ok">Identifiants OK</string>
- <string name="init_login_popup_failed">Erreur de connexion</string>
- <string name="init_login_popup_failed_reason">Erreur de connexion: </string>
- <string name="init_twitter_authorize">Autorisation de c:geo</string>
- <string name="init_twitter_publish">Publication d\'une cache trouvée</string>
- <string name="init_signature">Signature</string>
- <string name="init_signature_help_button">Aide</string>
- <string name="init_signature_help_title">Conseils sur la signature</string>
- <string name="init_signature_help_text">Écrivez votre propre signature pour vos visites.\nLes codes spéciaux supportés sont : [DATE] , [TIME], [DATETIME], [USER] &amp; [NUMBER].\nAu moment de l\'insertion de la signature, ces codes seront remplacés par la valeur correspondante.</string>
- <string name="init_signature_template_button">Insérer un modèle</string>
- <string name="init_signature_template_date">Date</string>
- <string name="init_signature_template_time">Heure</string>
- <string name="init_signature_template_datetime">Date &amp; Heure</string>
- <string name="init_signature_template_user">Utilisateur</string>
- <string name="init_signature_template_number">Nombre</string>
- <string name="init_signature_template_owner">Propriétaire</string>
- <string name="init_details">Détails des caches</string>
- <string name="init_ratingwanted">Charger la note depuis GCvote.com</string>
- <string name="init_elevationwanted">Charger l\'altitude de la cache</string>
- <string name="init_friendlogswanted">Charger le carnet (amis)</string>
- <string name="init_openlastdetailspage">Réouvrir les détails à la dernière page ouverte</string>
- <string name="init_autoload">Afficher automatiquement les descriptions longues</string>
- <string name="init_other">Autres options</string>
- <string name="init_skin">Fond clair (nécessite le redémarrage de c:geo)</string>
- <string name="init_address">Afficher l\'adresse sur l\'accueil</string>
- <string name="init_captcha">Afficher le CAPTCHA si nécessaire</string>
- <string name="init_useenglish">Utiliser l\'anglais dans c:geo\n(redémarrage nécessaire)</string>
- <string name="init_exclude">Exclure mes caches et les caches trouvées</string>
- <string name="init_showwaypoints">Points intermédiaires</string>
- <string name="init_showwaypoint_description">Nombre de caches en-dessous duquel les points intermédiaires sont affichés sur la carte.</string>
- <string name="init_disabled">Exclure les caches désactivées</string>
- <string name="init_offline">Enregistrer les cartes pour une utilisation hors ligne</string>
- <string name="init_offline_wp">Enregistrer les cartes autour des points intermédiaires pour une utilisation hors ligne</string>
- <string name="init_save_log_img">Sauver les images des visites</string>
- <string name="init_units">Utiliser des unités de distance impériales</string>
- <string name="init_log_offline">Toujours utiliser le mode hors-ligne, même si connecté.</string>
- <string name="init_choose_list">Demander dans quelle liste sauver les caches.</string>
- <string name="init_livelist">Afficher la direction des caches dans les listes</string>
- <string name="init_altitude">Correction de l\'altitude</string>
- <string name="init_altitude_description">Si le GPS indique une mauvaise altitude, vous pouvez la corriger avec une valeur en mètres, positive ou négative.</string>
- <string name="init_clear">Effacer l\'identifiant</string>
- <string name="init_cleared">c:geo a effacé votre identifiant.</string>
- <string name="init_backup">Sauvegarde</string>
- <string name="init_backup_backup">Sauvegarde</string>
- <string name="init_backup_running">Création de la copie de sauvegarde…</string>
- <string name="init_backup_note">Noter que cette option va sauvegarder/restaurer la base de données contenant les caches et les étapes, pas les paramètres. vos informations d\'utilisateur (mots de passe) ne quitteront pas l\'application.</string>
- <string name="init_backup_restore">Restauration</string>
- <string name="init_backup_success">La base de données de c:geo a été sauvegardée dans un fichier</string>
- <string name="init_backup_failed">La sauvegarde de la base de données de c:geo a échouée.</string>
- <string name="init_backup_unnecessary">La base de données est vide, sauvegarde non nécessaire.</string>
- <string name="init_restore_success">Restauration terminée.</string>
- <string name="init_restore_failed">Échec de la restauration.</string>
- <string name="init_restore_running">Restauration de la base de données des caches…</string>
- <string name="init_restore_confirm">La base de données est vide. Voulez-vous restaurer la copie de sauvegarde ?</string>
- <string name="init_backup_last">Sauvegarde disponible depuis</string>
- <string name="init_backup_last_no">Il n\'y a pas de fichier avec une sauvegarde.</string>
- <string name="init_mapsources">Source des cartes</string>
- <string name="init_mapsources_description">Vous pouvez choisir la source de vos cartes. En tant qu\'alternative aux cartes Google, diverses cartes de type OpenStreetMap sont disponibles et même en hors-ligne (voir <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a> pour plus de détails).</string>
- <string name="init_mapsource_select">Choisir la source des cartes</string>
- <string name="init_map_directory_description">Dossier contenant les cartes hors-ligne</string>
- <string name="init_gpx_exportdir">Dossier d\'exportation GPX</string>
- <string name="init_gpx_importdir">Dossier d\'importation GPX</string>
- <string name="init_gpx_exportdir_description">Vous pouvez choisir le dossier dans lequel les exportations au format GPX seront stockées.</string>
- <string name="init_gpx_importdir_description">Vous pouvez choisir le dossier à partir duquel les exportations au format GPX seront effectuées.</string>
- <string name="init_maptrail">Montrer la trace sur la carte</string>
- <string name="init_share_after_export">Ouvrir le menu de partage après les exportations GPX.</string>
- <string name="init_trackautovisit">Marquer automatiquement les objets voyageurs comme \"visité\"</string>
- <string name="init_sigautoinsert">Insérer la signature automatiquement</string>
- <string name="init_loaddirectionimg">Charge la direction de l\'image si nécessaire</string>
- <string name="init_default_navigation_tool">Navigation par défaut</string>
- <string name="init_default_navigation_tool_description">Vous pouvez choisir ici l\'outil de navigation à utiliser par défaut.</string>
- <string name="init_default_navigation_tool_select">Sélectionner l\'outil</string>
- <string name="init_default_navigation_tool_2_description">Vous pouvez choisir ici votre deuxième outil de navigation préféré. Il sera activé par un appui long sur l\'icône de navigation situé près du nom de la cache.</string>
- <string name="init_debug_title">Déverminage</string>
- <string name="init_debug_note">c:geo est capable de générer beaucoup d\'informations peu utiles pour des utilisateurs normaux. Cependant, en cas de problème, les développeurs en charge de c:geo peuvent avoir besoin de cette information pour pouvoir l\'identifier. Dans ce cas, ils vous demanderont d\'activer cette option et d\'envoyer les fichiers de journaux.</string>
- <string name="init_debug">Générer les informations</string>
- <string name="init_dbonsdcard_title">Emplacement de la base</string>
- <string name="init_dbonsdcard_note">La base de données de c:geo peut être enregistrée sur un support externe. En choisissant cette option, vous récupérerez de l\'espace de stockage sur votre appareil au détriment de performances réduites. c:geo ne fonctionnera pas si votre carte SD est absente.</string>
- <string name="init_dbonsdcard">Base de données sur stockage externe</string>
- <string name="init_dbmove_dbmove">Déplacement de la base de données</string>
- <string name="init_dbmove_running">Déplacement de la base de données</string>
- <string name="init_dbmove_success">Base de données déplacée</string>
- <string name="init_dbmove_failed">Erreur lors du déplacement de la base de données</string>
- <string name="init_plain_logs">Afficher les entrées de journal sans les couleurs</string>
- <string name="init_use_native_ua">S\'identifier comme le navigateur web Android. Peut résoudre des problèmes de connexion avec certains opérateurs mobiles.</string>
- <string name="init_rendertheme_folder">Dossier contenant les cartes hors-ligne personnelles (optionnelles).</string>
-
- <!-- map sources -->
- <string name="map_source_google_map">Google Maps : plan</string>
- <string name="map_source_google_satellite">Google Maps : satellite</string>
- <string name="map_source_osm_mapnik">OSM : rendu Mapnik</string>
- <string name="map_source_osm_cyclemap">OSM : pistes cyclables</string>
- <string name="map_source_osm_offline">hors-ligne</string>
- <string name="init_sendToCgeo">Envoyers vers c:geo</string>
- <string name="init_sendToCgeo_name">Votre nom d\'appareil:</string>
- <string name="init_sendToCgeo_description">Envoyers vers c:geo permet de recevoir les caches directement depuis le site Geocaching.com en utilisant une extension pour Firefox ou Chrome. Après votre inscription, veuillez lire <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Pour utiliser send2cgeo, vous avez juste besoin de vous inscrire. c:geo fonctionnera aussi sans enregistrer votre appareil.</string>
- <string name="init_sendToCgeo_register">Demande d\'enregistrement</string>
- <string name="init_sendToCgeo_registering">Enregistrer votre appareil pour "Send to c:geo"…</string>
- <string name="init_sendToCgeo_register_ok">Enregistrement réussi. Le code PIN est ####. Utiliser le sur le site de c:geo pour ajouter votre appareil dans votre navigateur.</string>
- <string name="init_sendToCgeo_register_fail">Échec de l\'enregistrement.</string>
- <string name="sendToCgeo_download_fail">c:geo n\'a pas pu charger les caches. Pas de connexion Internet ou problème avec le site send2c:geo.</string>
- <string name="sendToCgeo_no_registration">c:geo n\'a pas pu charger les caches. L\'abonnement à send2c:geo a expiré. Merci de vous réenregistrer dans les Paramètres.</string>
-
- <!-- auth -->
- <string name="auth_twitter">twitter</string>
- <string name="auth_authorize">autorisation de c:geo</string>
- <string name="auth_start">début d\'autorisation</string>
- <string name="auth_again">redémarre</string>
- <string name="auth_pin_hint">code donné par Twitter</string>
- <string name="auth_finish">terminé</string>
- <string name="auth_dialog_wait">en attente de Twitter…</string>
- <string name="auth_dialog_pin_title">code PIN</string>
- <string name="auth_dialog_pin_message">Veuillez saisir votre code PIN fourni par Twitter. Il est obligatoire pour finaliser l\'autorisation.</string>
- <string name="auth_dialog_completed">c:geo est maintenant autorisé à poster sur Twitter.</string>
-
- <!-- cache -->
- <plurals name="cache_counts">
- <item quantity="one">une cache</item>
- <item quantity="other">%1$d caches</item>
- </plurals>
-
- <string name="cache_offline">Hors ligne</string>
- <string name="cache_offline_refresh">Recharger</string>
- <string name="cache_offline_drop">Effacer</string>
- <string name="cache_offline_store">Enregistrer</string>
- <string name="cache_offline_stored">Enregistrée</string>
- <string name="cache_offline_not_ready">Hors ligne indisponible</string>
- <string name="cache_offline_time_about">il y a environ</string>
- <string name="cache_offline_time_mins">minutes</string>
- <string name="cache_offline_time_mins_few">il y a quelques minutes</string>
- <string name="cache_offline_time_hour">une heure</string>
- <string name="cache_offline_time_hours">heures</string>
- <string name="cache_offline_time_days">jours</string>
- <string name="cache_premium">Premium</string>
- <string name="cache_attributes">Attributs</string>
- <string name="cache_inventory">Inventaire</string>
- <string name="cache_log_offline">Visite hors-ligne</string>
- <string name="cache_log_images_title">Image de la visite</string>
- <string name="cache_log_image_default_title">Photo</string>
- <string name="cache_personal_note">Note personnelle</string>
- <string name="cache_personal_note_edit">Éditer</string>
- <string name="cache_personal_note_unstored">Cache non sauvegardée localement</string>
- <string name="cache_personal_note_store">La cache va être sauvegardée localement avant d\'autoriser les notes personnelles.</string>
- <string name="cache_description">Description</string>
- <string name="cache_description_long">Description longue</string>
- <string name="cache_description_table_note">La description contient des informations de formattages qui nécessitent possiblement d\'être vues sur le site %s pour être affichées correctement.</string>
- <string name="cache_watchlist_on">Cette cache est dans votre liste de suivi.</string>
- <string name="cache_watchlist_not_on">Cette cache n\'est pas dans votre liste de suivi.</string>
- <string name="cache_watchlist_add">Ajouter à votre liste de suivi</string>
- <string name="cache_watchlist_remove">Retirer de votre liste de suivi</string>
- <string name="cache_favpoint_on">Cette cache est dans vos favoris.</string>
- <string name="cache_favpoint_not_on">Cette cache n\'est pas dans vos favoris.</string>
- <string name="cache_favpoint_add">Ajouter</string>
- <string name="cache_favpoint_remove">Enlever</string>
- <string name="cache_list_text">Liste :</string>
- <string name="cache_list_change">Déplacer</string>
- <string name="cache_list_unknown">Dans aucune liste</string>
- <string name="cache_images">Images</string>
- <string name="cache_waypoints">Étapes</string>
-
- <plurals name="waypoints">
- <item quantity="one">1 étape</item>
- <item quantity="other">%d étapes</item>
- </plurals>
-
- <string name="cache_waypoints_add">Ajouter une étape</string>
- <string name="cache_hint">Indice</string>
- <string name="cache_logs">Carnet de bord</string>
- <string name="cache_logsfriends">Carnet (amis)</string>
- <string name="cache_dialog_loading_details">Chargement des détails…</string>
- <string name="cache_dialog_loading_details_status_loadpage">Chargement de la page</string>
- <string name="cache_dialog_loading_details_status_details">Analyse</string>
- <string name="cache_dialog_loading_details_status_spoilers">Images indices</string>
- <string name="cache_dialog_loading_details_status_logs">Entrées du carnet</string>
- <string name="cache_dialog_loading_details_status_waypoints">Points intermédiaires</string>
- <string name="cache_dialog_loading_details_status_gcvote">Votes</string>
- <string name="cache_dialog_loading_details_status_elevation">Altitude</string>
- <string name="cache_dialog_loading_details_status_cache">Sauvegarde des données</string>
- <string name="cache_dialog_loading_details_status_render">Préparation de la page</string>
- <string name="cache_dialog_offline_save_title">Hors ligne</string>
- <string name="cache_dialog_offline_save_message">Enregistrement pour une utilisation hors ligne…</string>
- <string name="cache_dialog_offline_drop_title">Hors ligne</string>
- <string name="cache_dialog_offline_drop_message">Suppression des caches de la mémoire…</string>
- <string name="cache_dialog_refresh_title">Recharger</string>
- <string name="cache_dialog_refresh_message">Rechargement des détails…</string>
- <string name="cache_dialog_watchlist_add_title">Liste de suivi</string>
- <string name="cache_dialog_watchlist_add_message">Ajout de la cache à votre liste de suivi…</string>
- <string name="cache_dialog_watchlist_remove_title">Liste de suivi</string>
- <string name="cache_dialog_watchlist_remove_message">Retrait de la cache de votre liste de suivi…</string>
- <string name="cache_dialog_favorite_add_title">Favori</string>
- <string name="cache_dialog_favorite_add_message">Ajout de la cache à vos favoris…</string>
- <string name="cache_dialog_favorite_remove_title">Favori</string>
- <string name="cache_dialog_favorite_remove_message">Suppression de la cache de vos favoris…</string>
- <string name="cache_menu_navigate">Navigation</string>
- <string name="cache_menu_navigation_drive">Navigation (voiture)</string>
- <string name="cache_menu_navigation_walk">Navigation (piéton)</string>
- <string name="cache_menu_maps_directions">Directions Google Maps</string>
- <string name="cache_menu_radar">Radar</string>
- <string name="cache_menu_map">Carte</string>
- <string name="cache_menu_map_static">Cartes statiques</string>
- <string name="cache_menu_download_map_static">Télécharger les cartes statiques</string>
- <string name="cache_menu_rmaps">Rmaps</string>
- <string name="cache_menu_map_ext">Carte externe</string>
- <string name="cache_menu_streetview">Street View</string>
- <string name="cache_menu_browser">Navigateur</string>
- <string name="cache_menu_visit">Carnet</string>
- <string name="cache_menu_visit_offline">Enregistrer la visite hors-ligne</string>
- <string name="cache_menu_spoilers">Images indices</string>
- <string name="cache_menu_around">Alentours</string>
- <string name="cache_menu_event">Ajouter à l\'agenda</string>
- <string name="cache_menu_details">Détails</string>
- <string name="cache_menu_refresh">Recharger</string>
- <string name="cache_menu_share">Partager la cache</string>
- <string name="cache_menu_move_list">Déplacer dans une autre liste</string>
- <string name="cache_menu_gcc">GCC</string>
- <string name="cache_menu_whereyougo">WhereYouGo</string>
- <string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
- <string name="cache_status">Statut</string>
- <string name="cache_status_offline_log">Visite sauvée hors-ligne</string>
- <string name="cache_status_found">Trouvée</string>
- <string name="cache_status_archived">Archivée</string>
- <string name="cache_status_disabled">Désactivée</string>
- <string name="cache_status_premium">Membres privilégiés seulement</string>
- <string name="cache_status_not_premium">Pour tous les membres</string>
- <string name="cache_status_stored">Stockée</string>
- <string name="cache_status_not_stored">Non stockée</string>
- <string name="cache_geocode">Code gc</string>
- <string name="cache_name">Nom</string>
- <string name="cache_type">Type</string>
- <string name="cache_size">Taille</string>
- <string name="cache_distance">Distance</string>
- <string name="cache_difficulty">Difficulté</string>
- <string name="cache_terrain">Terrain</string>
- <string name="cache_rating">Note</string>
- <string name="cache_own_rating">Note personnelle</string>
- <string name="cache_rating_of">de</string>
- <string name="cache_favorite">Favori</string>
- <string name="cache_owner">Propriétaire</string>
- <string name="cache_hidden">Cachée</string>
- <string name="cache_event">Date</string>
- <string name="cache_location">Lieu</string>
- <string name="cache_coordinates">Coordonnées</string>
- <string name="cache_coordinates_original">Coordonnées d\'origine</string>
- <string name="cache_spoiler_images_title">Images indices</string>
- <string name="cache_images_title">Images</string>
- <string name="cache_log_types">Types de visites</string>
- <string name="cache_coordinates_no">Cette cache n\'a pas de coordonnées.</string>
- <string name="cache_clear_history">Effacer l\'historique</string>
- <string name="cache_remove_from_history">Effacer de l\'historique</string>
- <string name="cache_license">Licence</string>
- <string name="cache_image">Image</string>
- <string name="cache_image_open_file">Ouvrir en tant que fichier</string>
- <string name="cache_image_open_browser">Ouvrir dans le navigateur</string>
- <string name="cache_share_field">Partager</string>
- <string name="cache_time_full_hours">heures</string>
- <string name="cache_listed_on">Listée le %s</string>
-
- <!-- editor dialog -->
- <string name="editor_save">Enregistrer</string>
-
- <!-- file list base -->
- <string name="file_searching_in">Recherche de fichiers\nin</string>
- <string name="file_searching_sdcard_in">Aucun fichier trouvé dans le répertoire par défaut:\n%1$s\n\nRecherche dans la totalité de la carte SD:\n</string>
- <string name="file_list_no_files">c:geo n\'a pas trouvé les fichiers nécessaires.</string>
- <string name="file_searching">Recherche des fichiers nécessaires</string>
- <string name="file_title_searching">Recherche en cours</string>
-
- <!-- simple_dir_chooser -->
- <string name="simple_dir_chooser_title">Choisir le dossier</string>
- <string name="simple_dir_chooser_current_path">Chemin :</string>
-
- <!-- gpx -->
- <string name="gpx_import_loading_caches">Chargement des caches depuis le fichier .gpx</string>
- <string name="gpx_import_loading_waypoints">Chargement des points intermédiaires depuis le fichier .gpx</string>
- <string name="gpx_import_store_static_maps">Écriture des cartes statiques</string>
- <string name="gpx_import_caches_imported">caches importées</string>
- <string name="gpx_import_static_maps_skipped">Chargement des cartes statiques interrompu</string>
- <string name="gpx_import_title_static_maps">Enregistrement des cartes statiques</string>
- <string name="gpx_import_title_reading_file">Lecture du fichier</string>
- <string name="gpx_import_title">Importation GPX</string>
- <string name="gpx_import_title_caches_imported">Résultat</string>
- <string name="gpx_import_title_caches_import_failed">Échec de l\'importation</string>
- <string name="gpx_import_error_io">Impossible de lire le fichier</string>
- <string name="gpx_import_error_parser">Format de fichier incorrect</string>
- <string name="gpx_import_error_unexpected">Erreur inattendue</string>
- <string name="gpx_import_confirm">Voulez vous importer le fichier GPX dans c:geo ?</string>
- <string name="gpx_import_canceled">Importation GPX interrompue</string>
- <string name="gpx_import_delete_title">Effacer le fichier</string>
- <string name="gpx_import_delete_message">Voulez vous effacer %s ?</string>
-
- <!-- map file select -->
- <string name="map_file_select_title">Choisir un fichier carte</string>
-
- <!-- theme file select -->
- <!-- import -->
- <string name="web_import_title">Import depuis le web</string>
- <string name="web_import_waiting">En attente de nouvelles caches depuis le web…</string>
- <string name="web_downloading">Téléchargement</string>
- <string name="web_downloaded">Téléchargé</string>
-
- <!-- popup -->
- <string name="popup_more">Plus de détails</string>
-
- <!-- waypoint -->
- <string name="waypoint">Étape</string>
- <string name="waypoint_cache_coordinates">Coordonnées de la cache</string>
- <string name="waypoint_custom">Personnalisé</string>
- <string name="waypoint_my_coordinates">Ma position</string>
- <string name="waypoint_bearing">Relèvement</string>
- <string name="waypoint_distance">Distance</string>
- <string name="waypoint_name">Nom</string>
- <string name="waypoint_edit">Éditer</string>
- <string name="waypoint_delete">Effacer</string>
- <string name="waypoint_edit_title">Éditer une étape</string>
- <string name="waypoint_add_title">Ajouter une étape</string>
- <string name="waypoint_note">Note</string>
- <string name="waypoint_visited">Marquer comme visité</string>
- <string name="waypoint_save">Sauver</string>
- <string name="waypoint_loading">Chargement d\'une étape…</string>
- <string name="waypoint_do_not_touch_cache_coordinates">Ne pas modifier les coordonnées de la cache</string>
- <string name="waypoint_set_as_cache_coords">Utiliser comme coordonnées de la cache dans c:geo</string>
- <string name="waypoint_save_and_modify_on_website">Utiliser comme coordonnées de la cache dans c:geo et sur le site web</string>
- <string name="waypoint_reset_cache_coords">Réinitialiser les coordonnées de la cache</string>
- <string name="waypoint_coordinates_has_been_reset_on_website">Les coordonnées de la cache ont été reinitialisées sur le site web.</string>
- <string name="waypoint_coordinates_being_reset_on_website">Réinitialisation des coordonnées de la cache sur le site web…</string>
- <string name="waypoint_reset">Réinitialiser</string>
- <string name="waypoint_localy_reset_cache_coords">Réinitialiser dans c:geo</string>
- <string name="waypoint_reset_local_and_remote_cache_coords">Réinitialiser dans c:geo et sur le site web</string>
- <string name="waypoint_being_saved">Étape en cours de sauvegarde…</string>
- <string name="waypoint_coordinates_couldnt_be_modified_on_website">Le site web n\'accepte pas la modification des coordonnées de la cache.</string>
- <string name="waypoint_coordinates_upload_error">Erreur lors de la modification des coordonnées sur le site web.</string>
- <string name="waypoint_coordinates_uploading_to_website">Envoi des coordonnées %s sur le site web.</string>
- <string name="waypoint_coordinates_has_been_modified_on_website">Les coordonnées de la cache ont été modifiées sur le site web en : %s</string>
- <string name="waypoint_done">Ok</string>
- <string name="waypoint_duplicate">Dupliquer</string>
- <string name="waypoint_copy_of">Copie de</string>
- <string name="search_history">Historique</string>
- <string name="search_history_empty">Aucune destination précédente</string>
- <string name="search_remove_destination">Destination effacée</string>
- <string name="search_clear_history">Effacer l\'historique</string>
- <string name="search_history_cleared">Historique effacé</string>
- <string name="waypoint_coordinate_formats_plain">Texte</string>
-
- <!-- visit -->
- <string name="visit_tweet">Publier votre découverte sur Twitter</string>
-
- <!-- map -->
- <string name="map_map">Carte</string>
- <string name="map_live">Carte active</string>
- <string name="map_view_map">Voir carte</string>
- <string name="map_modes">Marqueurs</string>
- <string name="map_trail_show">Afficher le parcours</string>
- <string name="map_trail_hide">Cacher le parcours</string>
- <string name="map_circles_show">Afficher les cercles</string>
- <string name="map_circles_hide">Cacher les cercles</string>
- <string name="map_theme_builtin">Défault</string>
- <string name="map_theme_select">Sélectionner le thème</string>
- <string name="map_live_enable">Activer Temps réel</string>
- <string name="map_live_disable">Désactiver Temps réel</string>
- <string name="map_static_title">Cartes statiques</string>
- <string name="map_static_loading">Chargement des cartes statiques…</string>
- <string name="map_token_err">Depuis que c:geo est capable de télécharger des données partielles, les coordonnées des caches peuvent être inexactes.</string>
- <string name="map_as_list">Lister les caches</string>
- <string name="map_strategy">Stratégie</string>
- <string name="map_strategy_title">Stratégie de carte active</string>
- <string name="map_strategy_fastest">La plus rapide</string>
- <string name="map_strategy_fast">Rapide</string>
- <string name="map_strategy_auto">En fonction du déplacement</string>
- <string name="map_strategy_detailed">Détaillée</string>
- <string name="live_map_notification">Lors de l\'affichage de la carte active, certaines coordonnées de géocaches peuvent être imprécises et sont indiquées par un cercle orange.\nDemander les détails d\'une géocache ou la sauver pour une utilisation hors-ligne récupérera les coordonnées exactes.\n\nVous trouverez plus d\'informations sur les changements sur la page \"À propos de c:geo\".</string>
- <string name="live_map_note_dontshow">Ne plus afficher</string>
-
- <!-- search -->
- <string name="search_bar_hint">Recherche de caches</string>
- <string name="search_bar_desc">Caches (code GC, mot clé), Objets voyageurs (code TB)</string>
- <string name="search_coordinates">Coordonnées</string>
- <string name="search_coordinates_button">Recherche par coordonnées</string>
- <string name="search_address">Adresse</string>
- <string name="search_address_button">Recherche par adresse</string>
- <string name="search_geo">Geocode</string>
- <string name="search_geo_button">Recherche par geocode</string>
- <string name="search_kw">Mots clés</string>
- <string name="search_kw_prefill">Mot clé</string>
- <string name="search_kw_button">Recherche par mot clé</string>
- <string name="search_fbu">Trouvé par utilisateur</string>
- <string name="search_fbu_prefill">Utilisateur</string>
- <string name="search_fbu_button">Recherche par utilisateur</string>
- <string name="search_hbu">Cachées par utilisateur</string>
- <string name="search_hbu_prefill">Propriétaire</string>
- <string name="search_hbu_button">Recherche par propriétaire</string>
- <string name="search_tb">Objet voyageur</string>
- <string name="search_tb_hint">Identifiant de l\'objet</string>
- <string name="search_tb_button">Recherche par objet voyageur</string>
- <string name="search_destination">Destination</string>
- <string name="search_direction_rel">De cette position</string>
- <string name="search_address_started">Recherche par lieu</string>
- <string name="search_address_result">Lieux trouvés</string>
- <string name="search_own_caches">Chercher mes caches</string>
-
- <!-- trackable -->
- <string name="trackable">Objet voyageur</string>
- <string name="trackable_details_loading">Chargement des détails d\'un objet voyageur…</string>
- <string name="trackable_log_touch">Toucher l\'objet</string>
- <string name="trackable_browser_open">Ouvrir dans un navigateur</string>
- <string name="trackable_goal">But</string>
- <string name="trackable_details">Détails</string>
- <string name="trackable_image">Image</string>
- <string name="trackable_code">Code TB</string>
- <string name="trackable_name">Nom</string>
- <string name="trackable_type">Type</string>
- <string name="trackable_owner">Propriétaire</string>
- <string name="trackable_spotted">Se situe</string>
- <string name="trackable_spotted_in_cache">Dans</string>
- <string name="trackable_spotted_at_user">Entre les mains de </string>
- <string name="trackable_spotted_unknown_location">Lieu inconnu</string>
- <string name="trackable_spotted_owner">Entre les mains du propriétaire</string>
- <string name="trackable_origin">Origine</string>
- <string name="trackable_unknown">Inconnu</string>
- <string name="trackable_released">Libéré</string>
- <string name="trackable_distance">Distance</string>
- <string name="trackable_touch">Toucher</string>
-
- <!-- user -->
- <string name="user_menu_title">A propos</string>
- <string name="user_menu_view_hidden">Caches cachées</string>
- <string name="user_menu_view_found">Caches trouvées</string>
- <string name="user_menu_open_browser">Ouvrir le profil dans un navigateur</string>
- <string name="user_menu_send_message">Envoyer un message</string>
-
- <!-- navigation -->
- <string name="navigation">Navigation</string>
- <string name="compass_title">Boussole</string>
- <string name="use_gps">Utiliser GPS</string>
- <string name="use_compass">Utiliser la boussole</string>
- <string name="destination_select">Choisir une destination</string>
- <string name="destination_set">Définir une destination</string>
- <string name="navigation_direct_navigation">Navigation directe</string>
- <string name="navigation_target">Cible</string>
-
- <!-- license -->
- <string name="license">Licence</string>
- <string name="license_show">Afficher la licence</string>
- <string name="license_dismiss">Rejeter</string>
-
- <!-- helpers -->
- <string name="helper_calendar_title">Module supplémentaire c:geo agenda</string>
- <string name="helper_calendar_missing">Module supplémentaire c:geo agenda non installé</string>
- <string name="helper_calendar_description">Permet d\'exporter les événements liés aux caches dans le calendrier Android.</string>
- <string name="helper_locus_title">Locus</string>
- <string name="helper_locus_description">Application simple affichant des cartes en ligne et hors ligne. Permet d\'enregistrer son parcours, de gérer des POI et de nombreuses autres fonctions utiles.</string>
- <string name="helper_gpsstatus_title">Etat GPS</string>
- <string name="helper_gpsstatus_description">Vous pouvez utiliser le radar de cette application dans c:geo. Il gère des informations supplémentaires relatives au GPS.</string>
- <string name="helper_bluetoothgps_title">GPS Bluetooth</string>
- <string name="helper_bluetoothgps_description">Vous permet d\'utiliser un GPS externe pour une meilleure réception, plus précis et économise la batterie.</string>
- <string name="helper_barcode_title">Lecteur de code barre</string>
- <string name="helper_barcode_description">Il existe des programmes et des sites web permettant d\'afficher un géo-code sous forme de code barre. Avec cette application, c:geo pourra lire les géo-codes affichés sous cette forme sur l\'écran de votre ordinateur.</string>
-
- <!-- add-ons -->
- <string name="addon_missing_title">Module complémentaire manquant</string>
- <string name="addon_download_prompt">Le télécharger sur Google Play.</string>
-
- <!-- export -->
- <string name="export">Exporter</string>
- <string name="export_exportedto">exporté vers</string>
- <string name="export_failed">Échec de l\'exportation</string>
- <string name="export_fieldnotes">Notes de terrain</string>
- <string name="export_fieldnotes_info">Les notes de terrain seront sauvées dans le dossier /sdcard/field-notes avec, comme nom de fichier, la date et l\'heure courantes.</string>
- <string name="export_fieldnotes_upload">Envoyer vers Geocaching.com</string>
- <string name="export_fieldnotes_uploading">Envoi en cours…</string>
- <string name="export_fieldnotes_upload_success">Envoi effectué avec succès</string>
- <string name="export_fieldnotes_onlynew">Uniquement les nouveautés depuis le dernier envoi</string>
- <string name="export_fieldnotes_creating">Création des notes de terrain…</string>
- <string name="export_gpx">GPX</string>
- <string name="export_gpx_info">Le fichier GPX sera exporté dans %1$s avec la date et l\'heure courantes comme nom de fichier.</string>
- <string name="export_gpx_to">Envoyer le GPX exporté vers</string>
-
- <!-- GC attributes -->
- <string name="attribute_dogs_yes">Chiens autorisés</string>
- <string name="attribute_dogs_no">Chiens interdits</string>
- <string name="attribute_bicycles_yes">Vélos autorisés</string>
- <string name="attribute_bicycles_no">Vélos interdits</string>
- <string name="attribute_motorcycles_yes">Motos autorisées</string>
- <string name="attribute_motorcycles_no">Motos interdites</string>
- <string name="attribute_quads_yes">Quads autorisés</string>
- <string name="attribute_quads_no">Quads interdits</string>
- <string name="attribute_jeeps_yes">Véhicules tout-terrain autorisés</string>
- <string name="attribute_jeeps_no">Véhicules tout-terrain interdits</string>
- <string name="attribute_snowmobiles_yes">Motos-neige autorisées</string>
- <string name="attribute_snowmobiles_no">Motos-neige interdites</string>
- <string name="attribute_horses_yes">Chevaux autorisés</string>
- <string name="attribute_horses_no">Chevaux interdits</string>
- <string name="attribute_campfires_yes">Feux de camp autorisés</string>
- <string name="attribute_campfires_no">Feux de camp interdits</string>
- <string name="attribute_rv_yes">Camions/Camping-cars autorisés</string>
- <string name="attribute_rv_no">Camions/Camping-cars interdits</string>
- <string name="attribute_kids_yes">Recommandé pour les enfants</string>
- <string name="attribute_kids_no">Non recommandé pour les enfants</string>
- <string name="attribute_onehour_yes">Prend moins d\'une heure</string>
- <string name="attribute_onehour_no">Prend plus d\'une heure</string>
- <string name="attribute_scenic_yes">Point de vue</string>
- <string name="attribute_scenic_no">Pas de point de vue</string>
- <string name="attribute_hiking_yes">Randonnée importante</string>
- <string name="attribute_hiking_no">Randonnée peu importante</string>
- <string name="attribute_climbing_yes">Escalade difficile</string>
- <string name="attribute_climbing_no">Pas d\'escalade difficile</string>
- <string name="attribute_wading_yes">Peut demander à barboter</string>
- <string name="attribute_wading_no">Ne demande pas à barboter</string>
- <string name="attribute_swimming_yes">Peut demander à nager</string>
- <string name="attribute_swimming_no">Ne demande pas à nager</string>
- <string name="attribute_available_yes">Disponible par tout temps</string>
- <string name="attribute_available_no">Pas disponible par tout temps</string>
- <string name="attribute_night_yes">Recommandé de nuit</string>
- <string name="attribute_night_no">Non recommandé de nuit</string>
- <string name="attribute_winter_yes">Disponible durant l\'hiver</string>
- <string name="attribute_winter_no">Pas disponible durant l\'hiver</string>
- <string name="attribute_stealth_yes">Bonne santé nécessaire</string>
- <string name="attribute_stealth_no">Bonne santé pas nécessaire</string>
- <string name="attribute_firstaid_yes">Nécessite une maintenance</string>
- <string name="attribute_firstaid_no">Ne nécessite pas de maintenance</string>
- <string name="attribute_cow_yes">Attention au bétail</string>
- <string name="attribute_cow_no">Pas de bétail</string>
- <string name="attribute_field_puzzle_yes">Puzzle de terrain</string>
- <string name="attribute_field_puzzle_no">Pas de puzzle de terrain</string>
- <string name="attribute_nightcache_yes">Cache de nuit</string>
- <string name="attribute_nightcache_no">Pas une cache de nuit</string>
- <string name="attribute_parkngrab_yes">Drive-in</string>
- <string name="attribute_parkngrab_no">Pas une drive-in</string>
- <string name="attribute_abandonedbuilding_yes">Batiment abandonné</string>
- <string name="attribute_abandonedbuilding_no">Pas batiment abandonné</string>
- <string name="attribute_hike_short_yes">Randonnée courte (moins d\'1 km)</string>
- <string name="attribute_hike_short_no">Pas de randonnée courte</string>
- <string name="attribute_hike_med_yes">Randonnée moyenne (1 à 10 km)</string>
- <string name="attribute_hike_med_no">Pas de randonnée moyenne</string>
- <string name="attribute_hike_long_yes">Randonnée longue (plus de 10 km)</string>
- <string name="attribute_hike_long_no">Pas de randonnée longue</string>
- <string name="attribute_seasonal_yes">Accès saisonnier</string>
- <string name="attribute_seasonal_no">Pas d\'accès saisonnier</string>
- <string name="attribute_touristok_yes">Ami des touristes</string>
- <string name="attribute_touristok_no">Pas ami avec les touristes</string>
- <string name="attribute_frontyard_yes">Résidence privée</string>
- <string name="attribute_frontyard_no">Pas une résidence privée</string>
- <string name="attribute_teamwork_yes">Travail d\'équipe nécessaire</string>
- <string name="attribute_teamwork_no">Pas de travail d\'équipe nécessaire</string>
- <string name="attribute_landf_yes">Circuit Perdu et trouvé</string>
- <string name="attribute_landf_no">Pas un circuit Perdu et trouvé</string>
- <string name="attribute_partnership_yes">Cache en partenariat</string>
- <string name="attribute_partnership_no">Pas de cache en partenariat</string>
- <string name="attribute_fee_yes">Parking payant</string>
- <string name="attribute_fee_no">Pas de parking payant</string>
- <string name="attribute_rappelling_yes">Matériel d\'escalade nécessaire</string>
- <string name="attribute_rappelling_no">Matériel d\'escalade pas nécessaire</string>
- <string name="attribute_boat_yes">Bateau nécessaire</string>
- <string name="attribute_boat_no">Pas de bateau nécessaire</string>
- <string name="attribute_scuba_yes">Matériel de plongée nécessaire</string>
- <string name="attribute_scuba_no">Matériel de plongée pas nécessaire</string>
- <string name="attribute_flashlight_yes">Torche nécessaire</string>
- <string name="attribute_flashlight_no">Torche pas nécessaire</string>
- <string name="attribute_uv_yes">Lumière UV nécessaire</string>
- <string name="attribute_uv_no">Lumière UV pas nécessaire</string>
- <string name="attribute_snowshoes_yes">Chaussures de neige nécessaires</string>
- <string name="attribute_snowshoes_no">Chaussures de neige pas nécessaires</string>
- <string name="attribute_skiis_yes">Skis de fond nécessaires</string>
- <string name="attribute_skiis_no">Skis de fond pas nécessaires</string>
- <string name="attribute_s_tool_yes">Outils spéciaux nécessaires</string>
- <string name="attribute_s_tool_no">Outils spéciaux pas nécessaires</string>
- <string name="attribute_wirelessbeacon_yes">Balise sans fil</string>
- <string name="attribute_wirelessbeacon_no">Pas de balise sans fil</string>
- <string name="attribute_treeclimbing_yes">Escalade d\'arbre nécessaire</string>
- <string name="attribute_treeclimbing_no">Pas d\'escalade d\'arbre nécessaire</string>
- <string name="attribute_poisonoak_yes">Plantes toxiques</string>
- <string name="attribute_poisonoak_no">Pas de plantes toxiques</string>
- <string name="attribute_dangerousanimals_yes">Animaux dangereux</string>
- <string name="attribute_dangerousanimals_no">Pas d\'animaux dangereux</string>
- <string name="attribute_ticks_yes">Tiques</string>
- <string name="attribute_ticks_no">Pas de tique</string>
- <string name="attribute_mine_yes">Mines abandonnées</string>
- <string name="attribute_mine_no">Pas de mine abandonnée</string>
- <string name="attribute_cliff_yes">Chutes de pierres</string>
- <string name="attribute_cliff_no">Pas de chute de pierres</string>
- <string name="attribute_hunting_yes">Chasse</string>
- <string name="attribute_hunting_no">Pas de chasse</string>
- <string name="attribute_danger_yes">Zone dangereuse</string>
- <string name="attribute_danger_no">Pas de zone dangereuse</string>
- <string name="attribute_thorn_yes">Épines</string>
- <string name="attribute_thorn_no">Pas d\'épine</string>
- <string name="attribute_wheelchair_yes">Accessible en fauteuil roulant</string>
- <string name="attribute_wheelchair_no">Pas accessible en fauteuil roulant</string>
- <string name="attribute_parking_yes">Parking possible</string>
- <string name="attribute_parking_no">Pas de parking possible</string>
- <string name="attribute_public_yes">Transport public</string>
- <string name="attribute_public_no">Pas de transport public</string>
- <string name="attribute_water_yes">Eau potable proche</string>
- <string name="attribute_water_no">Pas d\'eau potable proche</string>
- <string name="attribute_restrooms_yes">Toilettes publiques proches</string>
- <string name="attribute_restrooms_no">Pas de toilette publique proche</string>
- <string name="attribute_phone_yes">Téléphone proche</string>
- <string name="attribute_phone_no">Pas de téléphone proche</string>
- <string name="attribute_picnic_yes">Tables de pique-nique proches</string>
- <string name="attribute_picnic_no">Pas de table de pique-nique proche</string>
- <string name="attribute_camping_yes">Camping possible</string>
- <string name="attribute_camping_no">Pas de camping possible</string>
- <string name="attribute_stroller_yes">Accessible en poussette</string>
- <string name="attribute_stroller_no">Pas accessible en poussette</string>
- <string name="attribute_fuel_yes">Essence proche</string>
- <string name="attribute_fuel_no">Pas d\'essence proche</string>
- <string name="attribute_food_yes">Nourriture proche</string>
- <string name="attribute_food_no">Pas de nourriture proche</string>
- <string name="attribute_oc_only_yes">Uniquement enregistrable sur Opencaching</string>
- <string name="attribute_oc_only_no">Pas uniquement enregistrable sur Opencaching</string>
- <string name="attribute_link_only_yes">Hyperlien vers un autre portail</string>
- <string name="attribute_link_only_no">Pas uniquement les hyperliens vers un autre portail</string>
- <string name="attribute_letterbox_yes">Boîte à lettres (timbre requis)</string>
- <string name="attribute_letterbox_no">Pas de boîte à lettres avec timbre requis</string>
- <string name="attribute_railway_yes">Chemin de fer en service à proximité</string>
- <string name="attribute_railway_no">Pas de chemin de fer en service à proximité</string>
- <string name="attribute_syringe_yes">Premier secours disponible</string>
- <string name="attribute_syringe_no">Pas de premier secours disponible</string>
- <string name="attribute_swamp_yes">Marais</string>
- <string name="attribute_swamp_no">Pas de marais</string>
- <string name="attribute_hills_yes">Endroit vallonné</string>
- <string name="attribute_hills_no">Pas d\'endroit vallonné</string>
- <string name="attribute_easy_climbing_yes">Escalade facile</string>
- <string name="attribute_easy_climbing_no">Pas d\'escalade facile</string>
- <string name="attribute_poi_yes">Point d\'intérêt</string>
- <string name="attribute_poi_no">Pas de point d\'intérêt</string>
- <string name="attribute_moving_target_yes">Cible mouvante</string>
- <string name="attribute_moving_target_no">Pas de cible mouvante</string>
- <string name="attribute_webcam_yes">Webcam</string>
- <string name="attribute_webcam_no">Pas de webcam</string>
- <string name="attribute_inside_yes">Dans un endroit clos (grotte, bâtiment, etc.)</string>
- <string name="attribute_inside_no">Pas dans un endroit clos</string>
- <string name="attribute_in_water_yes">Dans l\'eau</string>
- <string name="attribute_in_water_no">Hors de l\'eau</string>
- <string name="attribute_no_gps_yes">Sans GPS (boîte à lettres, boussole, etc.)</string>
- <string name="attribute_no_gps_no">Avec GPS</string>
- <string name="attribute_overnight_yes">Passage de la nuit sur place nécessaire</string>
- <string name="attribute_overnight_no">Pas de passage de la nuit sur place nécessaire</string>
- <string name="attribute_specific_times_yes">Seulement possible à certaines heures</string>
- <string name="attribute_specific_times_no">Possible à toute heure</string>
- <string name="attribute_day_yes">Seulement de jour</string>
- <string name="attribute_day_no">Pas uniquement de jour</string>
- <string name="attribute_tide_yes">Marée</string>
- <string name="attribute_tide_no">Pas de marée</string>
- <string name="attribute_all_seasons_yes">Par toute saison</string>
- <string name="attribute_all_seasons_no">Pas par toute saison</string>
- <string name="attribute_breeding_yes">Période de reproduction / nature protégée</string>
- <string name="attribute_breeding_no">Pas de pérstiode de reproduction / nature protégée</string>
- <string name="attribute_snow_proof_yes">Cache protégée contre la neige</string>
- <string name="attribute_snow_proof_no">Cache non protégeé contre la neige</string>
- <string name="attribute_compass_yes">Boussole</string>
- <string name="attribute_compass_no">Pas de boussole</string>
- <string name="attribute_cave_yes">Équipement de spéléologie</string>
- <string name="attribute_cave_no">Sans équipement de spéléologie</string>
- <string name="attribute_aircraft_yes">Avion</string>
- <string name="attribute_aircraft_no">Pas d\'avion</string>
- <string name="attribute_investigation_yes">Enquête</string>
- <string name="attribute_investigation_no">Sans enquête</string>
- <string name="attribute_puzzle_yes">Puzzle / Mystère</string>
- <string name="attribute_puzzle_no">Sans puzzle / mystère</string>
- <string name="attribute_arithmetic_yes">Problème arithmétique</string>
- <string name="attribute_arithmetic_no">Sans problème arithmétique</string>
- <string name="attribute_other_cache_yes">Autre type de cache</string>
- <string name="attribute_other_cache_no">Pas d\'autre type de cache</string>
- <string name="attribute_ask_owner_yes">Demander les conditions au propriétaire</string>
- <string name="attribute_ask_owner_no">Ne pas demander les conditions au propriétaire</string>
- <string name="attribute_unknown_yes">Attribut inconnu</string>
- <string name="attribute_unknown_no">Attribut inconnu négatif</string>
-
- <!-- next things -->
- <string name="legal_note">Pour utiliser les services de Geocaching.com, vous devez accepter les termes et conditions de la <a href="http://www.geocaching.com/about/termsofuse.aspx">mise en garde de Groundspeak</a>.</string>
- <string name="quote">Pour faciliter le géocaching.</string>
- <string name="powered_by">carnero</string>
- <!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
- <string name="support">support: <a href="">support@cgeo.org</a></string>
- <string name="website">site: <a href="">cgeo.org</a></string>
- <string name="facebook">facebook: <a href="">page c:geo</a></string>
- <string name="twitter">twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manuel: <a href="">c:geo en bref</a></string>
- <string name="market">Android: <a href="">c:geo sur Google Play</a></string>
- <string name="about_twitter">Voulez-vous publier un nouveau statut sur Twitter à chaque nouvelle cache découverte sous <b>c:geo</b>?</string>
- <string name="about_auth_1">Le processus suivant permet à <b>c:geo</b> d\'accéder à votre compte Twitter - si vous acceptez.</string>
- <string name="about_auth_2">Cliquer sur le bouton \"début d\'autorisation\" pour démarrer. Une fenêtre de navigateur va s\'ouvrir pour vous connecter sur Twitter. Accepter pour que <b>c:geo</b> accéde à votre compte. Twitter vous affichera alors une code PIN composé de chiffres. Merci de coller ce code dans <b>c:geo</b> puis confirmer. C\'est tout!</string>
-
- <!-- status -->
- <string name="status_new_release" tools:ignore="UnusedResources">Nouvelle version disponible.\nCliquer pour installer.</string>
- <string name="status_new_nightly" tools:ignore="UnusedResources">Nouvelle version de test disponible.\nCliquer pour installer.</string>
- <string name="status_new_rc" tools:ignore="UnusedResources">Nouvelle version candidate disponible.\nCliquer pour installer.</string>
- <string name="status_geocaching_change" tools:ignore="UnusedResources">Des changements récents sur Geocaching.com ont cassé c:geo.\nNous sommes en train de nous en occuper.</string>
- <string name="status_geocaching_livemap" tools:ignore="UnusedResources">Des changements récents sur Geocaching.com ont cassé la carte active.\nNous sommes en train de nous en occuper.</string>
-
- <!-- text-to-speech for compass view -->
- <string name="tts_service">Boussole parlante</string>
- <string name="tts_start">Commencer à parler</string>
- <string name="tts_stop">Arrêter de parler</string>
- <string name="tts_kilometers">%s kilomètres</string>
- <string name="tts_meters">%s mètres</string>
- <string name="tts_miles">%s milles</string>
- <string name="tts_feet">%s pieds</string>
- <string name="tts_oclock">%s heures</string>
-
- <!-- various -->
- <string name="clipboard_copy_ok">Copié dans le presse-papiers</string>
-
- <plurals name="days_ago">
- <item quantity="one">hier</item>
- <item quantity="other">il y a %d jours</item>
- </plurals>
-
-</resources> \ No newline at end of file
+ <string name="app_name">c:geo</string>
+ <string name="cache">Cache</string>
+ <string name="detail">Détails</string>
+ <string name="search">Rechercher</string>
+ <string name="settings_titlebar">c:geo Paramètres</string>
+ <string name="helpers">Aide à l\'installation</string>
+ <string name="about">À propos de c:geo</string>
+ <string name="latitude">Latitude</string>
+ <string name="longitude">Longitude</string>
+ <string name="action_bar_share_title">Partager le lien vers la cache</string>
+ <string name="all_types">Tous les genres</string>
+ <string name="traditional">Traditionnelles</string>
+ <string name="multi">Multiples</string>
+ <string name="mystery">Inconnues</string>
+ <string name="letterbox">Boîtes aux lettres hybrides</string>
+ <string name="event">Événements</string>
+ <string name="mega">Méga-événements</string>
+ <string name="earth">Earthcache</string>
+ <string name="cito">Cache in trash out</string>
+ <string name="webcam">Webcams</string>
+ <string name="virtual">Virtuelles</string>
+ <string name="wherigo">Wherigo</string>
+ <string name="lostfound">Perdues &amp; trouvées</string>
+ <string name="ape">Project ape cache</string>
+ <string name="gchq">Groundspeak hq</string>
+ <string name="gps">GPS adventures exhibit</string>
+ <string name="block">Fête locale Groundspeak</string>
+ <string name="unknown">Type inconnu</string>
+ <string name="cache_size_micro">micro</string>
+ <string name="cache_size_small">petite</string>
+ <string name="cache_size_regular">normale</string>
+ <string name="cache_size_large">grande</string>
+ <string name="cache_size_other">autre</string>
+ <string name="cache_size_virtual">virtuelle</string>
+ <string name="cache_size_notchosen">non renseignée</string>
+ <string name="cache_size_unknown">inconnu</string>
+ <string name="wp_final">Étape finale</string>
+ <string name="wp_stage">Étape</string>
+ <string name="wp_puzzle">Énigme</string>
+ <string name="wp_pkg">Parking</string>
+ <string name="wp_trailhead">Départ du sentier</string>
+ <string name="wp_waypoint">Point de repère</string>
+ <string name="wp_original">Coordonnées originales</string>
+ <string name="log_found">Trouvée</string>
+ <string name="log_dnf">Pas trouvée</string>
+ <string name="log_note">Note</string>
+ <string name="log_published">Publiée</string>
+ <string name="log_enabled">Activée</string>
+ <string name="log_disabled">Désactivée</string>
+ <string name="log_attend">Participera</string>
+ <string name="log_attended">A participé</string>
+ <string name="log_retrieved">Récupéré</string>
+ <string name="log_placed">Placé</string>
+ <string name="log_grabbed">Pris ailleurs</string>
+ <string name="log_movecollection">Ajouté à une collection</string>
+ <string name="log_moveinventory">Ajouté à l\'inventaire</string>
+ <string name="log_maintained">Maintenance effectuée</string>
+ <string name="log_maintenance_needed">Nécessite une maintenance</string>
+ <string name="log_update">Coordonnées mises à jour</string>
+ <string name="log_archived">Archivée</string>
+ <string name="log_unarchived">Désarchivée</string>
+ <string name="log_needs_archived">Nécessite d\'être archivée</string>
+ <string name="log_discovered">Découverte</string>
+ <string name="log_reviewer">Note du relecteur</string>
+ <string name="log_retractlisting">Retirer l\'entrée</string>
+ <string name="log_marked_missing">Marquer comme absente</string>
+ <string name="log_tb_nothing">Ne fait rien</string>
+ <string name="log_tb_visit">Visité</string>
+ <string name="log_tb_drop">Déposé ici</string>
+ <string name="log_tb_changeall">Tout modifié</string>
+ <string name="log_save">Enregistrer</string>
+ <string name="log_saving">Enregistrement en cours…</string>
+ <string name="log_saving_and_uploading">Envoi de la note et de l\'image…</string>
+ <string name="log_clear">Effacer</string>
+ <string name="log_post">Envoyer</string>
+ <string name="log_post_rate">Envoyer &amp; noter</string>
+ <string name="log_post_no_rate">Envoyer &amp; ne pas noter</string>
+ <string name="log_post_not_possible">Chargement de la page…</string>
+ <string name="log_add">Ajouter</string>
+ <string name="log_rating">Note</string>
+ <string name="log_no_rating">Pas de note</string>
+ <string name="log_stars_1">1 étoile</string>
+ <string name="log_stars_15">1,5 étoiles</string>
+ <string name="log_stars_2">2 étoiles</string>
+ <string name="log_stars_25">2,5 étoiles</string>
+ <string name="log_stars_3">3 étoiles</string>
+ <string name="log_stars_35">3,5 étoiles</string>
+ <string name="log_stars_4">4 étoiles</string>
+ <string name="log_stars_45">4,5 étoiles</string>
+ <string name="log_stars_5">5 étoiles</string>
+ <string name="log_stars_1_description">faible</string>
+ <string name="log_stars_15_description">plutôt faible</string>
+ <string name="log_stars_2_description">en dessous de la moyenne</string>
+ <string name="log_stars_25_description">pas si mal</string>
+ <string name="log_stars_3_description">dans la moyenne</string>
+ <string name="log_stars_35_description">pas mal du tout</string>
+ <string name="log_stars_4_description">plutôt bien</string>
+ <string name="log_stars_45_description">très bien</string>
+ <string name="log_stars_5_description">super</string>
+ <string name="log_webcam">photo webcam prise</string>
+ <string name="log_new_log">Carnet</string>
+ <string name="log_new_log_text">Message</string>
+ <string name="log_announcement">Annonce</string>
+ <string name="log_today">Aujourd\'hui</string>
+ <string name="log_yesterday">Hier</string>
+ <string name="log_smilies">Sourillards</string>
+ <string name="log_image">Image</string>
+ <string name="log_image_attach">Ajouter une image</string>
+ <string name="log_image_edit">Éditer l\'image</string>
+ <string name="log_image_stored">Existante</string>
+ <string name="log_image_camera">Nouvelle</string>
+ <string name="log_image_caption">Légende</string>
+ <string name="log_image_description">Description</string>
+ <string name="log_image_scale">Mise à l\'échelle</string>
+ <string name="translate_to_sys_lang">Traduire en %s</string>
+ <string name="translate_to_english">Traduire en anglais</string>
+ <string name="translate_length_warning">La traduction d\'un texte trop long peut échouer.</string>
+ <string name="err_none">ok</string>
+ <string name="err_start">Communication non démarrée</string>
+ <string name="err_parse">Échec login lecture page</string>
+ <string name="err_server">Échec de la connexion à Geocaching.com (probléme de serveur ou de connexion?)</string>
+ <string name="err_login">Pas d\'utilisateur ou de mot de passe enregistré</string>
+ <string name="err_login_failed">c:geo ne peut pas se connecter.</string>
+ <string name="err_login_failed_toast">c:geo est en mode hors-ligne et ne peut pas se connecter. Vérifiez votre connexion Internet.</string>
+ <string name="err_unknown">Erreur inconnue</string>
+ <string name="err_comm">Erreur inconnue de communication</string>
+ <string name="err_missing_auth">Nom d\'utilisateur ou mot de passe manquant.</string>
+ <string name="err_wrong">Nom d\'utilisateur inconnu ou mauvais mot de passe</string>
+ <string name="err_maintenance">Le site de Geocaching.com est en cours de maintenance, essayez plus tard. c:geo fonctionne en mode hors-ligne.</string>
+ <string name="err_license">L\'utilisateur n\'a pas accepté les termes et les conditions d\'utilisation de Geocaching.com</string>
+ <string name="err_unvalidated_account">Vous devez d\'abord confirmer votre compte sur le site web Geocaching.com</string>
+ <string name="err_unpublished">La cache a été retirée de la publication</string>
+ <string name="err_premium_only">La cache est réservée aux membres Premium de Geocaching.com</string>
+ <string name="err_detail_open">c:geo ne peut pas ouvrir le détail de la cache.</string>
+ <string name="err_detail_cache">c:geo ne peut pas afficher cette cache. Est-ce vraiment une géocache?</string>
+ <string name="err_detail_cache_find">c:geo ne peut pas trouver de caches</string>
+ <string name="err_detail_cache_find_some">c:geo ne peut pas trouver cette cache.</string>
+ <string name="err_detail_cache_find_any">c:geo ne peut pas trouver de caches.</string>
+ <string name="err_detail_cache_forgot">c:geo a oublié la cache demandée.</string>
+ <string name="err_detail_google_maps_limit_reached">c:geo n\'a pas pu charger les cartes statiques. La limite de Google Maps est peut être temporairement atteinte.</string>
+ <string name="err_detail_no_spoiler">c:geo n\'a pas trouvé d\'image indice pour cette cache.</string>
+ <string name="err_detail_no_map_static">c:geo n\'a pas trouvé de cartes statiques pour cette cache.</string>
+ <string name="err_detail_not_load_map_static">c:geo n\'a pas réussi à charger les cartes statiques.</string>
+ <string name="err_detail_still_working">Autre tâche déjà en cours.</string>
+ <string name="err_watchlist_still_managing">Liste de suivi toujours en traitement.</string>
+ <string name="err_watchlist_failed">Échec lors du changement de votre liste de suivi.</string>
+ <string name="err_application_no">c:geo ne trouve pas d\'application conforme.</string>
+ <string name="err_auth_initialize">c:geo a échoué dans la demande d\'autorisation.</string>
+ <string name="err_auth_process">Échec de la demande d\'autorisation.</string>
+ <string name="err_cannot_log_visit">c:geo n\'a pas assez d\'information pour logger votre visite. Faites le depuis le détail de la cache, s\'il vous plait!</string>
+ <string name="err_download_fail">c:geo n\'a pas réussi à télécharger les caches car </string>
+ <string name="err_dwld_details_failed">c:geo n\'a pas réussi à télécharger les détails de la cache.</string>
+ <string name="err_load_descr_failed">c:geo ne peut pas charger la description.</string>
+ <string name="err_location_unknown">c:geo ne connait pas la position de la cache.</string>
+ <string name="err_missing_device_name">Veuillez saisir un nom pour votre appareil avant l\'enregistrement.</string>
+ <string name="err_favorite_failed">c:geo ne peut pas changer le status de favori.</string>
+ <string name="err_select_logimage_failed">La sélection d\'une image pour la note a échoué.</string>
+ <string name="err_acquire_image_failed">L\'acquisition d\'une nouvelle image pour la note a échoué.</string>
+ <string name="err_tb_display">\"c:geo ne peut pas afficher l\'objet voyageur demandé. Est-ce vraiment un objet voyageur?</string>
+ <string name="err_tb_details_open">c:geo ne peut pas ouvrir le détail de l\'objet voyageur.</string>
+ <string name="err_tb_forgot_saw">c:geo a oublié quel objet voyageur vous avez vu.</string>
+ <string name="err_tb_find">c:geo ne peut pas trouver d\'objet voyageur.</string>
+ <string name="err_tb_find_that">c:geo ne peut pas trouver cet objet voyageur.</string>
+ <string name="err_waypoint_cache_unknown">c:geo ne sait pas à quel cache vous voulez ajouter une étape.</string>
+ <string name="err_waypoint_add_failed">c:geo n\'a pas réussi à afficher l\'étape.</string>
+ <string name="err_point_unknown_position">c:geo ne peut pas savoir où vous êtes.</string>
+ <string name="err_point_no_position_given_title">Information obligatoire</string>
+ <string name="err_point_no_position_given">Remplissez au moins la latitude ou la longitude ou la distance et le relèvement. Vous pouvez aussi remplir tous les champs.</string>
+ <string name="err_point_curr_position_unavailable">c:geo ne connaît pas encore votre position. Veuillez patienter…</string>
+ <string name="err_point_bear_and_dist_title">Besoin d\'aide?</string>
+ <string name="err_point_bear_and_dist">Remplissez le relèvement et la distance. Le relèvement est l\'angle de 0 à 360 degrés par rapport au Nord. La distance est avec ou sans les unités.</string>
+ <string name="err_point_location_error">c:geo ne peut pas trouver la position de l\'étape.</string>
+ <string name="err_log_load_data">c:geo ne peut pas charger les données pour enregistrer votre visite.</string>
+ <string name="err_log_load_data_again">c:geo ne peut pas charger les données pour enregistrer votre visite. Essayer plus tard.</string>
+ <string name="err_log_load_data_still">c:geo est en train de charger les données pour enregistrer votre visite. Veuillez patienter encore un peu.</string>
+ <string name="err_log_failed_server">c:geo n\'a pas réussi à charger les données pour enregistrer votre visite car le serveur ne répond pas.</string>
+ <string name="err_log_post_failed">Il semble que votre visite n\'a pas été enregistrée. Veuillez vérifier sur le site Geocaching.com.</string>
+ <string name="err_logimage_post_failed">Il semble que l\'envoi de l\'image ait échoué. Veuillez vérifier sur le site Geocaching.com.</string>
+ <string name="err_search_address_forgot">c:geo a oublié l\'adresse recherchée.</string>
+ <string name="err_parse_lat">c:geo n\'arrive pas à lire la latitude.</string>
+ <string name="err_parse_lon">c:geo n\'arrive pas à lire la longitude.</string>
+ <string name="err_parse_dist">c:geo n\'arrive pas à lire la distance.</string>
+ <string name="err_parse_lat_lon">c:geo n\'arrive pas à lire la latitude ou la longitude.</string>
+ <string name="warn_save_nothing">Il n\'y a rien à sauver.</string>
+ <string name="warn_no_cache_coord">Il n\'y pas de caches avec les coordonnées associées.</string>
+ <string name="warn_no_coordinates">Aucune coordonnée associée.</string>
+ <string name="warn_no_keyword">Pas de mot clé.</string>
+ <string name="warn_no_username">Pas de nom d\'utilisateur.</string>
+ <string name="warn_search_help_title">Besoin d\'aide?</string>
+ <string name="warn_search_help_address">Veuillez remplir l\'adresse ou le lieu. Par exemple l\'adresse \"100 Avenue Montainge, Paris, France\", nom de la ville \"Berlin\" ou simplement \"Parc Yellowstone\".</string>
+ <string name="warn_search_help_gccode">Veuillez remplir le code de la cache. Par exemple \"GC1VCAZ\".</string>
+ <string name="warn_search_help_keyword">Veuillez saisir un mot censé se trouver dans le nom de la cache recherchée.</string>
+ <string name="warn_search_help_user">Veuillez remplir le nom d\'utilisateur utilisé sur Geocaching.com.</string>
+ <string name="warn_search_help_tb">Veuillez remplir le code de l\'objet voyageur. Par exemple \"TB29QMZ\".</string>
+ <string name="warn_log_text_fill">Merci de saisir un texte pour votre visite.</string>
+ <string name="warn_load_images">c:geo n\'a pas pu charger les images.</string>
+ <string name="warn_invalid_mapfile">Le fichier sélectionné n\'est pas un fichier de carte mapsforge version 0.3.0.\nLes cartes hors-lignes ne sont pas disponibles.</string>
+ <string name="warn_deprecated_mapfile">Vous utilisez un fichier de carte obsolète de version 0.2.4.\nVous devriez charger sans tarder une carte version 0.3.\nLe support des cartes 0.2.4 disparaîtra dans une prochaine version de c:geo.</string>
+ <string name="warn_nonexistant_mapfile">Le fichier de carte spécifié n\'existe pas.\nLes cartes hors ligne ne sont pas disponibles.</string>
+ <string name="warn_rendertheme_missing">Le thème de la carte n\'a pas été trouvé.</string>
+ <string name="info_log_posted">Envoi de la visite réussi.</string>
+ <string name="info_log_saved">Sauvegarde de la visite réussie.</string>
+ <string name="info_log_cleared">La visite a été effacée.</string>
+ <string name="info_log_type_changed">Le type de visite a changé!</string>
+ <string name="info_select_logimage_cancelled">La sélection ou l\'acquisition de l\'image a été annulée.</string>
+ <string name="info_stored_image">Nouvelle image sauvée dans :</string>
+ <string name="info_storing_static_maps">Sauvegarde des cartes statiques</string>
+ <string name="loc_last">Aucun</string>
+ <string name="loc_net">Réseau</string>
+ <string name="loc_gps">Gps</string>
+ <string name="loc_sat">Satellites</string>
+ <string name="loc_trying">Localisation en cours…</string>
+ <string name="loc_no_addr">Adresse inconnue</string>
+ <string name="loc_gps_disabled">GPS désactivé</string>
+ <string name="menu_about">À propos de c:geo</string>
+ <string name="menu_helpers">Utilitaires</string>
+ <string name="menu_settings">Paramètres</string>
+ <string name="menu_history">Historique</string>
+ <string name="menu_filter">Filtre</string>
+ <string name="menu_scan_geo">Scanner géocode</string>
+ <string name="live_map_button">Carte</string>
+ <string name="caches_nearby_button">Proches</string>
+ <string name="advanced_search_button">Recherche</string>
+ <string name="stored_caches_button">Stockées</string>
+ <string name="any_button">N\'importe</string>
+ <string name="unknown_scan">Le scan ne trouve pas de géocode.</string>
+ <string name="caches_no_cache">Aucune cache</string>
+ <string name="caches_more_caches">Charger plus de caches</string>
+ <string name="caches_more_caches_no">Pas d\'autres caches</string>
+ <string name="caches_more_caches_loading">Chargement des caches…</string>
+ <string name="caches_more_caches_currently">actuellement</string>
+ <string name="caches_downloading">Téléchargement des caches…\nRestant: </string>
+ <string name="caches_eta_ltm">Moins d\'une minute</string>
+ <string name="caches_store_offline">Stocker localement</string>
+ <string name="caches_store_selected">Stocker la sélection</string>
+ <string name="caches_history">Historique</string>
+ <string name="caches_on_map">Voir sur la carte</string>
+ <string name="caches_sort">Trier</string>
+ <string name="caches_sort_title">Trier par</string>
+ <string name="caches_sort_distance">distance</string>
+ <string name="caches_sort_difficulty">difficulté</string>
+ <string name="caches_sort_terrain">terrain</string>
+ <string name="caches_sort_size">taille</string>
+ <string name="caches_sort_favorites">popularité</string>
+ <string name="caches_sort_name">nom</string>
+ <string name="caches_sort_geocode">Geocode</string>
+ <string name="caches_sort_rating">note</string>
+ <string name="caches_sort_vote">vote (note perso)</string>
+ <string name="caches_sort_inventory">nombre d\'objets dans l\'inventaire</string>
+ <string name="caches_sort_date_hidden">date de création</string>
+ <string name="caches_sort_date_logged">date du carnet</string>
+ <string name="caches_sort_finds">trouvées</string>
+ <string name="caches_sort_state">état</string>
+ <string name="caches_sort_storage">date de sauvegarde dans l\'appareil</string>
+ <string name="caches_select_mode">Mode sélection</string>
+ <string name="caches_select_mode_exit">Sortir du mode sélection</string>
+ <string name="caches_select_invert">Inverser la sélection</string>
+ <string name="caches_nearby">Proches</string>
+ <string name="caches_manage">Gérer</string>
+ <string name="caches_drop_selected">Effacer les caches sélectionnées</string>
+ <string name="caches_drop_selected_ask">Effacer les caches sélectionnées du téléphone ?</string>
+ <string name="caches_drop_all">Tout effacer</string>
+ <string name="caches_drop_all_ask">Effacer les caches de la liste courante ?</string>
+ <string name="caches_drop_stored">Effacer les caches stockées</string>
+ <string name="caches_drop_progress">Suppression des caches en cours</string>
+ <string name="caches_drop_all_and_list">Suppression des caches et de la liste</string>
+ <string name="caches_delete_events">Effacer les événements précédents</string>
+ <string name="caches_refresh_selected">Rafraîchir les caches sélectionnées</string>
+ <string name="caches_refresh_all">Tout rafraîchir</string>
+ <string name="caches_move_selected">Déplacer les caches sélectionnées</string>
+ <string name="caches_move_all">Tout déplacer</string>
+ <string name="caches_map_locus">Locus</string>
+ <string name="caches_map_locus_export">Exporter vers Locus</string>
+ <string name="caches_recaptcha_title">reCAPTCHA</string>
+ <string name="caches_recaptcha_explanation">Recopier le texte se trouvant dans l\'image pour charger les coordonnées des caches. Cette étape peut être désactivée dans les Paramètres.</string>
+ <string name="caches_recaptcha_hint">Texte de l\'image</string>
+ <string name="caches_recaptcha_continue">Continuer</string>
+ <string name="caches_filter">Filtrer</string>
+ <string name="caches_filter_title">Filtrer selon</string>
+ <string name="caches_filter_size">taille</string>
+ <string name="caches_filter_type">type</string>
+ <string name="caches_filter_track">avec des trackables</string>
+ <string name="caches_filter_clear">effacer les filtres</string>
+ <string name="caches_filter_modified">Avec les coordonnées modifiées</string>
+ <string name="caches_filter_origin">Avec les coordonées originales</string>
+ <string name="caches_removing_from_history">Effacer de l\'historique…</string>
+ <string name="caches_clear_offlinelogs">Effacer les entrées de carnet hors-ligne</string>
+ <string name="caches_clear_offlinelogs_progress">Effacement des entrées de carnet hors-ligne</string>
+ <string name="list_menu">Listes</string>
+ <string name="list_menu_create">Nouvelle liste</string>
+ <string name="list_menu_all_lists">Toutes les caches</string>
+ <string name="list_menu_drop">Effacer la liste courante</string>
+ <string name="list_menu_change">Changer de liste</string>
+ <string name="list_menu_rename">Renommer la liste courante</string>
+ <string name="list_title">Choisir une liste</string>
+ <string name="list_inbox">Enregistrées</string>
+ <string name="list_all_lists">Toutes les caches</string>
+ <string name="list_dialog_create_title">Nouvelle liste</string>
+ <string name="list_dialog_create">Créer</string>
+ <string name="list_dialog_cancel">Annuler</string>
+ <string name="list_dialog_create_ok">Nouvelle liste créée</string>
+ <string name="list_dialog_create_err">c:geo n\'a pas pu créer la liste</string>
+ <string name="list_dialog_remove_title">Supprimer la liste</string>
+ <string name="list_dialog_remove_description">Voulez-vous supprimer la liste courante? Toutes les caches restantes seront déplacées dans \"Stockées\".</string>
+ <string name="list_dialog_remove">Effacer</string>
+ <string name="list_dialog_remove_ok">Liste supprimée</string>
+ <string name="list_dialog_remove_err">c:geo n\'a pas réussi à supprimer la liste courante</string>
+ <string name="list_dialog_rename_title">Renommer la liste</string>
+ <string name="list_dialog_rename">Renommer</string>
+ <string name="about_version">Version</string>
+ <string name="about_changelog">Versions</string>
+ <string name="about_donate">Dons</string>
+ <string name="about_detail">Détails</string>
+ <string name="about_donation_more">Don\ndéveloppement</string>
+ <string name="about_contributors">Contributeurs</string>
+ <string name="init_oc">opencaching.de</string>
+ <string name="init_oc_de_description">Autoriser c:geo à utiliser opencaching.de pour chercher des caches et accéder/filtrer vos caches trouvées.</string>
+ <string name="init_register_oc_de">Autoriser c:geo</string>
+ <string name="init_gcvote">GCvote.com</string>
+ <string name="init_twitter">Twitter</string>
+ <string name="init_username">Identifiant</string>
+ <string name="init_password">Mot de passe</string>
+ <string name="init_login">Vérification de l\'identifiant</string>
+ <string name="init_login_popup">Connexion</string>
+ <string name="init_login_popup_working">Connexion…</string>
+ <string name="init_login_popup_ok">Identifiants OK</string>
+ <string name="init_login_popup_failed">Erreur de connexion</string>
+ <string name="init_login_popup_failed_reason">Erreur de connexion: </string>
+ <string name="init_twitter_authorize">Autorisation de c:geo</string>
+ <string name="init_signature">Signature</string>
+ <string name="init_signature_help_text">Écrivez votre propre signature pour vos visites.\nLes codes spéciaux supportés sont : [DATE] , [TIME], [DATETIME], [USER] &amp; [NUMBER].\nAu moment de l\'insertion de la signature, ces codes seront remplacés par la valeur correspondante.</string>
+ <string name="init_signature_template_button">Insérer un modèle</string>
+ <string name="init_signature_template_date">Date</string>
+ <string name="init_signature_template_time">Heure</string>
+ <string name="init_signature_template_datetime">Date &amp; Heure</string>
+ <string name="init_signature_template_user">Utilisateur</string>
+ <string name="init_signature_template_number">Nombre</string>
+ <string name="init_signature_template_owner">Propriétaire</string>
+ <string name="init_ratingwanted">Charger la note depuis GCvote.com</string>
+ <string name="init_summary_ratingwanted">Charger la note depuis GCvote.com</string>
+ <string name="init_friendlogswanted">Charger le carnet (amis)</string>
+ <string name="init_summary_friendlogswanted">Charger le carnet (amis)</string>
+ <string name="init_openlastdetailspage">Réouvrir les détails à la dernière page ouverte</string>
+ <string name="init_summary_openlastdetailspage">Réouvrir les détails à la dernière page ouverte</string>
+ <string name="init_autoload">Afficher automatiquement les descriptions longues</string>
+ <string name="init_summary_autoload">Afficher automatiquement les descriptions longues</string>
+ <string name="init_skin">Fond clair (nécessite le redémarrage de c:geo)</string>
+ <string name="init_summary_skin">Fond clair (nécessite le redémarrage de c:geo)</string>
+ <string name="init_address">Afficher l\'adresse sur l\'accueil</string>
+ <string name="init_summary_address">Afficher l\'adresse sur l\'accueil</string>
+ <string name="init_captcha">Afficher le CAPTCHA si nécessaire</string>
+ <string name="init_summary_captcha">Afficher le CAPTCHA si nécessaire</string>
+ <string name="init_useenglish">Utiliser l\'anglais dans c:geo\n(redémarrage nécessaire)</string>
+ <string name="init_summary_useenglish">Utiliser l\'anglais dans c:geo\n(redémarrage nécessaire)</string>
+ <string name="init_exclude">Exclure mes caches et les caches trouvées</string>
+ <string name="init_summary_exclude">Exclure mes caches et les caches trouvées</string>
+ <string name="init_showwaypoints">Points intermédiaires</string>
+ <string name="init_showwaypoint_description">Nombre de caches en-dessous duquel les points intermédiaires sont affichés sur la carte.</string>
+ <string name="init_disabled">Exclure les caches désactivées</string>
+ <string name="init_summary_disabled">Exclure les caches désactivées</string>
+ <string name="init_offline">Enregistrer les cartes pour une utilisation hors ligne</string>
+ <string name="init_summary_offline">Enregistrer les cartes pour une utilisation hors ligne</string>
+ <string name="init_offline_wp">Enregistrer les cartes autour des points intermédiaires pour une utilisation hors ligne</string>
+ <string name="init_summary_offline_wp">Enregistrer les cartes autour des points intermédiaires pour une utilisation hors ligne</string>
+ <string name="init_save_log_img">Sauver les images des visites</string>
+ <string name="init_summary_save_log_img">Sauver les images des visites</string>
+ <string name="init_units">Utiliser des unités de distance impériales</string>
+ <string name="init_summary_units">Utiliser des unités de distance impériales</string>
+ <string name="init_log_offline">Toujours utiliser le mode hors-ligne, même si connecté.</string>
+ <string name="init_summary_log_offline">Toujours utiliser le mode hors-ligne, même si connecté.</string>
+ <string name="init_choose_list">Demander dans quelle liste sauver les caches.</string>
+ <string name="init_summary_choose_list">Demander dans quelle liste sauver les caches.</string>
+ <string name="init_livelist">Afficher la direction des caches dans les listes</string>
+ <string name="init_summary_livelist">Afficher la direction des caches dans les listes</string>
+ <string name="init_backup">Sauvegarde</string>
+ <string name="init_backup_backup">Sauvegarde</string>
+ <string name="init_backup_running">Création de la copie de sauvegarde…</string>
+ <string name="init_backup_note">Noter que cette option va sauvegarder/restaurer la base de données contenant les caches et les étapes, pas les paramètres. vos informations d\'utilisateur (mots de passe) ne quitteront pas l\'application.</string>
+ <string name="init_backup_restore">Restauration</string>
+ <string name="init_backup_success">La base de données de c:geo a été sauvegardée dans un fichier</string>
+ <string name="init_backup_failed">La sauvegarde de la base de données de c:geo a échouée.</string>
+ <string name="init_backup_unnecessary">La base de données est vide, sauvegarde non nécessaire.</string>
+ <string name="init_restore_success">Restauration terminée.</string>
+ <string name="init_restore_failed">Échec de la restauration.</string>
+ <string name="init_restore_running">Restauration de la base de données des caches…</string>
+ <string name="init_restore_confirm">La base de données est vide. Voulez-vous restaurer la copie de sauvegarde ?</string>
+ <string name="init_backup_last">Sauvegarde disponible depuis</string>
+ <string name="init_backup_last_no">Il n\'y a pas de fichier avec une sauvegarde.</string>
+ <string name="init_mapsource_select">Choisir la source des cartes</string>
+ <string name="init_map_directory_description">Dossier contenant les cartes hors-ligne</string>
+ <string name="init_gpx_exportdir">Dossier d\'exportation GPX</string>
+ <string name="init_gpx_importdir">Dossier d\'importation GPX</string>
+ <string name="init_maptrail">Montrer la trace sur la carte</string>
+ <string name="init_summary_maptrail">Montrer la trace sur la carte</string>
+ <string name="init_share_after_export">Ouvrir le menu de partage après les exportations GPX.</string>
+ <string name="init_trackautovisit">Marquer automatiquement les objets voyageurs comme \"visité\"</string>
+ <string name="init_sigautoinsert">Insérer la signature automatiquement</string>
+ <string name="init_loaddirectionimg">Charge la direction de l\'image si nécessaire</string>
+ <string name="init_summary_loaddirectionimg">Charge la direction de l\'image si nécessaire</string>
+ <string name="init_default_navigation_tool">Navigation par défaut</string>
+ <string name="init_default_navigation_tool_description">Vous pouvez choisir ici l\'outil de navigation à utiliser par défaut.</string>
+ <string name="init_default_navigation_tool_select">Sélectionner l\'outil</string>
+ <string name="init_default_navigation_tool_2_description">Vous pouvez choisir ici votre deuxième outil de navigation préféré. Il sera activé par un appui long sur l\'icône de navigation situé près du nom de la cache.</string>
+ <string name="init_debug_title">Déverminage</string>
+ <string name="init_debug_note">c:geo est capable de générer beaucoup d\'informations peu utiles pour des utilisateurs normaux. Cependant, en cas de problème, les développeurs en charge de c:geo peuvent avoir besoin de cette information pour pouvoir l\'identifier. Dans ce cas, ils vous demanderont d\'activer cette option et d\'envoyer les fichiers de journaux.</string>
+ <string name="init_debug">Générer les informations</string>
+ <string name="init_dbonsdcard_title">Emplacement de la base</string>
+ <string name="init_dbonsdcard_note">La base de données de c:geo peut être enregistrée sur un support externe. En choisissant cette option, vous récupérerez de l\'espace de stockage sur votre appareil au détriment de performances réduites. c:geo ne fonctionnera pas si votre carte SD est absente.</string>
+ <string name="init_dbonsdcard">Base de données sur stockage externe</string>
+ <string name="init_dbmove_dbmove">Déplacement de la base de données</string>
+ <string name="init_dbmove_running">Déplacement de la base de données</string>
+ <string name="init_dbmove_success">Base de données déplacée</string>
+ <string name="init_dbmove_failed">Erreur lors du déplacement de la base de données</string>
+ <string name="init_plain_logs">Afficher les entrées de journal sans les couleurs</string>
+ <string name="init_summary_plain_logs">Afficher les entrées de journal sans les couleurs</string>
+ <string name="init_use_native_ua">S\'identifier comme le navigateur web Android. Peut résoudre des problèmes de connexion avec certains opérateurs mobiles.</string>
+ <string name="init_rendertheme_folder">Dossier contenant les cartes hors-ligne personnelles (optionnelles).</string>
+ <string name="map_source_google_map">Google Maps : plan</string>
+ <string name="map_source_google_satellite">Google Maps : satellite</string>
+ <string name="map_source_osm_mapnik">OSM : rendu Mapnik</string>
+ <string name="map_source_osm_cyclemap">OSM : pistes cyclables</string>
+ <string name="map_source_osm_offline">hors-ligne</string>
+ <string name="init_sendToCgeo">Envoyers vers c:geo</string>
+ <string name="init_sendToCgeo_name">Votre nom d\'appareil:</string>
+ <string name="init_sendToCgeo_description">Envoyers vers c:geo permet de recevoir les caches directement depuis le site Geocaching.com en utilisant une extension pour Firefox ou Chrome. Après votre inscription, veuillez lire <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Pour utiliser send2cgeo, vous avez juste besoin de vous inscrire. c:geo fonctionnera aussi sans enregistrer votre appareil.</string>
+ <string name="init_sendToCgeo_register">Demande d\'enregistrement</string>
+ <string name="init_sendToCgeo_registering">Enregistrer votre appareil pour \"Send to c:geo\"…</string>
+ <string name="init_sendToCgeo_register_ok">Enregistrement réussi. Le code PIN est ####. Utiliser le sur le site de c:geo pour ajouter votre appareil dans votre navigateur.</string>
+ <string name="init_sendToCgeo_register_fail">Échec de l\'enregistrement.</string>
+ <string name="sendToCgeo_download_fail">c:geo n\'a pas pu charger les caches. Pas de connexion Internet ou problème avec le site send2c:geo.</string>
+ <string name="sendToCgeo_no_registration">c:geo n\'a pas pu charger les caches. L\'abonnement à send2c:geo a expiré. Merci de vous réenregistrer dans les Paramètres.</string>
+ <string name="auth_twitter">twitter</string>
+ <string name="auth_authorize">autorisation de c:geo</string>
+ <string name="auth_start">début d\'autorisation</string>
+ <string name="auth_again">redémarre</string>
+ <string name="auth_pin_hint">code donné par Twitter</string>
+ <string name="auth_finish">terminé</string>
+ <string name="auth_dialog_wait">en attente de Twitter…</string>
+ <string name="auth_dialog_pin_title">code PIN</string>
+ <string name="auth_dialog_pin_message">Veuillez saisir votre code PIN fourni par Twitter. Il est obligatoire pour finaliser l\'autorisation.</string>
+ <string name="auth_dialog_completed">c:geo est maintenant autorisé à poster sur Twitter.</string>
+ <string name="about_auth_1">Le processus suivant permet à <b>c:geo</b> d\'accéder à votre compte Twitter - si vous acceptez.</string>
+ <string name="about_auth_2">Cliquer sur le bouton \"début d\'autorisation\" pour démarrer. Une fenêtre de navigateur va s\'ouvrir pour vous connecter sur Twitter. Accepter pour que <b>c:geo</b> accéde à votre compte. Twitter vous affichera alors une code PIN composé de chiffres. Merci de coller ce code dans <b>c:geo</b> puis confirmer. C\'est tout!</string>
+ <string name="auth_ocde">opencaching.de</string>
+ <string name="auth_authorize_oc">Autoriser c:geo</string>
+ <string name="auth_start_oc">Commencer l\'autorisation</string>
+ <string name="auth_again_oc">Recommencer</string>
+ <string name="auth_pin_hint_oc">Code donné par %s</string>
+ <string name="auth_finish_oc">Terminer</string>
+ <string name="auth_dialog_wait_oc">En attente de %s…</string>
+ <string name="auth_dialog_pin_title_oc">Code PIN</string>
+ <string name="auth_dialog_pin_message_oc">Veuillez saisir votre code PIN fourni par %s. Il est nécessaire pour finaliser l\'autorisation.</string>
+ <string name="auth_dialog_completed_oc">c:geo est désormais autorisé à interagir avec %s.</string>
+ <string name="about_auth_1_oc">La procédure suivante permet à <b>c:geo</b> d\'accéder à %s - si vous acceptez.</string>
+ <string name="about_auth_2_oc">Cliquer sur le bouton \"début d\'autorisation\" pour démarrer. Une fenêtre de navigateur va s\'ouvrir pour vous connecter sur %s. Accepter pour que <b>c:geo</b> accède à votre compte. %s vous affichera alors un code PIN composé de chiffres. Merci de recopier ce code dans <b>c:geo</b> et de confirmer. C\'est tout.</string>
+ <string name="cache_offline">Hors ligne</string>
+ <string name="cache_offline_refresh">Recharger</string>
+ <string name="cache_offline_drop">Effacer</string>
+ <string name="cache_offline_store">Enregistrer</string>
+ <string name="cache_offline_stored">Enregistrée</string>
+ <string name="cache_offline_not_ready">Hors ligne indisponible</string>
+ <string name="cache_offline_time_about">il y a environ</string>
+ <string name="cache_offline_time_mins">minutes</string>
+ <string name="cache_offline_time_mins_few">il y a quelques minutes</string>
+ <string name="cache_offline_time_hour">une heure</string>
+ <string name="cache_offline_time_hours">heures</string>
+ <string name="cache_offline_time_days">jours</string>
+ <string name="cache_premium">Premium</string>
+ <string name="cache_attributes">Attributs</string>
+ <string name="cache_inventory">Inventaire</string>
+ <string name="cache_log_offline">Visite hors-ligne</string>
+ <string name="cache_log_images_title">Image de la visite</string>
+ <string name="cache_log_image_default_title">Photo</string>
+ <string name="cache_personal_note">Note personnelle</string>
+ <string name="cache_personal_note_edit">Éditer</string>
+ <string name="cache_personal_note_unstored">Cache non sauvegardée localement</string>
+ <string name="cache_personal_note_store">La cache va être sauvegardée localement avant d\'autoriser les notes personnelles.</string>
+ <string name="cache_description">Description</string>
+ <string name="cache_description_long">Description longue</string>
+ <string name="cache_description_table_note">La description contient des informations de formattages qui nécessitent possiblement d\'être vues sur le site %s pour être affichées correctement.</string>
+ <string name="cache_watchlist_on">Cette cache est dans votre liste de suivi.</string>
+ <string name="cache_watchlist_not_on">Cette cache n\'est pas dans votre liste de suivi.</string>
+ <string name="cache_watchlist_add">Ajouter à votre liste de suivi</string>
+ <string name="cache_watchlist_remove">Retirer de votre liste de suivi</string>
+ <string name="cache_favpoint_on">Cette cache est dans vos favoris.</string>
+ <string name="cache_favpoint_not_on">Cette cache n\'est pas dans vos favoris.</string>
+ <string name="cache_favpoint_add">Ajouter</string>
+ <string name="cache_favpoint_remove">Enlever</string>
+ <string name="cache_list_text">Liste :</string>
+ <string name="cache_list_change">Déplacer</string>
+ <string name="cache_list_unknown">Dans aucune liste</string>
+ <string name="cache_images">Images</string>
+ <string name="cache_waypoints">Étapes</string>
+ <string name="cache_waypoints_add">Ajouter une étape</string>
+ <string name="cache_hint">Indice</string>
+ <string name="cache_logs">Carnet de bord</string>
+ <string name="cache_logsfriends">Carnet (amis)</string>
+ <string name="cache_dialog_loading_details">Chargement des détails…</string>
+ <string name="cache_dialog_loading_details_status_loadpage">Chargement de la page</string>
+ <string name="cache_dialog_loading_details_status_details">Analyse</string>
+ <string name="cache_dialog_loading_details_status_spoilers">Images indices</string>
+ <string name="cache_dialog_loading_details_status_logs">Entrées du carnet</string>
+ <string name="cache_dialog_loading_details_status_waypoints">Points intermédiaires</string>
+ <string name="cache_dialog_loading_details_status_gcvote">Votes</string>
+ <string name="cache_dialog_loading_details_status_cache">Sauvegarde des données</string>
+ <string name="cache_dialog_loading_details_status_render">Préparation de la page</string>
+ <string name="cache_dialog_offline_save_title">Hors ligne</string>
+ <string name="cache_dialog_offline_save_message">Enregistrement pour une utilisation hors ligne…</string>
+ <string name="cache_dialog_offline_drop_title">Hors ligne</string>
+ <string name="cache_dialog_offline_drop_message">Suppression des caches de la mémoire…</string>
+ <string name="cache_dialog_refresh_title">Recharger</string>
+ <string name="cache_dialog_refresh_message">Rechargement des détails…</string>
+ <string name="cache_dialog_watchlist_add_title">Liste de suivi</string>
+ <string name="cache_dialog_watchlist_add_message">Ajout de la cache à votre liste de suivi…</string>
+ <string name="cache_dialog_watchlist_remove_title">Liste de suivi</string>
+ <string name="cache_dialog_watchlist_remove_message">Retrait de la cache de votre liste de suivi…</string>
+ <string name="cache_dialog_favorite_add_title">Favori</string>
+ <string name="cache_dialog_favorite_add_message">Ajout de la cache à vos favoris…</string>
+ <string name="cache_dialog_favorite_remove_title">Favori</string>
+ <string name="cache_dialog_favorite_remove_message">Suppression de la cache de vos favoris…</string>
+ <string name="cache_menu_navigate">Navigation</string>
+ <string name="cache_menu_navigation_drive">Navigation (voiture)</string>
+ <string name="cache_menu_navigation_walk">Navigation (piéton)</string>
+ <string name="cache_menu_navigation_bike">Navigation (vélo)</string>
+ <string name="cache_menu_maps_directions">Directions Google Maps</string>
+ <string name="cache_menu_radar">Radar</string>
+ <string name="cache_menu_map">Carte</string>
+ <string name="cache_menu_map_static">Cartes statiques</string>
+ <string name="cache_menu_download_map_static">Télécharger les cartes statiques</string>
+ <string name="cache_menu_rmaps">Rmaps</string>
+ <string name="cache_menu_map_ext">Carte externe</string>
+ <string name="cache_menu_streetview">Street View</string>
+ <string name="cache_menu_browser">Navigateur</string>
+ <string name="cache_menu_visit">Carnet</string>
+ <string name="cache_menu_visit_offline">Enregistrer la visite hors-ligne</string>
+ <string name="cache_menu_spoilers">Images indices</string>
+ <string name="cache_menu_around">Alentours</string>
+ <string name="cache_menu_event">Ajouter à l\'agenda</string>
+ <string name="cache_menu_details">Détails</string>
+ <string name="cache_menu_refresh">Recharger</string>
+ <string name="cache_menu_share">Partager la cache</string>
+ <string name="cache_menu_move_list">Déplacer dans une autre liste</string>
+ <string name="cache_menu_gcc">GCC</string>
+ <string name="cache_menu_whereyougo">WhereYouGo</string>
+ <string name="cache_menu_oruxmaps">OruxMaps</string>
+ <string name="cache_menu_cachebeacon">Cache Beacon</string>
+ <string name="cache_status">Statut</string>
+ <string name="cache_status_offline_log">Visite sauvée hors-ligne</string>
+ <string name="cache_status_found">Trouvée</string>
+ <string name="cache_status_archived">Archivée</string>
+ <string name="cache_status_disabled">Désactivée</string>
+ <string name="cache_status_premium">Membres privilégiés seulement</string>
+ <string name="cache_status_not_premium">Pour tous les membres</string>
+ <string name="cache_status_stored">Stockée</string>
+ <string name="cache_status_not_stored">Non stockée</string>
+ <string name="cache_geocode">Code gc</string>
+ <string name="cache_name">Nom</string>
+ <string name="cache_type">Type</string>
+ <string name="cache_size">Taille</string>
+ <string name="cache_distance">Distance</string>
+ <string name="cache_difficulty">Difficulté</string>
+ <string name="cache_terrain">Terrain</string>
+ <string name="cache_rating">Note</string>
+ <string name="cache_own_rating">Note personnelle</string>
+ <string name="cache_rating_of">de</string>
+ <string name="cache_favorite">Favori</string>
+ <string name="cache_owner">Propriétaire</string>
+ <string name="cache_hidden">Cachée</string>
+ <string name="cache_event">Date</string>
+ <string name="cache_location">Lieu</string>
+ <string name="cache_coordinates">Coordonnées</string>
+ <string name="cache_coordinates_original">Coordonnées d\'origine</string>
+ <string name="cache_spoiler_images_title">Images indices</string>
+ <string name="cache_images_title">Images</string>
+ <string name="cache_log_types">Types de visites</string>
+ <string name="cache_coordinates_no">Cette cache n\'a pas de coordonnées.</string>
+ <string name="cache_clear_history">Effacer l\'historique</string>
+ <string name="cache_remove_from_history">Effacer de l\'historique</string>
+ <string name="cache_license">Licence</string>
+ <string name="cache_image">Image</string>
+ <string name="cache_image_open_file">Ouvrir en tant que fichier</string>
+ <string name="cache_image_open_browser">Ouvrir dans le navigateur</string>
+ <string name="cache_share_field">Partager</string>
+ <string name="cache_time_full_hours">heures</string>
+ <string name="cache_listed_on">Listée le %s</string>
+ <string name="file_searching_in">Recherche de fichiers\nin</string>
+ <string name="file_searching_sdcard_in">Aucun fichier trouvé dans le répertoire par défaut:\n%1$s\n\nRecherche dans la totalité de la carte SD:\n</string>
+ <string name="file_list_no_files">c:geo n\'a pas trouvé les fichiers nécessaires.</string>
+ <string name="file_searching">Recherche des fichiers nécessaires</string>
+ <string name="file_title_searching">Recherche en cours</string>
+ <string name="simple_dir_chooser_title">Choisir le dossier</string>
+ <string name="simple_dir_chooser_current_path">Chemin :</string>
+ <string name="gpx_import_loading_caches">Chargement des caches depuis le fichier .gpx</string>
+ <string name="gpx_import_loading_waypoints">Chargement des points intermédiaires depuis le fichier .gpx</string>
+ <string name="gpx_import_store_static_maps">Écriture des cartes statiques</string>
+ <string name="gpx_import_caches_imported">caches importées</string>
+ <string name="gpx_import_static_maps_skipped">Chargement des cartes statiques interrompu</string>
+ <string name="gpx_import_title_static_maps">Enregistrement des cartes statiques</string>
+ <string name="gpx_import_title_reading_file">Lecture du fichier</string>
+ <string name="gpx_import_title">Importation GPX</string>
+ <string name="gpx_import_title_caches_imported">Résultat</string>
+ <string name="gpx_import_title_caches_import_failed">Échec de l\'importation</string>
+ <string name="gpx_import_error_io">Impossible de lire le fichier</string>
+ <string name="gpx_import_error_parser">Format de fichier incorrect</string>
+ <string name="gpx_import_error_unexpected">Erreur inattendue</string>
+ <string name="gpx_import_canceled">Importation GPX interrompue</string>
+ <string name="gpx_import_delete_title">Effacer le fichier</string>
+ <string name="gpx_import_delete_message">Voulez vous effacer %s ?</string>
+ <string name="gpx_import_select_list_title">Importer GPX dans la liste</string>
+ <string name="map_file_select_title">Choisir un fichier carte</string>
+ <string name="web_import_title">Import depuis le web</string>
+ <string name="web_import_waiting">En attente de nouvelles caches depuis le web…</string>
+ <string name="web_downloading">Téléchargement</string>
+ <string name="web_downloaded">Téléchargé</string>
+ <string name="popup_more">Plus de détails</string>
+ <string name="waypoint">Étape</string>
+ <string name="waypoint_cache_coordinates">Coordonnées de la cache</string>
+ <string name="waypoint_custom">Personnalisé</string>
+ <string name="waypoint_my_coordinates">Ma position</string>
+ <string name="waypoint_bearing">Relèvement</string>
+ <string name="waypoint_distance">Distance</string>
+ <string name="waypoint_name">Nom</string>
+ <string name="waypoint_edit">Éditer</string>
+ <string name="waypoint_delete">Effacer</string>
+ <string name="waypoint_edit_title">Éditer une étape</string>
+ <string name="waypoint_add_title">Ajouter une étape</string>
+ <string name="waypoint_note">Note</string>
+ <string name="waypoint_visited">Marquer comme visité</string>
+ <string name="waypoint_save">Sauver</string>
+ <string name="waypoint_loading">Chargement d\'une étape…</string>
+ <string name="waypoint_do_not_touch_cache_coordinates">Ne pas modifier les coordonnées de la cache</string>
+ <string name="waypoint_set_as_cache_coords">Utiliser comme coordonnées de la cache dans c:geo</string>
+ <string name="waypoint_save_and_modify_on_website">Utiliser comme coordonnées de la cache dans c:geo et sur le site web</string>
+ <string name="waypoint_reset_cache_coords">Réinitialiser les coordonnées de la cache</string>
+ <string name="waypoint_coordinates_has_been_reset_on_website">Les coordonnées de la cache ont été reinitialisées sur le site web.</string>
+ <string name="waypoint_coordinates_being_reset_on_website">Réinitialisation des coordonnées de la cache sur le site web…</string>
+ <string name="waypoint_reset">Réinitialiser</string>
+ <string name="waypoint_localy_reset_cache_coords">Réinitialiser dans c:geo</string>
+ <string name="waypoint_reset_local_and_remote_cache_coords">Réinitialiser dans c:geo et sur le site web</string>
+ <string name="waypoint_being_saved">Étape en cours de sauvegarde…</string>
+ <string name="waypoint_coordinates_couldnt_be_modified_on_website">Le site web n\'accepte pas la modification des coordonnées de la cache.</string>
+ <string name="waypoint_coordinates_upload_error">Erreur lors de la modification des coordonnées sur le site web.</string>
+ <string name="waypoint_coordinates_uploading_to_website">Envoi des coordonnées %s sur le site web.</string>
+ <string name="waypoint_coordinates_has_been_modified_on_website">Les coordonnées de la cache ont été modifiées sur le site web en : %s</string>
+ <string name="waypoint_done">Ok</string>
+ <string name="waypoint_duplicate">Dupliquer</string>
+ <string name="waypoint_copy_of">Copie de</string>
+ <string name="search_history">Historique</string>
+ <string name="search_history_empty">Aucune destination précédente</string>
+ <string name="search_remove_destination">Destination effacée</string>
+ <string name="search_clear_history">Effacer l\'historique</string>
+ <string name="search_history_cleared">Historique effacé</string>
+ <string name="waypoint_coordinate_formats_plain">Texte</string>
+ <string name="visit_tweet">Publier votre découverte sur Twitter</string>
+ <string name="map_map">Carte</string>
+ <string name="map_live">Carte active</string>
+ <string name="map_view_map">Voir carte</string>
+ <string name="map_modes">Marqueurs</string>
+ <string name="map_trail_show">Afficher le parcours</string>
+ <string name="map_trail_hide">Cacher le parcours</string>
+ <string name="map_circles_show">Afficher les cercles</string>
+ <string name="map_circles_hide">Cacher les cercles</string>
+ <string name="map_theme_builtin">Défault</string>
+ <string name="map_theme_select">Sélectionner le thème</string>
+ <string name="map_live_enable">Activer Temps réel</string>
+ <string name="map_live_disable">Désactiver Temps réel</string>
+ <string name="map_static_title">Cartes statiques</string>
+ <string name="map_static_loading">Chargement des cartes statiques…</string>
+ <string name="map_token_err">Depuis que c:geo est capable de télécharger des données partielles, les coordonnées des caches peuvent être inexactes.</string>
+ <string name="map_as_list">Lister les caches</string>
+ <string name="map_strategy">Stratégie</string>
+ <string name="map_strategy_title">Stratégie de carte active</string>
+ <string name="map_strategy_fastest">La plus rapide</string>
+ <string name="map_strategy_fast">Rapide</string>
+ <string name="map_strategy_auto">En fonction du déplacement</string>
+ <string name="map_strategy_detailed">Détaillée</string>
+ <string name="live_map_notification">Lors de l\'affichage de la carte active, certaines coordonnées de géocaches peuvent être imprécises et sont indiquées par un cercle orange.\nDemander les détails d\'une géocache ou la sauver pour une utilisation hors-ligne récupérera les coordonnées exactes.\n\nVous trouverez plus d\'informations sur les changements sur la page \"À propos de c:geo\".</string>
+ <string name="live_map_note_dontshow">Ne plus afficher</string>
+ <string name="search_bar_hint">Recherche de caches</string>
+ <string name="search_bar_desc">Caches (code GC, mot clé), Objets voyageurs (code TB)</string>
+ <string name="search_coordinates">Coordonnées</string>
+ <string name="search_coordinates_button">Recherche par coordonnées</string>
+ <string name="search_address">Adresse</string>
+ <string name="search_address_button">Recherche par adresse</string>
+ <string name="search_geo">Geocode</string>
+ <string name="search_geo_button">Recherche par geocode</string>
+ <string name="search_kw">Mots clés</string>
+ <string name="search_kw_prefill">Mot clé</string>
+ <string name="search_kw_button">Recherche par mot clé</string>
+ <string name="search_fbu">Trouvé par utilisateur</string>
+ <string name="search_fbu_prefill">Utilisateur</string>
+ <string name="search_fbu_button">Recherche par utilisateur</string>
+ <string name="search_hbu">Cachées par utilisateur</string>
+ <string name="search_hbu_prefill">Propriétaire</string>
+ <string name="search_hbu_button">Recherche par propriétaire</string>
+ <string name="search_tb">Objet voyageur</string>
+ <string name="search_tb_hint">Identifiant de l\'objet</string>
+ <string name="search_tb_button">Recherche par objet voyageur</string>
+ <string name="search_destination">Destination</string>
+ <string name="search_direction_rel">De cette position</string>
+ <string name="search_address_started">Recherche par lieu</string>
+ <string name="search_address_result">Lieux trouvés</string>
+ <string name="search_own_caches">Chercher mes caches</string>
+ <string name="trackable">Objet voyageur</string>
+ <string name="trackable_details_loading">Chargement des détails d\'un objet voyageur…</string>
+ <string name="trackable_log_touch">Toucher l\'objet</string>
+ <string name="trackable_browser_open">Ouvrir dans un navigateur</string>
+ <string name="trackable_goal">But</string>
+ <string name="trackable_details">Détails</string>
+ <string name="trackable_image">Image</string>
+ <string name="trackable_code">Code TB</string>
+ <string name="trackable_name">Nom</string>
+ <string name="trackable_type">Type</string>
+ <string name="trackable_owner">Propriétaire</string>
+ <string name="trackable_spotted">Se situe</string>
+ <string name="trackable_spotted_in_cache">Dans</string>
+ <string name="trackable_spotted_at_user">Entre les mains de </string>
+ <string name="trackable_spotted_unknown_location">Lieu inconnu</string>
+ <string name="trackable_spotted_owner">Entre les mains du propriétaire</string>
+ <string name="trackable_origin">Origine</string>
+ <string name="trackable_unknown">Inconnu</string>
+ <string name="trackable_released">Libéré</string>
+ <string name="trackable_distance">Distance</string>
+ <string name="trackable_touch">Toucher</string>
+ <string name="trackable_not_activated">Objet voyageur non activé</string>
+ <string name="geokret_type_traditional">Traditionnelle</string>
+ <string name="geokret_type_book_or_media">Livre ou média électronique</string>
+ <string name="geokret_type_human">Humain</string>
+ <string name="geokret_type_coin">Pièce de monnaie</string>
+ <string name="geokret_type_post">Courrier</string>
+ <string name="user_menu_title">A propos</string>
+ <string name="user_menu_view_hidden">Caches cachées</string>
+ <string name="user_menu_view_found">Caches trouvées</string>
+ <string name="user_menu_open_browser">Ouvrir le profil dans un navigateur</string>
+ <string name="user_menu_send_message">Envoyer un message</string>
+ <string name="navigation">Navigation</string>
+ <string name="compass_title">Boussole</string>
+ <string name="use_gps">Utiliser GPS</string>
+ <string name="use_compass">Utiliser la boussole</string>
+ <string name="destination_select">Choisir une destination</string>
+ <string name="destination_set">Définir une destination</string>
+ <string name="navigation_direct_navigation">Navigation directe</string>
+ <string name="navigation_target">Cible</string>
+ <string name="license">Licence</string>
+ <string name="license_show">Afficher la licence</string>
+ <string name="license_dismiss">Rejeter</string>
+ <string name="helper_calendar_title">Module supplémentaire c:geo agenda</string>
+ <string name="helper_calendar_missing">Module supplémentaire c:geo agenda non installé</string>
+ <string name="helper_calendar_description">Permet d\'exporter les événements liés aux caches dans le calendrier Android.</string>
+ <string name="helper_locus_title">Locus</string>
+ <string name="helper_locus_description">Application simple affichant des cartes en ligne et hors ligne. Permet d\'enregistrer son parcours, de gérer des POI et de nombreuses autres fonctions utiles.</string>
+ <string name="helper_gpsstatus_title">Etat GPS</string>
+ <string name="helper_gpsstatus_description">Vous pouvez utiliser le radar de cette application dans c:geo. Il gère des informations supplémentaires relatives au GPS.</string>
+ <string name="helper_bluetoothgps_title">GPS Bluetooth</string>
+ <string name="helper_bluetoothgps_description">Vous permet d\'utiliser un GPS externe pour une meilleure réception, plus précis et économise la batterie.</string>
+ <string name="helper_barcode_title">Lecteur de code barre</string>
+ <string name="helper_barcode_description">Il existe des programmes et des sites web permettant d\'afficher un géo-code sous forme de code barre. Avec cette application, c:geo pourra lire les géo-codes affichés sous cette forme sur l\'écran de votre ordinateur.</string>
+ <string name="helper_pocketquery_title">Pocket Query Creator</string>
+ <string name="helper_pocketquery_description">Permet la création facile et le téléchargement de Pocket Queries centrées sur votre position actuelle ou un point sélectionné sur une carte. Nécessite un compte Premium Geocaching.com.</string>
+ <string name="addon_missing_title">Module complémentaire manquant</string>
+ <string name="addon_download_prompt">Le télécharger sur Google Play.</string>
+ <string name="export">Exporter</string>
+ <string name="export_exportedto">exporté vers</string>
+ <string name="export_failed">Échec de l\'exportation</string>
+ <string name="export_fieldnotes">Notes de terrain</string>
+ <string name="export_fieldnotes_info">Les notes de terrain seront sauvées dans le dossier /sdcard/field-notes avec, comme nom de fichier, la date et l\'heure courantes.</string>
+ <string name="export_fieldnotes_upload">Envoyer vers Geocaching.com</string>
+ <string name="export_fieldnotes_uploading">Envoi en cours…</string>
+ <string name="export_fieldnotes_upload_success">Envoi effectué avec succès</string>
+ <string name="export_fieldnotes_onlynew">Uniquement les nouveautés depuis le dernier envoi</string>
+ <string name="export_fieldnotes_creating">Création des notes de terrain…</string>
+ <string name="export_gpx">GPX</string>
+ <string name="export_gpx_info">Le fichier GPX sera exporté dans %1$s avec la date et l\'heure courantes comme nom de fichier.</string>
+ <string name="export_gpx_to">Envoyer le GPX exporté vers</string>
+ <string name="attribute_dogs_yes">Chiens autorisés</string>
+ <string name="attribute_dogs_no">Chiens interdits</string>
+ <string name="attribute_bicycles_yes">Vélos autorisés</string>
+ <string name="attribute_bicycles_no">Vélos interdits</string>
+ <string name="attribute_motorcycles_yes">Motos autorisées</string>
+ <string name="attribute_motorcycles_no">Motos interdites</string>
+ <string name="attribute_quads_yes">Quads autorisés</string>
+ <string name="attribute_quads_no">Quads interdits</string>
+ <string name="attribute_jeeps_yes">Véhicules tout-terrain autorisés</string>
+ <string name="attribute_jeeps_no">Véhicules tout-terrain interdits</string>
+ <string name="attribute_snowmobiles_yes">Motos-neige autorisées</string>
+ <string name="attribute_snowmobiles_no">Motos-neige interdites</string>
+ <string name="attribute_horses_yes">Chevaux autorisés</string>
+ <string name="attribute_horses_no">Chevaux interdits</string>
+ <string name="attribute_campfires_yes">Feux de camp autorisés</string>
+ <string name="attribute_campfires_no">Feux de camp interdits</string>
+ <string name="attribute_rv_yes">Camions/Camping-cars autorisés</string>
+ <string name="attribute_rv_no">Camions/Camping-cars interdits</string>
+ <string name="attribute_kids_yes">Recommandé pour les enfants</string>
+ <string name="attribute_kids_no">Non recommandé pour les enfants</string>
+ <string name="attribute_onehour_yes">Prend moins d\'une heure</string>
+ <string name="attribute_onehour_no">Prend plus d\'une heure</string>
+ <string name="attribute_scenic_yes">Point de vue</string>
+ <string name="attribute_scenic_no">Pas de point de vue</string>
+ <string name="attribute_hiking_yes">Randonnée importante</string>
+ <string name="attribute_hiking_no">Randonnée peu importante</string>
+ <string name="attribute_climbing_yes">Escalade difficile</string>
+ <string name="attribute_climbing_no">Pas d\'escalade difficile</string>
+ <string name="attribute_wading_yes">Peut demander à barboter</string>
+ <string name="attribute_wading_no">Ne demande pas à barboter</string>
+ <string name="attribute_swimming_yes">Peut demander à nager</string>
+ <string name="attribute_swimming_no">Ne demande pas à nager</string>
+ <string name="attribute_available_yes">Disponible par tout temps</string>
+ <string name="attribute_available_no">Pas disponible par tout temps</string>
+ <string name="attribute_night_yes">Recommandé de nuit</string>
+ <string name="attribute_night_no">Non recommandé de nuit</string>
+ <string name="attribute_winter_yes">Disponible durant l\'hiver</string>
+ <string name="attribute_winter_no">Pas disponible durant l\'hiver</string>
+ <string name="attribute_stealth_yes">Bonne santé nécessaire</string>
+ <string name="attribute_stealth_no">Bonne santé pas nécessaire</string>
+ <string name="attribute_firstaid_yes">Nécessite une maintenance</string>
+ <string name="attribute_firstaid_no">Ne nécessite pas de maintenance</string>
+ <string name="attribute_cow_yes">Attention au bétail</string>
+ <string name="attribute_cow_no">Pas de bétail</string>
+ <string name="attribute_field_puzzle_yes">Puzzle de terrain</string>
+ <string name="attribute_field_puzzle_no">Pas de puzzle de terrain</string>
+ <string name="attribute_nightcache_yes">Cache de nuit</string>
+ <string name="attribute_nightcache_no">Pas une cache de nuit</string>
+ <string name="attribute_parkngrab_yes">Drive-in</string>
+ <string name="attribute_parkngrab_no">Pas une drive-in</string>
+ <string name="attribute_abandonedbuilding_yes">Batiment abandonné</string>
+ <string name="attribute_abandonedbuilding_no">Pas batiment abandonné</string>
+ <string name="attribute_hike_short_yes">Randonnée courte (moins d\'1 km)</string>
+ <string name="attribute_hike_short_no">Pas de randonnée courte</string>
+ <string name="attribute_hike_med_yes">Randonnée moyenne (1 à 10 km)</string>
+ <string name="attribute_hike_med_no">Pas de randonnée moyenne</string>
+ <string name="attribute_hike_long_yes">Randonnée longue (plus de 10 km)</string>
+ <string name="attribute_hike_long_no">Pas de randonnée longue</string>
+ <string name="attribute_seasonal_yes">Accès saisonnier</string>
+ <string name="attribute_seasonal_no">Pas d\'accès saisonnier</string>
+ <string name="attribute_touristok_yes">Ami des touristes</string>
+ <string name="attribute_touristok_no">Pas ami avec les touristes</string>
+ <string name="attribute_frontyard_yes">Résidence privée</string>
+ <string name="attribute_frontyard_no">Pas une résidence privée</string>
+ <string name="attribute_teamwork_yes">Travail d\'équipe nécessaire</string>
+ <string name="attribute_teamwork_no">Pas de travail d\'équipe nécessaire</string>
+ <string name="attribute_landf_yes">Circuit Perdu et trouvé</string>
+ <string name="attribute_landf_no">Pas un circuit Perdu et trouvé</string>
+ <string name="attribute_partnership_yes">Cache en partenariat</string>
+ <string name="attribute_partnership_no">Pas de cache en partenariat</string>
+ <string name="attribute_fee_yes">Parking payant</string>
+ <string name="attribute_fee_no">Pas de parking payant</string>
+ <string name="attribute_rappelling_yes">Matériel d\'escalade nécessaire</string>
+ <string name="attribute_rappelling_no">Matériel d\'escalade pas nécessaire</string>
+ <string name="attribute_boat_yes">Bateau nécessaire</string>
+ <string name="attribute_boat_no">Pas de bateau nécessaire</string>
+ <string name="attribute_scuba_yes">Matériel de plongée nécessaire</string>
+ <string name="attribute_scuba_no">Matériel de plongée pas nécessaire</string>
+ <string name="attribute_flashlight_yes">Torche nécessaire</string>
+ <string name="attribute_flashlight_no">Torche pas nécessaire</string>
+ <string name="attribute_uv_yes">Lumière UV nécessaire</string>
+ <string name="attribute_uv_no">Lumière UV pas nécessaire</string>
+ <string name="attribute_snowshoes_yes">Chaussures de neige nécessaires</string>
+ <string name="attribute_snowshoes_no">Chaussures de neige pas nécessaires</string>
+ <string name="attribute_skiis_yes">Skis de fond nécessaires</string>
+ <string name="attribute_skiis_no">Skis de fond pas nécessaires</string>
+ <string name="attribute_s_tool_yes">Outils spéciaux nécessaires</string>
+ <string name="attribute_s_tool_no">Outils spéciaux pas nécessaires</string>
+ <string name="attribute_wirelessbeacon_yes">Balise sans fil</string>
+ <string name="attribute_wirelessbeacon_no">Pas de balise sans fil</string>
+ <string name="attribute_treeclimbing_yes">Escalade d\'arbre nécessaire</string>
+ <string name="attribute_treeclimbing_no">Pas d\'escalade d\'arbre nécessaire</string>
+ <string name="attribute_poisonoak_yes">Plantes toxiques</string>
+ <string name="attribute_poisonoak_no">Pas de plantes toxiques</string>
+ <string name="attribute_dangerousanimals_yes">Animaux dangereux</string>
+ <string name="attribute_dangerousanimals_no">Pas d\'animaux dangereux</string>
+ <string name="attribute_ticks_yes">Tiques</string>
+ <string name="attribute_ticks_no">Pas de tique</string>
+ <string name="attribute_mine_yes">Mines abandonnées</string>
+ <string name="attribute_mine_no">Pas de mine abandonnée</string>
+ <string name="attribute_cliff_yes">Chutes de pierres</string>
+ <string name="attribute_cliff_no">Pas de chute de pierres</string>
+ <string name="attribute_hunting_yes">Chasse</string>
+ <string name="attribute_hunting_no">Pas de chasse</string>
+ <string name="attribute_danger_yes">Zone dangereuse</string>
+ <string name="attribute_danger_no">Pas de zone dangereuse</string>
+ <string name="attribute_thorn_yes">Épines</string>
+ <string name="attribute_thorn_no">Pas d\'épine</string>
+ <string name="attribute_wheelchair_yes">Accessible en fauteuil roulant</string>
+ <string name="attribute_wheelchair_no">Pas accessible en fauteuil roulant</string>
+ <string name="attribute_parking_yes">Parking possible</string>
+ <string name="attribute_parking_no">Pas de parking possible</string>
+ <string name="attribute_public_yes">Transport public</string>
+ <string name="attribute_public_no">Pas de transport public</string>
+ <string name="attribute_water_yes">Eau potable proche</string>
+ <string name="attribute_water_no">Pas d\'eau potable proche</string>
+ <string name="attribute_restrooms_yes">Toilettes publiques proches</string>
+ <string name="attribute_restrooms_no">Pas de toilette publique proche</string>
+ <string name="attribute_phone_yes">Téléphone proche</string>
+ <string name="attribute_phone_no">Pas de téléphone proche</string>
+ <string name="attribute_picnic_yes">Tables de pique-nique proches</string>
+ <string name="attribute_picnic_no">Pas de table de pique-nique proche</string>
+ <string name="attribute_camping_yes">Camping possible</string>
+ <string name="attribute_camping_no">Pas de camping possible</string>
+ <string name="attribute_stroller_yes">Accessible en poussette</string>
+ <string name="attribute_stroller_no">Pas accessible en poussette</string>
+ <string name="attribute_fuel_yes">Essence proche</string>
+ <string name="attribute_fuel_no">Pas d\'essence proche</string>
+ <string name="attribute_food_yes">Nourriture proche</string>
+ <string name="attribute_food_no">Pas de nourriture proche</string>
+ <string name="attribute_oc_only_yes">Uniquement enregistrable sur Opencaching</string>
+ <string name="attribute_oc_only_no">Pas uniquement enregistrable sur Opencaching</string>
+ <string name="attribute_link_only_yes">Hyperlien vers un autre portail</string>
+ <string name="attribute_link_only_no">Pas uniquement les hyperliens vers un autre portail</string>
+ <string name="attribute_letterbox_yes">Boîte à lettres (timbre requis)</string>
+ <string name="attribute_letterbox_no">Pas de boîte à lettres avec timbre requis</string>
+ <string name="attribute_railway_yes">Chemin de fer en service à proximité</string>
+ <string name="attribute_railway_no">Pas de chemin de fer en service à proximité</string>
+ <string name="attribute_syringe_yes">Premier secours disponible</string>
+ <string name="attribute_syringe_no">Pas de premier secours disponible</string>
+ <string name="attribute_swamp_yes">Marais</string>
+ <string name="attribute_swamp_no">Pas de marais</string>
+ <string name="attribute_hills_yes">Endroit vallonné</string>
+ <string name="attribute_hills_no">Pas d\'endroit vallonné</string>
+ <string name="attribute_easy_climbing_yes">Escalade facile</string>
+ <string name="attribute_easy_climbing_no">Pas d\'escalade facile</string>
+ <string name="attribute_poi_yes">Point d\'intérêt</string>
+ <string name="attribute_poi_no">Pas de point d\'intérêt</string>
+ <string name="attribute_moving_target_yes">Cible mouvante</string>
+ <string name="attribute_moving_target_no">Pas de cible mouvante</string>
+ <string name="attribute_webcam_yes">Webcam</string>
+ <string name="attribute_webcam_no">Pas de webcam</string>
+ <string name="attribute_inside_yes">Dans un endroit clos (grotte, bâtiment, etc.)</string>
+ <string name="attribute_inside_no">Pas dans un endroit clos</string>
+ <string name="attribute_in_water_yes">Dans l\'eau</string>
+ <string name="attribute_in_water_no">Hors de l\'eau</string>
+ <string name="attribute_no_gps_yes">Sans GPS (boîte à lettres, boussole, etc.)</string>
+ <string name="attribute_no_gps_no">Avec GPS</string>
+ <string name="attribute_overnight_yes">Passage de la nuit sur place nécessaire</string>
+ <string name="attribute_overnight_no">Pas de passage de la nuit sur place nécessaire</string>
+ <string name="attribute_specific_times_yes">Seulement possible à certaines heures</string>
+ <string name="attribute_specific_times_no">Possible à toute heure</string>
+ <string name="attribute_day_yes">Seulement de jour</string>
+ <string name="attribute_day_no">Pas uniquement de jour</string>
+ <string name="attribute_tide_yes">Marée</string>
+ <string name="attribute_tide_no">Pas de marée</string>
+ <string name="attribute_all_seasons_yes">Par toute saison</string>
+ <string name="attribute_all_seasons_no">Pas par toute saison</string>
+ <string name="attribute_breeding_yes">Période de reproduction / nature protégée</string>
+ <string name="attribute_breeding_no">Pas de pérstiode de reproduction / nature protégée</string>
+ <string name="attribute_snow_proof_yes">Cache protégée contre la neige</string>
+ <string name="attribute_snow_proof_no">Cache non protégeé contre la neige</string>
+ <string name="attribute_compass_yes">Boussole</string>
+ <string name="attribute_compass_no">Pas de boussole</string>
+ <string name="attribute_cave_yes">Équipement de spéléologie</string>
+ <string name="attribute_cave_no">Sans équipement de spéléologie</string>
+ <string name="attribute_aircraft_yes">Avion</string>
+ <string name="attribute_aircraft_no">Pas d\'avion</string>
+ <string name="attribute_investigation_yes">Enquête</string>
+ <string name="attribute_investigation_no">Sans enquête</string>
+ <string name="attribute_puzzle_yes">Puzzle / Mystère</string>
+ <string name="attribute_puzzle_no">Sans puzzle / mystère</string>
+ <string name="attribute_arithmetic_yes">Problème arithmétique</string>
+ <string name="attribute_arithmetic_no">Sans problème arithmétique</string>
+ <string name="attribute_other_cache_yes">Autre type de cache</string>
+ <string name="attribute_other_cache_no">Pas d\'autre type de cache</string>
+ <string name="attribute_ask_owner_yes">Demander les conditions au propriétaire</string>
+ <string name="attribute_ask_owner_no">Ne pas demander les conditions au propriétaire</string>
+ <string name="attribute_unknown_yes">Attribut inconnu</string>
+ <string name="attribute_unknown_no">Attribut inconnu négatif</string>
+ <string name="attribute_geotour_yes">Partie d\'un GéoTour</string>
+ <string name="attribute_geotour_no">Ne fait pas partie d\'un GéoTour</string>
+ <string name="quote">Pour faciliter le géocaching.</string>
+ <string name="powered_by">carnero</string>
+ <string name="support">support: <a href="">support@cgeo.org</a></string>
+ <string name="website">site: <a href="">cgeo.org</a></string>
+ <string name="facebook">facebook: <a href="">page c:geo</a></string>
+ <string name="twitter">twitter: <a href="">@android_GC</a></string>
+ <string name="nutshellmanual">Manuel: <a href="">c:geo en bref</a></string>
+ <string name="market">Android: <a href="">c:geo sur Google Play</a></string>
+ <string name="about_twitter">Voulez-vous publier un nouveau statut sur Twitter à chaque nouvelle cache découverte sous <b>c:geo</b>?</string>
+ <string name="status_new_release" tools:ignore="UnusedResources">Nouvelle version disponible.\nCliquer pour installer.</string>
+ <string name="status_new_nightly" tools:ignore="UnusedResources">Nouvelle version de test disponible.\nCliquer pour installer.</string>
+ <string name="status_new_rc" tools:ignore="UnusedResources">Nouvelle version candidate disponible.\nCliquer pour installer.</string>
+ <string name="status_geocaching_change" tools:ignore="UnusedResources">Des changements récents sur Geocaching.com ont cassé c:geo.\nNous sommes en train de nous en occuper.</string>
+ <string name="status_geocaching_livemap" tools:ignore="UnusedResources">Des changements récents sur Geocaching.com ont cassé la carte active.\nNous sommes en train de nous en occuper.</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Vous utilisez une version d\'Android inférieure à 2.1. Les futures versions de c:geo pourront ne pas être disponibles pour votre appareil.</string>
+ <string name="tts_service">Boussole parlante</string>
+ <string name="tts_start">Commencer à parler</string>
+ <string name="tts_stop">Arrêter de parler</string>
+ <string name="tts_one_kilometer">un kilomètre</string>
+ <string name="tts_one_meter">un mètre</string>
+ <string name="tts_one_mile">un mille</string>
+ <string name="tts_one_foot">un pied</string>
+ <string name="tts_one_oclock">une heure</string>
+ <string name="tts_oclock">%s heures</string>
+ <string name="clipboard_copy_ok">Copié dans le presse-papiers</string>
+ <string-array name="log_image_scales">
+ <item>Taille originale</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">minute</item>
+ <item quantity="other">minutes</item>
+ </plurals>
+ <plurals name="cache_counts">
+ <item quantity="one">une cache</item>
+ <item quantity="other">%1$d caches</item>
+ </plurals>
+ <plurals name="waypoints">
+ <item quantity="one">1 étape</item>
+ <item quantity="other">%d étapes</item>
+ </plurals>
+ <plurals name="tts_kilometers">
+ <item quantity="one">%s kilomètre</item>
+ <item quantity="other">%s kilomètres</item>
+ </plurals>
+ <plurals name="tts_meters">
+ <item quantity="one">%s mètre</item>
+ <item quantity="other">%s mètres</item>
+ </plurals>
+ <plurals name="tts_miles">
+ <item quantity="one">%s mille</item>
+ <item quantity="other">%s milles</item>
+ </plurals>
+ <plurals name="tts_feet">
+ <item quantity="one">%s pied</item>
+ <item quantity="other">%s pieds</item>
+ </plurals>
+ <plurals name="days_ago">
+ <item quantity="one">hier</item>
+ <item quantity="other">il y a %d jours</item>
+ </plurals>
+</resources>
diff --git a/main/res/values-hu/strings.xml b/main/res/values-hu/strings.xml
index f9810f0..ca15ea1 100644
--- a/main/res/values-hu/strings.xml
+++ b/main/res/values-hu/strings.xml
@@ -2,13 +2,12 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo iránytű</string>
<!-- basics -->
<string name="cache">Láda</string>
<string name="detail">Részletek</string>
<string name="search">Keresés</string>
- <string name="settings">Beállítások</string>
+ <string name="settings_titlebar">c:geo Beállítások</string>
<string name="helpers">Hasznos segédprogramok</string>
<string name="about">A c:geo-ról</string>
<string name="latitude">Szélesség</string>
@@ -153,7 +152,6 @@
<string name="err_auth_initialize">Sajnáljuk, a c:geo nem tudta elindítani az engedélyezési eljárást.</string>
<string name="err_auth_process">Az engedélyezési eljárás sikertelen.</string>
<string name="err_cannot_log_visit">A c:geo-nak nincs elég információja a láda logolásához. Kérlek logold a ládát a teljes láda leírásnál.</string>
- <string name="err_init_cleared">Sajnáljuk, a c:geo nem tudja törölni a belépési adatokat.</string>
<string name="err_download_fail">Sajnáljuk, a c:geo nem tudja letölteni a ládákat, mert </string>
<string name="err_dwld_details_failed">Sajnáljuk, a c:geo nem tudja letölteni a láda adatait.</string>
<string name="err_load_descr_failed">Sajnáljuk, a c:geo nem tudja betölteni a leírást.</string>
@@ -322,23 +320,18 @@
<string name="about_contributors">Hozzájárulók</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">Felhasználónév</string>
<string name="init_password">Jelszó</string>
- <string name="init_passvote">Jelszó</string>
- <string name="init_login">Belépés &amp; dátumformátum beállítása</string>
+ <string name="init_login">Belépés</string>
<string name="init_login_popup">Belépés</string>
<string name="init_login_popup_working">Belépés a geocaching.com-ra…</string>
<string name="init_login_popup_ok">Belépés ok.</string>
<string name="init_login_popup_failed">Belépés sikertelen.</string>
<string name="init_login_popup_failed_reason">Belépés sikertelen, mert </string>
<string name="init_twitter_authorize">Engedélyezés</string>
- <string name="init_twitter_publish">Állapot bejelentése láda megtalálásakor</string>
<string name="init_signature">Aláírás</string>
- <string name="init_signature_help_button">Súgó</string>
- <string name="init_signature_help_title">Aláírás tippek és trükkök</string>
<string name="init_signature_help_text">Add meg az aláírásod amit a bejegyzés szövegében szeretnél használni.\nHasználható speciális címkék: [DATE] , [TIME], [DATETIME], [USER] &amp; [NUMBER].\nEzek az aláírás beillesztése után válnak láthatóvá.</string>
<string name="init_signature_template_button">Sablon beillesztése</string>
<string name="init_signature_template_date">Dátum</string>
@@ -347,31 +340,40 @@
<string name="init_signature_template_user">Felhasználó</string>
<string name="init_signature_template_number">Szám</string>
<string name="init_signature_template_owner">Tulajdonos</string>
- <string name="init_details">Geoláda részletek</string>
<string name="init_ratingwanted">Értékelés betöltése a GCvote.com-ról</string>
- <string name="init_elevationwanted">A geoláda magassági adatainak betöltése</string>
+ <string name="init_summary_ratingwanted">Értékelés betöltése a GCvote.com-ról</string>
<string name="init_friendlogswanted">További logbook oldal betöltése a barátok logjainak.</string>
+ <string name="init_summary_friendlogswanted">További logbook oldal betöltése a barátok logjainak.</string>
<string name="init_openlastdetailspage">Az utoljára használt oldal részleteinek betöltése</string>
+ <string name="init_summary_openlastdetailspage">Az utoljára használt oldal részleteinek betöltése</string>
<string name="init_autoload">Hosszú leírás automatikus betöltése</string>
- <string name="init_other">Egyéb beállítások</string>
+ <string name="init_summary_autoload">Hosszú leírás automatikus betöltése</string>
<string name="init_skin">Világos felület\n(a c:geo újraindítását igényli)</string>
+ <string name="init_summary_skin">Világos felület\n(a c:geo újraindítását igényli)</string>
<string name="init_address">Cím mutatása a főablakban</string>
+ <string name="init_summary_address">Cím mutatása a főablakban</string>
<string name="init_captcha">CAPTCHA megjelenítése ha szükséges</string>
+ <string name="init_summary_captcha">CAPTCHA megjelenítése ha szükséges</string>
<string name="init_useenglish">Angol nyelv használata a c:geo-ban\n(újraindítás szükséges)</string>
+ <string name="init_summary_useenglish">Angol nyelv használata a c:geo-ban\n(újraindítás szükséges)</string>
<string name="init_exclude">Saját és megtalált ládák kihagyása</string>
+ <string name="init_summary_exclude">Saját és megtalált ládák kihagyása</string>
<string name="init_showwaypoints">Útpontok mutatása élő térképen</string>
<string name="init_showwaypoint_description">Maximum ennyi útpontot mutasson</string>
<string name="init_disabled">Letiltott ládák kihagyása</string>
+ <string name="init_summary_disabled">Letiltott ládák kihagyása</string>
<string name="init_offline">Statikus térképek tárolása offline használathoz</string>
+ <string name="init_summary_offline">Statikus térképek tárolása offline használathoz</string>
<string name="init_offline_wp">Az útpontok statikus térképeinek mentése offline használathoz</string>
+ <string name="init_summary_offline_wp">Az útpontok statikus térképeinek mentése offline használathoz</string>
<string name="init_save_log_img">Logokban található képek mentése</string>
+ <string name="init_summary_save_log_img">Logokban található képek mentése</string>
<string name="init_units">Mérföld/láb használata\n(angolszász mértékegységek)</string>
+ <string name="init_summary_units">Mérföld/láb használata\n(angolszász mértékegységek)</string>
<string name="init_log_offline">Offline logolás használata mindig (ne mutassa az online log ablakot logoláskor, ne küldje el a logot online)</string>
+ <string name="init_summary_log_offline">Offline logolás használata mindig (ne mutassa az online log ablakot logoláskor, ne küldje el a logot online)</string>
<string name="init_livelist">Mutassa a ládák irányát a listában</string>
- <string name="init_altitude">Magasság korrekció</string>
- <string name="init_altitude_description">Ha a GPS rossz magasságot mutat, módosíthatod pozitív vagy negatív irányban. A korrekció mindig méterben van.</string>
- <string name="init_clear">Belépési adatok törlése</string>
- <string name="init_cleared">a c:geo törölte a belépési adatokat.</string>
+ <string name="init_summary_livelist">Mutassa a ládák irányát a listában</string>
<string name="init_backup">Biztonsági mentés</string>
<string name="init_backup_backup">Biztonsági mentés</string>
<string name="init_backup_running">A geoláda adatbázis biztonsági mentése…</string>
@@ -386,19 +388,18 @@
<string name="init_restore_confirm">Az adatbázis üres. Szeretnéd visszaállítani a biztonsági mentést?</string>
<string name="init_backup_last">Elérhető biztonsági mentés</string>
<string name="init_backup_last_no">Nem találató fájl biztonsági mentéssel.</string>
- <string name="init_mapsources">Térkép források</string>
- <string name="init_mapsources_description">Itt választhatod ki a térképeid forrását. A Google térképek alternatívájaként több OpenStreetMap stílus is hozzáférhető és offline térkép fájlokat is használhatsz. (További információ <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a>).</string>
<string name="init_mapsource_select">Válassz térkép forrást</string>
<string name="init_map_directory_description">Könyvtár az offline térképekhez</string>
<string name="init_gpx_exportdir">GPX exportálási könyvtár</string>
<string name="init_gpx_importdir">GPX importálási könyvtár</string>
- <string name="init_gpx_exportdir_description">Itt választhatod ki a könyvtárat a GPX exportálásokhoz.</string>
- <string name="init_gpx_importdir_description">Itt választhatod ki a könyvtárat a GPX importálásokhoz.</string>
<string name="init_maptrail">A nyomvonal mutatása a térképen</string>
+ <string name="init_summary_maptrail">A nyomvonal mutatása a térképen</string>
<string name="init_share_after_export">A megosztás menü megnyitása a GPX exportálás után</string>
<string name="init_trackautovisit">A nyomonkövethető tárgyak automatikus \"látogatott\" logolása</string>
+ <string name="init_summary_trackautovisit">A nyomonkövethető tárgyak automatikus \"látogatott\" logolása</string>
<string name="init_sigautoinsert">Aláírás automatikus beillesztése</string>
<string name="init_loaddirectionimg">Irány-kép betöltése ha szükséges</string>
+ <string name="init_summary_loaddirectionimg">Irány-kép betöltése ha szükséges</string>
<string name="init_default_navigation_tool">Alapértelmezett navigáció</string>
<string name="init_default_navigation_tool_description">Itt választhatod ki az előnyben részesített navigációs eszközöd.</string>
<string name="init_default_navigation_tool_select">Eszköz kiválasztása</string>
@@ -408,14 +409,15 @@
<string name="init_debug">Hibakeresési információ generálása</string>
<string name="init_dbonsdcard_title">Adatbázis helye</string>
<string name="init_dbonsdcard_note">Elmentheted az adatbázist a külső eszközön is. Ezzel belső memóriát takaríthatsz meg, de a teljesítmény csökkenhet és a c:geo nem fog tudni működni ha az SD kártya nem hozzáférhető.</string>
- <string name="init_dbonsdcard">Az adatbázis a külső eszközön</string>
+ <string name="init_dbonsdcard">A külső eszközön</string>
<string name="init_dbmove_dbmove">Adatbázis mozgatása</string>
<string name="init_dbmove_running">Adatbázis mozgatása</string>
<string name="init_dbmove_success">Az adatbázis mozgatása sikeresen lezajlott</string>
<string name="init_dbmove_failed">Az adatbázis mozgatása sikertelen</string>
<string name="init_plain_logs">Log bejegyzések mutatása színek nélkül</string>
+ <string name="init_summary_plain_logs">Log bejegyzések mutatása színek nélkül</string>
<string name="init_use_native_ua">Azonosítás Android böngészőként. Ez megoldja a bejelentkezési problémákat bizonyos szolgáltatóknál.</string>
- <string name="init_rendertheme_folder">Az egyedi offline térképtémák könyvtára (opcionális)</string>
+ <string name="init_summary_use_native_ua">Azonosítás Android böngészőként. Ez megoldja a bejelentkezési problémákat bizonyos szolgáltatóknál.</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Térkép</string>
@@ -424,7 +426,7 @@
<string name="map_source_osm_cyclemap">OSM: Biciklis térkép</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Küldés a c:geo-hoz</string>
- <string name="init_sendToCgeo_name">Az eszközöd neve:</string>
+ <string name="init_sendToCgeo_name">Az eszközöd neve</string>
<string name="init_sendToCgeo_description">A c:geo-hoz küldés segítségével közvetlenül a geocaching weboldalról tölthetsz le ládákat egy Firefox vagy Chrome modul segítségével. Regisztráció előtt olvasd el a leírást <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Csak akkor kell regisztrálnod, ha a c:geo-hoz küldést használni akarod. A C:geo a regisztráció nélkül is működik.</string>
<string name="init_sendToCgeo_register">Regisztráció igénylése</string>
<string name="init_sendToCgeo_registering">Az eszközöd regisztrációja a c:geo-hoz küldéshez…</string>
@@ -499,7 +501,6 @@
<string name="cache_dialog_loading_details_status_logs">Logok betöltése</string>
<string name="cache_dialog_loading_details_status_waypoints">Útpontok feldolgozása</string>
<string name="cache_dialog_loading_details_status_gcvote">A GCVote betöltése</string>
- <string name="cache_dialog_loading_details_status_elevation">Magassági adatok betöltése</string>
<string name="cache_dialog_loading_details_status_cache">Láda adatai</string>
<string name="cache_dialog_loading_details_status_render">Render nézet</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -572,7 +573,6 @@
<string name="cache_time_full_hours">óra</string>
<!-- editor dialog -->
- <string name="editor_save">Mentés</string>
<!-- file list base -->
<string name="file_searching_in">Fájlok keresése\nitt</string>
@@ -599,7 +599,6 @@
<string name="gpx_import_error_io">A fájl olvasása sikertelen</string>
<string name="gpx_import_error_parser">Rossz fájlformátum</string>
<string name="gpx_import_error_unexpected">Váratlan hiba</string>
- <string name="gpx_import_confirm">Szeretnéd a GPX fájlt a c:geoba importálni?</string>
<string name="gpx_import_canceled">A GPX importálás megszakítva</string>
<string name="gpx_import_delete_title">Fájl törlése</string>
<string name="gpx_import_delete_message">Szeretnéd törölni ezt: %s?</string>
@@ -915,7 +914,7 @@
<string name="attribute_food_no">Nincs étel a közelben</string>
<!-- next things -->
- <string name="legal_note">A geocaching.com szolgáltatásainak használatához, el kell fogadnod ezeket a feltételeket:<a href="http://www.geocaching.com/about/termsofuse.aspx">Groundspeak disclaimer</a></string>
+ <string name="settings_gc_legal_note">A geocaching.com szolgáltatásainak használatához, el kell fogadnod ezeket a feltételeket: Groundspeak disclaimer</string>
<string name="quote">Hogy a geocaching könnyebb legyen a felhasználók pedig lustábbak.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -934,10 +933,11 @@
<string name="status_new_rc" tools:ignore="UnusedResources">Új kiadásra jelölt verzió található.\nKattints a telepítéshez.</string>
<string name="status_geocaching_change" tools:ignore="UnusedResources">A c:geo a geocaching.com-on nemrégen történt változások miatt nem működik.\nDolgozunk a megoldáson. Nézz vissza hamarosan.</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">Az élő térkép a geocaching.com-on nemrégen történt változások miatt nem működik.\nDolgozunk a megoldáson. Nézz vissza hamarosan.</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Úgy tűnik az Android 2.1-es verziójánál régebbit használsz. A c:geo jövőbeli frissítései lehet hogy nem lesznek elérhetők az eszközödre.</string>
<string name="clipboard_copy_ok">Kimásolva a vágólapra</string>
<plurals name="days_ago">
<item quantity="other">%d nappal ezelőtt</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-it/strings.xml b/main/res/values-it/strings.xml
index c0a282c..09eb40c 100644
--- a/main/res/values-it/strings.xml
+++ b/main/res/values-it/strings.xml
@@ -2,13 +2,12 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo bussola</string>
<!-- basics -->
<string name="cache">Cache</string>
<string name="detail">Dettaglio</string>
<string name="search">Cerca</string>
- <string name="settings">Settaggi</string>
+ <string name="settings_titlebar">c:geo Settaggi</string>
<string name="helpers">Apps utili</string>
<string name="about">Info c:geo</string>
<string name="latitude">Latitudine</string>
@@ -176,7 +175,6 @@
<string name="err_auth_initialize">c:geo ha fallito l\'inizializzazione del processo di autorizzazione.</string>
<string name="err_auth_process">Processo di autorizzazione fallito.</string>
<string name="err_cannot_log_visit">c:geo non ha abbastanza informazioni per salvare il log. Per cortesia effettuarlo dalla pagina dei dettagli completi del cache.</string>
- <string name="err_init_cleared">c:geo non può cancellare le informazioni di login.</string>
<string name="err_download_fail">c:geo ha fallito il download dei cache perché </string>
<string name="err_dwld_details_failed">c:geo ha fallito il download dei dettagli del cache.</string>
<string name="err_load_descr_failed">c:geo non può caricare la descrizione.</string>
@@ -362,28 +360,21 @@
<string name="about_contributors">Contributori</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
- <string name="init_gc_activate">Attiva Geocaching.com su mappa live e nelle ricerche</string>
<string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">Attiva opencaching.de su mappa live e nelle ricerche</string>
<string name="init_oc_de_description">Autorizza c:geo a cercare cache ed accedere/filtrare i ritrovamenti su opencaching.de</string>
<string name="init_register_oc_de">Autorizza c:geo</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">Utente</string>
<string name="init_password">Password</string>
- <string name="init_passvote">Password</string>
- <string name="init_login">Verifica e salva login</string>
+ <string name="init_login">Verifica login</string>
<string name="init_login_popup">Login</string>
<string name="init_login_popup_working">Logging…</string>
<string name="init_login_popup_ok">Login OK.</string>
<string name="init_login_popup_failed">Login fallito.</string>
<string name="init_login_popup_failed_reason">Login fallito perché </string>
<string name="init_twitter_authorize">Autorizza c:geo</string>
- <string name="init_twitter_publish">Manda un tweet quando trovi un cache</string>
<string name="init_signature">Firma</string>
- <string name="init_signature_help_button">Aiuto</string>
- <string name="init_signature_help_title">Suggerimento per la Firma</string>
<string name="init_signature_help_text">Scrivi la tua firma da usare nei testi di log.\nStringhe speciali possono essere usate come: [DATE], [TIME], [DATETIME], [USER] e [NUMBER].\nSaranno espanse quando la firma viene inserita.</string>
<string name="init_signature_template_button">Stringhe speciali</string>
<string name="init_signature_template_date">Data</string>
@@ -392,32 +383,42 @@
<string name="init_signature_template_user">Utente</string>
<string name="init_signature_template_number">Numero cache</string>
<string name="init_signature_template_owner">Proprietario</string>
- <string name="init_details">Dettagli cache</string>
<string name="init_ratingwanted">Carica il rating del cache da GCvote.com</string>
- <string name="init_elevationwanted">Carica dati altitudine cache</string>
+ <string name="init_summary_ratingwanted">Carica il rating del cache da GCvote.com</string>
<string name="init_friendlogswanted">Carica logbook addizionale con i log dei miei amici</string>
+ <string name="init_summary_friendlogswanted">Carica logbook addizionale con i log dei miei amici</string>
<string name="init_openlastdetailspage">Ricorda l\'ultima pagina usata nei dettagli</string>
+ <string name="init_summary_openlastdetailspage">Ricorda l\'ultima pagina usata nei dettagli</string>
<string name="init_autoload">Carica automaticamente descrizione estesa</string>
- <string name="init_other">Altre opzioni</string>
+ <string name="init_summary_autoload">Carica automaticamente descrizione estesa</string>
<string name="init_skin">Tema chiaro\n(richiede riavvio di c:geo)</string>
+ <string name="init_summary_skin">Tema chiaro\n(richiede riavvio di c:geo)</string>
<string name="init_address">Visualizza indirizzo invece delle coordinate su pagina principale</string>
+ <string name="init_summary_address">Visualizza indirizzo invece delle coordinate su pagina principale</string>
<string name="init_captcha">Visualizza CAPTCHA se necessario (solo utenti base, non Premium)</string>
+ <string name="init_summary_captcha">Visualizza CAPTCHA se necessario (solo utenti base, non Premium)</string>
<string name="init_useenglish">Usa sempre English in c:geo\n(richiede riavvio)</string>
+ <string name="init_summary_useenglish">Usa sempre English in c:geo\n(richiede riavvio)</string>
<string name="init_exclude">Escludi i miei cache e queli che ho già trovato</string>
+ <string name="init_summary_exclude">Escludi i miei cache e queli che ho già trovato</string>
<string name="init_showwaypoints">Mostra waypoints sulla mappa</string>
<string name="init_showwaypoint_description">Se sulla mappa sono mostrati meno cache di quelli indicati, saranno mostrati anche i relativi waypoints.</string>
<string name="init_disabled">Escludi cache disattivati</string>
+ <string name="init_summary_disabled">Escludi cache disattivati</string>
<string name="init_offline">Salva le mappe per uso offline</string>
+ <string name="init_summary_offline">Salva le mappe per uso offline</string>
<string name="init_offline_wp">Salva i waypoints delle mappe per uso offline</string>
+ <string name="init_summary_offline_wp">Salva i waypoints delle mappe per uso offline</string>
<string name="init_save_log_img">Salva immagini contenute nei log</string>
+ <string name="init_summary_save_log_img">Salva immagini contenute nei log</string>
<string name="init_units">Usa miglia/piedi</string>
+ <string name="init_summary_units">Usa miglia/piedi</string>
<string name="init_log_offline">Attiva log offline (non visualizzerà lo schermo di log online, non invierà subito il log)</string>
+ <string name="init_summary_log_offline">Attiva log offline (non visualizzerà lo schermo di log online, non invierà subito il log)</string>
<string name="init_choose_list">Chiedi la lista quando salvi un cache</string>
+ <string name="init_summary_choose_list">Chiedi la lista quando salvi un cache</string>
<string name="init_livelist">Visualizza in che direzione sono i cache, nelle liste</string>
- <string name="init_altitude">Correzione di altitudine</string>
- <string name="init_altitude_description">Se il GPS restituisce un\'errata altitudine, puoi correggerla inserendo un valore positivo o negativo, in metri.</string>
- <string name="init_clear">Azzera login</string>
- <string name="init_cleared">c:geo ha azzerato le informazioni di login.</string>
+ <string name="init_summary_livelist">Visualizza in che direzione sono i cache, nelle liste</string>
<string name="init_backup">Backup</string>
<string name="init_backup_backup">Backup</string>
<string name="init_backup_running">Creazione del backup del database dei cache in corso…</string>
@@ -432,19 +433,18 @@
<string name="init_restore_confirm">Il database è vuoto. Vuoi ripristinare il backup?</string>
<string name="init_backup_last">Disponibile Backup delle</string>
<string name="init_backup_last_no">Non esiste il file con il backup.</string>
- <string name="init_mapsources">Tipi di mappe</string>
- <string name="init_mapsources_description">Qui puoi scegliere dove c:geo preleverà le mappe. Come alternativa a Google maps esistono vari stili di OpenStreetMap disponibili anche per uso offline (vedi <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a> per dettagli).\nIn aggiunta, temi personalizzati sono disponibili per le mappe offline</string>
<string name="init_mapsource_select">Seleziona il tipo di mappa</string>
<string name="init_map_directory_description">Cartella con le mappe offline</string>
<string name="init_gpx_exportdir">Cartella di export GPX</string>
<string name="init_gpx_importdir">Cartella di import GPX</string>
- <string name="init_gpx_exportdir_description">Qui puoi selezionare la cartella di esportazione GPX.</string>
- <string name="init_gpx_importdir_description">Qui puoi selezionare la cartella di importazione GPX.</string>
<string name="init_maptrail">Mostra la scia nella Mappa</string>
+ <string name="init_summary_maptrail">Mostra la scia nella Mappa</string>
<string name="init_share_after_export">Apri menu condividi dopo export GPX</string>
<string name="init_trackautovisit">Setta i miei oggetti Trackables automaticamente su \"visit\" quando invio log</string>
- <string name="init_sigautoinsert">Inserisce la firma automaticamente</string>
+ <string name="init_summary_trackautovisit">Setta i miei oggetti Trackables automaticamente su \"visit\" quando invio log</string>
+ <string name="init_sigautoinsert">Inserisce automaticamente</string>
<string name="init_loaddirectionimg">Carica le immagini di direzione se necessario</string>
+ <string name="init_summary_loaddirectionimg">Carica le immagini di direzione se necessario</string>
<string name="init_default_navigation_tool">Navigatore preferito</string>
<string name="init_default_navigation_tool_description">Qui puoi scegliere il tuo strumento di navigazione preferito. Sarà attivato cliccando l\'icona di navigazione vicino al titolo del cache.</string>
<string name="init_default_navigation_tool_select">Scegli navigatore</string>
@@ -454,14 +454,15 @@
<string name="init_debug">Genera informazioni di debug</string>
<string name="init_dbonsdcard_title">Posizione Database</string>
<string name="init_dbonsdcard_note">Puoi decidere di salvare il database su memoria esterna. In questo caso risparmierai memoria interna ma potresti perdere un pochino di velocità e c:geo non funzionerà se la tua sdcard non sarà disponibile.</string>
- <string name="init_dbonsdcard">Database su memoria esterna</string>
+ <string name="init_dbonsdcard">Su memoria esterna</string>
<string name="init_dbmove_dbmove">Spostamento Database</string>
<string name="init_dbmove_running">Spostamento Database</string>
<string name="init_dbmove_success">Database spostato con successo.</string>
<string name="init_dbmove_failed">Spostamento fallito</string>
<string name="init_plain_logs">Visualizza i LOG senza colori</string>
+ <string name="init_summary_plain_logs">Visualizza i LOG senza colori</string>
<string name="init_use_native_ua">Identifica come browser Android. Risolve alcuni problemi di login con alcuni provider di rete.</string>
- <string name="init_rendertheme_folder">Cartella per i temi mappa personali off-line</string>
+ <string name="init_summary_use_native_ua">Identifica come browser Android. Risolve alcuni problemi di login con alcuni provider di rete.</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Map</string>
<string name="map_source_google_satellite">Google: Satellite</string>
@@ -469,7 +470,7 @@
<string name="map_source_osm_cyclemap">OSM: Cyclemap</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Send to c:geo</string>
- <string name="init_sendToCgeo_name">Nome dispositivo:</string>
+ <string name="init_sendToCgeo_name">Nome dispositivo</string>
<string name="init_sendToCgeo_description">\"Send to c:geo\" permette di ricevere cache direttamente dal sito geocaching.com tramite un plugin speciale per Firefox o Chrome. Prima della registrazione leggere <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. È necessario registrare questo dispositivo solo se intendi usare send2cgeo. C:geo funzionerà anche senza questa registrazione e senza send2cgeo.</string>
<string name="init_sendToCgeo_register">Richiedi registrazione</string>
<string name="init_sendToCgeo_registering">Registrazione in corso a \"Send to c:geo\"…</string>
@@ -565,7 +566,6 @@
<string name="cache_dialog_loading_details_status_logs">Caricamento log</string>
<string name="cache_dialog_loading_details_status_waypoints">Elaborazione waypoints</string>
<string name="cache_dialog_loading_details_status_gcvote">Caricamento GCVote</string>
- <string name="cache_dialog_loading_details_status_elevation">Caricamento dati di altitudine</string>
<string name="cache_dialog_loading_details_status_cache">Salvataggio dati</string>
<string name="cache_dialog_loading_details_status_render">Creazione pagina</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -648,7 +648,6 @@
<string name="cache_listed_on">Elencato su %s</string>
<!-- editor dialog -->
- <string name="editor_save">Salva</string>
<!-- file list base -->
<string name="file_searching_in">Ricerca file\nin</string>
@@ -675,7 +674,6 @@
<string name="gpx_import_error_io">Impossibile leggere il file</string>
<string name="gpx_import_error_parser">Il formato del file non è compatibile</string>
<string name="gpx_import_error_unexpected">Errore inaspettato</string>
- <string name="gpx_import_confirm">Vuoi importare il file GPX in c:geo?</string>
<string name="gpx_import_canceled">Importazione GPX annullata</string>
<string name="gpx_import_delete_title">Cancella file</string>
<string name="gpx_import_delete_message">Vuoi cancellare %s?</string>
@@ -1061,7 +1059,7 @@
<string name="attribute_geotour_no">Non fa parte di un GeoTour</string>
<!-- next things -->
- <string name="legal_note">Per usare i servizi di Geocaching.com, si applicano i termini e le condizioni del <a href="http://www.geocaching.com/about/termsofuse.aspx">Contratto Groundspeak</a> che deve essere approvato dall\'utente.</string>
+ <string name="settings_gc_legal_note">Per usare i servizi di Geocaching.com, si applicano i termini e le condizioni del Contratto Groundspeak che deve essere approvato dall\'utente.</string>
<string name="quote">Per rendere il geocaching più facile e rendere gli utenti più pigri.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -1081,17 +1079,35 @@
<string name="status_new_rc" tools:ignore="UnusedResources">Una nuova release candidate è disponibile.\nClicca per installarla.</string>
<string name="status_geocaching_change" tools:ignore="UnusedResources">Modifiche recenti al sito geocaching hanno disattivato c:geo.\nCi stiamo lavorando, riprova più tardi.</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">Modifiche recenti al sito geocaching hanno disattivato la mappa live.\nCi stiamo lavorando, riprova più tardi.</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Sembra che tu stia utilizzando una versione di Android precedente alla 2.1. Le future versioni di c:geo potrebbero non supportare il tuo dispositivo.</string>
<!-- text-to-speech for compass view -->
<string name="tts_service">Bussola parlante</string>
<string name="tts_start">Start voce</string>
<string name="tts_stop">Stop voce</string>
- <string name="tts_kilometers">%s chilometri</string>
- <string name="tts_meters">%s metri</string>
- <string name="tts_miles">%s miglia</string>
- <string name="tts_feet">%s piedi</string>
- <string name="tts_oclock">%s precisi</string>
-
+ <string name="tts_one_kilometer">un chilometro</string>
+ <plurals name="tts_kilometers">
+ <item quantity="one">un chilometro</item>
+ <item quantity="other">%s chilometri</item>
+ </plurals>
+ <string name="tts_one_meter">un metro</string>
+ <plurals name="tts_meters">
+ <item quantity="one">un metro</item>
+ <item quantity="other">%s metri</item>
+ </plurals>
+ <string name="tts_one_mile">un miglio</string>
+ <plurals name="tts_miles">
+ <item quantity="one">un miglio</item>
+ <item quantity="other">%s miglia</item>
+ </plurals>
+ <string name="tts_one_foot">un piede</string>
+ <plurals name="tts_feet">
+ <item quantity="one">un piede</item>
+ <item quantity="other">%s piedi</item>
+ </plurals>
+ <string name="tts_one_oclock">a ore una</string>
+ <string name="tts_oclock">a ore %s</string>
+
<!-- various -->
<string name="clipboard_copy_ok">Copiato nella clipboard</string>
diff --git a/main/res/values-ja/strings.xml b/main/res/values-ja/strings.xml
index 94d0ffc..ef11738 100644
--- a/main/res/values-ja/strings.xml
+++ b/main/res/values-ja/strings.xml
@@ -2,13 +2,11 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo コンパス</string>
<!-- basics -->
<string name="cache">キャッシュ</string>
<string name="detail">詳細</string>
<string name="search">検索</string>
- <string name="settings">設定</string>
<string name="helpers">役に立つアプリ</string>
<string name="about">c:geoについて</string>
<string name="latitude">緯度</string>
@@ -16,6 +14,7 @@
<!-- actionbar -->
<string name="action_bar_share_title">キャッシュのリンクを共有</string>
+ <string name="settings_titlebar">c:geo 設定</string>
<!-- caches -->
<string name="all_types">全てのタイプのキャッシュ</string>
@@ -34,10 +33,10 @@
<string name="ape">Project APE キャッシュ</string>
<string name="gchq">Groundspeak HQ</string>
<string name="gps">GPS Adventures Exhibit</string>
+ <string name="block">Groundspeak Block Party</string>
<string name="unknown">不明なタイプ</string>
- <!-- cache sizes -->
- <!-- 要確認 -->
+ <!-- cache sizes --> <!-- 要確認 -->
<string name="cache_size_micro">マイクロ</string>
<string name="cache_size_small">スモール</string>
<string name="cache_size_regular">レギュラー</string>
@@ -54,8 +53,7 @@
<string name="wp_pkg">駐車場</string>
<string name="wp_trailhead">出発地点</string>
<string name="wp_waypoint">参考地点</string>
- <string name="wp_original">オリジナル座標</string> <!-- 「初公開時の座標」の方がいいかも -->
-
+ <string name="wp_original">オリジナル座標</string> <!-- 「初公開時の座標」の方がいいかも -->
<!-- logs -->
<string name="log_found">見つかった</string>
@@ -86,7 +84,8 @@
<string name="log_tb_drop">ここに置く</string>
<string name="log_tb_changeall">Change All</string>
<string name="log_save">保存</string>
- <string name="log_saving">ログを保存中…</string>
+ <string name="log_saving">ログを送信中…</string>
+ <string name="log_saving_and_uploading">ログと画像を送信中…</string>
<string name="log_clear">消去</string>
<string name="log_post">ログの投稿</string>
<string name="log_post_rate">ログの投稿と評価:</string>
@@ -104,7 +103,7 @@
<string name="log_stars_4">星4つ</string>
<string name="log_stars_45">星4.5</string>
<string name="log_stars_5">星5つ</string>
- <string name="log_stars_1_description">お粗末</string> <!-- 要確認 GCVote.com Suggested quality rating -->
+ <string name="log_stars_1_description">お粗末</string> <!-- 要確認 GCVote.com Suggested quality rating -->
<string name="log_stars_15_description">見劣りする</string>
<string name="log_stars_2_description">平均以下</string>
<string name="log_stars_25_description">悪くはない</string>
@@ -120,6 +119,24 @@
<string name="log_today">今日</string>
<string name="log_yesterday">昨日</string>
<string name="log_smilies">スマイルマーク</string>
+ <string name="log_image">画像</string>
+ <string name="log_image_attach">画像を添付</string>
+ <string name="log_image_edit">添付画像を変更</string>
+ <string name="log_image_stored">ファイル選択</string>
+ <string name="log_image_camera">撮影</string>
+ <string name="log_image_caption">タイトル</string>
+ <string name="log_image_description">説明</string>
+ <string name="log_image_scale">拡大縮小</string>
+ <string name="log_password_title">Log Password:</string>
+ <string name="log_hint_log_password">Enter your log password</string>
+
+ <string-array name="log_image_scales">
+ <item>実サイズ</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<!-- translation -->
<string name="translate_to_sys_lang">%sに翻訳</string>
@@ -160,18 +177,19 @@
<string name="err_auth_initialize">認証プロセスの初期化に失敗しました。</string>
<string name="err_auth_process">認証プロセスに失敗しました。</string>
<string name="err_cannot_log_visit">ログを書くことができません。キャッシュの詳細画面から書き込みしてみてください。</string>
- <string name="err_init_cleared">ログイン情報を消去することができません。</string>
<string name="err_download_fail">キャッシュ情報のダウンロードに失敗しました。</string>
<string name="err_dwld_details_failed">キャッシュ情報の詳細をダウンロードすることができませんでした。</string>
<string name="err_load_descr_failed">キャッシュの説明をロードすることができません。</string>
<string name="err_location_unknown">キャッシュの場所が分かりません。</string>
<string name="err_missing_device_name">登録するにはこの端末のモデル番号を入力してください。</string>
<string name="err_favorite_failed">お気に入りの変更に失敗しました。</string>
- <string name="err_tb_display">トラッカブルアイテムを表示することができません。本当にトラッカブルアイテムですか?</string>
- <string name="err_tb_details_open">トラッカブルアイテムの詳細を開くことができません。</string>
+ <string name="err_select_logimage_failed">添付画像ファイルの選択に失敗しました。</string>
+ <string name="err_acquire_image_failed">画像ファイルの取得に失敗しました。</string>
+ <string name="err_tb_display">トラッカブルを表示することができません。本当にトラッカブルですか?</string>
+ <string name="err_tb_details_open">トラッカブルの詳細を開くことができません。</string>
<string name="err_tb_forgot_saw">c:geo forgot which trackable you saw.</string>
- <string name="err_tb_find">トラッカブルアイテムが見つかりません。</string>
- <string name="err_tb_find_that">トラッカブルアイテムが見つかりません。</string>
+ <string name="err_tb_find">トラッカブルが見つかりません。</string>
+ <string name="err_tb_find_that">トラッカブルが見つかりません。</string>
<string name="err_waypoint_cache_unknown">c:geo doesn\'t know to which cache you want to add waypoint.</string>
<string name="err_waypoint_add_failed">ウェイポイントを追加することができませんでした。</string>
<string name="err_point_unknown_position">現在地を認識できません。</string>
@@ -179,13 +197,14 @@
<string name="err_point_no_position_given">少なくとも経度、緯度、または距離と方位を入力してください。全てを入力することもできます。</string>
<string name="err_point_curr_position_unavailable">現在地の座標が分かりません。もう少しお待ちください…</string>
<string name="err_point_bear_and_dist_title">ヘルプが必要?</string>
- <string name="err_point_bear_and_dist">方位と距離を入力してください。方位は北を基準として時計回りに0~360度で表し単位は付けないでください。</string> <!-- 半角必須? -->
+ <string name="err_point_bear_and_dist">方位と距離を入力してください。方位は北を基準として時計回りに0~360度で表し単位は付けないでください。</string> <!-- 半角必須? -->
<string name="err_point_location_error">ウェイポイントの場所が得られません。</string>
<string name="err_log_load_data">ログを書くのに必要なデータをロードすることができません。</string>
<string name="err_log_load_data_again">ログを書くのに必要なデータをロードすることができません。もう一度やってみてください。</string>
<string name="err_log_load_data_still">ログを投稿するのに必要なデータをまだロード中です。もう少しお待ちください。</string>
<string name="err_log_failed_server">サーバの反応がないのでログを投稿することができませんでした。</string>
- <string name="err_log_post_failed">ログを投稿することができなかったようです。geocaching.comで確認してください。</string>
+ <string name="err_log_post_failed">ログを投稿することができなかったようです。Geocaching.comで確認してください。</string>
+ <string name="err_logimage_post_failed">ログの添付画像がアップロードされなかったようです。Geocaching.comで確認してください。</string>
<string name="err_search_address_forgot">c:geo forgot the address you tried to find.</string>
<string name="err_parse_lat">緯度の解析ができません。</string>
<string name="err_parse_lon">経度の解析ができません。</string>
@@ -198,11 +217,11 @@
<string name="warn_no_username">ユーザ名が入力されていません。</string>
<string name="warn_search_help_title">ヘルプが必要?</string>
<string name="warn_search_help_address">住所、地名や名称を入力してください。例:住所の「Radlicka 100, Prague, Czech Republic」、都市名の「ベルリン」、または「イエローストーン国立公園」のような名称。</string>
- <string name="warn_search_help_gccode">ジオキャッシュコード(GCコード)を入力してください。例:「GC1VCAZ」。</string> <!-- 半角必須? -->
- <string name="warn_search_help_keyword">キャッシュ名の一部を入力してください。検索対象はキャッシュ名だけです。キャッシュの詳細は対象ではありません。例:「Night Cache」。</string> <!-- 半角英数字記号で? -->
- <string name="warn_search_help_user">Geocaching.comのユーザ名を入力してください。</string> <!-- 半角必須? -->
- <string name="warn_search_help_tb">トラッカブルアイテムのコード(多くはTBかTCで始まります)を入力してください。例:「TB29QMZ」。</string> <!-- 半角必須? -->
- <string name="warn_log_text_fill">ログの本文を入力してください。(訳者注:日本語も使用できます)</string>
+ <string name="warn_search_help_gccode">ジオキャッシュコード(GCコード)を入力してください。例:「GC1VCAZ」。</string> <!-- 半角必須? -->
+ <string name="warn_search_help_keyword">キャッシュ名の一部を入力してください。検索対象はキャッシュ名だけです。キャッシュの詳細は対象ではありません。例:「Night Cache」。</string> <!-- 半角英数字記号で? -->
+ <string name="warn_search_help_user">Geocaching.comのユーザ名を入力してください。</string> <!-- 半角必須? -->
+ <string name="warn_search_help_tb">トラッカブルのコード(多くはTBかTCで始まります)を入力してください。例:「TB29QMZ」。</string> <!-- 半角必須? -->
+ <string name="warn_log_text_fill">ログの本文を入力してください。</string>
<string name="warn_load_images">画像をロードすることができませんでした。</string>
<string name="warn_invalid_mapfile">選択した地図ファイルはMapsforge version 0.3.0フォーマットの地図ファイルではありません。\nオフライン地図は利用できません。</string>
<string name="warn_deprecated_mapfile">Mapsforge version 0.2.4フォーマットの地図ファイルは非推奨です。\nMapsforge version 0.3.0フォーマットに変更した方がいいでしょう。次のリリースでversion 0.2.4はサポートされなくなります。</string>
@@ -212,6 +231,8 @@
<string name="info_log_saved">ログを保存しました。</string>
<string name="info_log_cleared">ログを消去しました。</string>
<string name="info_log_type_changed">ログのタイプを変更しました。</string>
+ <string name="info_select_logimage_cancelled">添付画像のファイル選択または撮影がキャンセルされました。</string>
+ <string name="info_stored_image">新規画像ファイルの保存場所:</string>
<string name="info_storing_static_maps">オフライン用に地図を保存中</string>
<!-- location service -->
@@ -229,8 +250,7 @@
<string name="menu_settings">設定</string>
<string name="menu_history">履歴</string>
<string name="menu_filter">フィルター</string>
- <string name="menu_scan_geo">QRコードスキャン</string> <!-- It is more suitable "QRcode" than "Geocode" in Japanese, because "Geocode" is not commonly known. Issue #794 https://github.com/cgeo/cgeo/issues/794 -->
-
+ <string name="menu_scan_geo">QRコードスキャン</string> <!-- It is more suitable "QRcode" than "Geocode" in Japanese, because "Geocode" is not commonly known. Issue #794 https://github.com/cgeo/c-geo-opensource/issues/794 -->
<!-- main screen -->
<string name="live_map_button">地図</string>
@@ -250,6 +270,7 @@
<string name="caches_eta_ltm">1分以内</string>
<plurals name="caches_eta_mins">
+ <!-- <item quantity="one">分</item> -->
<item quantity="other">分</item>
</plurals>
@@ -265,10 +286,11 @@
<string name="caches_sort_size">サイズ</string>
<string name="caches_sort_favorites">人気</string>
<string name="caches_sort_name">名前</string>
+ <string name="caches_sort_geocode">GCコード</string>
<string name="caches_sort_rating">評価</string>
<string name="caches_sort_vote">Vote (Own Rating)</string>
<string name="caches_sort_inventory">目録の数</string>
- <string name="caches_sort_date_hidden">隠した日</string>
+ <string name="caches_sort_date_hidden">設置日</string>
<string name="caches_sort_date_logged">ログが書かれた日</string>
<string name="caches_sort_finds">見つかった数</string>
<string name="caches_sort_state">状態</string>
@@ -281,7 +303,7 @@
<string name="caches_drop_selected">選択したキャッシュを削除</string>
<string name="caches_drop_selected_ask">選択したキャッシュをデバイスから削除しますか?</string>
<string name="caches_drop_all">全て削除</string>
- <string name="caches_drop_all_ask">全てのキャッシュをデバイスから削除しますか?</string> <!-- 要確認 -->
+ <string name="caches_drop_all_ask">全てのキャッシュをデバイスから削除しますか?</string> <!-- 要確認 -->
<string name="caches_drop_stored">削除</string>
<string name="caches_drop_progress">キャッシュを削除中</string>
<string name="caches_drop_all_and_list">全て削除し、リストも消去</string>
@@ -293,17 +315,20 @@
<string name="caches_map_locus">Locus</string>
<string name="caches_map_locus_export">Locusにエクスポート</string>
<string name="caches_recaptcha_title">reCAPTCHA</string>
- <string name="caches_recaptcha_explanation">画像の文字を入力してください。キャッシュの座標を得るのには重要ですが必須ではありません。設定(メイン画面のメニューボタンから)で、このダイアログを表示しないようにできます。</string> <!-- 半角必須? -->
+ <string name="caches_recaptcha_explanation">画像の文字を入力してください。キャッシュの座標を得るのには重要ですが必須ではありません。設定(メイン画面のメニューボタンから)で、このダイアログを表示しないようにできます。</string> <!-- 半角必須? -->
<string name="caches_recaptcha_hint">画像の文字</string>
<string name="caches_recaptcha_continue">続ける</string>
<string name="caches_filter">フィルター</string>
<string name="caches_filter_title">フィルター</string>
<string name="caches_filter_size">サイズ</string>
<string name="caches_filter_type">タイプ</string>
- <string name="caches_filter_track">トラッカブルアイテムあり</string>
+ <string name="caches_filter_track">トラッカブルあり</string>
<string name="caches_filter_clear">フィルターをクリア</string>
<string name="caches_filter_modified">座標の更新あり</string>
+ <string name="caches_filter_origin">Origin</string>
<string name="caches_removing_from_history">履歴から削除中…</string>
+ <string name="caches_clear_offlinelogs">全てのオフラインログを削除</string>
+ <string name="caches_clear_offlinelogs_progress">全てのオフラインログを削除中</string>
<!-- caches lists -->
<string name="list_menu">リスト</string>
@@ -336,26 +361,50 @@
<string name="about_donation_more">開発に\n寄付する</string>
<string name="about_contributors">貢献者</string>
- <!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
- <string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">オンライン地図や検索でopencaching.deも使用する</string>
+ <!-- settings -->
+ <string name="settings_title_services">サービス</string>
+ <string name="settings_title_appearance">外観</string>
+ <string name="settings_title_cachedetails">キャッシュの詳細</string>
+ <string name="settings_title_offlinedata">オフラインデータ</string>
+ <string name="settings_title_logging">ログ</string>
+ <string name="settings_title_map">地図</string>
+ <string name="settings_title_map_data">地図データ</string>
+ <string name="settings_title_map_content">地図表示</string>
+ <string name="settings_title_gpx">GPX</string>
+ <string name="settings_title_basicmembers">ベーシック会員</string>
+ <string name="settings_title_navigation">ナビゲーション</string>
+ <string name="settings_title_system">システム</string>
+
+ <string name="settings_category_browser">ブラウザ</string>
+ <string name="settings_category_logging_other">他のオプション</string>
+
+ <string name="settings_goto_url_button">詳細…</string>
+
+ <string name="settings_title_gc">Geocaching.com</string>
+ <string name="settings_activate_gc">有効化</string>
+ <string name="settings_gc_legal_note">Geocaching.comを使うにはGroundspeak利用規約(英語)に同意している必要があります。</string>
+ <string name="settings_info_facebook_login_title">Facebook Login</string>
+ <string name="settings_info_facebook_login">c:geoからFacebookのアカウントでgeocaching.comにログインすることはできません。 しかし簡単に回避することはできます…</string>
+ <string name="init_oc">Opencaching.de</string>
+ <string name="settings_activate_oc">有効化</string>
+ <string name="init_oc_de_description">キャッシュを検索したり見つけたキャッシュにアクセス/フィルタリングしたりするためにc:geoにopencaching.deを認証させる。</string>
+ <string name="init_register_oc_de">c:geoを認証</string>
+ <string name="init_reregister_oc_de">再度c:geoを認証</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
+ <string name="settings_activate_twitter">有効化</string>
<string name="init_username">ユーザ名</string>
<string name="init_password">パスワード</string>
- <string name="init_passvote">パスワード</string>
- <string name="init_login">ログイン確認とログイン情報を保存</string>
+ <string name="init_login">ログイン確認</string>
<string name="init_login_popup">ログイン</string>
<string name="init_login_popup_working">ログイン中…</string>
<string name="init_login_popup_ok">ログイン完了</string>
<string name="init_login_popup_failed">ログイン失敗</string>
<string name="init_login_popup_failed_reason">ログインに失敗しました。原因: </string>
+ <string name="init_login_popup_not_authorized">認証できませんでした</string>
<string name="init_twitter_authorize">c:geoを認証</string>
- <string name="init_twitter_publish">キャッシュが見つかったら状況をツイート</string>
+ <string name="init_twitter_reauthorize">再度c:geoを認証</string>
<string name="init_signature">署名</string>
- <string name="init_signature_help_button">ヘルプ</string>
- <string name="init_signature_help_title">署名のヒント</string>
<string name="init_signature_help_text">ログ本文で使う署名を入力してください。\n特別な文字として、[DATE]、[TIME]、[DATETIME]、[USER]や[NUMBER]があります。\nこれらは署名の挿入時に、日付、時間、日時、ユーザ名や見つけたキャッシュ数+1に変換されます。</string>
<string name="init_signature_template_button">テンプレートを挿入</string>
<string name="init_signature_template_date">日付</string>
@@ -363,32 +412,43 @@
<string name="init_signature_template_datetime">日付と時間</string>
<string name="init_signature_template_user">ユーザ名</string>
<string name="init_signature_template_number">キャッシュ数</string>
- <string name="init_signature_template_owner">所有者</string>
- <string name="init_details">キャッシュの詳細</string>
- <string name="init_ratingwanted">キャッシュの評価をGCvote.comから取得</string>
- <string name="init_elevationwanted">キャッシュの標高値を取得</string> <!-- 正確に訳すと高度値 -->
- <string name="init_friendlogswanted">友達の書いたログを別ページに表示</string>
- <string name="init_openlastdetailspage">キャッシュ情報の表示では最後に表示したページを開く</string>
- <string name="init_autoload">キャッシュの説明を自動的に全て表示</string>
- <string name="init_other">その他のオプション</string>
- <string name="init_skin">明るい色のスキンを使用\n(c:geoの再起動が必要)</string>
- <string name="init_address">メイン画面での現在地を座標値の代わりに地名で表示</string>
- <string name="init_captcha">必要ならCAPTCHAを表示(ベーシック会員のみ)</string>
- <string name="init_useenglish">英語表示\n(c:geoの再起動が必要)</string>
- <string name="init_exclude">自分で所有または見つけたキャッシュは除く</string>
+ <string name="init_signature_template_owner">オーナー</string>
+ <string name="init_ratingwanted">GCvote評価</string>
+ <string name="init_summary_ratingwanted">キャッシュの評価をGCvote.comから取得</string>
+ <string name="init_friendlogswanted">友達のログページ</string>
+ <string name="init_summary_friendlogswanted">友達の書いたログを別ページに表示</string>
+ <string name="init_openlastdetailspage">最後に表示したページ</string>
+ <string name="init_summary_openlastdetailspage">キャッシュ情報の表示では最後に表示したページを開く</string>
+ <string name="init_autoload">詳細表示</string>
+ <string name="init_summary_autoload">キャッシュの説明を自動的に全て表示</string>
+ <string name="init_skin">明るいスキン</string>
+ <string name="init_summary_skin">明るい色のスキンを使用\n(c:geoの再起動が必要)</string>
+ <string name="init_address">地名表示</string>
+ <string name="init_summary_address">メイン画面での現在地を座標値の代わりに地名で表示</string>
+ <string name="init_captcha">CAPTCHA表示</string>
+ <string name="init_summary_captcha">必要ならCAPTCHAを表示(ベーシック会員のみ)</string>
+ <string name="init_useenglish">英語表示</string>
+ <string name="init_summary_useenglish">英語で表示\n(c:geoの再起動が必要)</string>
+ <string name="init_exclude">所有または見つけたキャッシュ除外</string>
+ <string name="init_summary_exclude">自分で所有または見つけたキャッシュは除く</string>
<string name="init_showwaypoints">地図でウェイポイントの表示</string>
<string name="init_showwaypoint_description">地図に表示されてるキャッシュ数が入力した数より少ない場合にはウェイポイントも地図に表示します。</string>
- <string name="init_disabled">無効化キャッシュは除く</string>
- <string name="init_offline">オフライン用にキャッシュの地図を保存</string>
- <string name="init_offline_wp">オフライン用にウェイポイントの地図を保存</string>
- <string name="init_save_log_img">オフライン用にログの添付画像を保存</string>
- <string name="init_units">距離をマイル/フィートで表示</string>
- <string name="init_log_offline">ログ書きをオフライン専用にする\n(ログを書く際にオンラインでの投稿をしない。このチェックを外してもオフライン用に保存することはできます。)</string>
- <string name="init_livelist">キャッシュの一覧で方向をアイコン表示</string>
- <string name="init_altitude">標高の修正</string>
- <string name="init_altitude_description">もし現在地の標高が正しくないなら修正できます。正または負のメートル単位で入力してください。</string>
- <string name="init_clear">ログイン情報を消去</string>
- <string name="init_cleared">ログイン情報を消去しました。</string>
+ <string name="init_disabled">無効化キャッシュ除外</string>
+ <string name="init_summary_disabled">無効化キャッシュは除く</string>
+ <string name="init_offline">オフライン地図</string>
+ <string name="init_summary_offline">オフライン用にキャッシュの地図を保存</string>
+ <string name="init_offline_wp">オフライン地図(WP)</string>
+ <string name="init_summary_offline_wp">オフライン用にウェイポイントを地図に保存</string>
+ <string name="init_save_log_img">画像保存</string>
+ <string name="init_summary_save_log_img">オフライン用にログの添付画像を保存</string>
+ <string name="init_units">マイル/フィート表示</string>
+ <string name="init_summary_units">距離をメートルの代わりにマイル/フィートで表示</string>
+ <string name="init_log_offline">オフラインログ</string>
+ <string name="init_summary_log_offline">ログ書きをオフライン専用にする\n(ログを書く際にオンラインでの投稿をしない。このチェックを外してもオフライン用に保存することはできます。)</string>
+ <string name="init_choose_list">リストを選択</string>
+ <string name="init_summary_choose_list">キャッシュ情報の保存時にリストを選択するダイアログを表示</string>
+ <string name="init_livelist">方向を表示</string>
+ <string name="init_summary_livelist">キャッシュの一覧で方向をアイコン表示</string>
<string name="init_backup">バックアップ</string>
<string name="init_backup_backup">バックアップ</string>
<string name="init_backup_running">キャッシュのデータベースをバックアップ中…</string>
@@ -403,19 +463,22 @@
<string name="init_restore_confirm">キャッシュのデータベースは空です。バックアップからリストアしますか?</string>
<string name="init_backup_last">前回バックアップ日時:</string>
<string name="init_backup_last_no">まだバックアップを取ったことがありません。</string>
- <string name="init_mapsources">地図の設定</string>
- <string name="init_mapsources_description">オンライン地図をGoogleマップからOpenStreetMap(その派生オンライン地図やオフライン地図)に変更できます。詳細は<a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a> (英語)をご覧ください。\nオフライン地図用のテーマも使用できます。</string>
+ <string name="settings_info_offline_maps_title">オフライン地図について</string>
+ <string name="settings_info_offline_maps">Mapsforgeからダウンロードした地図やOSMのデータから自作した地図などを使用できます。</string>
+ <string name="settings_info_themes_title">オフライン地図のテーマについて</string>
+ <string name="settings_info_themes">オフライン地図用のテーマが使用できます。カラースタイル(ナイトビュー用など)を変更したり、自転車道など特定のオブジェクトをハイライトしたり、高度線を表示したりすることができます。</string>
<string name="init_mapsource_select">地図の選択</string>
<string name="init_map_directory_description">オフライン地図フォルダ</string>
<string name="init_gpx_exportdir">GPXエクスポートフォルダ</string>
<string name="init_gpx_importdir">GPXインポートフォルダ</string>
- <string name="init_gpx_exportdir_description">GPXファイルへエクスポートする際の保存先フォルダを選択できます。</string>
- <string name="init_gpx_importdir_description">GPXファイルへインポートする際の保存先フォルダを選択できます。</string>
- <string name="init_maptrail">地図に軌跡を表示</string>
+ <string name="init_maptrail">軌跡表示</string>
+ <string name="init_summary_maptrail">地図に軌跡を表示</string>
<string name="init_share_after_export">エクスポートした後に共有メニューを表示</string>
- <string name="init_trackautovisit">「見つけた」ログを書く際に、持っているトラッカブルアイテムを自動的に「訪れた」にする</string>
+ <string name="init_trackautovisit">トラッカブル「訪れた」設定</string>
+ <string name="init_summary_trackautovisit">「見つけた」ログを書く際に、持っているトラッカブルを自動的に「訪れた」にする</string>
<string name="init_sigautoinsert">署名を自動的に挿入</string>
- <string name="init_loaddirectionimg">必要なら方向アイコンを取得(ベーシック会員のみ)</string>
+ <string name="init_loaddirectionimg">方向アイコン</string>
+ <string name="init_summary_loaddirectionimg">必要なら方向アイコンを取得(ベーシック会員のみ)</string>
<string name="init_default_navigation_tool">デフォルトのナビ</string>
<string name="init_default_navigation_tool_description">お好きなナビツールを選択できます。</string>
<string name="init_default_navigation_tool_select">ナビツールの選択</string>
@@ -430,19 +493,22 @@
<string name="init_dbmove_running">データベースの移動中</string>
<string name="init_dbmove_success">データベースを移動しました。</string>
<string name="init_dbmove_failed">データベースの移動に失敗しました</string>
- <string name="init_plain_logs">ログブックのフォントカラーを無効化</string>
- <string name="init_use_native_ua">OSにブラウザとして認識させる\n(特定のインターネットプロバイダ経由でログインできない場合にチェックしてください。)</string>
- <string name="init_rendertheme_folder">オフライン地図のテーマ用フォルダ(任意)</string>
+ <string name="init_plain_logs">プレーンログ</string>
+ <string name="init_summary_plain_logs">ログブックのフォントカラーを無効化</string>
+ <string name="init_use_native_ua">Androidブラウザ</string>
+ <string name="init_summary_use_native_ua">OSにブラウザとして認識させる\n(特定のインターネットプロバイダ経由でログインできない場合にチェックしてください。)</string>
+ <string name="init_rendertheme_folder">オフライン地図のテーマ用フォルダ</string>
<!-- map sources -->
<string name="map_source_google_map">Googleマップ:地図</string>
<string name="map_source_google_satellite">Googleマップ:航空写真</string>
- <string name="map_source_osm_mapnik">OpenStreetMap</string>
+ <string name="map_source_osm_mapnik">OpenStreetMap:Mapnik</string>
<string name="map_source_osm_cyclemap">OpenStreetMap:Cyclemap</string>
- <string name="map_source_osm_offline">オフライン用</string>
+ <string name="map_source_osm_offline">OpenStreetMap:オフライン用</string>
<string name="init_sendToCgeo">Send to c:geo</string>
+ <string name="settings_info_send2cgeo_title">send2cgeoについて</string>
<string name="init_sendToCgeo_name">この端末のモデル番号:</string>
- <string name="init_sendToCgeo_description"><b>Send 2 c:geo</b>はPCのブラウザ(FirefoxやChrome。InternetExplorerは非対応)で表示してるキャッシュ情報をアンドロイド端末に直接送ることができます。 登録する前に<a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a> (英語)をお読みください。簡単な登録とブラウザに拡張機能のインストールが必要です。この<b>Send 2 c:geo</b>機能を使用しないのなら登録は不要です。</string>
+ <string name="init_sendToCgeo_description"><b>Send 2 c:geo</b>はPCのブラウザ(FirefoxとChrome)で表示してるキャッシュ情報をアンドロイド端末に直接送ることができます。 登録する前に<a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a> (英語)をお読みください。簡単な登録とブラウザに拡張機能のインストールが必要です。この<b>Send 2 c:geo</b>機能を使用しないのなら登録は不要です。</string>
<string name="init_sendToCgeo_register">登録を申請</string>
<string name="init_sendToCgeo_registering">"Send to c:geo"にこの端末を登録しています…</string>
<string name="init_sendToCgeo_register_ok">登録しました。PINコードは####です。PCのブラウザでhttp://send2.cgeo.org/(英語)を開き、右下辺りの「Add a device…」からPINコードを入力して端末の登録を完了してください。</string>
@@ -450,7 +516,7 @@
<string name="sendToCgeo_download_fail">キャッシュ情報がダウンロードできませんでした。インターネットに未接続かSend 2 c:geoのサーバが停止中です。</string>
<string name="sendToCgeo_no_registration">キャッシュ情報がダウンロードできませんでした。 Send 2 c:geoの登録期限が過ぎました。再度、設定画面から登録してください。</string>
- <!-- auth -->
+ <!-- auth twitter -->
<string name="auth_twitter">Twitter</string>
<string name="auth_authorize">c:geoを認証</string>
<string name="auth_start">認証を開始</string>
@@ -461,9 +527,26 @@
<string name="auth_dialog_pin_title">PINコード</string>
<string name="auth_dialog_pin_message">Twitterのサイトで表示されたPINコードを入力してください。認証を完了するために必要です。</string>
<string name="auth_dialog_completed">c:geoはTwitterにポストするための認証を受けました。</string>
+ <string name="about_auth_1"><b>c:geo</b>がTwitterにアクセスする許可を得るには次のようにしてください。</string>
+ <string name="about_auth_2">「認証を開始する」ボタンを押すとブラウザでTwitterのページが開きます。そのページにログインすれば<b>c:geo</b>があなたのアカウントにアクセルする許可が得られます。ログインに成功したら数字のPINコードが表示されるので、この下の入力欄にコピー&amp;ペーストして「完了」ボタンを押してください。</string>
+
+ <!-- auth opencaching -->
+ <string name="auth_ocde">opencaching.de</string>
+ <string name="auth_authorize_oc">c:geoを認証</string>
+ <string name="auth_start_oc">認証を開始</string>
+ <string name="auth_again_oc">再度認証を開始</string>
+ <string name="auth_pin_hint_oc">%sのPINコード</string>
+ <string name="auth_finish_oc">完了</string>
+ <string name="auth_dialog_wait_oc">%sからの返答を待っています…</string>
+ <string name="auth_dialog_pin_title_oc">PINコード</string>
+ <string name="auth_dialog_pin_message_oc">%sのサイトで表示されたPINコードを入力してください。認証を完了するために必要です。</string>
+ <string name="auth_dialog_completed_oc">c:geoは%sと連携するための認証を受けました。</string>
+ <string name="about_auth_1_oc"><b>c:geo</b>が%sにアクセスする許可を得るには次のようにしてください。</string>
+ <string name="about_auth_2_oc">「認証を開始する」ボタンを押すとブラウザで%sのページが開きます。そのページにログインすれば<b>c:geo</b>があなたのアカウントにアクセルする許可が得られます。ログインに成功したら数字のPINコードが表示されるので、この下の入力欄にコピー&amp;ペーストして「完了」ボタンを押してください。</string>
<!-- cache -->
<plurals name="cache_counts">
+ <!-- <item quantity="one">1つのキャッシュ</item> -->
<item quantity="other">%1$d 個のキャッシュ</item>
</plurals>
@@ -487,9 +570,15 @@
<string name="cache_log_image_default_title">写真</string>
<string name="cache_personal_note">パーソナルノート</string>
<string name="cache_personal_note_edit">編集</string>
+ <string name="cache_personal_note_upload">アップロード</string>
+ <string name="cache_personal_note_uploading">パーソナルノートをアップロード中</string>
+ <string name="cache_personal_note_upload_done">パーソナルノートをアップロードしました</string>
+ <string name="cache_personal_note_upload_cancelled">パーソナルノートのアップロードをキャンセルしました</string>
+ <string name="cache_personal_note_unstored">キャッシュ情報が保存されていません</string>
+ <string name="cache_personal_note_store">パーソナルノートを有効にするためにキャッシュ情報を保存します。</string>
<string name="cache_description">説明</string>
<string name="cache_description_long">全て表示</string>
- <string name="cache_description_table_note">キャッシュ情報の説明にはhtmlを使ったテーブル表が含まれています。正しく表示するにはブラウザで開く必要があるかもしれません。</string>
+ <string name="cache_description_table_note">キャッシュ情報の説明にはhtmlを使ったテーブル表が含まれています。正しく表示するには%sで開く必要があるかもしれません。</string>
<string name="cache_watchlist_on">このキャッシュはウォッチリストに登録されています。</string>
<string name="cache_watchlist_not_on">このキャッシュはウォッチリストに登録されていません。</string>
<string name="cache_watchlist_add">ウォッチリストに追加</string>
@@ -498,10 +587,14 @@
<string name="cache_favpoint_not_on">このキャッシュはあなたのお気に入りに登録されていません。</string>
<string name="cache_favpoint_add">登録</string>
<string name="cache_favpoint_remove">削除</string>
+ <string name="cache_list_text">リスト:</string>
+ <string name="cache_list_change">移動</string>
+ <string name="cache_list_unknown">Not in a list</string>
<string name="cache_images">画像</string>
<string name="cache_waypoints">ウェイポイント</string>
<plurals name="waypoints">
+ <!-- <item quantity="one">1 ウェイポイント</item> -->
<item quantity="other">%d ウェイポイント</item>
</plurals>
@@ -516,7 +609,6 @@
<string name="cache_dialog_loading_details_status_logs">ログをロード中</string>
<string name="cache_dialog_loading_details_status_waypoints">ウェイポイントを処理中</string>
<string name="cache_dialog_loading_details_status_gcvote">GCVoteをロード中</string>
- <string name="cache_dialog_loading_details_status_elevation">標高値をロード中</string> <!-- 正確に訳すと高度値 -->
<string name="cache_dialog_loading_details_status_cache">データのキャッシュ中</string>
<string name="cache_dialog_loading_details_status_render">表示の処理中</string>
<string name="cache_dialog_offline_save_title">オフライン</string>
@@ -536,6 +628,7 @@
<string name="cache_menu_navigate">ナビゲーション</string>
<string name="cache_menu_navigation_drive">ナビゲーション(自動車)</string>
<string name="cache_menu_navigation_walk">ナビゲーション(徒歩)</string>
+ <string name="cache_menu_navigation_bike">ナビゲーション(自転車)</string>
<string name="cache_menu_maps_directions">Googleマップ 経路・乗換</string>
<string name="cache_menu_radar">レーダー</string>
<string name="cache_menu_map">地図</string>
@@ -565,6 +658,8 @@
<string name="cache_status_disabled">無効化</string>
<string name="cache_status_premium">プレミア会員のみ</string>
<string name="cache_status_not_premium">全ての会員に閲覧可</string>
+ <string name="cache_status_stored">保存済み</string>
+ <string name="cache_status_not_stored">未保存</string>
<string name="cache_geocode">GCコード</string>
<string name="cache_name">名前</string>
<string name="cache_type">タイプ</string>
@@ -576,12 +671,12 @@
<string name="cache_own_rating">Own Rating</string>
<string name="cache_rating_of">/</string>
<string name="cache_favorite">お気に入り</string>
- <string name="cache_owner">所有者</string>
- <string name="cache_hidden">隠した日</string>
+ <string name="cache_owner">オーナー</string>
+ <string name="cache_hidden">設置日</string>
<string name="cache_event">イベント日付</string>
<string name="cache_location">場所</string>
<string name="cache_coordinates">座標</string>
- <string name="cache_coordinates_original">オリジナル座標</string> <!-- 「初公開時の座標」の方がいいかも -->
+ <string name="cache_coordinates_original">オリジナル座標</string> <!-- 「初公開時の座標」の方がいいかも -->
<string name="cache_spoiler_images_title">スポイラー画像</string>
<string name="cache_images_title">画像</string>
<string name="cache_log_types">ログタイプ</string>
@@ -593,11 +688,10 @@
<string name="cache_image_open_file">他のアプリで開く</string>
<string name="cache_image_open_browser">ブラウザで開く</string>
<string name="cache_share_field">共有</string>
- <string name="cache_time_full_hours">時</string> <!-- issues#1858 main/src/cgeo/geocaching/Geocache.java:public String guessEventTimeMinutes()説明分からイベントキャッシュの開催時間を推測 -->
-
+ <string name="cache_time_full_hours">時</string> <!-- issues#1858 main/src/cgeo/geocaching/Geocache.java:public String guessEventTimeMinutes()説明分からイベントキャッシュの開催時間を推測 -->
+ <string name="cache_listed_on">Listed on %s</string>
<!-- editor dialog -->
- <string name="editor_save">保存</string>
<!-- file list base -->
<string name="file_searching_in">ファイルを検索中:\n</string>
@@ -624,10 +718,10 @@
<string name="gpx_import_error_io">ファイルが読み込めません</string>
<string name="gpx_import_error_parser">ファイルフォーマットが正しくありません</string>
<string name="gpx_import_error_unexpected">予期せぬエラー</string>
- <string name="gpx_import_confirm">c:geoにGPXファイルをインポートしますか?</string>
- <string name="gpx_import_canceled">GPXファイルのインポートが中止されました</string>
+ <string name="gpx_import_canceled">GPXファイルのインポートがキャンセルされました</string>
<string name="gpx_import_delete_title">ファイル削除</string>
<string name="gpx_import_delete_message">%sを削除しますか?</string>
+ <string name="gpx_import_select_list_title">GPXファイルをリストへインポート</string>
<!-- map file select -->
<string name="map_file_select_title">地図ファイルの選択</string>
@@ -655,12 +749,13 @@
<string name="waypoint_edit_title">ウェイポイントを編集</string>
<string name="waypoint_add_title">ウェイポイントを追加</string>
<string name="waypoint_note">メモ</string>
+ <string name="waypoint_visited">訪問済み</string>
<string name="waypoint_save">保存</string>
<string name="waypoint_loading">ウェイポイントをロード中…</string>
<string name="waypoint_do_not_touch_cache_coordinates">キャッシュ座標を変更しない</string>
<string name="waypoint_set_as_cache_coords">c:geo内部のみでキャッシュ座標を変更</string>
<string name="waypoint_save_and_modify_on_website">c:geo内部とWebサイトでキャッシュ座標を変更</string>
- <string name="waypoint_reset_cache_coords">キャッシュ座標をリセット</string>
+ <string name="waypoint_reset_cache_coords">キャッシュ座標をリセット</string>
<string name="waypoint_coordinates_has_been_reset_on_website">Webサイトでのキャッシュ座標をリセットしました。</string>
<string name="waypoint_coordinates_being_reset_on_website">Webサイトでのキャッシュ座標をリセットしています…</string>
<string name="waypoint_reset">リセット</string>
@@ -691,8 +786,10 @@
<string name="map_modes">表示切替</string>
<string name="map_trail_show">軌跡を表示</string>
<string name="map_trail_hide">軌跡を非表示</string>
- <string name="map_circles_show">半径161mの円を表示</string>
+ <string name="map_circles_show">0.1マイル円を表示</string>
<string name="map_circles_hide">円を非表示</string>
+ <string name="map_mycaches_show">所有/見つけたキャッシュを表示</string>
+ <string name="map_mycaches_hide">所有/見つけたキャッシュを非表示</string>
<string name="map_theme_builtin">デフォルト</string>
<string name="map_theme_select">地図のテーマを選択</string>
<string name="map_live_enable">オンラインで取得</string>
@@ -712,11 +809,13 @@
<!-- search -->
<string name="search_bar_hint">キャッシュ検索</string>
- <string name="search_bar_desc">キャッシュ(GCコード,キーワード), トラッカブルアイテム(TBコード)</string>
+ <string name="search_bar_desc">キャッシュ(GCコード,キーワード), トラッカブル(TBコード)</string>
<string name="search_coordinates">座標</string>
<string name="search_coordinates_button">座標で検索</string>
<string name="search_address">住所</string>
<string name="search_address_button">住所で検索</string>
+ <string name="search_geo">GCコード</string>
+ <string name="search_geo_button">GCコードで検索</string>
<string name="search_kw">キーワード</string>
<string name="search_kw_prefill">キーワード</string>
<string name="search_kw_button">キーワードで検索</string>
@@ -724,11 +823,11 @@
<string name="search_fbu_prefill">ユーザ名</string>
<string name="search_fbu_button">ユーザ名で検索</string>
<string name="search_hbu">キャッシュを隠したユーザ名</string>
- <string name="search_hbu_prefill">所有者名</string>
- <string name="search_hbu_button">所有者名で検索</string>
- <string name="search_tb">トラッカブルアイテム</string>
- <string name="search_tb_hint">トラッカブルアイテムコード</string>
- <string name="search_tb_button">トラッカブルアイテムを検索</string>
+ <string name="search_hbu_prefill">オーナー名</string>
+ <string name="search_hbu_button">オーナー名で検索</string>
+ <string name="search_tb">トラッカブル</string>
+ <string name="search_tb_hint">トラッカブルコード</string>
+ <string name="search_tb_button">トラッカブルを検索</string>
<string name="search_destination">目的地</string>
<string name="search_direction_rel">この地点から</string>
<string name="search_address_started">場所を検索中</string>
@@ -736,8 +835,8 @@
<string name="search_own_caches">自分のキャッシュを検索</string>
<!-- trackable -->
- <string name="trackable">トラッカブルアイテム</string>
- <string name="trackable_details_loading">トラッカブルアイテムの詳細をロード中…</string>
+ <string name="trackable">トラッカブル</string>
+ <string name="trackable_details_loading">トラッカブルの詳細をロード中…</string>
<string name="trackable_log_touch">ログを書く</string>
<string name="trackable_browser_open">ブラウザで開く</string>
<string name="trackable_goal">目的</string>
@@ -746,17 +845,24 @@
<string name="trackable_code">TBコード</string>
<string name="trackable_name">名前</string>
<string name="trackable_type">タイプ</string>
- <string name="trackable_owner">所有者</string>
+ <string name="trackable_owner">オーナー</string>
<string name="trackable_spotted">現在地</string>
<string name="trackable_spotted_in_cache">キャッシュの中:</string>
<string name="trackable_spotted_at_user">持っている人:</string>
<string name="trackable_spotted_unknown_location">不明</string>
- <string name="trackable_spotted_owner">所有者の手元</string>
+ <string name="trackable_spotted_owner">オーナーの手元</string>
<string name="trackable_origin">出発地</string>
<string name="trackable_unknown">不明</string>
<string name="trackable_released">リリース</string>
<string name="trackable_distance">総移動距離</string>
<string name="trackable_touch">見つけた</string>
+ <string name="trackable_not_activated">有効化されていないトラッカブル</string>
+
+ <string name="geokret_type_traditional">トラディショナル</string>
+ <string name="geokret_type_book_or_media">本または電子メディア</string>
+ <string name="geokret_type_human">人</string>
+ <string name="geokret_type_coin">コイン</string>
+ <string name="geokret_type_post">メール</string>
<!-- user -->
<string name="user_menu_title">ユーザ名:</string>
@@ -781,8 +887,8 @@
<string name="license_dismiss">閉じる</string>
<!-- helpers -->
- <string name="helper_calendar_title">c:geo - カレンダープラグイン</string>
- <string name="helper_calendar_missing">c:geo - カレンダープラグインはインストールされていません。</string>
+ <string name="helper_calendar_title">c:geo - カレンダーアドオン</string>
+ <string name="helper_calendar_missing">c:geo - カレンダーアドオンはインストールされていません。</string>
<string name="helper_calendar_description">イベントキャッシュをカレンダーアプリに登録することができます。</string>
<string name="helper_locus_title">Locus</string>
<string name="helper_locus_description">シンプルで役に立つ地図アプリ。オフライン用に地図を直接ダウンロード(画像データのみ)することができます。軌跡(GPSログ)を記録したり、POIを扱ったり、その他もたくさん便利な機能があります。</string>
@@ -792,10 +898,12 @@
<string name="helper_bluetoothgps_description">外部GPSデバイスを利用することができます。より正確な位置情報を得られ、アンドロイド端末のバッテリ消費が少なくなるかもしれません。</string>
<string name="helper_barcode_title">QRコードスキャナー</string>
<string name="helper_barcode_description">GCコードをQRコードで表示するGreasemonkeyスクリプトやサイトがあります。このアプリを使えばパソコンの画面から直接GCコードを読み込むことができます。</string>
+ <string name="helper_pocketquery_title">Pocket Query Creator</string>
+ <string name="helper_pocketquery_description">現在地や地図上の指定した地点で簡単にポケット・クエリを作成できます。Geocaching.comのプレミアム会員である必要があります。</string>
<!-- add-ons -->
- <string name="addon_missing_title">プラグインが見つかりません</string>
- <string name="addon_download_prompt">Playストアからインストールしますか?</string>
+ <string name="addon_missing_title">アドオンが見つかりません</string>
+ <string name="addon_download_prompt">Google Playからインストールしますか?</string>
<!-- export -->
<string name="export">エクスポート</string>
@@ -806,16 +914,13 @@
<string name="export_fieldnotes_upload">geocaching.comにアップロード</string>
<string name="export_fieldnotes_uploading">アップロード中…</string>
<string name="export_fieldnotes_upload_success">geocaching.comにアップロードしました</string>
- <string name="export_fieldnotes_onlynew">最後にエクスポートした時から更新がある場合のみ</string> <!-- only new logs since last export/upload line53:FieldnoteExport.java -->
+ <string name="export_fieldnotes_onlynew">最後にエクスポートした時から更新がある場合のみ</string> <!-- only new logs since last export/upload line53:FieldnoteExport.java -->
<string name="export_fieldnotes_creating">フィールドノートを作成中…</string>
<string name="export_gpx">GPX</string>
<string name="export_gpx_info">GPXファイルは%1$sフォルダに保存され、ファイル名は現在の日時になります。</string>
<string name="export_gpx_to">エクスポートしたGPXファイルを送る:</string>
- <!-- attribute unknown -->
- <string name="attribute_unknown_yes">未知の属性あり</string>
- <string name="attribute_unknown_no">未知の属性なし</string>
- <!-- attributes (permissions -> allowed, not allowed) -->
+ <!-- GC attributes -->
<string name="attribute_dogs_yes">犬の同伴可</string>
<string name="attribute_dogs_no">犬の同伴不可</string>
<string name="attribute_bicycles_yes">自転車侵入可</string>
@@ -834,8 +939,6 @@
<string name="attribute_campfires_no">焚き火不可</string>
<string name="attribute_rv_yes">トラック/RV車侵入可</string>
<string name="attribute_rv_no">トラック/RV車侵入不可</string>
-
- <!-- attributes (conditions -> yes, no) -->
<string name="attribute_kids_yes">子供にお薦め</string>
<string name="attribute_kids_no">子供にはお薦めしない</string>
<string name="attribute_onehour_yes">1時間以内</string>
@@ -888,8 +991,6 @@
<string name="attribute_landf_no">No lost and found tour</string>
<string name="attribute_partnership_yes">共同キャッシュ</string>
<string name="attribute_partnership_no">共同キャッシュではない</string>
-
- <!-- attributes (equipment -> required, not required) -->
<string name="attribute_fee_yes">交通料金や駐車料金が必要</string>
<string name="attribute_fee_no">交通料金や駐車料金は不要</string>
<string name="attribute_rappelling_yes">登山道具が必要</string>
@@ -912,8 +1013,6 @@
<string name="attribute_wirelessbeacon_no">無線ビーコンなし</string>
<string name="attribute_treeclimbing_yes">木登りが必要</string>
<string name="attribute_treeclimbing_no">木登りは不要</string>
-
- <!-- attributes (hazards -> present, not present) -->
<string name="attribute_poisonoak_yes">有毒植物あり</string>
<string name="attribute_poisonoak_no">有毒植物なし</string>
<string name="attribute_dangerousanimals_yes">危険な動物がいる</string>
@@ -930,8 +1029,6 @@
<string name="attribute_danger_no">危険区域ではない</string>
<string name="attribute_thorn_yes">棘のある植物あり</string>
<string name="attribute_thorn_no">棘のある植物なし</string>
-
- <!-- attributes (facilities -> yes, no) -->
<string name="attribute_wheelchair_yes">車いす可</string>
<string name="attribute_wheelchair_no">車いす不可</string>
<string name="attribute_parking_yes">駐車場あり</string>
@@ -954,9 +1051,70 @@
<string name="attribute_fuel_no">近くにガソリンスタンドなし</string>
<string name="attribute_food_yes">近くに飲食店あり</string>
<string name="attribute_food_no">近くに飲食店なし</string>
+ <string name="attribute_oc_only_yes">Opencachingでのみログ可</string>
+ <string name="attribute_oc_only_no">Opencaching以外でもログ可</string>
+ <string name="attribute_link_only_yes">他のジオキャッシングサイトへのリンク</string>
+ <string name="attribute_link_only_no">他のジオキャッシングサイトへのリンク以外の情報あり</string>
+ <string name="attribute_letterbox_yes">レターボックス(スタンプ必要)</string>
+ <string name="attribute_letterbox_no">レターボックスでない(スタンプ不要)</string>
+ <string name="attribute_railway_yes">近くに運行中の鉄道路線あり</string>
+ <string name="attribute_railway_no">近くに運行中の鉄道路線なし</string>
+ <string name="attribute_syringe_yes">応急手当可</string>
+ <string name="attribute_syringe_no">応急手当不可</string>
+ <string name="attribute_swamp_yes">湿地や沼地</string>
+ <string name="attribute_swamp_no">湿地や沼地ではない</string>
+ <string name="attribute_hills_yes">丘陵地</string>
+ <string name="attribute_hills_no">丘陵地ではない</string>
+ <string name="attribute_easy_climbing_yes">Lightweight climbing</string>
+ <string name="attribute_easy_climbing_no">No lightweight climbing</string>
+ <string name="attribute_poi_yes">POI(興味深い地点)あり</string>
+ <string name="attribute_poi_no">POI(興味深い地点)なし</string>
+ <string name="attribute_moving_target_yes">移動するターゲットあり</string>
+ <string name="attribute_moving_target_no">移動するターゲットなし</string>
+ <string name="attribute_webcam_yes">ウェブカムあり</string>
+ <string name="attribute_webcam_no">ウェブカムなし</string>
+ <string name="attribute_inside_yes">囲まれた空間内(洞窟や建物など)</string>
+ <string name="attribute_inside_no">囲まれた空間内ではない</string>
+ <string name="attribute_in_water_yes">水中</string>
+ <string name="attribute_in_water_no">水中ではない</string>
+ <string name="attribute_no_gps_yes">GPS使用不可(レターボックス,コンパスが不安定,…)</string>
+ <string name="attribute_no_gps_no">GPS使用可</string>
+ <string name="attribute_overnight_yes">宿泊必要</string>
+ <string name="attribute_overnight_no">宿泊不要</string>
+ <string name="attribute_specific_times_yes">特定の時間のみ有効</string>
+ <string name="attribute_specific_times_no">特定の時間以外も有効</string>
+ <string name="attribute_day_yes">昼間のみ</string>
+ <string name="attribute_day_no">昼間以外も有効</string>
+ <string name="attribute_tide_yes">潮の干満あり</string>
+ <string name="attribute_tide_no">潮の干満なし</string>
+ <string name="attribute_all_seasons_yes">オールシーズン</string>
+ <string name="attribute_all_seasons_no">オールシーズンではない</string>
+ <string name="attribute_breeding_yes">繁殖期または保護期間</string>
+ <string name="attribute_breeding_no">繁殖期や保護期間ではない</string>
+ <string name="attribute_snow_proof_yes">Snow-proof hiding place</string>
+ <string name="attribute_snow_proof_no">No snow-proof hiding place</string>
+ <string name="attribute_compass_yes">Compass</string>
+ <string name="attribute_compass_no">No compass</string>
+ <string name="attribute_cave_yes">洞窟の知識や準備が必要</string>
+ <string name="attribute_cave_no">洞窟の知識や準備は不要</string>
+ <string name="attribute_aircraft_yes">航空機</string>
+ <string name="attribute_aircraft_no">航空機ではない</string>
+ <string name="attribute_investigation_yes">調査が必要</string>
+ <string name="attribute_investigation_no">調査は不要</string>
+ <string name="attribute_puzzle_yes">パズルまたはミステリー</string>
+ <string name="attribute_puzzle_no">パズルやミステリーではない</string>
+ <string name="attribute_arithmetic_yes">算術問題あり</string>
+ <string name="attribute_arithmetic_no">算術問題なし</string>
+ <string name="attribute_other_cache_yes">他のキャッシュタイプあり</string>
+ <string name="attribute_other_cache_no">他のキャッシュタイプなし</string>
+ <string name="attribute_ask_owner_yes">出発地の状態をオーナーに尋ねる必要あり</string>
+ <string name="attribute_ask_owner_no">出発地の状態をオーナーに尋ねる必要なし</string>
+ <string name="attribute_unknown_yes">未知の属性あり</string>
+ <string name="attribute_unknown_no">未知の属性なし</string>
+ <string name="attribute_geotour_yes">ジオツアーの一部</string>
+ <string name="attribute_geotour_no">ジオツアーの一部ではない</string>
<!-- next things -->
- <string name="legal_note">Geocaching.comを使うには<a href="http://www.geocaching.com/about/termsofuse.aspx">Groundspeak 利用規約</a>(英語)に同意している必要があります。</string>
<string name="quote">To make geocaching easier, to make users lazier.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -964,10 +1122,9 @@
<string name="website">Webサイト: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">マニュアル: <a href="">c:geo マニュアル</a>(英語)</string>
+ <string name="nutshellmanual">マニュアル: <a href="">c:geo マニュアル(英語)</a></string>
+ <string name="market">Android: <a href="">Google Playのc:geo</a></string>
<string name="about_twitter">キャッシュのログを書いたら<b>c:geo</b>にTwitterでつぶやいてほしい?</string>
- <string name="about_auth_1"><b>c:geo</b>がTwitterにアクセスする許可を得るには次のようにしてください。</string>
- <string name="about_auth_2">「認証を開始する」ボタンを押すとブラウザでTwitterのページが開きます。そのページにログインすれば<b>c:geo</b>があなたのアカウントにアクセルする許可が得られます。ログインに成功したら数字のPINコードが表示されるので、この下の入力欄にコピー&amp;ペーストして「完了」ボタンを押してください。</string>
<!-- status (used via string based resource loading) -->
<string name="status_new_release" tools:ignore="UnusedResources">新しいバージョンがあります。\nクリックしてインストールしてください。</string>
@@ -975,10 +1132,41 @@
<string name="status_new_rc" tools:ignore="UnusedResources">新しいRCバージョンがあります。\nクリックしてインストールしてください。</string>
<string name="status_geocaching_change" tools:ignore="UnusedResources">geocaching.comが更新されましたがc:geoはまだ未対応です。\n現在、作業中です。しばらくお待ちください。</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">geocaching.comが更新されましたがオンライン地図機能はまだ未対応です。\n現在、作業中です。しばらくお待ちください。</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Android OS 2.1未満のバージョンをご使用中ですね。申し訳ありませんがc:geoは次期リリースからOS2.1必須になりますので使用できなくなります。</string>
+
+ <!-- text-to-speech for compass view -->
+ <string name="tts_service">Talking compass</string>
+ <string name="tts_start">音声案内開始</string>
+ <string name="tts_stop">音声案内終了</string>
+ <string name="tts_one_kilometer">1 km</string>
+ <plurals name="tts_kilometers">
+ <!-- <item quantity="one">%s km</item> -->
+ <item quantity="other">%s km</item>
+ </plurals>
+ <string name="tts_one_meter">1 m</string>
+ <plurals name="tts_meters">
+ <!-- <item quantity="one">%s m</item> -->
+ <item quantity="other">%s m</item>
+ </plurals>
+ <string name="tts_one_mile">1 マイル</string>
+ <plurals name="tts_miles">
+ <!-- <item quantity="one">%s マイル</item> -->
+ <item quantity="other">%s マイル</item>
+ </plurals>
+ <string name="tts_one_foot">1 フィート</string>
+ <plurals name="tts_feet">
+ <!-- <item quantity="one">%s フィート</item> -->
+ <item quantity="other">%s フィート</item>
+ </plurals>
+ <string name="tts_one_oclock">1 時</string>
+ <string name="tts_oclock">%s 時</string>
+
+ <!-- various -->
<string name="clipboard_copy_ok">クリップボードにコピーしました</string>
<plurals name="days_ago">
+ <!-- <item quantity="one">昨日</item> -->
<item quantity="other">%d日前</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-nb/strings.xml b/main/res/values-nb/strings.xml
index 313d7e3..d7d7c37 100644
--- a/main/res/values-nb/strings.xml
+++ b/main/res/values-nb/strings.xml
@@ -2,13 +2,12 @@
<resources>
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo kompass</string>
<!-- basics -->
<string name="cache">Cache</string>
<string name="detail">Detalj</string>
<string name="search">Søk</string>
- <string name="settings">Instillinger</string>
+ <string name="settings_titlebar">c:geo Instillinger</string>
<string name="about">Om c:geo</string>
<!-- actionbar -->
@@ -30,7 +29,7 @@
<string name="lostfound">Lost &amp; found</string>
<string name="ape">Prosjekt A.P.E. cache</string>
<string name="gchq">Groundspeak hovedkvarter</string>
- <string name="gps">GPS cache</string>
+ <string name="gps">GPS adventures exhibit</string>
<!-- waypoints -->
<string name="wp_final">Sluttpunkt</string>
@@ -104,7 +103,6 @@
<string name="err_auth_initialize">Beklager, c:geo klarte ikke å igangsette autoriserings-prosessen.</string>
<string name="err_auth_process">Autoriserings-prosessen mislyktes.</string>
<string name="err_cannot_log_visit">c:geo har ikke nok informasjon til å logge funn. Prøv å laste inn cachens detaljer først.</string>
- <string name="err_init_cleared">Beklager, c:geo klarte ikke å fjerne innloggings-opplysningene.</string>
<string name="err_download_fail">Beklager. c:geo klarte ikke å laste ned cachene p.g.a.</string>
<string name="err_dwld_details_failed">Beklager, c:geo klarte ikke å laste ned cachens detaljer</string>
<string name="err_load_descr_failed">Beklager, c:geo klarte ikke å åpne beskrivelsen.</string>
@@ -189,12 +187,10 @@
<string name="about_contributors">Bidragsytere</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
<string name="init_gcvote">GCVote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">Brukernavn</string>
<string name="init_password">Passord</string>
- <string name="init_passvote">Passord</string>
<string name="init_login">Sjekk innloggings-opplysninger</string>
<string name="init_login_popup">Logg inn</string>
<string name="init_login_popup_working">Logger inn på Geocaching.com…</string>
@@ -202,19 +198,23 @@
<string name="init_login_popup_failed">Innlogging mislyktes.</string>
<string name="init_login_popup_failed_reason">Innlogging mislyktes p.g.a.</string>
<string name="init_twitter_authorize">Autoriser c:geo</string>
- <string name="init_twitter_publish">Del på Twitter når du finner cacher</string>
<string name="init_signature">Signatur</string>
- <string name="init_other">Andre instillinger</string>
<string name="init_skin">Hvitt tema</string>
+ <string name="init_summary_skin">Hvitt tema</string>
<string name="init_address">Vis adressen i menyen</string>
+ <string name="init_summary_address">Vis adressen i menyen</string>
<string name="init_exclude">Ekskluder egne og funnede cacher fra kartet</string>
+ <string name="init_summary_exclude">Ekskluder egne og funnede cacher fra kartet</string>
<string name="init_disabled">Ekskluder deaktiverte cacher</string>
+ <string name="init_summary_disabled">Ekskluder deaktiverte cacher</string>
<string name="init_offline">Lagre kartet for offline-bruk (små deler)</string>
+ <string name="init_summary_offline">Lagre kartet for offline-bruk (små deler)</string>
<string name="init_units">Bruk imperialistiske måleenheter</string>
+ <string name="init_summary_units">Bruk imperialistiske måleenheter</string>
<string name="init_autoload">Last full beskrivelse automatisk</string>
+ <string name="init_summary_autoload">Last full beskrivelse automatisk</string>
<string name="init_livelist">Vis cachers retning i listen</string>
- <string name="init_clear">Ikke husk meg</string>
- <string name="init_cleared">c:geo fjernet innloggings-opplysningene.</string>
+ <string name="init_summary_livelist">Vis cachers retning i listen</string>
<!-- auth -->
<string name="auth_twitter">Twitter</string>
@@ -385,7 +385,7 @@
<string name="license_dismiss">Dismiss</string>
<!-- next things -->
- <string name="legal_note">For å bruke tjenestene til Geocaching.com, må brukeren samtykke i vilkårene og betingelsene til <a href="http://www.geocaching.com/about/termsofuse.aspx">Groundspeak\'s ansvarsfraskrivelse</a></string>
+ <string name="settings_gc_legal_note">For å bruke tjenestene til Geocaching.com, må brukeren samtykke i vilkårene og betingelsene til Groundspeak\'s ansvarsfraskrivelse.</string>
<string name="support">e-post adresse: <a href="mailto:support@cgeo.org">support@cgeo.org</a></string>
<string name="website">web-side: <a href="http://cgeo.org/">cgeo.org</a></string>
<string name="facebook">facebook: <a href="http://www.facebook.com/pages/cgeo/297269860090">c:geo page</a></string>
@@ -393,4 +393,4 @@
<string name="about_auth_1">Den følgende prosessen tillater <b>c:geo</b> tilgang til Twitter - hvis bruker samtykker.</string>
<string name="about_auth_2">Trykk på \"Start autorisasjon\" knappen for å starte prosessen. Denne prosessen vil åpne Twitter i web-leseren. Logg inn, og tillat <b>c:geo</b> tilgang til kontoen din. Hvis du aksepterer, vil Twitter oppgi en numerisk PIN-kode. Denne PIN-koden må så limes inn i <b>c:geo</b>. Verre er det ikke.</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-nl/strings.xml b/main/res/values-nl/strings.xml
index fd3e54c..f65e441 100644
--- a/main/res/values-nl/strings.xml
+++ b/main/res/values-nl/strings.xml
@@ -2,13 +2,12 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo compass</string>
<!-- basics -->
<string name="cache">Cache</string>
<string name="detail">Detail</string>
<string name="search">Zoeken</string>
- <string name="settings">Instellingen</string>
+ <string name="settings_titlebar">c:geo Instellingen</string>
<string name="helpers">Wat te installeren</string>
<string name="about">Over c:geo</string>
<string name="latitude">Breedtegraad</string>
@@ -33,7 +32,7 @@
<string name="lostfound">Lost &amp; found</string>
<string name="ape">Project ape cache</string>
<string name="gchq">Groundspeak hq</string>
- <string name="gps">Gps cache exhibit</string>
+ <string name="gps">Gps adventures exhibit</string>
<string name="unknown">Onbekend type</string>
<!-- cache sizes -->
@@ -158,7 +157,6 @@
<string name="err_auth_initialize">Sorry, het is c:geo niet gelukt het autorisatie proces te initialiseren.</string>
<string name="err_auth_process">Autorisatie proces mislukt.</string>
<string name="err_cannot_log_visit">c:geo Heeft onvoldoende informatie om bezoek te loggen. Probeer het vanuit de volledige cache details.</string>
- <string name="err_init_cleared">Sorry, c:geo kan de inlog informatie niet wissen.</string>
<string name="err_download_fail">Sorry, c:geo heeft caches niet kunnen downloaden omdat </string>
<string name="err_dwld_details_failed">Sorry, c:geo kon de cache details niet downloaden.</string>
<string name="err_load_descr_failed">Sorry, c:geo kan de omschrijving niet laden.</string>
@@ -337,25 +335,19 @@
<string name="about_contributors">Bijdragers</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
<string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">Activeer opencaching.de op live-kaart en in zoekopdrachten.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">Gebruikersnaam</string>
<string name="init_password">Wachtwoord</string>
- <string name="init_passvote">Wachtwoord</string>
- <string name="init_login">Login controleren &amp; zet datum-formaat</string>
+ <string name="init_login">Login controleren</string>
<string name="init_login_popup">Inloggen</string>
<string name="init_login_popup_working">Inloggen op Geocaching.com…</string>
<string name="init_login_popup_ok">Ingelogd.</string>
<string name="init_login_popup_failed">Inloggen mislukt.</string>
<string name="init_login_popup_failed_reason">Inloggen mislukt omdat </string>
<string name="init_twitter_authorize">c:geo Autoriseren</string>
- <string name="init_twitter_publish">Status publiceren bij gevonden cache</string>
<string name="init_signature">Handtekening</string>
- <string name="init_signature_help_button">Help</string>
- <string name="init_signature_help_title">Handtekening tips en truuks</string>
<string name="init_signature_help_text">Maak een handtekening om te gebruiken in logs.\nSpeciale teksten die gebruikt kunnen worden zijn: [DATE] , [TIME], [DATETIME], [USER] &amp; [NUMBER].\nDeze worden ingevuld op het moment dat de handtekening ingevoegd word.</string>
<string name="init_signature_template_button">Voeg template toe</string>
<string name="init_signature_template_date">Datum</string>
@@ -364,32 +356,42 @@
<string name="init_signature_template_user">Gebruiker</string>
<string name="init_signature_template_number">Nummer</string>
<string name="init_signature_template_owner">Eigenaar</string>
- <string name="init_details">Cache details</string>
<string name="init_ratingwanted">Laad cachewaardering van GCvote.com</string>
- <string name="init_elevationwanted">Laad cache hoogte gegevens</string>
+ <string name="init_summary_ratingwanted">Laad cachewaardering van GCvote.com</string>
<string name="init_friendlogswanted">Laad extra logbook pagina voor logs van vrienden</string>
+ <string name="init_summary_friendlogswanted">Laad extra logbook pagina voor logs van vrienden</string>
<string name="init_openlastdetailspage">Laad details met laatst gebruikte pagina</string>
+ <string name="init_summary_openlastdetailspage">Laad details met laatst gebruikte pagina</string>
<string name="init_autoload">Automatisch laden van lange omschrijving</string>
- <string name="init_other">Overige opties</string>
+ <string name="init_summary_autoload">Automatisch laden van lange omschrijving</string>
<string name="init_skin">Lichte skin (c:geo herstarten)</string>
+ <string name="init_summary_skin">Lichte skin (c:geo herstarten)</string>
<string name="init_address">Toon adres in plaats van positie op hoofdscherm</string>
+ <string name="init_summary_address">Toon adres in plaats van positie op hoofdscherm</string>
<string name="init_captcha">Laat CAPTCHA zien indien noodzakelijk</string>
+ <string name="init_summary_captcha">Laat CAPTCHA zien indien noodzakelijk</string>
<string name="init_useenglish">Use English inside c:geo\n(restart needed)</string>
+ <string name="init_summary_useenglish">Use English inside c:geo\n(restart needed)</string>
<string name="init_exclude">Eigen en gevonden caches uitsluiten</string>
+ <string name="init_summary_exclude">Eigen en gevonden caches uitsluiten</string>
<string name="init_showwaypoints">Laat waypoints zien in map</string>
<string name="init_showwaypoint_description">Level vanaf wanneer waypoints weergegeven worden in de map.</string>
<string name="init_disabled">Uitgeschakelde caches uitsluiten</string>
+ <string name="init_summary_disabled">Uitgeschakelde caches uitsluiten</string>
<string name="init_offline">Kaarten opslaan voor gebruik zonder verbinding</string>
+ <string name="init_summary_offline">Kaarten opslaan voor gebruik zonder verbinding</string>
<string name="init_offline_wp">Statische kaarten van waipoints opslaan voor gebruik zonder verbinding</string>
+ <string name="init_summary_offline_wp">Statische kaarten van waipoints opslaan voor gebruik zonder verbinding</string>
<string name="init_save_log_img">Sla afbeeldingen van logs op</string>
+ <string name="init_summary_save_log_img">Sla afbeeldingen van logs op</string>
<string name="init_units">Gebruik imperiale stelsel voor afstanden</string>
+ <string name="init_summary_units">Gebruik imperiale stelsel voor afstanden</string>
<string name="init_log_offline">Als er gelogd word, doe dit altijd offline (Laat het online log scherm niet zien en verzend de log niet)</string>
+ <string name="init_summary_log_offline">Als er gelogd word, doe dit altijd offline (Laat het online log scherm niet zien en verzend de log niet)</string>
<string name="init_choose_list">Vraag naar lijst voor opslaan caches.</string>
+ <string name="init_summary_choose_list">Vraag naar lijst voor opslaan caches.</string>
<string name="init_livelist">Toon afstand tot cache in lijst</string>
- <string name="init_altitude">Hoogte correctie</string>
- <string name="init_altitude_description">Als de GPS een verkeerde hoogte aangeeft, kan dit gecorrigeerd worden met een positief of negatief nummer. De correctie is in meters.</string>
- <string name="init_clear">Login wissen</string>
- <string name="init_cleared">c:geo Heeft inloginformatie gewist.</string>
+ <string name="init_summary_livelist">Toon afstand tot cache in lijst</string>
<string name="init_backup">Backup</string>
<string name="init_backup_backup">Backup</string>
<string name="init_backup_running">Backup aan het maken van de cache-database…</string>
@@ -404,19 +406,18 @@
<string name="init_restore_confirm">De database is leeg, wil je een database-backup herstellen?</string>
<string name="init_backup_last">Backup beschikbaar van</string>
<string name="init_backup_last_no">Er is geen bestand met een backup.</string>
- <string name="init_mapsources">Kaartbron</string>
- <string name="init_mapsources_description">Hier kan een kaartenbron geselecteerd worden. Als alternatief voor Google maps zijn verschillende OpenStreetMap varianten en ook offline kaarten-files beschikbaar (Zie <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a> voor meer info).</string>
<string name="init_mapsource_select">Selecteer kaartbron</string>
<string name="init_map_directory_description">Directory met offline kaarten</string>
<string name="init_gpx_exportdir">GPX Export Directory</string>
<string name="init_gpx_importdir">GPX Import Directory</string>
- <string name="init_gpx_exportdir_description">Hier kan je de directory voor GPX exports selecteren.</string>
- <string name="init_gpx_importdir_description">Hier kan je de directory voor GPX imports selecteren.</string>
<string name="init_maptrail">Laat pad op kaart zien</string>
+ <string name="init_summary_maptrail">Laat pad op kaart zien</string>
<string name="init_share_after_export">Open deel-menu na GPX export.</string>
<string name="init_trackautovisit">Zet trackables automatisch op \'bezocht\'</string>
- <string name="init_sigautoinsert">Voeg handtekening automatisch toe</string>
+ <string name="init_summary_trackautovisit">Zet trackables automatisch op \'bezocht\'</string>
+ <string name="init_sigautoinsert">Voeg automatisch toe</string>
<string name="init_loaddirectionimg">Laad de richting-afbeelding in, indien nodig (alleen basis-leden)</string>
+ <string name="init_summary_loaddirectionimg">Laad de richting-afbeelding in, indien nodig (alleen basis-leden)</string>
<string name="init_default_navigation_tool">Standaard navigatie</string>
<string name="init_default_navigation_tool_description">Hier kan je de navigatie-tool van jouw voorkeur instellen.</string>
<string name="init_default_navigation_tool_select">Selecteer tool</string>
@@ -426,14 +427,15 @@
<string name="init_debug">Genereer debug informatie.</string>
<string name="init_dbonsdcard_title">Database locatie</string>
<string name="init_dbonsdcard_note">Je kan de c:geo database op een externe locatie opslaan. Dit zal intern geheugen besparen maar kan de applicatie iets trager maken en c:geo zal niet werken als het externe medium (zoals een (micro-)SD-kaart) verwijderd is.</string>
- <string name="init_dbonsdcard">Database op externe locatie.</string>
+ <string name="init_dbonsdcard">Op externe locatie.</string>
<string name="init_dbmove_dbmove">Verplaats database</string>
<string name="init_dbmove_running">Verplaats database</string>
<string name="init_dbmove_success">Database succesvol verplaatst.</string>
<string name="init_dbmove_failed">Database kon niet verplaatst worden.</string>
<string name="init_plain_logs">Laat logs zien zonder kleuren.</string>
+ <string name="init_summary_plain_logs">Laat logs zien zonder kleuren.</string>
<string name="init_use_native_ua">Identificeer als Android browser (lost loginproblemen bij sommige mobiele aanbieders op).</string>
- <string name="init_rendertheme_folder">Directory met aangepaste offline mapthema\'s (optioneel).</string>
+ <string name="init_summary_use_native_ua">Identificeer als Android browser (lost loginproblemen bij sommige mobiele aanbieders op).</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Map</string>
@@ -442,7 +444,7 @@
<string name="map_source_osm_cyclemap">OSM: Cyclemap</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Verstuur naar c:geo</string>
- <string name="init_sendToCgeo_name">Jouw apparaatnaam:</string>
+ <string name="init_sendToCgeo_name">Jouw apparaatnaam</string>
<string name="init_sendToCgeo_description">Verstuur naar c:geo zorgt ervoor dat je caches direct vanaf de geocaching website kan ontvangen door middel van een plugin in je webbrowser (Firefox of Chrome). Lees het volgende voordat je registreert <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Registratie is alleen nodig als je send2cgeo wil gebruiken. C:geo werkt ook zonder het registreren van je apparaat.</string>
<string name="init_sendToCgeo_register">Verstuur registratieverzoek</string>
<string name="init_sendToCgeo_registering">Bezig met het registreren voor "Send to c:geo"…</string>
@@ -522,7 +524,6 @@
<string name="cache_dialog_loading_details_status_logs">Laden logs</string>
<string name="cache_dialog_loading_details_status_waypoints">Verwerken waypoints</string>
<string name="cache_dialog_loading_details_status_gcvote">Laden GCVote</string>
- <string name="cache_dialog_loading_details_status_elevation">Laden van hoogte gegevens</string>
<string name="cache_dialog_loading_details_status_cache">Caching Gegevens</string>
<string name="cache_dialog_loading_details_status_render">Weergave genereren</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -603,7 +604,6 @@
<string name="cache_listed_on">Opgenomen in %s</string>
<!-- editor dialog -->
- <string name="editor_save">Opslaan</string>
<!-- file list base -->
<string name="file_searching_in">Zoeken naar bestanden\nin</string>
@@ -630,7 +630,6 @@
<string name="gpx_import_error_io">Kan bestand niet lezen</string>
<string name="gpx_import_error_parser">Bestandsformaat niet goed</string>
<string name="gpx_import_error_unexpected">Onbekend probleem</string>
- <string name="gpx_import_confirm">Wil je de GPX gegevens in c:geo laden?</string>
<string name="gpx_import_canceled">GPX import is afgebroken</string>
<string name="gpx_import_delete_title">Verwijder file</string>
<string name="gpx_import_delete_message">Weet je zeker dat je %s wil verwijderen?</string>
@@ -1011,7 +1010,7 @@
<string name="attribute_unknown_no">Geen onbekend attribuut aanwezig</string>
<!-- next things -->
- <string name="legal_note">Voor het gebruik van de diensten van Geocaching.com, dient akkoord te worden gegaan met de <a href="http://www.geocaching.com/about/termsofuse.aspx">Groundspeak voorwaarden</a>.</string>
+ <string name="settings_gc_legal_note">Voor het gebruik van de diensten van Geocaching.com, dient akkoord te worden gegaan met de Groundspeak voorwaarden.</string>
<string name="quote">Om geocahing makkelijker te maken en gebruikers luier te maken.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -1037,4 +1036,4 @@
<item quantity="other">%d dagen geleden</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-pl/strings.xml b/main/res/values-pl/strings.xml
index 184b159..7fb263f 100644
--- a/main/res/values-pl/strings.xml
+++ b/main/res/values-pl/strings.xml
@@ -2,13 +2,12 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo kompas</string>
<!-- basics -->
<string name="cache">Skrzynka</string>
<string name="detail">Szczegóły</string>
<string name="search">Szukaj</string>
- <string name="settings">Ustawienia</string>
+ <string name="settings_titlebar">c:geo Ustawienia</string>
<string name="helpers">Przydatne programy</string>
<string name="about">O c:geo</string>
<string name="latitude">Szerokość geograficzna</string>
@@ -34,6 +33,7 @@
<string name="ape">Projekt APE Cache</string>
<string name="gchq">Groundspeak HQ</string>
<string name="gps">GPS Adventures exhibit</string>
+ <string name="block">Groundspeak Block Party</string>
<string name="unknown">Nieznana</string>
<!-- cache sizes -->
@@ -127,6 +127,8 @@
<string name="log_image_caption">Podpis</string>
<string name="log_image_description">Opis</string>
<string name="log_image_scale">Skalowanie obrazu</string>
+ <string name="log_password_title">Hasło do logu:</string>
+ <string name="log_hint_log_password">Wpisz hasło do logu</string>
<!-- translation -->
<string name="translate_to_sys_lang">Przetłumacz na %s</string>
@@ -167,7 +169,6 @@
<string name="err_auth_initialize">c:geo nie może rozpocząć autoryzacji.</string>
<string name="err_auth_process">Autoryzacja zakończona niepowodzeniem.</string>
<string name="err_cannot_log_visit">c:geo nie może dodać wpisu wizyty. Proszę spróbuj przez szczegóły skrzynki.</string>
- <string name="err_init_cleared">c:geo nie może usunąć danych logowania.</string>
<string name="err_download_fail">c:geo nie może załadować skrzynek.</string>
<string name="err_dwld_details_failed">c:geo nie może załadować szczegółów skrzynki.</string>
<string name="err_load_descr_failed">c:geo nie może załadować opisu.</string>
@@ -262,7 +263,8 @@
<plurals name="caches_eta_mins">
<item quantity="one">minuta</item>
- <item quantity="few">minut</item>
+ <item quantity="few">minuty</item>
+ <item quantity="many">minut</item>
<item quantity="other">minut</item>
</plurals>
@@ -352,28 +354,50 @@
<string name="about_detail">Szczegóły</string>
<string name="about_donation_more">Darowizna dla\nprogramisty</string>
<string name="about_contributors">Współpracownicy</string>
+
+ <!-- settings -->
+ <string name="settings_title_services">Usługi</string>
+ <string name="settings_title_appearance">Wygląd</string>
+ <string name="settings_title_cachedetails">Szczegóły skrzynki</string>
+ <string name="settings_title_offlinedata">Dane offline</string>
+ <string name="settings_title_logging">Logowanie</string>
+ <string name="settings_title_map">Mapa</string>
+ <string name="settings_title_map_data">Dane mapy</string>
+ <string name="settings_title_map_content">Zawartość mapy</string>
+ <string name="settings_title_gpx">GPX</string>
+ <string name="settings_title_basicmembers">Użytkownicy Basic</string>
- <!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
- <string name="init_gc_activate">Aktywuj Geocaching.com na aktualnej mapie i w wyszukiwaniu</string>
- <string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">Aktywuj opencaching.de na mapie Live i w wyszukiwaniu</string>
+ <string name="settings_category_browser">Przeglądarka</string>
+ <string name="settings_category_logging_other">Inne opcje logowania</string>
+
+ <string name="settings_goto_url_button">więcej …</string>
+
+ <string name="settings_title_gc">Geocaching.com</string>
+ <string name="settings_activate_gc">Aktywuj</string>
+
+
+ <string name="settings_gc_legal_note">Aby móc korzystać z usług serwisu Geocaching.com warunki korzystania Groundspeak muszą być zaakceptowane.</string>
+ <string name="settings_info_facebook_login_title">Facebook Login</string>
+ <string name="settings_info_facebook_login">Nie możesz zmusić c:geo aby zalogował się do geocaching.com przy pomocy Twojego konta Facebook. Jednakże istnieje proste rozwiązanie …</string>
+
+ <string name="init_oc">Opencaching.de</string>
+ <string name="settings_activate_oc">Aktywuj</string>
+ <string name="init_oc_de_description">Autoryzuj c:geo z opencaching.de aby wyszukiwać skrzynki i mieć dostęp/filtrować znalezione skrzynki.</string>
+ <string name="init_register_oc_de">Autoryzuj c:geo</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
+ <string name="settings_activate_twitter">Aktywuj</string>
<string name="init_username">Nazwa użytkownika</string>
<string name="init_password">Hasło</string>
- <string name="init_passvote">Hasło</string>
- <string name="init_login">Sprawdź i zapisz nazwę użytkownika</string>
+ <string name="init_login">Sprawdź nazwę użytkownika</string>
<string name="init_login_popup">Nazwa użytkownika</string>
<string name="init_login_popup_working">Logowanie…</string>
<string name="init_login_popup_ok">Nazwa użytkownika OK</string>
<string name="init_login_popup_failed">Logowanie nie powiodło się</string>
<string name="init_login_popup_failed_reason">Logowanie nie powiodło się, ponieważ </string>
+ <string name="init_login_popup_not_authorized">Brak autoryzacji</string>
<string name="init_twitter_authorize">Autoryzacja c:geo</string>
- <string name="init_twitter_publish">Publikuj stan w momencie odnalezienia skrzynki</string>
<string name="init_signature">Podpis</string>
- <string name="init_signature_help_button">Pomoc</string>
- <string name="init_signature_help_title">Podpis - porady i wskazówki</string>
<string name="init_signature_help_text">Wprowadź Twój podpis, który będzie używany przy wpisie do dziennika.\nWyrażenia specjalne, które mogą być użyte to: [DATE] , [TIME], [DATETIME], [USER] &amp; [NUMBER].\nBędą one zastępowane w momencie wstawiania podpisu.</string>
<string name="init_signature_template_button">Wstaw szablon</string>
<string name="init_signature_template_date">Data</string>
@@ -382,32 +406,42 @@
<string name="init_signature_template_user">Użytkownik</string>
<string name="init_signature_template_number">Numer</string>
<string name="init_signature_template_owner">Właściciel</string>
- <string name="init_details">Szczegóły skrzynki</string>
<string name="init_ratingwanted">Załaduj ocenę skrzynki z GCvote.com</string>
- <string name="init_elevationwanted">Załaduj dane o ukształtowaniu terenu</string>
+ <string name="init_summary_ratingwanted">Załaduj ocenę skrzynki z GCvote.com</string>
<string name="init_friendlogswanted">Załaduj dodatkowy dziennik dla wpisów od przyjaciół</string>
+ <string name="init_summary_friendlogswanted">Załaduj dodatkowy dziennik dla wpisów od przyjaciół</string>
<string name="init_openlastdetailspage">Otwórz szczegóły ostatnio używanej strony</string>
+ <string name="init_summary_openlastdetailspage">Otwórz szczegóły ostatnio używanej strony</string>
<string name="init_autoload">Automatyczne ładowanie długich opisów</string>
- <string name="init_other">Inne opcje</string>
+ <string name="init_summary_autoload">Automatyczne ładowanie długich opisów</string>
<string name="init_skin">Light skin\n(wymaga restartu)</string>
+ <string name="init_summary_skin">Light skin\n(wymaga restartu)</string>
<string name="init_address">Pokaż adres zamiast współrzędnych na ekranie głównym</string>
+ <string name="init_summary_address">Pokaż adres zamiast współrzędnych na ekranie głównym</string>
<string name="init_captcha">Pokaż CAPTCHA w razie potrzeby (tylko użytkownicy Basic)</string>
+ <string name="init_summary_captcha">Pokaż CAPTCHA w razie potrzeby (tylko użytkownicy Basic)</string>
<string name="init_useenglish">Użyj języka angielskiego wewnątrz c:geo\n(wymaga restartu)</string>
+ <string name="init_summary_useenglish">Użyj języka angielskiego wewnątrz c:geo\n(wymaga restartu)</string>
<string name="init_exclude">Wyklucz własne lub już znalezione skrzynki</string>
+ <string name="init_summary_exclude">Wyklucz własne lub już znalezione skrzynki</string>
<string name="init_showwaypoints">Pokaż punkty nawigacji na mapie</string>
<string name="init_showwaypoint_description">Jeśli mniej niż podana liczba skrzynek wyświetlana jest na mapie, ich punkty nawigacji są dodatkowo wyświetlane.</string>
<string name="init_disabled">Wyklucz tymczasowo niedostępne skrzynki</string>
+ <string name="init_summary_disabled">Wyklucz tymczasowo niedostępne skrzynki</string>
<string name="init_offline">Zapisuj mapy statyczne skrzynek do użytku offline</string>
+ <string name="init_summary_offline">Zapisuj mapy statyczne skrzynek do użytku offline</string>
<string name="init_offline_wp">Zapisuj mapy statyczne punktów nawigacji do użytku offline</string>
+ <string name="init_summary_offline_wp">Zapisuj mapy statyczne punktów nawigacji do użytku offline</string>
<string name="init_save_log_img">Zapisz zdjęcia z wpisów</string>
+ <string name="init_summary_save_log_img">Zapisz zdjęcia z wpisów</string>
<string name="init_units">Używaj angielskich jednostek miary\n(mile)</string>
+ <string name="init_summary_units">Używaj angielskich jednostek miary\n(mile)</string>
<string name="init_log_offline">Włącz logowanie offline\n(Nie pokazuj ekranu logowania online, nie wysyłaj logu online)</string>
+ <string name="init_summary_log_offline">Włącz logowanie offline\n(Nie pokazuj ekranu logowania online, nie wysyłaj logu online)</string>
<string name="init_choose_list">Zapytaj o wykaz podczas zapisywania skrzynek</string>
+ <string name="init_summary_choose_list">Zapytaj o wykaz podczas zapisywania skrzynek</string>
<string name="init_livelist">Pokazuj kierunek do skrzynek na liście</string>
- <string name="init_altitude">Korekta wysokości</string>
- <string name="init_altitude_description">Jeśli GPS podaje Tobie złą wysokość, możesz skorygować ją liczbą dodatnią lub ujemną. Poprawka musi być zawsze wyrażona w metrach.</string>
- <string name="init_clear">Usuń nazwę użytkownika</string>
- <string name="init_cleared">c:geo usunął dane logowania.</string>
+ <string name="init_summary_livelist">Pokazuj kierunek do skrzynek na liście</string>
<string name="init_backup">Kopia zapasowa</string>
<string name="init_backup_backup">Wykonaj kopię zapasową</string>
<string name="init_backup_running">Tworzę kopię zapasową bazy skrzynek…</string>
@@ -422,19 +456,24 @@
<string name="init_restore_confirm">Baza danych jest pusta. Czy na pewno chcesz odzyskać bazę danych z kopii zapasowej?</string>
<string name="init_backup_last">Kopia dostępna od</string>
<string name="init_backup_last_no">Brak pliku z kopią zapasową.</string>
- <string name="init_mapsources">Źródła mapy</string>
- <string name="init_mapsources_description">Tutaj możesz wybrać źródło dla Twoich map. Jako alternatywa do map Google, dostępne są różne wersje OpenStreetMap, a nawet pliki offline z mapą (szczegóły znajdziesz tutaj: <a href="http://code.google.com/p/mapsforge/"> http://code.google.com/p/mapsforge/</a>).\nPonadto wspierane są wybieralne motywy dla map offline.</string>
+
+ <string name="settings_info_offline_maps_title">Informacje na temat Map Offline</string>
+ <string name="settings_info_offline_maps">c:geo wspiera mapy do użytku offline. Możesz pobrać mapy z Mapsforge lub nawet stworzyć własne w oparciu o OSM.</string>
+ <string name="settings_info_themes_title">Informacje na temat Map Themes</string>
+ <string name="settings_info_themes">c:geo wspiera motywy dla map offline. Mogą być używane by zmienić kolorystykę mapy (np. aby uzyskać tryb nocny) lub by zaznaczyć wybrane obiekty jak ścieżki rowerowe lub izolinie.</string>
+
<string name="init_mapsource_select">Wybierz źródło mapy</string>
<string name="init_map_directory_description">Katalog z mapami offline</string>
<string name="init_gpx_exportdir">Katalog do eksportu plików GPX</string>
<string name="init_gpx_importdir">Katalog do importu plików GPX</string>
- <string name="init_gpx_exportdir_description">Tutaj możesz wybrać katalog do eksportu plików GPX.</string>
- <string name="init_gpx_importdir_description">Tutaj możesz wybrać katalog do importu plików GPX.</string>
<string name="init_maptrail">Pokaż szlak na mapie</string>
+ <string name="init_summary_maptrail">Pokaż szlak na mapie</string>
<string name="init_share_after_export">Otwórz dzielone menu po eksporcie plików GPX</string>
<string name="init_trackautovisit">Ustaw przedmioty podróżne domyślnie na \"Odwiedzony\"</string>
+ <string name="init_summary_trackautovisit">Ustaw przedmioty podróżne domyślnie na \"Odwiedzony\"</string>
<string name="init_sigautoinsert">Wstaw podpis automatycznie</string>
<string name="init_loaddirectionimg">Załaduj obrazek kierunku w razie potrzeby (tylko użytkownicy Basic)</string>
+ <string name="init_summary_loaddirectionimg">Załaduj obrazek kierunku w razie potrzeby (tylko użytkownicy Basic)</string>
<string name="init_default_navigation_tool">Domyślna nawigacja</string>
<string name="init_default_navigation_tool_description">Tutaj możesz wybrać preferowane narzędzie nawigacji.</string>
<string name="init_default_navigation_tool_select">Wybierz narzędzie</string>
@@ -444,14 +483,16 @@
<string name="init_debug">Generuj informację o błędach</string>
<string name="init_dbonsdcard_title">Położenie bazy danych</string>
<string name="init_dbonsdcard_note">Możesz przechowywać bazę danych c:geo na zewnętrznym urządzeniu. Dzięki temu zaoszczędzisz miejsce w pamięci wewnętrznej, ale wydajność może zmniejszyć się trochę, a c:geo nie będzie mógł pracować jeśli Twoja karta SD będzie niedostępna.</string>
- <string name="init_dbonsdcard">Baza danych na zewnętrznym urządzeniu</string>
+ <string name="init_dbonsdcard">Na zewnętrznym urządzeniu</string>
<string name="init_dbmove_dbmove">Przenoszę bazę danych</string>
<string name="init_dbmove_running">Przenoszę bazę danych</string>
<string name="init_dbmove_success">Baza danych została przeniesiona.</string>
<string name="init_dbmove_failed">Nie udało się przenieść bazy danych</string>
<string name="init_plain_logs">Wyświetlaj wpisy dziennika bez kolorów</string>
+ <string name="init_summary_plain_logs">Wyświetlaj wpisy dziennika bez kolorów</string>
<string name="init_use_native_ua">Identyfikuj jako przeglądarka Android. Rozwiązuje problemy z logowaniem w niektórych sieciach.</string>
- <string name="init_rendertheme_folder">Katalog z tematami map offline (opcja)</string>
+ <string name="init_summary_use_native_ua">Identyfikuj jako przeglądarka Android. Rozwiązuje problemy z logowaniem w niektórych sieciach.</string>
+ <string name="init_rendertheme_folder">Katalog z motywami map</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Mapa</string>
@@ -460,7 +501,8 @@
<string name="map_source_osm_cyclemap">OSM: Cyclemap</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Wyślij do c:geo</string>
- <string name="init_sendToCgeo_name">Nazwa urządzenia:</string>
+ <string name="settings_info_send2cgeo_title">Informacje o send2cgeo</string>
+ <string name="init_sendToCgeo_name">Nazwa urządzenia</string>
<string name="init_sendToCgeo_description"><b>Wyślij do c:geo</b> pozwala Tobie odbierać skrzynki bezpośrednio ze strony geocaching.com za pomocą specjalnego pluginu do przeglądarki Firefox lub Chrome. Przed rejestracją prosimy o zapoznanie się z <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Rejestracja jest wymagana tylko jeśli będziesz używać send2cgeo. c:geo będzie normalnie działał również bez rejestracji urządzenia.</string>
<string name="init_sendToCgeo_register">Poproś o rejestrację</string>
<string name="init_sendToCgeo_registering">Rejestruję Twoje urządzenie do \"Wyślij do c:geo\"…</string>
@@ -481,10 +523,25 @@
<string name="auth_dialog_pin_message">Proszę wpisać kod PIN dostarczony przez stronę Twitter. To jest obowiązkowe do ukończenia autoryzacji.</string>
<string name="auth_dialog_completed">c:geo jest teraz upoważniony do postu na Twitter.</string>
+ <!-- auth opencaching -->
+ <string name="auth_ocde">opencaching.de</string>
+ <string name="auth_authorize_oc">Autoryzuj c:geo</string>
+ <string name="auth_start_oc">Rozpocznij autoryzację</string>
+ <string name="auth_again_oc">Spróbuj ponownie</string>
+ <string name="auth_pin_hint_oc">PIN przypisany przez %s</string>
+ <string name="auth_finish_oc">Zakończ</string>
+ <string name="auth_dialog_wait_oc">Czekam na %s…</string>
+ <string name="auth_dialog_pin_title_oc">Kod PIN</string>
+ <string name="auth_dialog_pin_message_oc">Proszę wpisz kod PIN dostarczony przez stronę %s. Jest to konieczne by zakończyć autoryzację.</string>
+ <string name="auth_dialog_completed_oc">c:geo został zautoryzowany by komunikować się z %s.</string>
+ <string name="about_auth_1_oc">Następujący proces pozwolił <b>c:geo</b> aby uzyskać dostęp do %s - jeśli wyrażono zgodę.</string>
+ <string name="about_auth_2_oc">Kliknięcie na przycisk \"autoryzuj c:geo\" rozpocznie proces. Zostanie otwarta przeglądarka ze stroną %s. Zaloguj się i pozwól <b>c:geo</b> uzyskać dostęp do Twojego konta. Po zaakceptowaniu, %s pokaże kod numeryczny PIN. Ten kod PIN musi być wklejony do <b>c:geo</b> i potwierdzony. To wszystko.</string>
+
<!-- cache -->
<plurals name="cache_counts">
<item quantity="one">Jedna skrzynka</item>
<item quantity="few">%1$d skrzynki</item>
+ <item quantity="many">%1$d skrzynek</item>
<item quantity="other">%1$d skrzynek</item>
</plurals>
@@ -508,6 +565,14 @@
<string name="cache_log_image_default_title">Zdjęcie</string>
<string name="cache_personal_note">Notatka osobista</string>
<string name="cache_personal_note_edit">Edytuj</string>
+
+ <string name="cache_personal_note_upload">Wysyłanie</string>
+ <string name="cache_personal_note_uploading">Wysyłam osobistą notatkę</string>
+ <string name="cache_personal_note_upload_done">Notatka osobista wysłana</string>
+ <string name="cache_personal_note_upload_cancelled">Wysyłanie notatki osobistej anulowane</string>
+ <string name="cache_personal_note_unstored">Skrzynka nie jest zapisana</string>
+ <string name="cache_personal_note_store">Skrzynka będzie najpierw zapisana aby umożliwić dodawanie notatek osobistych.</string>
+
<string name="cache_description">Opis</string>
<string name="cache_description_long">Długi opis</string>
<string name="cache_description_table_note">Opis zawiera formatowanie w formie tabeli, które w celu poprawnego wyświetlania może wymagać odwiedzenia %s.</string>
@@ -528,6 +593,7 @@
<plurals name="waypoints">
<item quantity="one">Jeden punkt nawigacji</item>
<item quantity="few">%d punkty nawigacji</item>
+ <item quantity="many">%d punktów nawigacji</item>
<item quantity="other">%d punktów nawigacji</item>
</plurals>
@@ -542,7 +608,6 @@
<string name="cache_dialog_loading_details_status_logs">Ładuję wpisy</string>
<string name="cache_dialog_loading_details_status_waypoints">Przetwarzam punkty nawigacji</string>
<string name="cache_dialog_loading_details_status_gcvote">Ładuję GCVote</string>
- <string name="cache_dialog_loading_details_status_elevation">Ładuję dane o ukształtowaniu terenu</string>
<string name="cache_dialog_loading_details_status_cache">Zapisuję dane</string>
<string name="cache_dialog_loading_details_status_render">Renderuję widok</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -562,6 +627,7 @@
<string name="cache_menu_navigate">Nawiguj</string>
<string name="cache_menu_navigation_drive">Nawigacja (jazda)</string>
<string name="cache_menu_navigation_walk">Nawigacja (pieszo)</string>
+ <string name="cache_menu_navigation_bike">Nawigacja (rower)</string>
<string name="cache_menu_maps_directions">Kierunki map Google</string>
<string name="cache_menu_radar">Radar</string>
<string name="cache_menu_map">Pokaż na mapie</string>
@@ -625,7 +691,6 @@
<string name="cache_listed_on">Zapisana w %s</string>
<!-- editor dialog -->
- <string name="editor_save">Zapisz</string>
<!-- file list base -->
<string name="file_searching_in">Szukam plików\nw</string>
@@ -652,10 +717,10 @@
<string name="gpx_import_error_io">Nie mogę odczytać pliku</string>
<string name="gpx_import_error_parser">Zły format pliku</string>
<string name="gpx_import_error_unexpected">Nieoczekiwany błąd</string>
- <string name="gpx_import_confirm">Czy na pewno chcesz zaimportować plik GPX do c:geo?</string>
<string name="gpx_import_canceled">Import pliku GPX został anulowany</string>
<string name="gpx_import_delete_title">Usuń plik</string>
<string name="gpx_import_delete_message">Czy na pewno chcesz usunąć %s?</string>
+ <string name="gpx_import_select_list_title">Importuj GPX do listy</string>
<!-- map file select -->
<string name="map_file_select_title">Wybierz plik z mapą</string>
@@ -722,7 +787,7 @@
<string name="map_circles_show">Pokaż okręgi</string>
<string name="map_circles_hide">Ukryj okręgi</string>
<string name="map_theme_builtin">Domyślny</string>
- <string name="map_theme_select">Wybierz temat mapy</string>
+ <string name="map_theme_select">Wybierz motyw mapy</string>
<string name="map_live_enable">Włącz live</string>
<string name="map_live_disable">Wyłącz live</string>
<string name="map_static_title">Mapa statyczna</string>
@@ -787,6 +852,15 @@
<string name="trackable_released">Wydany</string>
<string name="trackable_distance">W podróży</string>
<string name="trackable_touch">TB-Akcja</string>
+ <string name="trackable_not_activated">Przedmiot podróżny nie został zaktywowany</string>
+
+ <string name="geokret_type_traditional">Tradycyjny</string>
+ <string name="geokret_type_book_or_media">Książka lub media elektroniczne</string>
+ <string name="geokret_type_human">Człowiek</string>
+ <string name="geokret_type_coin">Moneta</string>
+ <string name="geokret_type_post">List</string>
+
+
<!-- user -->
<string name="user_menu_title">O użytkowniku</string>
@@ -822,6 +896,8 @@
<string name="helper_bluetoothgps_description">Umożliwia korzystanie z zewnętrznego odbiornika sygnału GPS, w celu uzyskania bardziej precyzyjnej lokalizacji i zaoszczędzenia baterii telefonu.</string>
<string name="helper_barcode_title">Barcode Scanner</string>
<string name="helper_barcode_description">Istnieją skrypty i strony WWW, które umożliwiają wyświetlanie GC-kodu jako kodu kreskowego. Z tym programem c:geo może czytać te GC-kody bezpośrednio z ekranu Twojego komputera.</string>
+ <string name="helper_pocketquery_title">Kreator Pocket Query</string>
+ <string name="helper_pocketquery_description">Pozwala na łatwe tworzenie i pobieranie Pocket Queries wyśrodkowanych w Twoim aktualnym położeniu lub wybranym punkcie mapy. Wymaga konta Premium w Geocaching.com.</string>
<!-- add-ons -->
<string name="addon_missing_title">Brakujący dodatek</string>
@@ -1033,9 +1109,10 @@
<string name="attribute_ask_owner_no">Kontakt z założycielem przed rozpoczęciem poszukiwań nie jest konieczny</string>
<string name="attribute_unknown_yes">Nieznany atrybut obecny</string>
<string name="attribute_unknown_no">Nie ma żadnego nieznanego atrybutu</string>
+ <string name="attribute_geotour_yes">Część GeoTour</string>
+ <string name="attribute_geotour_no">Nie jest częścią GeoTour</string>
<!-- next things -->
- <string name="legal_note">Aby móc korzystać z usług serwisu Geocaching.com <a href="http://www.geocaching.com/about/termsofuse.aspx">warunki korzystania Groundspeak</a> muszą być zaakceptowane.</string>
<string name="quote">Aby uczynić geocaching prostszym, a użytkowników bardziej leniwymi.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -1044,6 +1121,7 @@
<string name="facebook">Facebook: <a href="">c:geo strona</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
<string name="nutshellmanual">Podręcznik: <a href="">c:geo skrócona instrukcja obsługi</a></string>
+ <string name="market">Android: <a href="">c:geo w Google Play</a></string>
<string name="about_twitter">Czy chczesz aby <b>c:geo</b> publikował nowy status na Twitter za każdym razem kiedy znajdziesz skrzynkę?</string>
<string name="about_auth_1">Poniższy proces pozwala <b>c:geo</b> uzyskać dostęp do Twitter za Twoim pozwoleniem.</string>
<string name="about_auth_2">Kliknięcie na \"Autoryzacja c:geo\" spowoduje rozpoczęcie procesu. Ten proces spowoduje otwarcie przeglądarki internetowej na stronie Twitter. Zaloguj się na tej stronie i pozwól <b>c:geo</b> uzyskać dostęp do Twojego konta. Jeśli zostanie zaakceptowany, Twitter wyświetli kod numeryczny PIN. Kod PIN musi zostać wklejony do <b>c:geo</b> i potwierdzony. To wszystko.</string>
@@ -1055,11 +1133,48 @@
<string name="status_geocaching_change" tools:ignore="UnusedResources">Ostatnie zmiany na geocaching.com popsuły c:geo.\nPracujemy nad tym, sprawdź ponownie niedługo.</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">Ostatnie zmiany na geocaching.com popsuły funkcjonalność map Live.\nWe are working on it, Pracujemy nad tym, sprawdź ponownie niedługo.</string>
<string name="clipboard_copy_ok">Skopiowano do schowka</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Wygląda, że używasz wersji Android starszej niż 2.1. Następne wydania c:geo mogą być niedostępne dla Twojego urządzenia.</string>
+
+ <!-- text-to-speech for compass view -->
+ <string name="tts_service">Mówiący kompas</string>
+ <string name="tts_start">Zacznij mówić</string>
+ <string name="tts_stop">Przestań mówić</string>
+ <string name="tts_one_kilometer">jeden kilometr</string>
+ <plurals name="tts_kilometers">
+ <item quantity="one">%s kilometr</item>
+ <item quantity="few">%s kilometry</item>
+ <item quantity="many">%s kilometrów</item>
+ <item quantity="other">%s kilometrów</item>
+ </plurals>
+ <string name="tts_one_meter">jeden metr</string>
+ <plurals name="tts_meters">
+ <item quantity="one">%s metr</item>
+ <item quantity="few">%s metry</item>
+ <item quantity="many">%s metrów</item>
+ <item quantity="other">%s metrów</item>
+ </plurals>
+ <string name="tts_one_mile">jedna mila</string>
+ <plurals name="tts_miles">
+ <item quantity="one">%s mila</item>
+ <item quantity="few">%s mile</item>
+ <item quantity="many">%s mil</item>
+ <item quantity="other">%s mil</item>
+ </plurals>
+ <string name="tts_one_foot">jedna stopa</string>
+ <plurals name="tts_feet">
+ <item quantity="one">%s stopa</item>
+ <item quantity="few">%s stopy</item>
+ <item quantity="many">%s stóp</item>
+ <item quantity="other">%s stóp</item>
+ </plurals>
+ <string name="tts_one_oclock">pierwsza</string>
+ <string name="tts_oclock">%s</string>
<plurals name="days_ago">
<item quantity="one">wczoraj</item>
<item quantity="few">%d dni temu</item>
+ <item quantity="many">%d dni temu</item>
<item quantity="other">%d dni temu</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-pt/strings.xml b/main/res/values-pt/strings.xml
index 3e31a5d..c72ba98 100644
--- a/main/res/values-pt/strings.xml
+++ b/main/res/values-pt/strings.xml
@@ -2,13 +2,11 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo bússola</string>
<!-- basics -->
<string name="cache">Cache</string>
<string name="detail">Detalhes</string>
<string name="search">Pesquisar</string>
- <string name="settings">Definições</string>
<string name="helpers">Apps Úteis</string>
<string name="about">Sobre c:geo</string>
<string name="latitude">Latitude</string>
@@ -16,6 +14,7 @@
<!-- actionbar -->
<string name="action_bar_share_title">Partilhar ligação para a cache</string>
+ <string name="settings_titlebar">c:geo Definições</string>
<!-- caches -->
<string name="all_types">Todos os tipos</string>
@@ -29,11 +28,12 @@
<string name="cito">Evento Cache In Trash Out</string>
<string name="webcam">Cache webcam</string>
<string name="virtual">Cache virtual</string>
- <string name="wherigo">Cache whereigo</string>
+ <string name="wherigo">Cache wherigo</string>
<string name="lostfound">Perdidos e achados</string>
<string name="ape">Cache projecto APE</string>
<string name="gchq">Groundspeak hq</string>
<string name="gps">Cache exposição GPS</string>
+ <string name="block">Groundspeak Block Party</string>
<string name="unknown">Tipo Desconhecido</string>
<!-- cache sizes -->
@@ -53,6 +53,7 @@
<string name="wp_pkg">Parque de estacionamento</string>
<string name="wp_trailhead">Início</string>
<string name="wp_waypoint">Ponto de referência</string>
+ <string name="wp_original">Coordenadas Originais</string>
<!-- logs -->
<string name="log_found">Encontrei</string>
@@ -76,12 +77,15 @@
<string name="log_needs_archived">Precisa de arquivamento</string>
<string name="log_discovered">Descoberta</string>
<string name="log_reviewer">Nota de revisor</string>
+ <string name="log_retractlisting">Retirar Lista</string>
+ <string name="log_marked_missing">Marcado em falta</string>
<string name="log_tb_nothing">Não fazer nada</string>
<string name="log_tb_visit">Visitei</string>
<string name="log_tb_drop">Deixei aqui</string>
<string name="log_tb_changeall">Alterar todos</string>
<string name="log_save">Gravar</string>
<string name="log_saving">A gravar o registo…</string>
+ <string name="log_saving_and_uploading">A enviar o registo e a imagem…</string>
<string name="log_clear">Limpar</string>
<string name="log_post">Publicar o registo</string>
<string name="log_post_rate">Publicar registo &amp; Votar</string>
@@ -115,6 +119,24 @@
<string name="log_today">Hoje</string>
<string name="log_yesterday">Ontem</string>
<string name="log_smilies">Smilies</string>
+ <string name="log_image">Imagem</string>
+ <string name="log_image_attach">Anexar Imagem</string>
+ <string name="log_image_edit">Editar Imagem</string>
+ <string name="log_image_stored">Existente</string>
+ <string name="log_image_camera">Nova</string>
+ <string name="log_image_caption">Título</string>
+ <string name="log_image_description">Descrição</string>
+ <string name="log_image_scale">Dimensionamento</string>
+ <string name="log_password_title">Password do registo:</string>
+ <string name="log_hint_log_password">Inserira a password do registo</string>
+
+ <string-array name="log_image_scales">
+ <item>Não dimensionar</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<!-- translation -->
<string name="translate_to_sys_lang">Traduzir para %s</string>
@@ -135,6 +157,7 @@
<string name="err_wrong">Dados de login inválidos</string>
<string name="err_maintenance">Geocaching.com está em manutenção. O c:geo funciona offline com as caches Arquivadas.</string>
<string name="err_license">O utilizador não concordou com a licença de utilização de Geocaching.com, por isso c:geo não pode carregar as coordenadas da cache.</string>
+ <string name="err_unvalidated_account">Deve validar a sua conta primeiro em Geocaching.com.</string>
<string name="err_unpublished">A cache pedida não está publicada.</string>
<string name="err_premium_only">Esta cache só está disponível para membros premium do Geocaching.com.</string>
<string name="err_detail_open">O c:geo não consegue abrir os detalhes da geocache.</string>
@@ -154,12 +177,14 @@
<string name="err_auth_initialize">O c:geo falhou a iniciar o processo de autorização.</string>
<string name="err_auth_process">Processo de autorização falhou.</string>
<string name="err_cannot_log_visit">O c:geo não tem informação suficiente para registar a visita. Por favor, faça-o a partir dos detalhes completos da cache.</string>
- <string name="err_init_cleared">O c:geo não consegue limpar os dados de login.</string>
<string name="err_download_fail">O c:geo falhou o download das caches porque </string>
<string name="err_dwld_details_failed">O c:geo falhou o download dos detalhes da cache.</string>
<string name="err_load_descr_failed">O c:geo não consegue carregar a descrição.</string>
<string name="err_location_unknown">O c:geo não sabe a localização da cache.</string>
<string name="err_missing_device_name">Por favor insira um nome para este dispositivo antes de registar.</string>
+ <string name="err_favorite_failed">Alteração do estado de favorito falhou.</string>
+ <string name="err_select_logimage_failed">Selecionar uma imagem para o registo falhado.</string>
+ <string name="err_acquire_image_failed">Aquisição de uma imagem falhou.</string>
<string name="err_tb_display">O c:geo não consegue mostrar o trackable pretendido. É mesmo um trackable?</string>
<string name="err_tb_details_open">O c:geo não consegue abrir os detalhes do trackable.</string>
<string name="err_tb_forgot_saw">O c:geo esqueceu o trackable que viu.</string>
@@ -179,6 +204,7 @@
<string name="err_log_load_data_still">O c:geo ainda está a carregar dados necessários para publicar o registo. Por favor espere mais um pouco.</string>
<string name="err_log_failed_server">O c:geo falhou a publicação do registo porque o servidor não responde.</string>
<string name="err_log_post_failed">O c:geo falhou a publicação do registo.</string>
+ <string name="err_logimage_post_failed">Parece que a sua imagem de registo não foi enviada. Por favor verifique em Geocaching.com.</string>
<string name="err_search_address_forgot">O c:geo esqueceu o endereço que procura.</string>
<string name="err_parse_lat">O c:geo não consegue analisar a latitue.</string>
<string name="err_parse_lon">O c:geo não consegue analisar a logitude.</string>
@@ -205,6 +231,8 @@
<string name="info_log_saved">O c:geo gravou o registo com sucesso.</string>
<string name="info_log_cleared">O registo foi limpo.</string>
<string name="info_log_type_changed">O tipo de registo foi alterado!</string>
+ <string name="info_select_logimage_cancelled">A selecção ou captura de imagem foi cancelada.</string>
+ <string name="info_stored_image">Nova imagem guardada em:</string>
<string name="info_storing_static_maps">A tentar arquivar mapas estáticos.</string>
<!-- location service -->
@@ -252,17 +280,18 @@
<string name="caches_on_map">Mostrar no mapa</string>
<string name="caches_sort">Ordenar</string>
<string name="caches_sort_title">Ordenar por</string>
- <string name="caches_sort_distance">distância</string>
- <string name="caches_sort_difficulty">dificuldade</string>
- <string name="caches_sort_terrain">terreno</string>
- <string name="caches_sort_size">tamanho</string>
- <string name="caches_sort_favorites">popularidade</string>
- <string name="caches_sort_name">nome</string>
- <string name="caches_sort_rating">pontuação</string>
- <string name="caches_sort_vote">votos (pontuação própria)</string>
- <string name="caches_sort_inventory">somatório do inventário</string>
- <string name="caches_sort_date_hidden">data</string>
- <string name="caches_sort_date_logged">Data de log</string>
+ <string name="caches_sort_distance">Distância</string>
+ <string name="caches_sort_difficulty">Dificuldade</string>
+ <string name="caches_sort_terrain">Terreno</string>
+ <string name="caches_sort_size">Tamanho</string>
+ <string name="caches_sort_favorites">Popularidade</string>
+ <string name="caches_sort_name">Nome</string>
+ <string name="caches_sort_geocode">Geo Código</string>
+ <string name="caches_sort_rating">Pontuação</string>
+ <string name="caches_sort_vote">Votos (pontuação própria)</string>
+ <string name="caches_sort_inventory">Somatório do Inventário</string>
+ <string name="caches_sort_date_hidden">Data</string>
+ <string name="caches_sort_date_logged">Data de Registo</string>
<string name="caches_sort_finds">Encontradas</string>
<string name="caches_sort_state">Estado</string>
<string name="caches_sort_storage">Data gravada no dispositivo</string>
@@ -278,6 +307,7 @@
<string name="caches_drop_stored">Apagar do arquivo</string>
<string name="caches_drop_progress">A remover caches</string>
<string name="caches_drop_all_and_list">Apagar todas e remover lista</string>
+ <string name="caches_delete_events">Eliminar eventos passados</string>
<string name="caches_refresh_selected">Actualizar seleccionada</string>
<string name="caches_refresh_all">Actualizar todas</string>
<string name="caches_move_selected">Mover seleccionadas</string>
@@ -295,7 +325,10 @@
<string name="caches_filter_track">Com trackables</string>
<string name="caches_filter_clear">Limpar filtros</string>
<string name="caches_filter_modified">Com as coordenadas modificadas</string>
+ <string name="caches_filter_origin">Origem</string>
<string name="caches_removing_from_history">A remover do histórico…</string>
+ <string name="caches_clear_offlinelogs">Limpar registos offline</string>
+ <string name="caches_clear_offlinelogs_progress">A limpar registos offline</string>
<!-- caches lists -->
<string name="list_menu">Listas</string>
@@ -328,24 +361,46 @@
<string name="about_donation_more">Doar\ndesenvolvimento</string>
<string name="about_contributors">Contribuidores</string>
- <!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
+ <!-- settings -->
+ <string name="settings_title_services">Serviços</string>
+ <string name="settings_title_appearance">Aparência</string>
+ <string name="settings_title_cachedetails">Detalhos da Cache</string>
+ <string name="settings_title_offlinedata">Dados Offline</string>
+ <string name="settings_title_logging">A fazer o registo</string>
+ <string name="settings_title_map">Mapa</string>
+ <string name="settings_title_map_data">Dados do Mapa</string>
+ <string name="settings_title_map_content">Conteúdo do Mapa</string>
+ <string name="settings_title_gpx">GPX</string>
+ <string name="settings_title_basicmembers">Membros Básico</string>
+
+ <string name="settings_category_browser">Browser</string>
+ <string name="settings_category_logging_other">Outras Opções de Registo</string>
+
+ <string name="settings_goto_url_button">mais …</string>
+
+ <string name="settings_title_gc">Geocaching.com</string>
+ <string name="settings_activate_gc">Activar</string>
+ <string name="settings_gc_legal_note">Para utilizar os serviços de Geocaching.com tem que aceitar os termos e condições do aviso legal da Groundspeak.</string>
+ <string name="settings_info_facebook_login_title">Facebook Login</string>
+ <string name="settings_info_facebook_login">Não consegue que c:geo faça o login em geocaching.com com a sua conta do Facebook. Mas existe uma solução simples…</string>
+ <string name="init_oc">Opencaching.de</string>
+ <string name="settings_activate_oc">Activar</string>
+ <string name="init_oc_de_description">Autorizar c:geo com opencaching.de para pesquisar por caches e aceder/filtrar as suas caches encontradas.</string>
+ <string name="init_register_oc_de">Autorizar c:geo</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
+ <string name="settings_activate_twitter">Activar</string>
<string name="init_username">Nome de utilizador</string>
<string name="init_password">Password</string>
- <string name="init_passvote">Password</string>
<string name="init_login">Verificar login</string>
<string name="init_login_popup">Login</string>
<string name="init_login_popup_working">Logging to Geocaching.com…</string>
<string name="init_login_popup_ok">Login ok.</string>
<string name="init_login_popup_failed">Login falhado.</string>
<string name="init_login_popup_failed_reason">Login falhado porque </string>
+ <string name="init_login_popup_not_authorized">Não autorizado</string>
<string name="init_twitter_authorize">Autorize o c:geo</string>
- <string name="init_twitter_publish">Publicar estado quando encontrar cache</string>
<string name="init_signature">Assinatura</string>
- <string name="init_signature_help_button">Ajuda</string>
- <string name="init_signature_help_title">Dicas para assinaturas</string>
<string name="init_signature_help_text">Escreva a sua assinatura, para adicionar ao texto de registo na cache.\nPode usar algumas palavras-chave: [DATE] , [TIME], [USER] &amp; [NUMBER].\nEstas serão expandidas quando a assinatura for inserida.</string>
<string name="init_signature_template_button">Inserir modelo</string>
<string name="init_signature_template_date">Data</string>
@@ -354,31 +409,42 @@
<string name="init_signature_template_user">Utilizador</string>
<string name="init_signature_template_number">Número</string>
<string name="init_signature_template_owner">Dono</string>
- <string name="init_details">Detalhes da cache</string>
<string name="init_ratingwanted">Carregar a pontuação da cache de GCvote.com</string>
- <string name="init_elevationwanted">Carregar dados de elevação de cache</string>
+ <string name="init_summary_ratingwanted">Carregar a pontuação da cache de GCvote.com</string>
<string name="init_friendlogswanted">Carregar página adicional de registos de amigos</string>
+ <string name="init_summary_friendlogswanted">Carregar página adicional de registos de amigos</string>
<string name="init_openlastdetailspage">Abrir detalhes da última página vizualizada</string>
+ <string name="init_summary_openlastdetailspage">Abrir detalhes da última página vizualizada</string>
<string name="init_autoload">Carregar automaticamente a descrição longa</string>
- <string name="init_other">Outras opções</string>
+ <string name="init_summary_autoload">Carregar automaticamente a descrição longa</string>
<string name="init_skin">Tema leve (precisa reiniciar o c:geo)</string>
+ <string name="init_summary_skin">Tema leve (precisa reiniciar o c:geo)</string>
<string name="init_address">Mostrar endereços no ecrã principal</string>
+ <string name="init_summary_address">Mostrar endereços no ecrã principal</string>
<string name="init_captcha">Mostrar CAPTCHA se necessário</string>
+ <string name="init_summary_captcha">Mostrar CAPTCHA se necessário</string>
<string name="init_useenglish">Utilizar inglês no c:geo\n(necessário reiniciar)</string>
+ <string name="init_summary_useenglish">Utilizar inglês no c:geo\n(necessário reiniciar)</string>
<string name="init_exclude">Excluir caches encontradas e minhas</string>
+ <string name="init_summary_exclude">Excluir caches encontradas e minhas</string>
<string name="init_showwaypoints">Mostrar Waypoints no mapa</string>
<string name="init_showwaypoint_description">Se menos do que o número de caches encontradas são mostradas no mapa, os seus waypoints são mostrados adicionalmente.</string>
<string name="init_disabled">Excluir caches desactivadas</string>
+ <string name="init_summary_disabled">Excluir caches desactivadas</string>
<string name="init_offline">Armazenar a cache de mapas estáticos para utilização offline</string>
+ <string name="init_summary_offline">Armazenar a cache de mapas estáticos para utilização offline</string>
<string name="init_offline_wp">Armazenar waypoints de mapas estáticos para utilização offline</string>
+ <string name="init_summary_offline_wp">Armazenar waypoints de mapas estáticos para utilização offline</string>
<string name="init_save_log_img">Guardar imagens dos registos</string>
+ <string name="init_summary_save_log_img">Guardar imagens dos registos</string>
<string name="init_units">Utilizar distância nas unidades do sistema imperial</string>
+ <string name="init_summary_units">Utilizar distância nas unidades do sistema imperial</string>
<string name="init_log_offline">Activar registo offline\n(Não mostrar o registo online quando fôr registar, não enviar o registo online)</string>
+ <string name="init_summary_log_offline">Activar registo offline\n(Não mostrar o registo online quando fôr registar, não enviar o registo online)</string>
+ <string name="init_choose_list">Pedir Lista</string>
+ <string name="init_summary_choose_list">Pedir lista quando guarda as caches</string>
<string name="init_livelist">Mostrar a direcção para a cache na lista</string>
- <string name="init_altitude">Correcção de altitude</string>
- <string name="init_altitude_description">Se o GPS estiver a dar uma altitude errada, pode corrigi-la com um número positivo ou negativo. A correcção é sempre em metros.</string>
- <string name="init_clear">Limpar login</string>
- <string name="init_cleared">O c:geo limpou a informação de login.</string>
+ <string name="init_summary_livelist">Mostrar a direcção para a cache na lista</string>
<string name="init_backup">Backup</string>
<string name="init_backup_backup">Backup</string>
<string name="init_backup_running">A criar um backup da base de dados de caches…</string>
@@ -393,19 +459,22 @@
<string name="init_restore_confirm">Base de dados vazia. Quer restaurar o backup?</string>
<string name="init_backup_last">Disponível backup de</string>
<string name="init_backup_last_no">Não existe nenhum ficheiro de backup.</string>
- <string name="init_mapsources">Fontes de mapa</string>
- <string name="init_mapsources_description">Aqui pode seleccionar a fonte dos seus mapas. Como alternativa ao Google Maps, vários estilos de OpenStreetMap estão disponíveis, e até ficheiros de mapas offline (veja <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a> para mais detalhes).</string>
+ <string name="settings_info_offline_maps_title">Informações sobre Offline Maps</string>
+ <string name="settings_info_offline_maps">c: geo suporta mapas para uso offline. Pode baixar mapas de Mapsforge ou até mesmo criar seus próprios mapas a partir de dados OSM.</string>
+ <string name="settings_info_themes_title">Informações sobre Map Themes</string>
+ <string name="settings_info_themes">c: geo suporta temas customizados para os mapas off-line. Estes podem ser usados ​​para alterar o estilo de cores do mapa (por exemplo, ter um mapa para visão nocturna) ou para realçar certos objetos, como ciclovias ou linhas de altura dentro do mapa.</string>
<string name="init_mapsource_select">Seleccione a fonte de mapa</string>
<string name="init_map_directory_description">Directório com os mapas offline</string>
<string name="init_gpx_exportdir">Directório para exportar GPX</string>
<string name="init_gpx_importdir">Directório para importar GPX</string>
- <string name="init_gpx_exportdir_description">Aqui pode selecionar o directório para exportar os GPX.</string>
- <string name="init_gpx_importdir_description">Aqui pode selecionar o directório para importar os GPX.</string>
<string name="init_maptrail">Mostrar rasto no mapa</string>
+ <string name="init_summary_maptrail">Mostrar rasto no mapa</string>
<string name="init_share_after_export">Abrir o menu de partilha depois da exportação GPX</string>
<string name="init_trackautovisit">Marcar automaticamente os trackables como \"visitados\"</string>
- <string name="init_sigautoinsert">Inserir assinatura automaticamente</string>
+ <string name="init_summary_trackautovisit">Marcar automaticamente os trackables como \"visitados\"</string>
+ <string name="init_sigautoinsert">Inserir automaticamente</string>
<string name="init_loaddirectionimg">Carregar a imagem de dricção se necessário</string>
+ <string name="init_summary_loaddirectionimg">Carregar a imagem de dricção se necessário</string>
<string name="init_default_navigation_tool">Navegador principal</string>
<string name="init_default_navigation_tool_description">Aqui pode selecionar o seu navegador preferido.</string>
<string name="init_default_navigation_tool_select">Ferramenta de selecção</string>
@@ -415,14 +484,16 @@
<string name="init_debug">Gerar informação de depuração</string>
<string name="init_dbonsdcard_title">Localização da base de dados</string>
<string name="init_dbonsdcard_note">Pode armazenar a base de dados do c:geo no armazenamento externo. Se o fizer vai poupar memória interna, mas pode perder um pouco de performance e o c:geo pode não funcionar se o armazenamento externo não estiver disponível.</string>
- <string name="init_dbonsdcard">base de dados no armazenamento externo</string>
+ <string name="init_dbonsdcard">No armazenamento externo</string>
<string name="init_dbmove_dbmove">A mover a base de dados</string>
<string name="init_dbmove_running">A mover a base de dados</string>
<string name="init_dbmove_success">Base de dados movida com sucesso.</string>
<string name="init_dbmove_failed">Falha ao mover a base de dados.</string>
<string name="init_plain_logs">Mostrar os logs sem as cores</string>
+ <string name="init_summary_plain_logs">Mostrar os logs sem as cores</string>
<string name="init_use_native_ua">Identificar como se fosse o browser do Android. Resolve os problemas de login em alguns provedores de rede.</string>
- <string name="init_rendertheme_folder">Directório com os temas de mapas offline personalizados (opcional)</string>
+ <string name="init_summary_use_native_ua">Identificar como se fosse o browser do Android. Resolve os problemas de login em alguns provedores de rede.</string>
+ <string name="init_rendertheme_folder">Directório de Temas de Mapas</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Mapa</string>
@@ -431,7 +502,8 @@
<string name="map_source_osm_cyclemap">OSM: Cyclemap</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Enviar para o c:geo</string>
- <string name="init_sendToCgeo_name">Nome do seu dispositivo:</string>
+ <string name="settings_info_send2cgeo_title">Informação sobre send2cgeo</string>
+ <string name="init_sendToCgeo_name">Nome do seu dispositivo</string>
<string name="init_sendToCgeo_description">Enviar para o c: geo permite-lhe receber caches directamente do site Geocaching.com, utilizando um plugin especial para o Firefox ou Chrome. Antes de se registar, por favor leia <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Apenas necessita de registar, se pretender utilizar o send2cgeo. O c:geo irá funcionar mesmo sem este registo.</string>
<string name="init_sendToCgeo_register">Solicitar registo</string>
<string name="init_sendToCgeo_registering">Registando o seu dispositivo para "Enviar para o c:geo"…</string>
@@ -440,10 +512,10 @@
<string name="sendToCgeo_download_fail">c:geo falhou o download das caches. Sem ligação à internet ou send2c:geo está em baixo.</string>
<string name="sendToCgeo_no_registration">c:geo falhou o download das caches. Registo do send2c:geo expirou. Faça o registo nas definições.</string>
- <!-- auth -->
+ <!-- auth twitter -->
<string name="auth_twitter">Twitter</string>
<string name="auth_authorize">Autorizar c:geo</string>
- <string name="auth_start">Autorização iniciada</string>
+ <string name="auth_start">Iniciar autorização</string>
<string name="auth_again">Iniciar de novo</string>
<string name="auth_pin_hint">PIN atribuído pelo Twitter</string>
<string name="auth_finish">Fim</string>
@@ -451,7 +523,23 @@
<string name="auth_dialog_pin_title">Código PIN</string>
<string name="auth_dialog_pin_message">Por favor insira o código PIN fornecido pelo site do Twitter. É imperativo para que se complete a autorização.</string>
<string name="auth_dialog_completed">O c:geo está agora autorizado a publicar no Twitter.</string>
+ <string name="about_auth_1">O processo seguinte permite <b>c:geo</b> aceder ao Twitter - se concordar.</string>
+ <string name="about_auth_2">Um clique sobre o botão \"autorizar c:geo \" irá iniciar o processo. Este processo irá abrir um navegador com uma página no Twitter. Entre nesta página e permita o <b>c:geo</b> aceder à sua conta. Se isso for aceite, o Twitter vai mostrar um código PIN numérico. Este PIN deve ser colado em <b>c:geo</b> e confirmado. É tudo.</string>
+ <!-- auth opencaching -->
+ <string name="auth_ocde">opencaching.de</string>
+ <string name="auth_authorize_oc">Autorizar c:geo</string>
+ <string name="auth_start_oc">Começar autorização</string>
+ <string name="auth_again_oc">Iniciar de novo</string>
+ <string name="auth_pin_hint_oc">PIN atribuído por %s</string>
+ <string name="auth_finish_oc">Fim</string>
+ <string name="auth_dialog_wait_oc">A esperar pot %s…</string>
+ <string name="auth_dialog_pin_title_oc">Código PIN</string>
+ <string name="auth_dialog_pin_message_oc">Por favor insira o código PIN fornecido pelo site %s. É imperativo para que se complete a autorização.</string>
+ <string name="auth_dialog_completed_oc">c:geo está agora autorizado a interagir com %s.</string>
+ <string name="about_auth_1_oc">O processo seguinte permite <b>c:geo</b> aceder ao Twitter - se concordar.</string>
+ <string name="about_auth_2_oc">Um clique sobre o botão \"autorizar c:geo \" irá iniciar o processo. Este processo irá abrir um navegador com uma página em %s. Entre nesta página e permita o <b>c:geo</b> aceder à sua conta. Se isso for aceite, %s vai mostrar um código PIN numérico. Este PIN deve ser colado em <b>c:geo</b> e confirmado. É tudo.</string>
+
<!-- cache -->
<plurals name="cache_counts">
<item quantity="one">Uma cache</item>
@@ -478,6 +566,12 @@
<string name="cache_log_image_default_title">Foto</string>
<string name="cache_personal_note">Nota pessoal</string>
<string name="cache_personal_note_edit">Editar</string>
+ <string name="cache_personal_note_upload">Enviar</string>
+ <string name="cache_personal_note_uploading">A enviar nota pessoal</string>
+ <string name="cache_personal_note_upload_done">Nota pessoal enviada</string>
+ <string name="cache_personal_note_upload_cancelled">Envio de nota pessoal cancelado</string>
+ <string name="cache_personal_note_unstored">Cache não guaradada</string>
+ <string name="cache_personal_note_store">A cache vai ser guardada primeiro para permitir notas pessoais.</string>
<string name="cache_description">Descrição</string>
<string name="cache_description_long">Descrição longa</string>
<string name="cache_description_table_note">A descrição contém a formatação da tabela que pode ser necessário para ser vista correctamente em %s.</string>
@@ -489,6 +583,9 @@
<string name="cache_favpoint_not_on">Esta cache não é uma das suas favoritas.</string>
<string name="cache_favpoint_add">Adicionar</string>
<string name="cache_favpoint_remove">Remover</string>
+ <string name="cache_list_text">Lista:</string>
+ <string name="cache_list_change">Mover</string>
+ <string name="cache_list_unknown">Não está numa lista</string>
<string name="cache_images">Imagens</string>
<string name="cache_waypoints">Pontos de referência</string>
@@ -508,7 +605,6 @@
<string name="cache_dialog_loading_details_status_logs">A carregar os registo</string>
<string name="cache_dialog_loading_details_status_waypoints">A processar os waypoints</string>
<string name="cache_dialog_loading_details_status_gcvote">A carregar GCVote</string>
- <string name="cache_dialog_loading_details_status_elevation">A carregar os dados de elevação</string>
<string name="cache_dialog_loading_details_status_cache">A carregar dados</string>
<string name="cache_dialog_loading_details_status_render">A renderizar a vista</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -521,9 +617,14 @@
<string name="cache_dialog_watchlist_add_message">A adicionar cache à lista de observação…</string>
<string name="cache_dialog_watchlist_remove_title">Lista de observação</string>
<string name="cache_dialog_watchlist_remove_message">A remover cache da lista de observação…</string>
+ <string name="cache_dialog_favorite_add_title">Favorita</string>
+ <string name="cache_dialog_favorite_add_message">Adicionar cache aos favoritos…</string>
+ <string name="cache_dialog_favorite_remove_title">Favorita</string>
+ <string name="cache_dialog_favorite_remove_message">Remover cache dos favoritos…</string>
<string name="cache_menu_navigate">Navegar</string>
<string name="cache_menu_navigation_drive">Navegar (Conduzir)</string>
- <string name="cache_menu_navigation_walk">Navegar (Andar)</string>
+ <string name="cache_menu_navigation_walk">Navegar (Caminhar)</string>
+ <string name="cache_menu_navigation_bike">Navegar (Andar de bicicleta)</string>
<string name="cache_menu_maps_directions">Direcções pelo Google Maps</string>
<string name="cache_menu_radar">Radar</string>
<string name="cache_menu_map">Mostrar no mapa</string>
@@ -547,13 +648,15 @@
<string name="cache_menu_oruxmaps">OruxMaps</string>
<string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_status">Estado</string>
- <string name="cache_status_offline_log">Log gravado</string>
+ <string name="cache_status_offline_log">Registo gravado</string>
<string name="cache_status_found">Encontrada</string>
<string name="cache_status_archived">Arquivada</string>
<string name="cache_status_disabled">Desactivada</string>
<string name="cache_status_premium">Apenas membros premium</string>
<string name="cache_status_not_premium">Acesso a todos os membros</string>
- <string name="cache_geocode">Código-GC</string>
+ <string name="cache_status_stored">Guardada</string>
+ <string name="cache_status_not_stored">Não guardada</string>
+ <string name="cache_geocode">Geo Código</string>
<string name="cache_name">Nome</string>
<string name="cache_type">Tipo</string>
<string name="cache_size">Tamanho</string>
@@ -582,9 +685,9 @@
<string name="cache_image_open_browser">Abrir no browser</string>
<string name="cache_share_field">Partilhar</string>
<string name="cache_time_full_hours">o\'clock</string>
+ <string name="cache_listed_on">Listada em %s</string>
<!-- editor dialog -->
- <string name="editor_save">Gravar</string>
<!-- file list base -->
<string name="file_searching_in">A procurar ficheiros\nem</string>
@@ -611,10 +714,10 @@
<string name="gpx_import_error_io">Não consegue ler o ficheiro</string>
<string name="gpx_import_error_parser">Formato de ficheiro errado</string>
<string name="gpx_import_error_unexpected">Erro inesperado</string>
- <string name="gpx_import_confirm">Quer importat o ficheiro GPX para o c:geo?</string>
<string name="gpx_import_canceled">A importação GPX foi cancelada</string>
<string name="gpx_import_delete_title">Eliminar ficheiro</string>
<string name="gpx_import_delete_message">Quer eliminar %s?</string>
+ <string name="gpx_import_select_list_title">Importar GPX para lista</string>
<!-- map file select -->
<string name="map_file_select_title">Seleccione ficheiro de mapa</string>
@@ -642,8 +745,23 @@
<string name="waypoint_edit_title">Editar ponto de referência</string>
<string name="waypoint_add_title">Adicionar ponto de referência</string>
<string name="waypoint_note">Nota</string>
+ <string name="waypoint_visited">Visitado</string>
<string name="waypoint_save">Gravar</string>
<string name="waypoint_loading">A carregar ponto de referência…</string>
+ <string name="waypoint_do_not_touch_cache_coordinates">Nenhuma mudança às coordenadas da cache</string>
+ <string name="waypoint_set_as_cache_coords">Definir como coordenadas da cache no c:geo</string>
+ <string name="waypoint_save_and_modify_on_website">Definir como coordenadas da cache no c:geo e no site</string>
+ <string name="waypoint_reset_cache_coords">Redefinir as coordenadas da cache</string>
+ <string name="waypoint_coordinates_has_been_reset_on_website">Coordenadas da cache foram redefinidas no site.</string>
+ <string name="waypoint_coordinates_being_reset_on_website">A redefinir as coordenadas da cache no site…</string>
+ <string name="waypoint_reset">Redefinir</string>
+ <string name="waypoint_localy_reset_cache_coords">Redefinir no c:geo</string>
+ <string name="waypoint_reset_local_and_remote_cache_coords">Redefinir no c:geo e no site</string>
+ <string name="waypoint_being_saved">A guardar pontos de referência…</string>
+ <string name="waypoint_coordinates_couldnt_be_modified_on_website">O site não suporta modificar as coordenadas da cache.</string>
+ <string name="waypoint_coordinates_upload_error">Ocorreu um erro ao modificar as coordenadas no site.</string>
+ <string name="waypoint_coordinates_uploading_to_website">A enviar as coordenadas para o site %s.</string>
+ <string name="waypoint_coordinates_has_been_modified_on_website">As coordenadas da cache no site foram modificados para: %s.</string>
<string name="waypoint_done">Feito</string>
<string name="waypoint_duplicate">Duplicar</string>
<string name="waypoint_copy_of">Cópia de</string>
@@ -690,6 +808,8 @@
<string name="search_coordinates_button">Pesquisar por coordenadas</string>
<string name="search_address">Endereço</string>
<string name="search_address_button">Pesquisar por endereço</string>
+ <string name="search_geo">Geo código</string>
+ <string name="search_geo_button">Pesquisar por geo código</string>
<string name="search_kw">Palavras-chave</string>
<string name="search_kw_prefill">Palavra-chave</string>
<string name="search_kw_button">Pesquisar por palavra-chave</string>
@@ -730,12 +850,20 @@
<string name="trackable_released">Criado</string>
<string name="trackable_distance">Viajado</string>
<string name="trackable_touch">Toque</string>
+ <string name="trackable_not_activated">Trackable não activado</string>
+
+ <string name="geokret_type_traditional">Tradicional</string>
+ <string name="geokret_type_book_or_media">Livro ou média electrónica</string>
+ <string name="geokret_type_human">Humano</string>
+ <string name="geokret_type_coin">Moeda</string>
+ <string name="geokret_type_post">Correio</string>
<!-- user -->
<string name="user_menu_title">Sobre</string>
<string name="user_menu_view_hidden">Caches escondidas</string>
<string name="user_menu_view_found">Caches encontradas</string>
<string name="user_menu_open_browser">Abrir perfil no browser</string>
+ <string name="user_menu_send_message">Enviar mensagem</string>
<!-- navigation -->
<string name="navigation">Navegação</string>
@@ -764,6 +892,8 @@
<string name="helper_bluetoothgps_description">Permite utilizar um GPS externo, para uma melhor recepção, localização mais precisa e permite poupar a bateria do seu telemóvel.</string>
<string name="helper_barcode_title">Barcode Scanner</string>
<string name="helper_barcode_description">Existem scripts Greasemonkey e websites que permitem mostrar um geo código com um código barras. Com esta aplicação o c:geo consegue ler o código barras directamente do ecrã do seu computador.</string>
+ <string name="helper_pocketquery_title">Criador de Pocket Query</string>
+ <string name="helper_pocketquery_description">Permite a fácil criação de consultas e download de Pocket Query centrado na sua posição actual ou um ponto selecionado a partir de um mapa. Requer uma conta premium em Geocaching.com.</string>
<!-- add-ons -->
<string name="addon_missing_title">Add-On em falta</string>
@@ -784,7 +914,7 @@
<string name="export_gpx_info">O ficheiro GPX vai ser exportado para %1$s com a data e a hora actual como nome de ficheiro.</string>
<string name="export_gpx_to">Enviar GPX exportado para</string>
- <!-- attributes (permissions -> allowed, not allowed) -->
+ <!-- GC attributes -->
<string name="attribute_dogs_yes">Cães permitidos</string>
<string name="attribute_dogs_no">Cães não permitidos</string>
<string name="attribute_bicycles_yes">Bicicletas permitidas</string>
@@ -803,8 +933,6 @@
<string name="attribute_campfires_no">Fogueiras não permitidas</string>
<string name="attribute_rv_yes">Roulottes permitidas</string>
<string name="attribute_rv_no">Roulottes não permitidas</string>
-
- <!-- attributes (conditions -> yes, no) -->
<string name="attribute_kids_yes">Recomendado para crianças</string>
<string name="attribute_kids_no">Não recomendado para crianças</string>
<string name="attribute_onehour_yes">Demora menos de uma hora</string>
@@ -857,8 +985,6 @@
<string name="attribute_landf_no">Não é um passeio de perdidos e achados</string>
<string name="attribute_partnership_yes">Cache de parceria</string>
<string name="attribute_partnership_no">Não é uma cache de parceria</string>
-
- <!-- attributes (equipment -> required, not required) -->
<string name="attribute_fee_yes">Taxa de acesso ou estacionamento aplicável</string>
<string name="attribute_fee_no">Não tem taxa de acesso ou estacionamento</string>
<string name="attribute_rappelling_yes">Requer equipamento de escalada</string>
@@ -881,8 +1007,6 @@
<string name="attribute_wirelessbeacon_no">Sem sinal de rede sem fios</string>
<string name="attribute_treeclimbing_yes">Requer subida a árvores</string>
<string name="attribute_treeclimbing_no">Não requer subida a árvores</string>
-
- <!-- attributes (hazards -> present, not present) -->
<string name="attribute_poisonoak_yes">Plantas venenosas</string>
<string name="attribute_poisonoak_no">Sem plantas venenosas</string>
<string name="attribute_dangerousanimals_yes">Animais perigosos</string>
@@ -899,8 +1023,6 @@
<string name="attribute_danger_no">Área não perigosa</string>
<string name="attribute_thorn_yes">Espinhos</string>
<string name="attribute_thorn_no">Sem espinhos</string>
-
- <!-- attributes (facilities -> yes, no) -->
<string name="attribute_wheelchair_yes">Acesso a cadeiras de rodas</string>
<string name="attribute_wheelchair_no">Sem acesso a cadeiras de rodas</string>
<string name="attribute_parking_yes">Estacionamento disponível</string>
@@ -923,9 +1045,70 @@
<string name="attribute_fuel_no">Sem abastecimento de combustível por perto</string>
<string name="attribute_food_yes">Comida por perto</string>
<string name="attribute_food_no">Sem comida por perto</string>
+ <string name="attribute_oc_only_yes">Só dá para registar em Opencaching</string>
+ <string name="attribute_oc_only_no">Dá registar em Opencaching e não só</string>
+ <string name="attribute_link_only_yes">Ligação para outro portal de caching</string>
+ <string name="attribute_link_only_no">Não só ligação para outro portal de caching</string>
+ <string name="attribute_letterbox_yes">Caixa de correio (precisa de selo)</string>
+ <string name="attribute_letterbox_no">Caixa de correio (não precisa de selo)</string>
+ <string name="attribute_railway_yes">Caminho de ferro activo próximo</string>
+ <string name="attribute_railway_no">Sem caminho de ferro activo próximo</string>
+ <string name="attribute_syringe_yes">Primeiros socorros disponíveis</string>
+ <string name="attribute_syringe_no">Sem primeiros socorros disponíveis</string>
+ <string name="attribute_swamp_yes">Pântano</string>
+ <string name="attribute_swamp_no">Sem pântano</string>
+ <string name="attribute_hills_yes">Área montanhosa</string>
+ <string name="attribute_hills_no">Área não montanhosa</string>
+ <string name="attribute_easy_climbing_yes">Escalada leve</string>
+ <string name="attribute_easy_climbing_no">Escalada não leve</string>
+ <string name="attribute_poi_yes">Ponto de interesse</string>
+ <string name="attribute_poi_no">Não é ponto de interesse</string>
+ <string name="attribute_moving_target_yes">Alvo em movimento</string>
+ <string name="attribute_moving_target_no">Alvo não em movimento</string>
+ <string name="attribute_webcam_yes">Webcam</string>
+ <string name="attribute_webcam_no">Sem webcam</string>
+ <string name="attribute_inside_yes">Dentro de locais fechados (grutas, edifícios, etc)</string>
+ <string name="attribute_inside_no">Fora de locais fechados</string>
+ <string name="attribute_in_water_yes">Na água</string>
+ <string name="attribute_in_water_no">Fora da água</string>
+ <string name="attribute_no_gps_yes">Sem GPS (caixas de correio, bússola, …)</string>
+ <string name="attribute_no_gps_no">Com GPS</string>
+ <string name="attribute_overnight_yes">Necessário pernoitar</string>
+ <string name="attribute_overnight_no">Não necessário pernoitar</string>
+ <string name="attribute_specific_times_yes">Disponível apenas em horários específicos</string>
+ <string name="attribute_specific_times_no">Não só disponível em horários especificados</string>
+ <string name="attribute_day_yes">Apendas de dia</string>
+ <string name="attribute_day_no">Não só de dia</string>
+ <string name="attribute_tide_yes">Maré</string>
+ <string name="attribute_tide_no">Sem maré</string>
+ <string name="attribute_all_seasons_yes">Todas as estações</string>
+ <string name="attribute_all_seasons_no">Não em todas as estações</string>
+ <string name="attribute_breeding_yes">Época de reprodução / natureza protegida</string>
+ <string name="attribute_breeding_no">Não tem época de reprodução / natureza protegida</string>
+ <string name="attribute_snow_proof_yes">Esconderijo à prova de neve</string>
+ <string name="attribute_snow_proof_no">Esconderijo não à prova de neve</string>
+ <string name="attribute_compass_yes">Bússola</string>
+ <string name="attribute_compass_no">Sem bússola</string>
+ <string name="attribute_cave_yes">Equipamento para caverna</string>
+ <string name="attribute_cave_no">Sem equipamento para caverna</string>
+ <string name="attribute_aircraft_yes">Aeronave</string>
+ <string name="attribute_aircraft_no">Não aeronave</string>
+ <string name="attribute_investigation_yes">Investigação</string>
+ <string name="attribute_investigation_no">Não investigação</string>
+ <string name="attribute_puzzle_yes">Puzzle / Mistério</string>
+ <string name="attribute_puzzle_no">Não Puzzle / Mistério</string>
+ <string name="attribute_arithmetic_yes">Problema aritmético</string>
+ <string name="attribute_arithmetic_no">Sem problema aritmético</string>
+ <string name="attribute_other_cache_yes">Outro tipo de cache</string>
+ <string name="attribute_other_cache_no">Não é outro tipo de cache</string>
+ <string name="attribute_ask_owner_yes">Pergunte ao dono as condições de início</string>
+ <string name="attribute_ask_owner_no">Não pergunte ao dono as condições de início</string>
+ <string name="attribute_unknown_yes">Atributo desconhecido presente</string>
+ <string name="attribute_unknown_no">Sem atributo desconhecido presente</string>
+ <string name="attribute_geotour_yes">Parte de GeoTour</string>
+ <string name="attribute_geotour_no">Não é parte de GeoTour</string>
<!-- next things -->
- <string name="legal_note">Para utilizar os serviços de Geocaching.com, tem de concordar com os termos e condições da <a href="http://www.geocaching.com/about/termsofuse.aspx">declaração Groundspeak</a>.</string>
<string name="quote">Para tornar o geocaching mais fácil, para tornar os utilizadores mais preguiçosos.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -934,21 +1117,49 @@
<string name="facebook">Facebook: <a href="">página do c:geo</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
<string name="nutshellmanual">Manual: <a href="">o essencial do c:geo</a></string>
+ <string name="market">Android: <a href="">c:geo no Google Play</a></string>
<string name="about_twitter">O <b>c:geo</b> deve publicar no Twitter de cada vez que uma cache for registada?</string>
- <string name="about_auth_1">O processo seguinte permite ao <b>c:geo</b> aceder ao Twitter - se concordar.</string>
- <string name="about_auth_2">Premir o botão \"Autorizar c:geo\" dará início ao processo. Este processo irá abrir a página do Twitter no seu browser. Faça login nesta página e autorize o <b>c:geo</b> a aceder à sua conta. Se autorizar, o Twitter irá mostrar um código PIN numérico. Este PIN deverá ser copiado para o <b>c:geo</b> e sujeito a confirmação. E é tudo.</string>
- <!-- status -->
+ <!-- status (used via string based resource loading) -->
<string name="status_new_release" tools:ignore="UnusedResources">Nova versão disponível.\nClique para instalar.</string>
<string name="status_new_nightly" tools:ignore="UnusedResources">Nova \'nightly build\' disponível.\nClique para instalar.</string>
<string name="status_new_rc" tools:ignore="UnusedResources">Nova \'release candidate\' disponível .\nClique para instalar.</string>
<string name="status_geocaching_change" tools:ignore="UnusedResources">Alterações recentes em geocaching.com fizeram com que c:geo funcione mal.\nEstamos a trabalhar nisto, verifique de novo mais tarde.</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">Alterações recentes em geocaching.com fizeram com o mapa ao vivo não funcione bem.\nEstamos a trabalhar nisto, verifique de novo mais tarde.</string>
- <string name="clipboard_copy_ok">Copiado para a área de transferência</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Parece estar a utilizar uma versão do Android inferior a 2.1. Futuras versões do c: geo podem deixar de ficar disponíveis para o seu dispositivo.</string>
+
+ <!-- text-to-speech for compass view -->
+ <string name="tts_service">Bússola que fala</string>
+ <string name="tts_start">Comece a falar</string>
+ <string name="tts_stop">Páre de falar</string>
+ <string name="tts_one_kilometer" tools:ignore="Typos">um quilómetro</string>
+ <plurals name="tts_kilometers">
+ <item quantity="one">%s quilómetro</item>
+ <item quantity="other">%s quilómetro</item>
+ </plurals>
+ <string name="tts_one_meter">um metro</string>
+ <plurals name="tts_meters">
+ <item quantity="one">%s metro</item>
+ <item quantity="other">%s metros</item>
+ </plurals>
+ <string name="tts_one_mile">uma milha</string>
+ <plurals name="tts_miles">
+ <item quantity="one">%s milha</item>
+ <item quantity="other">%s milhas</item>
+ </plurals>
+ <string name="tts_one_foot">um pé</string>
+ <plurals name="tts_feet">
+ <item quantity="one">%s pé</item>
+ <item quantity="other">%s pés</item>
+ </plurals>
+ <string name="tts_one_oclock">uma hora</string>
+ <string name="tts_oclock">%s horas</string>
- <plurals name="days_ago">
+ <!-- various -->
+ <string name="clipboard_copy_ok">Copiado para a área de transferência</string>
+ <plurals name="days_ago">
<item quantity="one">ontem</item>
<item quantity="other">%d dias atrás</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-sk/strings.xml b/main/res/values-sk/strings.xml
index af8f487..5c4371c 100644
--- a/main/res/values-sk/strings.xml
+++ b/main/res/values-sk/strings.xml
@@ -2,13 +2,12 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo kompas</string>
<!-- basics -->
<string name="cache">Skrýša</string>
<string name="detail">Detail</string>
<string name="search">Vyhľadávanie</string>
- <string name="settings">Nastavenie</string>
+ <string name="settings_titlebar">c:geo Nastavenie</string>
<string name="helpers">Pomocné aplikácie</string>
<string name="about">O aplikácii</string>
<string name="latitude">Zemepisná šírka</string>
@@ -153,7 +152,6 @@
<string name="err_auth_initialize">Prepáčte, c:geo nedokázalo zahájiť autorizáciu.</string>
<string name="err_auth_process">Autorizácia zlyhala.</string>
<string name="err_cannot_log_visit">c:geo nemá dostatok informácií pre zapísanie návštevy. Prosím urobte to z kompletného detailu skrýše.</string>
- <string name="err_init_cleared">Prepáčte, c:geo nedokázalo zmazať prihlasovacie údaje.</string>
<string name="err_download_fail">Prepáčte, c:geo nemôže načítať skrýšu, pretože</string>
<string name="err_dwld_details_failed">c:geo nemôže stiahnuť detaily skrýše.</string>
<string name="err_load_descr_failed">c:geo nemôže načítať popis.</string>
@@ -242,6 +240,7 @@
<plurals name="caches_eta_mins">
<item quantity="one">minúta</item>
+ <!-- please add an entry for "few" -->
<item quantity="other">minúty</item>
</plurals>
@@ -329,23 +328,18 @@
<string name="about_contributors">Prispievatelia</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">používateľské meno</string>
<string name="init_password">heslo</string>
- <string name="init_passvote">heslo</string>
- <string name="init_login">Kontrola prihlásenia a nastavenie formátu dátumu</string>
+ <string name="init_login">Kontrola prihlásenia</string>
<string name="init_login_popup">Prihlasovanie</string>
<string name="init_login_popup_working">Prihlasovanie na Geocaching.com…</string>
<string name="init_login_popup_ok">Prihlásenie úspešné</string>
<string name="init_login_popup_failed">Prihlásenie neúspešné</string>
<string name="init_login_popup_failed_reason">Prihlásenie neúspešné: </string>
<string name="init_twitter_authorize">Autorizovať c:geo</string>
- <string name="init_twitter_publish">Nový status pri nájdení skrýše</string>
<string name="init_signature">Podpis</string>
- <string name="init_signature_help_button">Pomocník</string>
- <string name="init_signature_help_title">Tipy a triky pre podpis</string>
<string name="init_signature_help_text">Zapíšte váš podpis, ktorý chcete použiť v texte záznamov.\nMôžete použiť špeciálne slová: [DATE] , [TIME], [DATETIME], [USER] a [NUMBER].\nTieto budú nahradené pri vložení podpisu.</string>
<string name="init_signature_template_button">Vložiť šablónu</string>
<string name="init_signature_template_date">Dátum</string>
@@ -354,31 +348,40 @@
<string name="init_signature_template_user">Používateľ</string>
<string name="init_signature_template_number">Číslo</string>
<string name="init_signature_template_owner">Vlastník</string>
- <string name="init_details">Detaily skrýše</string>
<string name="init_ratingwanted">Načítať hodnotenie skrýše z GCvote.com</string>
- <string name="init_elevationwanted">Načítať údaje o stúpaní skrýše</string>
+ <string name="init_summary_ratingwanted">Načítať hodnotenie skrýše z GCvote.com</string>
<string name="init_friendlogswanted">Načítať dodatočnú stránku s logmi od priateľov</string>
+ <string name="init_summary_friendlogswanted">Načítať dodatočnú stránku s logmi od priateľov</string>
<string name="init_openlastdetailspage">Otvoriť detaily na naposledy použitej stránke</string>
+ <string name="init_summary_openlastdetailspage">Otvoriť detaily na naposledy použitej stránke</string>
<string name="init_autoload">Automatické načítanie dlhého popisu</string>
- <string name="init_other">Ďalšie možnosti</string>
+ <string name="init_summary_autoload">Automatické načítanie dlhého popisu</string>
<string name="init_skin">Svetlý vzhľad\n(vyžaduje reštart c:geo)</string>
+ <string name="init_summary_skin">Svetlý vzhľad\n(vyžaduje reštart c:geo)</string>
<string name="init_address">Adresa na úvodnej obrazovke</string>
+ <string name="init_summary_address">Adresa na úvodnej obrazovke</string>
<string name="init_captcha">Zobraziť CAPTCHA, ak je to potrebné</string>
+ <string name="init_summary_captcha">Zobraziť CAPTCHA, ak je to potrebné</string>
<string name="init_useenglish">Používať angličtinu v c:geo\n(vyžaduje reštart)</string>
+ <string name="init_summary_useenglish">Používať angličtinu v c:geo\n(vyžaduje reštart)</string>
<string name="init_exclude">Nezobrazovať vlastné a nájdené skrýše</string>
+ <string name="init_summary_exclude">Nezobrazovať vlastné a nájdené skrýše</string>
<string name="init_showwaypoints">Body trasy na mape</string>
<string name="init_showwaypoint_description">Úroveň, od ktorej zobraziť body trasy na mape.</string>
<string name="init_disabled">Nezobrazovať zrušené skrýše</string>
+ <string name="init_summary_disabled">Nezobrazovať zrušené skrýše</string>
<string name="init_offline">Ukladať mapy pre použitie offline</string>
+ <string name="init_summary_offline">Ukladať mapy pre použitie offline</string>
<string name="init_offline_wp">Uložiť statické mapy bodov strás pre použitie offline</string>
+ <string name="init_summary_offline_wp">Uložiť statické mapy bodov strás pre použitie offline</string>
<string name="init_save_log_img">Uložiť obrázky zo záznamov</string>
+ <string name="init_summary_save_log_img">Uložiť obrázky zo záznamov</string>
<string name="init_units">Používať imperiálne jednotky vzdialenosti</string>
+ <string name="init_summary_units">Používať imperiálne jednotky vzdialenosti</string>
<string name="init_log_offline">Pri zaznamenávaní vždy použiť offline režim (nezobrazovať online obrazovku počas zaznamenávania, neposielať záznam online)</string>
+ <string name="init_summary_log_offline">Pri zaznamenávaní vždy použiť offline režim (nezobrazovať online obrazovku počas zaznamenávania, neposielať záznam online)</string>
<string name="init_livelist">Zobrazovať smer v zozname skrýš</string>
- <string name="init_altitude">Oprava výšky</string>
- <string name="init_altitude_description">Keď vám GPS zobrazuje nesprávnu nadmorskú výšku, môžete ju opraviť zadaním kladného alebo záporného čísla. Oprava ja vždy v metroch.</string>
- <string name="init_clear">Zmazať prihlasovacie údaje</string>
- <string name="init_cleared">Prihlasovacie údaje zmazané.</string>
+ <string name="init_summary_livelist">Zobrazovať smer v zozname skrýš</string>
<string name="init_backup">Záloha</string>
<string name="init_backup_backup">Zálohovať</string>
<string name="init_backup_running">Vytváranie zálohy databázy skrýš…</string>
@@ -393,19 +396,18 @@
<string name="init_restore_confirm">Databáza je prázdna. Chcete ju obnoviť zo zálohy?</string>
<string name="init_backup_last">Posledná dostupná záloha</string>
<string name="init_backup_last_no">Neexistuje súbor zo zálohou.</string>
- <string name="init_mapsources">Mapové zdroje</string>
- <string name="init_mapsources_description">Tu môžete vybrať zdroje pre vaše mapy. Je to alternatíva ku Google mapám rôznych OpenStreetMap styles sú dostupné a dokonca offline mapové súbory (podrobnosti nájdete na <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a>).</string>
<string name="init_mapsource_select">Vyberte zdroj máp</string>
<string name="init_map_directory_description">Priečinok s offline mapami</string>
<string name="init_gpx_exportdir">Priečinok pre GPX Export</string>
<string name="init_gpx_importdir">Priečinok pre GPX Import</string>
- <string name="init_gpx_exportdir_description">Tu si môžete vybrať priečinok pre GPX exporty.</string>
- <string name="init_gpx_importdir_description">Tu si môžete vybrať priečinok pre GPX importy.</string>
<string name="init_maptrail">Zobraziť stopu na mape</string>
+ <string name="init_summary_maptrail">Zobraziť stopu na mape</string>
<string name="init_share_after_export">Po exporte GPX otvoriť menu pre zdieľanie</string>
<string name="init_trackautovisit">Nastaviť trasovateľné predmety automaticky na „navštívené“</string>
+ <string name="init_summary_trackautovisit">Nastaviť trasovateľné predmety automaticky na „navštívené“</string>
<string name="init_sigautoinsert">Automaticky vložiť podpis</string>
<string name="init_loaddirectionimg">Ak je to potrebné načítať obrázok zo smerom</string>
+ <string name="init_summary_loaddirectionimg">Ak je to potrebné načítať obrázok zo smerom</string>
<string name="init_default_navigation_tool">Predvolená navigácia</string>
<string name="init_default_navigation_tool_description">Môžete si vybrať preferovaný nástroj pre navigáciu.</string>
<string name="init_default_navigation_tool_select">Vyberte nástroj</string>
@@ -415,14 +417,15 @@
<string name="init_debug">Generovanie ladiacich informácií</string>
<string name="init_dbonsdcard_title">Umiestnenie databázy</string>
<string name="init_dbonsdcard_note">Databázu c:geo môžete umiestniť na externé úložisko. Ak to spravíte, ušetríte vnútornú pamäť, ale môžete stratiť časť z výkonu a c:geo nebude fungovať, keď vaša SD karta nebude dostupná.</string>
- <string name="init_dbonsdcard">Databáza na externom úložisku</string>
+ <string name="init_dbonsdcard">Na externom úložisku</string>
<string name="init_dbmove_dbmove">Presúvanie databázy</string>
<string name="init_dbmove_running">Prebieha presúvanie databázy</string>
<string name="init_dbmove_success">Databáza bola úspešne presunutá.</string>
<string name="init_dbmove_failed">Presun databázy zlyhal.</string>
<string name="init_plain_logs">Zobraziť záznamy logu bez farieb</string>
+ <string name="init_summary_plain_logs">Zobraziť záznamy logu bez farieb</string>
<string name="init_use_native_ua">Ohlásiť sa ako prehliadač Android. Pomôže vyriešiť problémy pri niektorých poskytovateľov siete.</string>
- <string name="init_rendertheme_folder">Priečinok s vlastnými témami offline máp (voliteľné)</string>
+ <string name="init_summary_use_native_ua">Ohlásiť sa ako prehliadač Android. Pomôže vyriešiť problémy pri niektorých poskytovateľov siete.</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Mapa</string>
@@ -431,7 +434,7 @@
<string name="map_source_osm_cyclemap">OSM: Cyklomapa</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Poslať do c:geo</string>
- <string name="init_sendToCgeo_name">Názov vášho zariadenia:</string>
+ <string name="init_sendToCgeo_name">Názov vášho zariadenia</string>
<string name="init_sendToCgeo_description">Poslanie do c:geo umožní prijímanie skrýš priamo z geocaching webu použitím špeciálneho rozšírenia do Firefoxu či Chrome. Pred registráciou si prosím prečítajte <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Registrovať sa potrebujete iba ak budete používať send2cgeo. C:geo bude fungovať i bez registrovaného zariadenia.</string>
<string name="init_sendToCgeo_register">Žiadosť o registráciu</string>
<string name="init_sendToCgeo_registering">Registrácia zariadenia pre „Poslať do c:geo“…</string>
@@ -455,6 +458,7 @@
<!-- cache -->
<plurals name="cache_counts">
<item quantity="one">jedna skrýša</item>
+ <!-- please add an entry for "few" -->
<item quantity="other">%1$d skrýš</item>
</plurals>
@@ -509,7 +513,6 @@
<string name="cache_dialog_loading_details_status_logs">Načítanie logov</string>
<string name="cache_dialog_loading_details_status_waypoints">Spracovanie bodov trasy</string>
<string name="cache_dialog_loading_details_status_gcvote">Načítanie GCVote</string>
- <string name="cache_dialog_loading_details_status_elevation">Načítanie údajov o stúpaní</string>
<string name="cache_dialog_loading_details_status_cache">Kešovanie údajov</string>
<string name="cache_dialog_loading_details_status_render">Vykreslovanie pohľadu</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -582,7 +585,6 @@
<string name="cache_time_full_hours">hodín</string>
<!-- editor dialog -->
- <string name="editor_save">Uložiť</string>
<!-- file list base -->
<string name="file_searching_in">Vyhľadávanie súborov\nv</string>
@@ -609,7 +611,6 @@
<string name="gpx_import_error_io">Nedá sa prečítať súbor</string>
<string name="gpx_import_error_parser">Nie je v poriadku formát súboru</string>
<string name="gpx_import_error_unexpected">Neočakávaná chyba</string>
- <string name="gpx_import_confirm">Chcete importovať GPX súbor do c:geo?</string>
<string name="gpx_import_canceled">Import GPX bol zrušený</string>
<string name="gpx_import_delete_title">Vymazať súbor</string>
<string name="gpx_import_delete_message">Chcete zmazať %s?</string>
@@ -928,7 +929,7 @@
<string name="attribute_food_no">Bez občerstvenia neďaleko</string>
<!-- next things -->
- <string name="legal_note">Pred používaním služieb serveru Geocaching.com je potrebné súhlasiť s <a href="http://www.geocaching.com/about/disclaimer.aspx">licenčnou dohodou Groundspeaku</a>.</string>
+ <string name="settings_gc_legal_note">Pred používaním služieb serveru Geocaching.com je potrebné súhlasiť s licenčnou dohodou Groundspeaku.</string>
<string name="quote">Pre jednoduchšie hľadanie skrýš a používateľov lenivších.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -955,4 +956,4 @@
<item quantity="other">pred %d dňami</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values-sv/strings.xml b/main/res/values-sv/strings.xml
index b7cba9a..3cbf60d 100644
--- a/main/res/values-sv/strings.xml
+++ b/main/res/values-sv/strings.xml
@@ -2,13 +2,12 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo kompass</string>
<!-- basics -->
<string name="cache">Cache</string>
<string name="detail">Detaljer</string>
<string name="search">Sök</string>
- <string name="settings">Inställningar</string>
+ <string name="settings_titlebar">c:geo Inställningar</string>
<string name="helpers">Bra program att installera</string>
<string name="about">Om c:geo</string>
<string name="latitude">Latitud</string>
@@ -33,7 +32,7 @@
<string name="lostfound">Lost &amp; found</string>
<string name="ape">Projekt APE cache</string>
<string name="gchq">Groundspeak HQ</string>
- <string name="gps">GPS cache utställning</string>
+ <string name="gps">GPS adventures utställning</string>
<string name="block">Groundspeak Gatufest</string>
<string name="unknown">Okänd typ</string>
@@ -176,7 +175,6 @@
<string name="err_auth_initialize">Tyvärr misslyckades c:geo att starta inloggningsproceduren.</string>
<string name="err_auth_process">Inloggningsproceduren misslyckades.</string>
<string name="err_cannot_log_visit">c:geo har inte tillräckligt med information för att logga ditt besök. Vänligen försök igen från vyn med all information om cachen.</string>
- <string name="err_init_cleared">Tyvärr kan c:geo inte rensa inloggningsinställningarna.</string>
<string name="err_download_fail">Tyvärr misslyckades c:geo att ladda ner cacher.</string>
<string name="err_dwld_details_failed">Tyvärr misslyckades c:geo att ladda detaljer.</string>
<string name="err_load_descr_failed">Tyvärr kan c:geo inte ladda beskrivningen.</string>
@@ -362,26 +360,19 @@
<string name="about_contributors">Medarbetare</string>
<!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
- <string name="init_gc_activate">Aktivera Geocaching.com i live-kartor och sökningar</string>
<string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">Aktivera opencaching.de i live-kartor och sökningar</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="init_username">Användare</string>
<string name="init_password">Lösenord</string>
- <string name="init_passvote">Lösenord</string>
- <string name="init_login">Testa och spara inloggning</string>
+ <string name="init_login">Testa inloggning</string>
<string name="init_login_popup">Inloggning</string>
<string name="init_login_popup_working">Testar inloggning mot gc.com…</string>
<string name="init_login_popup_ok">Inloggning OK</string>
<string name="init_login_popup_failed">Inloggning misslyckades</string>
<string name="init_login_popup_failed_reason">Inloggning misslyckades:</string>
<string name="init_twitter_authorize">Inställningar för Twitter</string>
- <string name="init_twitter_publish">Publicera status när en cache hittats</string>
<string name="init_signature">Signatur</string>
- <string name="init_signature_help_button">Hjälp</string>
- <string name="init_signature_help_title">Tips och tricks</string>
<string name="init_signature_help_text">Skriv den signatur som du vill använda i dina loggtexter.\nDet finns några speciella texter som kan användas och som expanderas när signaturen läggs in: [DATE] , [TIME], [USER] &amp; [NUMBER].</string>
<string name="init_signature_template_button">Infoga makro</string>
<string name="init_signature_template_date">Datum</string>
@@ -390,32 +381,42 @@
<string name="init_signature_template_user">Namn</string>
<string name="init_signature_template_number">Nummer</string>
<string name="init_signature_template_owner">Ägare</string>
- <string name="init_details">Cacheinformation</string>
<string name="init_ratingwanted">Ladda cache betyg från GCvote.com</string>
- <string name="init_elevationwanted">Ladda höjddata för cacher</string>
+ <string name="init_summary_ratingwanted">Ladda cache betyg från GCvote.com</string>
<string name="init_friendlogswanted">Ladda extra sida med loggbok för dina vänner</string>
+ <string name="init_summary_friendlogswanted">Ladda extra sida med loggbok för dina vänner</string>
<string name="init_openlastdetailspage">Visa senaste använda delsidan när detaljer öppnas</string>
+ <string name="init_summary_openlastdetailspage">Visa senaste använda delsidan när detaljer öppnas</string>
<string name="init_autoload">Ladda full beskrivning automatiskt</string>
- <string name="init_other">Övriga inställningar</string>
+ <string name="init_summary_autoload">Ladda full beskrivning automatiskt</string>
<string name="init_skin">Vitt skal (kräver omstart av c:geo)</string>
+ <string name="init_summary_skin">Vitt skal (kräver omstart av c:geo)</string>
<string name="init_address">Visa adress istället för koordinater på startsidan</string>
+ <string name="init_summary_address">Visa adress istället för koordinater på startsidan</string>
<string name="init_captcha">Visa CAPTCHA (robotfällor) vid behov (enbart för Basic Member)</string>
+ <string name="init_summary_captcha">Visa CAPTCHA (robotfällor) vid behov (enbart för Basic Member)</string>
<string name="init_useenglish">Använd engelska i c:geo (kräver omstart)</string>
+ <string name="init_summary_useenglish">Använd engelska i c:geo (kräver omstart)</string>
<string name="init_exclude">Dölj egna och hittade cacher</string>
+ <string name="init_summary_exclude">Dölj egna och hittade cacher</string>
<string name="init_showwaypoints">Extra punkter på kartan</string>
<string name="init_showwaypoint_description">Gräns för antal cacher där extra punkter (parkering eller tillagd lösning) börjar visas i kartan. Bör vara mellan 5 och 50.</string>
<string name="init_disabled">Dölj inaktiva cacher</string>
+ <string name="init_summary_disabled">Dölj inaktiva cacher</string>
<string name="init_offline">Spara kartor för cacher för användning offline</string>
+ <string name="init_summary_offline">Spara kartor för cacher för användning offline</string>
<string name="init_offline_wp">Spara kartor för extra punkter för användning offline</string>
+ <string name="init_summary_offline_wp">Spara kartor för extra punkter för användning offline</string>
<string name="init_save_log_img">Spara bilder från loggar</string>
+ <string name="init_summary_save_log_img">Spara bilder från loggar</string>
<string name="init_units">Använd amerikanska enheter för avstånd</string>
+ <string name="init_summary_units">Använd amerikanska enheter för avstånd</string>
<string name="init_log_offline">Vid loggning: spara bara loggen lokalt (visa inte loggningfönster och skicka inte loggen till gc.com)</string>
+ <string name="init_summary_log_offline">Vid loggning: spara bara loggen lokalt (visa inte loggningfönster och skicka inte loggen till gc.com)</string>
<string name="init_choose_list">Fråga efter lista när cacher sparas</string>
+ <string name="init_summary_choose_list">Fråga efter lista när cacher sparas</string>
<string name="init_livelist">Visa riktning till cacher i listan</string>
- <string name="init_altitude">Höjd justering</string>
- <string name="init_altitude_description">Det är möjligt att justera höjden över havet om din GPS visar fel. Detta görs med ett positivt eller negativt tal, angivet i meter.</string>
- <string name="init_clear">Rensa inloggningsinfo</string>
- <string name="init_cleared">c:geo har rensat inloggningsinformationen</string>
+ <string name="init_summary_livelist">Visa riktning till cacher i listan</string>
<string name="init_backup">Säkerhetskopiering</string>
<string name="init_backup_backup">Kopiera</string>
<string name="init_backup_running">Skapar säkerhetskopia av databasen med cacher…</string>
@@ -430,19 +431,18 @@
<string name="init_restore_confirm">Databasen är tom. Vill du återställa med säkerhetskopian du gjort tidigare?</string>
<string name="init_backup_last">Tillgänglig kopia från</string>
<string name="init_backup_last_no">Det finns ingen säkerhetskopia.</string>
- <string name="init_mapsources">Kartkällor</string>
- <string name="init_mapsources_description">Här kan du välja vilken kartkälla du vill använda. Som alternativ till Google Maps finns olika varianter av OpenStreetMap och till och med offline kartor (se <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a> för detaljer). Ytterligare valbara teman stödjs också.</string>
<string name="init_mapsource_select">Välj kartkälla</string>
<string name="init_map_directory_description">Katalog med offline kartor</string>
<string name="init_gpx_exportdir">GPX-exportkatalog</string>
<string name="init_gpx_importdir">GPX-importkatalog</string>
- <string name="init_gpx_exportdir_description">Här kan du välja katalog för GPX-exporteringar.</string>
- <string name="init_gpx_importdir_description">Här kan du välja katalog för GPX-importeringar.</string>
<string name="init_maptrail">Visa spår på kartan</string>
+ <string name="init_summary_maptrail">Visa spår på kartan</string>
<string name="init_share_after_export">Visa meny för att dela efter slutförd exportering</string>
<string name="init_trackautovisit">Sätt trackable automatiskt till \"besök\" vid loggning av en cache</string>
- <string name="init_sigautoinsert">Infoga signatur automatiskt i loggar</string>
+ <string name="init_summary_trackautovisit">Sätt trackable automatiskt till \"besök\" vid loggning av en cache</string>
+ <string name="init_sigautoinsert">Infoga automatiskt i loggar</string>
<string name="init_loaddirectionimg">Ladda riktningsbild om det behövs (enbart Basic Member)</string>
+ <string name="init_summary_loaddirectionimg">Ladda riktningsbild om det behövs (enbart Basic Member)</string>
<string name="init_default_navigation_tool">Förvald navigering</string>
<string name="init_default_navigation_tool_description">Här kan du välja ditt förvalda navigeringsprogram.</string>
<string name="init_default_navigation_tool_select">Välj program</string>
@@ -452,14 +452,15 @@
<string name="init_debug">Generera debug information</string>
<string name="init_dbonsdcard_title">Databasplacering</string>
<string name="init_dbonsdcard_note">Du kan placera c:geos databas på ditt minneskort. På detta sätt kan du spara internminne, men du kan också få något sämre prestanda och c:geo kommer inte fungera om ditt minneskort inte är tillgängligt (exempelvis när den är kopplad till en dator).</string>
- <string name="init_dbonsdcard">Databas på minneskort</string>
+ <string name="init_dbonsdcard">På minneskort</string>
<string name="init_dbmove_dbmove">Flyttar databasen</string>
<string name="init_dbmove_running">Flyttar databasen</string>
<string name="init_dbmove_success">Databasen har nu flyttats.</string>
<string name="init_dbmove_failed">Misslyckades att flytta databasen</string>
<string name="init_plain_logs">Visa loggar utan färger</string>
+ <string name="init_summary_plain_logs">Visa loggar utan färger</string>
<string name="init_use_native_ua">Identifiera som en Android webbläsare. Löser problem med inloggning vid uppkoppling via vissa operatörer.</string>
- <string name="init_rendertheme_folder">Katalog för offline kartteman (valfritt)</string>
+ <string name="init_summary_use_native_ua">Identifiera som en Android webbläsare. Löser problem med inloggning vid uppkoppling via vissa operatörer.</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Map</string>
@@ -468,7 +469,7 @@
<string name="map_source_osm_cyclemap">OSM: Cyclemap</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Skicka till c:geo (Send2cgeo)</string>
- <string name="init_sendToCgeo_name">Namnet på din enhet:</string>
+ <string name="init_sendToCgeo_name">Namnet på din enhet</string>
<string name="init_sendToCgeo_description">Skicka till c:geo (send2cgeo) gör det möjligt att ta emot cacher direkt från geocaching hemsidan genom att använda en speciell plugin till Firefox eller Chrome. Läs detta innan registrering: <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Du behöver bara registrera din enhet om du kommer att använda send2cgeo. C:geo fungerar även utan registrering.</string>
<string name="init_sendToCgeo_register">Registrera din enhet</string>
<string name="init_sendToCgeo_registering">Registrerar din enhet för "send2cgeo"…</string>
@@ -550,7 +551,6 @@
<string name="cache_dialog_loading_details_status_logs">Hämtar tidigare loggar</string>
<string name="cache_dialog_loading_details_status_waypoints">Analyserar punkter</string>
<string name="cache_dialog_loading_details_status_gcvote">Hämtar betyg från GCVote.com</string>
- <string name="cache_dialog_loading_details_status_elevation">Hämtar höjddata</string>
<string name="cache_dialog_loading_details_status_cache">Sparar information</string>
<string name="cache_dialog_loading_details_status_render">Förbereder för visning</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -633,7 +633,6 @@
<string name="cache_listed_on">Listad på %s</string>
<!-- editor dialog -->
- <string name="editor_save">Spara</string>
<!-- file list base -->
<string name="file_searching_in">Söker efter filer\ni</string>
@@ -660,8 +659,6 @@
<string name="gpx_import_error_io">Kan inte läsa filen</string>
<string name="gpx_import_error_parser">Felaktigt filformat</string>
<string name="gpx_import_error_unexpected">Oväntat fel</string>
- <string name="gpx_import_confirm">Vill du importera GPX filen till c:geo?</string>
- <string name="gpx_import_canceled">Importeringen av GPX filen avbröts</string>
<string name="gpx_import_delete_title">Ta bort fil</string>
<string name="gpx_import_delete_message">Vill du radera %s?</string>
@@ -852,7 +849,7 @@
<string name="export_gpx_to">Skicka exporterad GPX till</string>
<!-- next things -->
- <string name="legal_note">För att använda tjänster hos Geocaching.com, måste regler och villkor i <a href="http://www.geocaching.com/about/termsofuse.aspx">Groundspeaks avtal</a> godkännas.</string>
+ <string name="settings_gc_legal_note">För att använda tjänster hos Geocaching.com, måste regler och villkor i Groundspeaks avtal godkännas.</string>
<string name="quote">To make geocaching easier, to make users lazier.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -872,17 +869,35 @@
<string name="status_new_rc" tools:ignore="UnusedResources">Ny kandidat till officiellt bygge finns tillgängligt.\nKlicka för att installera.</string>
<string name="status_geocaching_change" tools:ignore="UnusedResources">Ändringar som gjorts på geocaching.com har gjort så att c:geo inte fungerar.\nVi jobbar för att lösa problemen, försök igen om en stund.</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">Ändringar som gjorts på geocaching.com har gjort så att Live kartan inte fungerar.\nVi jobbar för att lösa problemen, försök igen om en stund.</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">Du verkar använda en version av Android som är äldre än 2.1. Framtida versioner av c:geo kommer troligtvis inte fungera på din telefon.</string>
<!-- text-to-speech for compass view -->
<string name="tts_service">Talande kompass</string>
<string name="tts_start">Starta tal</string>
<string name="tts_stop">Stoppa tal</string>
- <string name="tts_kilometers">%s kilometer</string>
- <string name="tts_meters">%s meter</string>
- <string name="tts_miles">%s eng. mil</string>
- <string name="tts_feet">%s fot</string>
+ <string name="tts_one_kilometer">en kilometer</string>
+ <plurals name="tts_kilometers">
+ <item quantity="one">%s kilometer</item>
+ <item quantity="other">%s kilometer</item>
+ </plurals>
+ <string name="tts_one_meter">en meter</string>
+ <plurals name="tts_meters">
+ <item quantity="one">%s meter</item>
+ <item quantity="other">%s meter</item>
+ </plurals>
+ <string name="tts_one_mile">en engelsk mil</string>
+ <plurals name="tts_miles">
+ <item quantity="one">%s engelsk mil</item>
+ <item quantity="other">%s engelsk mil</item>
+ </plurals>
+ <string name="tts_one_foot">en fot</string>
+ <plurals name="tts_feet">
+ <item quantity="one">%s fot</item>
+ <item quantity="other">%s fot</item>
+ </plurals>
+ <string name="tts_one_oclock">Klockan ett</string>
<string name="tts_oclock">Klockan %s</string>
-
+
<!-- various -->
<string name="clipboard_copy_ok">Kopierat till urklipp</string>
diff --git a/main/res/values/.gitignore b/main/res/values/.gitignore
index 1f65bef..ade2b6e 100644
--- a/main/res/values/.gitignore
+++ b/main/res/values/.gitignore
@@ -1 +1,2 @@
/ocde_okapi.xml
+/ocpl_okapi.xml
diff --git a/main/res/values/attrs.xml b/main/res/values/attrs.xml
index ba4cf1d..5eaa6a0 100644
--- a/main/res/values/attrs.xml
+++ b/main/res/values/attrs.xml
@@ -30,7 +30,23 @@
<attr name="close" format="integer" />
<attr name="log_img_icon" format="integer" />
<attr name="actionbar_compass" format="integer" />
+ <attr name="settings_cloud" format="integer" />
+ <attr name="settings_details" format="integer" />
+ <attr name="settings_eye" format="integer" />
+ <attr name="settings_map" format="integer" />
+ <attr name="settings_arrow" format="integer" />
+ <attr name="settings_nut" format="integer" />
+ <attr name="settings_pen" format="integer" />
+ <attr name="settings_sdcard" format="integer" />
+ <attr name="settings_info_icon" format="integer" />
+
+ <!-- attributes for custom made preferences -->
+ <attr name="title" format="string" />
+ <attr name="text" format="string" />
+ <attr name="url" format="string" />
+ <attr name="urlButton" format="string" />
+
<!-- others -->
<attr name="compass" format="integer" />
<attr name="progressSpinnerLarge" format="integer" />
diff --git a/main/res/values/changelog_master.xml b/main/res/values/changelog_master.xml
new file mode 100644
index 0000000..6989040
--- /dev/null
+++ b/main/res/values/changelog_master.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- changelog for the master branch -->
+ <string name="changelog_master" translatable="false">
+ <b>Next feature release</b>\n
+ <b>New Features:</b>\n
+ · Talking compass (select \"Start talking\" while compass is active)\n
+ · New menu structure for c:geo settings\n
+ · Implemenation of OKAPI interface for opencaching.de\n
+ Support of live map, nearby search and online logging\n
+ · Support uploading and merging of personal note to gc.com\n
+ · Improved input method for editing personal note\n
+ · Removed help function integration as it is no longer maintained by the author\n
+ You can still access it online. Link in \"About c:geo\"\n
+ · Added \"Pocket Query Creator\" to the list of useful apps\n
+ · Suport importing PQs created by \"Pocket Query Creator\"\n
+ · Detect if no internet connection is available when trying to download caches\n
+ · Added image scaling for log images to be uploaded\n
+ · Support hyperlinks in existing logbook entries\n
+ · New filter on nearby results to filter out stored caches\n
+ · Convert coordinates to different formats by clicking on them also for waypoints\n
+ · Use \"Today\" and \"Yesterday\" as date for logbook entries\n
+ · Support smilies also for trackable logs\n
+ · Starting Bike navigation for Google navigation added\n
+ · Support importing LOC files from waymarking.com\n
+ \n
+ <b>Bugfixes:</b>\n
+ · Enable GPX import option also on virtual all caches list\n
+ · Support GeoTour attribute\n
+ · Support of Block Party cache type\n
+ · Support of GPS Adventure Exhibit cache type\n
+ · Circles on the map only for physical stages\n
+ · Cache archived status not correctly refreshed\n
+ · Bad title shown when invoking c:geo from email (import operation)\n
+ · Avoid crash when log images is too large\n
+ · Save cache before allowing to add or edit a personal note\n
+ · Automatically use log type \"Attended\" if the date of an event cache is in the past\n
+ · Use log type \"Note\" for event caches if they are already logged as \"Attended\"\n
+ · Avoid to accidentally set the log type to \"Needs archived\" while loading the log page is still in progress\n
+ · Ignore hiding of owned caches when explicitly searching for owned caches\n
+ · Do not allow to select \"..\" as valid source directory for files\n
+ · Exclude inaccessible directories from selection list\n
+ · Do not show the short description of an oc.de cache if it is identical to the long description\n
+ · Sorting of lists by cache name did not respect country specific characters\n
+ · Avoid crash when deleting all caches including the list\n
+ · Logging progress message keeps showing when tapping on the screen\n
+ · Try to additionally detect the waypoint type when reading out coordinates from the personal note\n
+ · Show the image uploaded with a log in the logbook without the need to refresh the cache before\n
+ · Improvements to GPX import and export\n
+ · Ask for list to save caches when importing GPX\n
+ · Show basic Geokrety information for OC-caches\n
+ · Improved the map source selection for offline maps\n
+ · Avoid crashes when using the QR-code scanner\n
+ </string>
+</resources>
diff --git a/main/res/values/changelog_release.xml b/main/res/values/changelog_release.xml
new file mode 100644
index 0000000..d5aea77
--- /dev/null
+++ b/main/res/values/changelog_release.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- changelog for the release branch -->
+ <string name="changelog_release" translatable="false">\n
+ <b>Next bugfix release</b>\n
+ <b>Changes:</b>\n
+ · A warning message is shown if an android version less than 2.1 is used\n
+ c:geo will no longer support these devices starting with the next main release\n
+ · Upgraded to new twitter API to fix non working tweets\n
+ \n
+ \n
+ <b>2013.06.05</b>\n
+ <b>Bugfixing:</b>\n
+ · Adaption to changes on gc.com (Logging date could be wrong in some cases)\n
+ \n
+ \n
+ <b>2013.05.31</b>\n
+ <b>Bugfixing:</b>\n
+ · Adaption to changes on gc.com (cache and TB log not possible, cache attributes not shown)\n
+ · Pictures in logs are now loaded in standard resolution like on the website to improve performance\n
+ · Corrected missing information and performance issues on nearby search for basic members\n
+ \n
+ \n
+ <b>2013.05.22</b>\n
+ <b>Bugfixing:</b>\n
+ · Fixed and improved nearby search for basic members after gc.com changes\n
+ · Avoid inconsistency of logbook while pictures are loaded in the background\n
+ \n
+ \n
+ <b>2013.05.18</b>\n
+ <b>Bugfixing:</b>\n
+ · Correction for compatibility issue with tablet devices\n
+ \n
+ \n
+ <b>2013.05.16</b>\n
+ <b>Bugfixing:</b>\n
+ · Adaption to changes on gc.com (live map)\n
+ \n
+ \n
+ <b>2013.05.13</b>\n
+ <b>Bugfixing:</b>\n
+ · Twitter option was not shown on logging page\n
+ · Disable trail on map did only work after refresh of the map\n
+ · Stability improvements when selecting log pictures to be attached\n
+ · Remove accidentely appended spaces in searches\n
+ · Stability improvements for GPX import and export\n
+ · Do not duplicate waypoints retrieved from the personal note when updating a cache\n
+ · Fixed a possible crash when device is rotated while cache list is shown\n
+ · Fixed a possible crash in \"Any destination\" menu\n
+ · Ignore hide setting when searching for owned caches\n
+ \n
+ \n
+ <b>2013.04.03</b>\n
+ <b>New Features/Functions:</b>\n
+ · Support of attaching pictures to logs\n
+ · Support of opencaching.de online API in live map and nearby search\n
+ · Support for searching opencaching.nl caches\n
+ · Alphabetical sorting of OSM:Offline maps in map selection\n
+ · Color markers also in trackable logbook\n
+ · Edit cache type filter by clicking on filter bar\n
+ · Inverse sorting of cache lists (hit the same menu again)\n
+ · View pager for trackable activity\n
+ · Menu item to delete past events\n
+ · Settings: Option to ask for list to store caches\n
+ · Change list in cache details\n
+ · Ability to select \"All\" list from main screen\n
+ · Default log type for event caches will be \"Attended\" if \"Will attend\" was logged before\n
+ · Improved and extended cache type detection on live map\n
+ · Waypoints can be marked as visited\n
+ · Possibility to delete offline logs in lists\n
+ · Support of language specific characters in log text equally to the website\n
+ \n
+ <b>Bugfixing:</b>\n
+ · Final flag icon lost when updating cache with self defined final\n
+ · Bad selection in directory chooser\n
+ · Log type \"Retract Listing\" now parsed correctly\n
+ · Active cache detail page now remembered when rotating device\n
+ · Replaced the term \"GC-Code\" by \"Geocode\"\n
+ · Improvements for light theme\n
+ · Share function uses short URL again\n
+ · Offline log marker now shown after autosave of log\n
+ · GPX export no longer exports waypoints without coordinates\n
+ · Corrections for light scheme on Adnroid 2.x devices\n
+ · Avoid crash if logging page is opened while not connected correctly\n
+ \n
+ <a href="https://github.com/cgeo/cgeo/issues?milestone=9&amp;state=closed">Detailed list of all changes</a>\n
+ \n
+ <b>Known Limitations/Bugs:</b>\n
+ · Live map:\n
+ Approximated coords due to limitations on the GC-website\n
+ Be aware: If navigation is started directly from live map it may also use the approximated coords!\n
+ In fast mode the cache type might be wrong in rare cases\n
+ On low zoom owned/found caches may not be hidden anymore\n
+ · Other:\n
+ On devices with HD display resolution OSM maps might not work. Please use Google maps in this case.\n
+ <b>Old releases</b>\n
+ · Please refer to the release notes on the <a href="http://www.cgeo.org">c:geo-website</a>.\n
+ \n</string>
+</resources>
diff --git a/main/res/values/preference_keys.xml b/main/res/values/preference_keys.xml
new file mode 100644
index 0000000..0d4e4bb
--- /dev/null
+++ b/main/res/values/preference_keys.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- preferences used in settings -->
+ <string name="pref_fakekey_main_screen">fakekey_main_screen</string>
+ <string name="pref_fakekey_services_screen">fakekey_services_screen</string>
+ <string name="pref_fakekey_basicmembers_screen">fakekey_basicmembers_screen</string>
+ <string name="pref_fakekey_ocde_authorization">fakekey_ocde_authorization</string>
+ <string name="pref_fakekey_twitter_authorization">fakekey_twitter_authorization</string>
+ <string name="pref_connectorGCActive">connectorGCActive</string>
+ <string name="pref_username">username</string>
+ <string name="pref_password">password</string>
+ <string name="pref_connectorOCActive">connectorOCActive</string>
+ <string name="pref_pass_vote">pass-vote</string>
+ <string name="pref_twitter">twitter</string>
+ <string name="pref_webDeviceName">webDeviceName</string>
+ <string name="pref_nativeUa">nativeUa</string>
+ <string name="pref_skin">skin</string>
+ <string name="pref_showaddress">showaddress</string>
+ <string name="pref_useenglish">useenglish</string>
+ <string name="pref_units">units</string>
+ <string name="pref_autoloaddesc">autoloaddesc</string>
+ <string name="pref_ratingwanted">ratingwanted</string>
+ <string name="pref_friendlogswanted">friendlogswanted</string>
+ <string name="pref_opendetailslastpage">opendetailslastpage</string>
+ <string name="pref_excludemine">excludemine</string>
+ <string name="pref_excludedisabled">excludedisabled</string>
+ <string name="pref_plainLogs">plainLogs</string>
+ <string name="pref_signature">signature</string>
+ <string name="pref_sigautoinsert">sigautoinsert</string>
+ <string name="pref_trackautovisit">trackautovisit</string>
+ <string name="pref_log_offline">log_offline</string>
+ <string name="pref_offlinemaps">offlinemaps</string>
+ <string name="pref_offlinewpmaps">offlinewpmaps</string>
+ <string name="pref_logimages">logimages</string>
+ <string name="pref_choose_list">choose_list</string>
+ <string name="pref_mapsource">mapsource</string>
+ <string name="pref_mapDirectory">mapDirectory</string>
+ <string name="pref_renderthemepath">renderthemepath</string>
+ <string name="pref_gcshowwaypointsthreshold">gcshowwaypointsthreshold</string>
+ <string name="pref_maptrail">maptrail</string>
+ <string name="pref_defaultNavigationTool">defaultNavigationTool</string>
+ <string name="pref_defaultNavigationTool2">defaultNavigationTool2</string>
+ <string name="pref_gpxExportDir">gpxExportDir</string>
+ <string name="pref_gpxImportDir">gpxImportDir</string>
+ <string name="pref_showcaptcha">showcaptcha</string>
+ <string name="pref_loaddirectionimg">loaddirectionimg</string>
+ <string name="pref_fakekey_preference_backup_info">fakekey_preference_backup_info</string>
+ <string name="pref_fakekey_preference_backup">fakekey_preference_backup</string>
+ <string name="pref_fakekey_preference_restore">fakekey_preference_restore</string>
+ <string name="pref_dbonsdcard">dbonsdcard</string>
+ <string name="pref_debug">debug</string>
+ <!-- preferences used internally -->
+ <string name="pref_temp_twitter_token_secret">temp-token-secret</string>
+ <string name="pref_temp_twitter_token_public">temp-token-public</string>
+ <string name="pref_help_shown">helper</string>
+ <string name="pref_anylongitude">anylongitude</string>
+ <string name="pref_anylatitude">anylatitude</string>
+ <string name="pref_webDeviceCode">webDeviceCode</string>
+ <string name="pref_maplive">maplive</string>
+ <string name="pref_lastmapzoom">mapzoom</string>
+ <string name="pref_lastmaplat">maplat</string>
+ <string name="pref_lastmaplon">maplon</string>
+ <string name="pref_livelist">livelist</string>
+ <string name="pref_lastusedlist">lastlist</string>
+ <string name="pref_cachetype">cachetype</string>
+ <string name="pref_twitter_token_secret">tokensecret</string>
+ <string name="pref_twitter_token_public">tokenpublic</string>
+ <string name="pref_version">version</string>
+ <string name="pref_usecompass">usecompass</string>
+ <string name="pref_mapfile">mfmapfile</string>
+ <string name="pref_memberstatus">memberstatus</string>
+ <string name="pref_coordinputformat">coordinputformat</string>
+ <string name="pref_gccustomdate">gccustomdate</string>
+ <string name="pref_cookiestore">cookiestore</string>
+ <string name="pref_lastdetailspage">lastdetailspage</string>
+ <string name="pref_livemapstrategy">livemapstrategy</string>
+ <string name="pref_hidelivemaphint">hidelivemaphint</string>
+ <string name="pref_livemaphintshowcount">livemaphintshowcount</string>
+ <string name="pref_settingsversion">settingsversion</string>
+ <string name="pref_trackableaction">trackableaction</string>
+ <string name="pref_shareafterexport">shareafterexport</string>
+ <string name="pref_renderthemefile">renderthemefile</string>
+ <string name="pref_logImageScale">logImageScale</string>
+ <string name="pref_ocde_tokensecret">ocde_tokensecret</string>
+ <string name="pref_ocde_tokenpublic">ocde_tokenpublic</string>
+ <string name="pref_temp_ocde_token_secret">ocde-temp-token-secret</string>
+ <string name="pref_temp_ocde_token_public">ocde-temp-token-public</string>
+ <string name="pref_fieldnoteExportDate">fieldnoteExportDate</string>
+</resources>
diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml
index c2195d8..6bb17fd 100644
--- a/main/res/values/strings.xml
+++ b/main/res/values/strings.xml
@@ -2,13 +2,11 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">c:geo</string>
- <string name="app_name_compass">c:geo compass</string>
<!-- basics -->
<string name="cache">Cache</string>
<string name="detail">Details</string>
<string name="search">Search</string>
- <string name="settings">Settings</string>
<string name="helpers">Useful apps</string>
<string name="about">About c:geo</string>
<string name="latitude">Latitude</string>
@@ -16,7 +14,8 @@
<!-- actionbar -->
<string name="action_bar_share_title">Share link to cache</string>
-
+ <string name="settings_titlebar">c:geo Settings</string>
+
<!-- caches -->
<string name="all_types">All Cache Types</string>
<string name="traditional">Traditional Cache</string>
@@ -133,6 +132,8 @@
<string name="log_image_caption">Caption</string>
<string name="log_image_description">Description</string>
<string name="log_image_scale">Scaling</string>
+ <string name="log_password_title">Log Password:</string>
+ <string name="log_hint_log_password">Enter your log password</string>
<string-array name="log_image_scales">
<item>No scaling</item>
@@ -145,32 +146,32 @@
<!-- translation -->
<string name="translate_to_sys_lang">Translate to %s</string>
<string name="translate_to_english">Translate to English</string>
- <string name="translate_length_warning">Translate may fail with large amounts of text.</string>
+ <string name="translate_length_warning">Translation may fail with a large amount of text.</string>
<!-- errors, warnings, info toasts -->
<string name="err_none">OK</string>
<string name="err_start">Communication not started</string>
<string name="err_parse">Failed Login page parsing</string>
- <string name="err_server">Unable to contact Geocaching.com. The website may be down or your Internet connection not working.</string>
+ <string name="err_server">Unable to contact Geocaching.com. The website may be down or your internet connection not working.</string>
<string name="err_login">No Login information stored</string>
<string name="err_login_failed">c:geo can\'t log in.</string>
- <string name="err_login_failed_toast">c:geo can\'t log in. c:geo works offline with Stored caches. Check your Login settings or enable Internet connection.</string>
+ <string name="err_login_failed_toast">c:geo can\'t log in. c:geo works offline with Stored caches. Check Login settings or enable your internet connection.</string>
<string name="err_unknown">Unknown error</string>
<string name="err_comm">Unknown communication error</string>
<string name="err_missing_auth">No username and/or password set.</string>
<string name="err_wrong">Login information incorrect</string>
<string name="err_maintenance">Geocaching.com is down for maintenance. c:geo works offline with Stored caches.</string>
- <string name="err_license">You have not agreed to Geocaching.com license agreement, so c:geo can\'t load cache coordinates.</string>
- <string name="err_unvalidated_account">You must validate your account on Geocaching.com web site first.</string>
+ <string name="err_license">You have not agreed to the Geocaching.com license agreement, so c:geo can\'t load cache coordinates.</string>
+ <string name="err_unvalidated_account">You must validate your account on the Geocaching.com website first.</string>
<string name="err_unpublished">The requested cache is unpublished.</string>
<string name="err_premium_only">This Cache is only available to Geocaching.com Premium Members.</string>
<string name="err_detail_open">c:geo can\'t open geocache details.</string>
<string name="err_detail_cache">c:geo can\'t display the geocache you want. Is it really a geocache?</string>
<string name="err_detail_cache_find">c:geo can\'t find geocache</string>
<string name="err_detail_cache_find_some">c:geo can\'t find that geocache.</string>
- <string name="err_detail_cache_find_any">c:geo can\'t find any geocache.</string>
+ <string name="err_detail_cache_find_any">c:geo can\'t find any geocaches.</string>
<string name="err_detail_cache_forgot">c:geo forgot which geocache you want.</string>
- <string name="err_detail_google_maps_limit_reached">c:geo failed to download static maps. Maybe google maps limit is reached.</string>
+ <string name="err_detail_google_maps_limit_reached">c:geo failed to download static maps. Maybe the Google Maps API limit was reached.</string>
<string name="err_detail_no_spoiler">c:geo found no spoiler images for this cache.</string>
<string name="err_detail_no_map_static">c:geo found no static maps for this cache.</string>
<string name="err_detail_not_load_map_static">c:geo failed to load static maps.</string>
@@ -180,8 +181,7 @@
<string name="err_application_no">c:geo can\'t find any suitable application.</string>
<string name="err_auth_initialize">c:geo failed to initialize authorization process.</string>
<string name="err_auth_process">Authorization process failed.</string>
- <string name="err_cannot_log_visit">c:geo is unable to log your visit. Please log your visit from full cache details screen.</string>
- <string name="err_init_cleared">c:geo can\'t clear login information.</string>
+ <string name="err_cannot_log_visit">c:geo is unable to log your visit. Please log your visit from the full cache details screen.</string>
<string name="err_download_fail">c:geo failed to download caches.</string>
<string name="err_dwld_details_failed">c:geo failed to download cache details.</string>
<string name="err_load_descr_failed">c:geo can\'t load description.</string>
@@ -190,19 +190,19 @@
<string name="err_favorite_failed">Changing favorite status failed.</string>
<string name="err_select_logimage_failed">Selecting an image for the log failed.</string>
<string name="err_acquire_image_failed">Acquiring an image failed.</string>
- <string name="err_tb_display">c:geo can\'t display trackable you want. Is it really a trackable?</string>
+ <string name="err_tb_display">c:geo can\'t display the trackable you want. Is it really a trackable?</string>
<string name="err_tb_details_open">c:geo can\'t open trackable details.</string>
<string name="err_tb_forgot_saw">c:geo forgot which trackable you saw.</string>
<string name="err_tb_find">c:geo can\'t find trackable</string>
<string name="err_tb_find_that">c:geo can\'t find that trackable.</string>
- <string name="err_waypoint_cache_unknown">c:geo doesn\'t know to which cache you want to add waypoint.</string>
+ <string name="err_waypoint_cache_unknown">c:geo doesn\'t know to which cache you want to add a waypoint for.</string>
<string name="err_waypoint_add_failed">c:geo failed to add your waypoint.</string>
<string name="err_point_unknown_position">c:geo can\'t recognize where you are.</string>
<string name="err_point_no_position_given_title">Info required</string>
- <string name="err_point_no_position_given">Fill at least latitude or longitude or distance and bearing. You can also fill all four fields.</string>
+ <string name="err_point_no_position_given">Fill at least latitude and longitude or distance and bearing. You can also fill all four fields.</string>
<string name="err_point_curr_position_unavailable">c:geo still doesn\'t have current coordinates. Please, wait a while…</string>
<string name="err_point_bear_and_dist_title">Need some help?</string>
- <string name="err_point_bear_and_dist">Fill both bearing and distance. Bearing is angle 0 to 360 degrees relative to north. Distance with or without units.</string>
+ <string name="err_point_bear_and_dist">Fill both bearing and distance. Bearing is angle 0 to 360 degrees relative to north. Distance doesn\'t require units.</string>
<string name="err_point_location_error">c:geo can\'t get location of waypoint.</string>
<string name="err_log_load_data">c:geo can\'t load data required to log visit.</string>
<string name="err_log_load_data_again">c:geo can\'t load data required to log visit. Trying again.</string>
@@ -216,20 +216,20 @@
<string name="err_parse_dist">c:geo can\'t parse distance.</string>
<string name="err_parse_lat_lon">c:geo can\'t parse latitude or longitude.</string>
<string name="warn_save_nothing">There is nothing to be saved.</string>
- <string name="warn_no_cache_coord">There is no cache with coordinates.</string>
+ <string name="warn_no_cache_coord">There are no caches with coordinates.</string>
<string name="warn_no_coordinates">No Coordinates given.</string>
<string name="warn_no_keyword">No Keyword given.</string>
<string name="warn_no_username">No Username given.</string>
<string name="warn_search_help_title">Need some help?</string>
<string name="warn_search_help_address">Enter an address or location name. For example use a postal address \"Radlicka 100, Prague, Czech Republic\", a city name \"Berlin\" or just a name of something like \"Yellowstone Park\".</string>
<string name="warn_search_help_gccode">Enter the code for a geocache. For example \"GC1VCAZ\".</string>
- <string name="warn_search_help_keyword">Enter all or part of a geocache name. For example \"Night Cache\".</string>
+ <string name="warn_search_help_keyword">Enter all or part of a geocache\'s name. For example \"Night Cache\".</string>
<string name="warn_search_help_user">Enter a username from Geocaching.com.</string>
<string name="warn_search_help_tb">Enter the code for a trackable. For example \"TB29QMZ\".</string>
- <string name="warn_log_text_fill">Please fill in text for your log.</string>
+ <string name="warn_log_text_fill">Please input some text for your log.</string>
<string name="warn_load_images">c:geo failed to load images.</string>
<string name="warn_invalid_mapfile">The selected map file is not a valid mapsforge version 0.3.0 map file.\nOffline maps are not available.</string>
- <string name="warn_deprecated_mapfile">You are using a deprecated version 0.2.4 map file.\nConsider switching to a version 0.3.0 map.\nWe will drop support for version 0.2.4 in the next release.</string>
+ <string name="warn_deprecated_mapfile">You are using a deprecated version of map file (0.2.4).\nConsider switching to a version 0.3.0 map.\nWe will drop support for version 0.2.4 in the next release.</string>
<string name="warn_nonexistant_mapfile">The selected map file does not exist.\nOffline maps are not available.</string>
<string name="warn_rendertheme_missing">Map theme not found.</string>
<string name="info_log_posted">c:geo successfully submitted the log.</string>
@@ -263,10 +263,10 @@
<string name="advanced_search_button">Search</string>
<string name="stored_caches_button">Stored</string>
<string name="any_button">Any destination</string>
- <string name="unknown_scan">Didn\'t find any geocode in the scan result.</string>
+ <string name="unknown_scan">Didn\'t find any geocodes in the scan result.</string>
<!-- caches -->
- <string name="caches_no_cache">There is no cache</string>
+ <string name="caches_no_cache">No caches here</string>
<string name="caches_more_caches">Load more caches</string>
<string name="caches_more_caches_no">No more caches</string>
<string name="caches_more_caches_loading">Loading caches…</string>
@@ -279,7 +279,7 @@
<item quantity="other">minutes</item>
</plurals>
- <string name="caches_store_offline">Store for Offline</string>
+ <string name="caches_store_offline">Store Offline</string>
<string name="caches_store_selected">Store Selected</string>
<string name="caches_history">History</string>
<string name="caches_on_map">Show on map</string>
@@ -306,7 +306,7 @@
<string name="caches_nearby">Nearby</string>
<string name="caches_manage">Manage</string>
<string name="caches_drop_selected">Drop selected</string>
- <string name="caches_drop_selected_ask">Do you want to remove selected caches from device?</string>
+ <string name="caches_drop_selected_ask">Do you want to remove the selected caches from your device?</string>
<string name="caches_drop_all">Drop all</string>
<string name="caches_drop_all_ask">Do you want to remove all caches from current list?</string>
<string name="caches_drop_stored">Drop stored</string>
@@ -320,7 +320,7 @@
<string name="caches_map_locus">Locus</string>
<string name="caches_map_locus_export">Export to Locus</string>
<string name="caches_recaptcha_title">reCAPTCHA</string>
- <string name="caches_recaptcha_explanation">Please, write text from image. It\'s important to download coordinates of caches. It\'s optional and can be switched off in Settings.</string>
+ <string name="caches_recaptcha_explanation">Please enter the text you see in the image. This enables downloading of cache coordinates, which can be disabled in Settings.</string>
<string name="caches_recaptcha_hint">Text from image</string>
<string name="caches_recaptcha_continue">Continue</string>
<string name="caches_filter">Filter</string>
@@ -350,12 +350,12 @@
<string name="list_dialog_create">Create</string>
<string name="list_dialog_cancel">Cancel</string>
<string name="list_dialog_create_ok">A new list was created</string>
- <string name="list_dialog_create_err">c:geo failed to create new list</string>
+ <string name="list_dialog_create_err">c:geo failed to create the new list</string>
<string name="list_dialog_remove_title">Remove list</string>
- <string name="list_dialog_remove_description">Do you want to remove the current list of caches? All caches remaining in the list will be moved to \"Stored\".</string>
+ <string name="list_dialog_remove_description">Do you want to remove the current list? All caches remaining in the list will be moved to \"Stored\".</string>
<string name="list_dialog_remove">Remove</string>
<string name="list_dialog_remove_ok">The list was removed</string>
- <string name="list_dialog_remove_err">c:geo failed to remove current list</string>
+ <string name="list_dialog_remove_err">c:geo failed to remove the current list</string>
<string name="list_dialog_rename_title">Rename list</string>
<string name="list_dialog_rename">Rename</string>
@@ -367,30 +367,51 @@
<string name="about_donation_more">Donate\ndevelopment</string>
<string name="about_contributors">Contributors</string>
- <!-- init -->
- <string name="init_geocaching">Geocaching.com</string>
- <string name="init_gc_activate">Activate Geocaching.com on live-map and in searches</string>
- <string name="init_oc">opencaching.de</string>
- <string name="init_oc_activate">Activate opencaching.de on live-map and in searches</string>
+ <!-- settings -->
+ <string name="settings_title_services">Services</string>
+ <string name="settings_title_appearance">Appearance</string>
+ <string name="settings_title_cachedetails">Cache Details</string>
+ <string name="settings_title_offlinedata">Offline Data</string>
+ <string name="settings_title_logging">Logging</string>
+ <string name="settings_title_map">Map</string>
+ <string name="settings_title_map_data">Map Data</string>
+ <string name="settings_title_map_content">Map Content</string>
+ <string name="settings_title_gpx">GPX</string>
+ <string name="settings_title_basicmembers">Basic Members</string>
+ <string name="settings_title_navigation">Navigation</string>
+ <string name="settings_title_system">System</string>
+
+ <string name="settings_category_browser">Browser</string>
+ <string name="settings_category_logging_other">Other Logging Options</string>
+
+ <string name="settings_goto_url_button">more …</string>
+
+ <string name="settings_title_gc">Geocaching.com</string>
+ <string name="settings_activate_gc">Activate</string>
+ <string name="settings_gc_legal_note">To use the services of geocaching.com, you must agree to the Groundspeak Terms of Use.</string>
+ <string name="settings_info_facebook_login_title">Facebook Login</string>
+ <string name="settings_info_facebook_login">You can\'t make c:geo login to geocaching.com with your Facebook account. But there is a simple workaround …</string>
+ <string name="init_oc">Opencaching.de</string>
+ <string name="settings_activate_oc">Activate</string>
<string name="init_oc_de_description">Authorize c:geo with opencaching.de to search for caches and access/filter your found caches.</string>
<string name="init_register_oc_de">Authorize c:geo</string>
+ <string name="init_reregister_oc_de">Authorize c:geo again</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
+ <string name="settings_activate_twitter">Activate</string>
<string name="init_username">Username</string>
<string name="init_password">Password</string>
- <string name="init_passvote">Password</string>
- <string name="init_login">Check and save Login</string>
+ <string name="init_login">Check Login</string>
<string name="init_login_popup">Login</string>
<string name="init_login_popup_working">Logging in…</string>
<string name="init_login_popup_ok">Login OK</string>
<string name="init_login_popup_failed">Login failed</string>
<string name="init_login_popup_failed_reason">Login failed:</string>
+ <string name="init_login_popup_not_authorized">Not authorized</string>
<string name="init_twitter_authorize">Authorize c:geo</string>
- <string name="init_twitter_publish">Publish status when a cache has been found</string>
+ <string name="init_twitter_reauthorize">Authorize c:geo again</string>
<string name="init_signature">Signature</string>
- <string name="init_signature_help_button">Help</string>
- <string name="init_signature_help_title">Signature Tips and Tricks</string>
- <string name="init_signature_help_text">Enter your signature to use it in the log text.\nSpecial strings that can be used are: [DATE] , [TIME], [DATETIME], [USER] &amp; [NUMBER].\nThese will be expanded when the signature is inserted.</string>
+ <string name="init_signature_help_text">Enter a signature to be appended to your logs.\nSpecial strings that can be used are: [DATE] , [TIME], [DATETIME], [USER] &amp; [NUMBER].\nThese will be expanded when the signature is inserted.</string>
<string name="init_signature_template_button">Insert Template</string>
<string name="init_signature_template_date">Date</string>
<string name="init_signature_template_time">Time</string>
@@ -398,39 +419,49 @@
<string name="init_signature_template_user">User</string>
<string name="init_signature_template_number">Number</string>
<string name="init_signature_template_owner">Owner</string>
- <string name="init_details">Cache Details</string>
- <string name="init_ratingwanted">Load cache rating from GCvote.com</string>
- <string name="init_elevationwanted">Load cache elevation data</string>
- <string name="init_friendlogswanted">Load additional logbook page for logs from friends</string>
- <string name="init_openlastdetailspage">Open details with last used page</string>
- <string name="init_autoload">Auto-loading of long description</string>
- <string name="init_other">Other Options</string>
- <string name="init_skin">Use light skin\n(Restart needed)</string>
- <string name="init_address">Show address instead of coordinates on main screen</string>
- <string name="init_captcha">Show CAPTCHA if necessary (only Basic Member)</string>
- <string name="init_useenglish">Use English language for c:geo\n(Restart needed)</string>
- <string name="init_exclude">Exclude own and found caches</string>
- <string name="init_showwaypoints">Show Waypoints on map</string>
+ <string name="init_ratingwanted">GCvote Rating</string>
+ <string name="init_summary_ratingwanted">Load cache rating from GCvote.com</string>
+ <string name="init_friendlogswanted">Show Friends\' Logs</string>
+ <string name="init_summary_friendlogswanted">Display additional logbook page for logs from friends</string>
+ <string name="init_openlastdetailspage">Last Details Page</string>
+ <string name="init_summary_openlastdetailspage">Open details with last used page</string>
+ <string name="init_autoload">Long Description</string>
+ <string name="init_summary_autoload">Always load long description</string>
+ <string name="init_skin">Light Skin</string>
+ <string name="init_summary_skin">Use light skin (Restart needed)</string>
+ <string name="init_address">Show Address</string>
+ <string name="init_summary_address">Show address instead of coordinates on main screen</string>
+ <string name="init_captcha">Show CAPTCHA</string>
+ <string name="init_summary_captcha">Show CAPTCHA if necessary (only Basic Member)</string>
+ <string name="init_useenglish">Use English</string>
+ <string name="init_summary_useenglish">Use English language for c:geo (Restart needed)</string>
+ <string name="init_exclude">Exclude Own and Found</string>
+ <string name="init_summary_exclude">Exclude caches you own or have found</string>
+ <string name="init_showwaypoints">Show Waypoints</string>
<string name="init_showwaypoint_description">If less than the given amount of caches are displayed on the map, their waypoints are shown additionally.</string>
- <string name="init_disabled">Exclude disabled caches</string>
- <string name="init_offline">Store cache static maps for offline use</string>
- <string name="init_offline_wp">Store waypoints static maps for offline use</string>
- <string name="init_save_log_img">Save Images from Logs</string>
- <string name="init_units">Use Imperial Units instead of Metric Units</string>
- <string name="init_log_offline">Enable Offline Logging\n(Don\'t show online Log screen when logging, don\'t send the Log online)</string>
- <string name="init_choose_list">Ask for list when storing caches</string>
- <string name="init_livelist">Show Direction to caches in the list</string>
- <string name="init_altitude">Altitude Correction</string>
- <string name="init_altitude_description">If your GPS is calculating a wrong altitude, you can correct it with a positive or negative number. The correction always has to be given in meters.</string>
- <string name="init_clear">Clear Login</string>
- <string name="init_cleared">c:geo cleared login information.</string>
+ <string name="init_disabled">Exclude Disabled</string>
+ <string name="init_summary_disabled">Exclude disabled caches</string>
+ <string name="init_offline">Static Maps</string>
+ <string name="init_summary_offline">Store cache static maps for offline use</string>
+ <string name="init_offline_wp">Static Maps (WP)</string>
+ <string name="init_summary_offline_wp">Store waypoints static maps for offline use</string>
+ <string name="init_save_log_img">Save Images</string>
+ <string name="init_summary_save_log_img">Save Images from Logs</string>
+ <string name="init_units">Use Imperial Units</string>
+ <string name="init_summary_units">Use Imperial Units instead of Metric Units</string>
+ <string name="init_log_offline">Offline Logging</string>
+ <string name="init_summary_log_offline">Enable Offline Logging (Wont\'t show online log screen when logging, won\'t upload logs)</string>
+ <string name="init_choose_list">Ask for List</string>
+ <string name="init_summary_choose_list">Ask which list to store caches in</string>
+ <string name="init_livelist">Show Direction</string>
+ <string name="init_summary_livelist">Show direction of caches in the list</string>
<string name="init_backup">Backup</string>
<string name="init_backup_backup">Backup</string>
<string name="init_backup_running">Creating backup of cache database…</string>
- <string name="init_backup_note">Please note, that this option will backup or restore the database containing caches and waypoints, but not your settings.\nYour Login data or passwords will never leave this application.</string>
+ <string name="init_backup_note">Please note that this feature will backup/restore a database containing caches and waypoints, but not your settings.\nYour Login data and passwords will never leave this application.</string>
<string name="init_backup_restore">Restore</string>
- <string name="init_backup_success">Database of c:geo was successfully copied to the file</string>
- <string name="init_backup_failed">Backup of database of c:geo failed.</string>
+ <string name="init_backup_success">c:geo\'s database was successfully copied to:</string>
+ <string name="init_backup_failed">Backup of c:geo\'s database failed.</string>
<string name="init_backup_unnecessary">Database is empty, no backup necessary.</string>
<string name="init_restore_success">Restoration completed.</string>
<string name="init_restore_failed">Restoration failed.</string>
@@ -438,36 +469,42 @@
<string name="init_restore_confirm">Database is empty. Do you want to restore the database backup?</string>
<string name="init_backup_last">Available backup from</string>
<string name="init_backup_last_no">There is no file with a backup.</string>
- <string name="init_mapsources">Map Sources</string>
- <string name="init_mapsources_description">Here you can select the source for your maps. As an alternative to Google maps various OpenStreetMap styles are available and even offline map files (See <a href="http://code.google.com/p/mapsforge/">http://code.google.com/p/mapsforge/</a> for details).\nFurthermore selectable themes for offline maps are supported.</string>
+ <string name="settings_info_offline_maps_title">Info on Offline Maps</string>
+ <string name="settings_info_offline_maps">c:geo supports maps for offline use. You can download maps from Mapsforge or even create your own maps from OSM data.</string>
+ <string name="settings_info_themes_title">Info on Map Themes</string>
+ <string name="settings_info_themes">c:geo supports custom themes for offline maps. These can be used to change the color style of the map (e.g. to have a nightview map) or to highlight certain objects like cycle paths or height lines within the map.</string>
<string name="init_mapsource_select">Select Map Source</string>
<string name="init_map_directory_description">Directory with offline maps</string>
<string name="init_gpx_exportdir">GPX Export Directory</string>
<string name="init_gpx_importdir">GPX Import Directory</string>
- <string name="init_gpx_exportdir_description">Here you can select the directory for GPX exports.</string>
- <string name="init_gpx_importdir_description">Here you can select the directory for GPX imports.</string>
- <string name="init_maptrail">Show trail on Map</string>
+ <string name="init_maptrail">Show Trail</string>
+ <string name="init_summary_maptrail">Show trail on Map</string>
<string name="init_share_after_export">Open share menu after GPX export</string>
- <string name="init_trackautovisit">Set trackables to \"Visited\" as a default</string>
- <string name="init_sigautoinsert">Insert signature automatically</string>
- <string name="init_loaddirectionimg">Load direction-image if necessary (only Basic Member)</string>
+ <string name="init_trackautovisit">Visit TBs</string>
+ <string name="init_summary_trackautovisit">Set trackables to \"Visited\" by default</string>
+ <string name="init_sigautoinsert">Insert automatically</string>
+ <string name="init_loaddirectionimg">Direction Image</string>
+ <string name="init_summary_loaddirectionimg">Download directional arrow image if necessary (only required for Basic Members)</string>
<string name="init_default_navigation_tool">Default Navigation</string>
+ <string name="init_secondary_navigation_tool">Secondary Navigation</string>
<string name="init_default_navigation_tool_description">Here you can select your preferred navigation tool.</string>
<string name="init_default_navigation_tool_select">Select tool</string>
- <string name="init_default_navigation_tool_2_description">Here you can select your second preferred navigation tool. It\'s activated by long clicking the navigation icon next to the title of the cache.</string>
+ <string name="init_default_navigation_tool_2_description">Here you can select your second preferred navigation tool. Activate it by long pressing the navigation icon next to the title of the cache.</string>
<string name="init_debug_title">Debug information</string>
- <string name="init_debug_note">c:geo can generate a lot of debugging information. While this information is generally not useful for c:geo users, developers may need to generate this information in order to analyze a bug. In this case, they will ask you to check the box below and send them the log file.</string>
+ <string name="init_debug_note">c:geo can generate a lot of debugging information. While this information is generally not useful for c:geo users, developers may need you to generate this information in order to analyze a bug. In this case, they will ask you to check the box below and send them the resulting log file.</string>
<string name="init_debug">Generate debug information</string>
<string name="init_dbonsdcard_title">Database location</string>
- <string name="init_dbonsdcard_note">You may store the database of c:geo on the external storage medium. If you do so you will save internal memory, but you may loose a bit of performance and c:geo will not work if your sdcard is not available.</string>
- <string name="init_dbonsdcard">Database on external storage</string>
+ <string name="init_dbonsdcard_note">You may store the database of c:geo on your external storage medium. Doing so will save internal memory, but you may lose a bit of performance and c:geo will not work if your SD card isn\'t available.</string>
+ <string name="init_dbonsdcard">On external storage</string>
<string name="init_dbmove_dbmove">Moving Database</string>
<string name="init_dbmove_running">Moving Database</string>
<string name="init_dbmove_success">Successfully moved the database.</string>
<string name="init_dbmove_failed">Failed to move database</string>
- <string name="init_plain_logs">Display log entries without colors</string>
- <string name="init_use_native_ua">Identify as Android browser. Solves login problems of some network providers.</string>
- <string name="init_rendertheme_folder">Directory with custom offline map themes (optional)</string>
+ <string name="init_plain_logs">Plain Logs</string>
+ <string name="init_summary_plain_logs">Display log entries without colors</string>
+ <string name="init_use_native_ua">Android browser</string>
+ <string name="init_summary_use_native_ua">Identify as Android browser. Solves login problems when using certain network providers.</string>
+ <string name="init_rendertheme_folder">Map Themes Directory</string>
<!-- map sources -->
<string name="map_source_google_map">Google: Map</string>
@@ -476,13 +513,14 @@
<string name="map_source_osm_cyclemap">OSM: Cyclemap</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Send to c:geo</string>
- <string name="init_sendToCgeo_name">Your device name:</string>
- <string name="init_sendToCgeo_description"><b>Send2cgeo</b> allows you to receive caches directly from the geocaching site using a special plugin for Firefox or Chrome. Before registration please read <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. You only need to register if you want to use send2cgeo. c:geo will work normal even without registering your device.</string>
+ <string name="settings_info_send2cgeo_title">Info on send2cgeo</string>
+ <string name="init_sendToCgeo_name">Your device name</string>
+ <string name="init_sendToCgeo_description"><b>Send2c:geo</b> allows you to send caches to your Android device directly from geocaching.com using a special plugin for Firefox or Chrome. Before registering, please see <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. You only need to register if you want to use send2c:geo. c:geo will work normally without registering your device.</string>
<string name="init_sendToCgeo_register">Request Registration</string>
- <string name="init_sendToCgeo_registering">Registering your device for "Send to c:geo"…</string>
- <string name="init_sendToCgeo_register_ok">Registration successful. PIN code is ####. Use it on c:geo website to add this device to your browser.</string>
+ <string name="init_sendToCgeo_registering">Registering your device for Send2c:geo…</string>
+ <string name="init_sendToCgeo_register_ok">Registration successful. PIN code is ####. Use it on the c:geo website to connect this device to your browser.</string>
<string name="init_sendToCgeo_register_fail">Registration failed.</string>
- <string name="sendToCgeo_download_fail">c:geo failed to download caches. No internet connection or send2c:geo is down.</string>
+ <string name="sendToCgeo_download_fail">c:geo failed to download caches. No internet connection, or send2c:geo is down.</string>
<string name="sendToCgeo_no_registration">c:geo failed to download caches. Registration for send2c:geo expired. Please register in settings.</string>
<!-- auth twitter -->
@@ -494,10 +532,10 @@
<string name="auth_finish">Finish</string>
<string name="auth_dialog_wait">Waiting for Twitter…</string>
<string name="auth_dialog_pin_title">PIN code</string>
- <string name="auth_dialog_pin_message">Please type in PIN code provided by the Twitter website. It is mandatory to complete the authorization.</string>
+ <string name="auth_dialog_pin_message">Please type in the PIN code provided by Twitter. It is required to complete authorization.</string>
<string name="auth_dialog_completed">c:geo is now authorized to post on Twitter.</string>
- <string name="about_auth_1">The following process allows <b>c:geo</b> to access Twitter - if agreed.</string>
- <string name="about_auth_2">A click on the \"authorize c:geo\" button will start the process. This process will open up a web browser with a Twitter page. Login on this page and allow <b>c:geo</b> to access your account. If this is accepted, Twitter will show up a numeric PIN code. This PIN must be pasted into <b>c:geo</b> and confirmed. That\'s all.</string>
+ <string name="about_auth_1">The following process will allow <b>c:geo</b> to access Twitter.</string>
+ <string name="about_auth_2">Pressing the \"authorize c:geo\" button will start the process. This process will open up a web browser with a Twitter page. Log in on this page and allow <b>c:geo</b> to access your account. After this, Twitter will show up a numeric PIN code. This PIN must be pasted into <b>c:geo</b> and confirmed. That\'s all.</string>
<!-- auth opencaching -->
<string name="auth_ocde">opencaching.de</string>
@@ -508,14 +546,13 @@
<string name="auth_finish_oc">Finish</string>
<string name="auth_dialog_wait_oc">Waiting for %s…</string>
<string name="auth_dialog_pin_title_oc">PIN code</string>
- <string name="auth_dialog_pin_message_oc">Please type in PIN code provided by the %s website. It is mandatory to complete the authorization.</string>
+ <string name="auth_dialog_pin_message_oc">Please type in PIN code provided by the %s website. It is required to complete authorization.</string>
<string name="auth_dialog_completed_oc">c:geo is now authorized to interact with %s.</string>
- <string name="about_auth_1_oc">The following process allows <b>c:geo</b> to access %s - if agreed.</string>
- <string name="about_auth_2_oc">A click on the \"authorize c:geo\" button will start the process. This process will open up a web browser with a %s page. Login on this page and allow <b>c:geo</b> to access your account. If this is accepted, %s will show up a numeric PIN code. This PIN must be pasted into <b>c:geo</b> and confirmed. That\'s all.</string>
+ <string name="about_auth_1_oc">The following process allows <b>c:geo</b> to access %s.</string>
+ <string name="about_auth_2_oc">Pressing the \"authorize c:geo\" button will start the process. This process will open up a web browser with a %s page. Log in on this page and allow <b>c:geo</b> to access your account. After this, %s will show up a numeric PIN code. This PIN must be pasted into <b>c:geo</b> and confirmed. That\'s all.</string>
<!-- cache -->
<plurals name="cache_counts">
- <item quantity="zero">No cache</item>
<item quantity="one">One cache</item>
<item quantity="other">%1$d caches</item>
</plurals>
@@ -540,6 +577,10 @@
<string name="cache_log_image_default_title">Photo</string>
<string name="cache_personal_note">Personal note</string>
<string name="cache_personal_note_edit">Edit</string>
+ <string name="cache_personal_note_upload">Upload</string>
+ <string name="cache_personal_note_uploading">Uploading personal note</string>
+ <string name="cache_personal_note_upload_done">Personal note uploaded</string>
+ <string name="cache_personal_note_upload_cancelled">Personal note upload cancelled</string>
<string name="cache_personal_note_unstored">Cache not stored</string>
<string name="cache_personal_note_store">The cache will be stored first to enable personal notes.</string>
<string name="cache_description">Description</string>
@@ -575,7 +616,6 @@
<string name="cache_dialog_loading_details_status_logs">Loading logs</string>
<string name="cache_dialog_loading_details_status_waypoints">Processing waypoints</string>
<string name="cache_dialog_loading_details_status_gcvote">Loading GCVote</string>
- <string name="cache_dialog_loading_details_status_elevation">Loading elevation data</string>
<string name="cache_dialog_loading_details_status_cache">Caching Data</string>
<string name="cache_dialog_loading_details_status_render">Render view</string>
<string name="cache_dialog_offline_save_title">Offline</string>
@@ -595,6 +635,7 @@
<string name="cache_menu_navigate">Navigate</string>
<string name="cache_menu_navigation_drive">Navigation (Driving)</string>
<string name="cache_menu_navigation_walk">Navigation (Walking)</string>
+ <string name="cache_menu_navigation_bike">Navigation (Bike)</string>
<string name="cache_menu_maps_directions">Google Maps Directions</string>
<string name="cache_menu_radar">Radar</string>
<string name="cache_menu_map">Map</string>
@@ -612,7 +653,7 @@
<string name="cache_menu_details">Details</string>
<string name="cache_menu_refresh">Refresh</string>
<string name="cache_menu_share">Share cache</string>
- <string name="cache_menu_move_list">Move to other list</string>
+ <string name="cache_menu_move_list">Move to different list</string>
<string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
@@ -634,7 +675,7 @@
<string name="cache_difficulty">Difficulty</string>
<string name="cache_terrain">Terrain</string>
<string name="cache_rating">Rating</string>
- <string name="cache_own_rating">Own Rating</string>
+ <string name="cache_own_rating">Your Rating</string>
<string name="cache_rating_of">of</string>
<string name="cache_favorite">Favorite</string>
<string name="cache_owner">Owner</string>
@@ -658,7 +699,6 @@
<string name="cache_listed_on">Listed on %s</string>
<!-- editor dialog -->
- <string name="editor_save">Save</string>
<!-- file list base -->
<string name="file_searching_in">Searching for files\nin</string>
@@ -685,11 +725,11 @@
<string name="gpx_import_error_io">Can\'t read file</string>
<string name="gpx_import_error_parser">Bad File format</string>
<string name="gpx_import_error_unexpected">Unexpected error</string>
- <string name="gpx_import_confirm">Do you want to import the GPX file into c:geo?</string>
<string name="gpx_import_canceled">GPX import was canceled</string>
<string name="gpx_import_delete_title">Delete file</string>
<string name="gpx_import_delete_message">Do you want to delete %s?</string>
-
+ <string name="gpx_import_select_list_title">Import GPX to list</string>
+
<!-- map file select -->
<string name="map_file_select_title">Select map file</string>
@@ -750,18 +790,20 @@
<string name="map_map">Map</string>
<string name="map_live">Live map</string>
<string name="map_view_map">Map view</string>
- <string name="map_modes">Map modes</string>
+ <string name="map_modes">Map settings</string>
<string name="map_trail_show">Show trail</string>
<string name="map_trail_hide">Hide trail</string>
<string name="map_circles_show">Show circles</string>
<string name="map_circles_hide">Hide circles</string>
+ <string name="map_mycaches_show">Show own/found caches</string>
+ <string name="map_mycaches_hide">Hide own/found caches</string>
<string name="map_theme_builtin">Default</string>
<string name="map_theme_select">Select map theme</string>
<string name="map_live_enable">Enable live</string>
<string name="map_live_disable">Disable live</string>
<string name="map_static_title">Static maps</string>
<string name="map_static_loading">Loading static maps…</string>
- <string name="map_token_err">Since c:geo is able to download only partial data, coordinates of caches could be inaccurate.</string>
+ <string name="map_token_err">Since c:geo is only able to download partial data, coordinates of caches could be inaccurate.</string>
<string name="map_as_list">Show as list</string>
<string name="map_strategy">Strategy</string>
<string name="map_strategy_title">Live Map strategy</string>
@@ -769,7 +811,7 @@
<string name="map_strategy_fast">Fast</string>
<string name="map_strategy_auto">Speed dependent</string>
<string name="map_strategy_detailed">Detailed</string>
- <string name="live_map_notification">On the new live map coordinates may not always be precise. Possibly imprecise coordinates are marked by an orange circle.\nOpening the cache details or saving the cache for offline use will always obtain precise coordinates.\n\nMore information on all changes can be found on the \"About c:geo\" page inside the app.</string>
+ <string name="live_map_notification">Coordinates on the live map may not always be precise. Possibly imprecise coordinates are marked by an orange circle.\nOpening the cache details or saving the cache for offline use will always obtain precise coordinates.\n\nMore information can be found on the \"About c:geo\" page inside the app.</string>
<string name="live_map_note_dontshow">Do not show again</string>
<!-- search -->
@@ -815,11 +857,11 @@
<string name="trackable_spotted_in_cache">In</string>
<string name="trackable_spotted_at_user">In the hands of</string>
<string name="trackable_spotted_unknown_location">Unknown location</string>
- <string name="trackable_spotted_owner">In the hands of the owner</string>
+ <string name="trackable_spotted_owner">In the hands of its owner</string>
<string name="trackable_origin">Origin</string>
<string name="trackable_unknown">Unknown</string>
<string name="trackable_released">Released</string>
- <string name="trackable_distance">Travelled</string>
+ <string name="trackable_distance">Traveled</string>
<string name="trackable_touch">Touch</string>
<string name="trackable_not_activated">Trackable not activated</string>
@@ -854,17 +896,17 @@
<!-- helpers -->
<string name="helper_calendar_title">c:geo calendar add-on</string>
<string name="helper_calendar_missing">c:geo calendar add-on not installed.</string>
- <string name="helper_calendar_description">Enables you to export event caches into the calendar on your device.</string>
+ <string name="helper_calendar_description">Enables you to export event caches to the calendar on your device.</string>
<string name="helper_locus_title">Locus</string>
- <string name="helper_locus_description">Simple usable application showing Online maps and allowing to download them directly into Offline mode (raster maps only). Also support track recording, POI handling and many other useful functions.</string>
+ <string name="helper_locus_description">Simple, usable application which shows online maps and allows you to download them directly into Offline mode (raster maps only). Also supports track recording, POI handling and many other useful functions.</string>
<string name="helper_gpsstatus_title">GPS Status</string>
- <string name="helper_gpsstatus_description">You can use radar from this application with c:geo. It also offers a lot of other GPS-related information.</string>
+ <string name="helper_gpsstatus_description">You can use the radar in this application in conjunction with c:geo. It also offers a lot of other GPS-related information.</string>
<string name="helper_bluetoothgps_title">Bluetooth GPS</string>
- <string name="helper_bluetoothgps_description">Allows you to use an external GPS receiver to get more precise location and can spare battery of your device.</string>
+ <string name="helper_bluetoothgps_description">Allows you to use an external GPS receiver to get more precise location data, and can spare battery of your device.</string>
<string name="helper_barcode_title">Barcode Scanner</string>
- <string name="helper_barcode_description">There are Greasemonkey scripts and websites which allow to display a geocode as barcode. With this app c:geo can read that geocode directly from the screen of your computer.</string>
+ <string name="helper_barcode_description">There are Greasemonkey scripts and websites which enable display of geocodes as barcodes. With this app, c:geo can read such geocodes directly from the screen of your computer.</string>
<string name="helper_pocketquery_title">Pocket Query Creator</string>
- <string name="helper_pocketquery_description">Allows easy creation and download of Pocket Queries centred on your current position or a point selected from a map. Requires a premium Geocaching.com account.</string>
+ <string name="helper_pocketquery_description">Allows easy creation and download of Pocket Queries centred on your current position or a point selected from a map. Requires a Premium Geocaching.com account.</string>
<!-- add-ons -->
<string name="addon_missing_title">Missing Add-On</string>
@@ -875,14 +917,14 @@
<string name="export_exportedto">exported to</string>
<string name="export_failed">Export failed</string>
<string name="export_fieldnotes">Field Notes</string>
- <string name="export_fieldnotes_info">Field Notes will be exported to /sdcard/field-notes with current date and time as file name.</string>
+ <string name="export_fieldnotes_info">Field Notes will be exported to /sdcard/field-notes with the current date and time as their file name.</string>
<string name="export_fieldnotes_upload">Upload to geocaching.com</string>
<string name="export_fieldnotes_uploading">Uploading…</string>
<string name="export_fieldnotes_upload_success">Upload to geocaching.com successful</string>
<string name="export_fieldnotes_onlynew">Only since last export</string>
<string name="export_fieldnotes_creating">Creating Field Notes…</string>
<string name="export_gpx">GPX</string>
- <string name="export_gpx_info">The GPX file will be exported to %1$s with current date and time as file name.</string>
+ <string name="export_gpx_info">The GPX file will be exported to %1$s with the current date and time as its file name.</string>
<string name="export_gpx_to">Send exported GPX to</string>
<!-- GC attributes -->
@@ -949,13 +991,13 @@
<string name="attribute_touristok_yes">Tourist friendly</string>
<string name="attribute_touristok_no">Not tourist friendly</string>
<string name="attribute_frontyard_yes">Private residence</string>
- <string name="attribute_frontyard_no">No private residence</string>
+ <string name="attribute_frontyard_no">Not a private residence</string>
<string name="attribute_teamwork_yes">Teamwork required</string>
<string name="attribute_teamwork_no">No teamwork required</string>
<string name="attribute_landf_yes">Lost and found tour</string>
- <string name="attribute_landf_no">No lost and found tour</string>
+ <string name="attribute_landf_no">Not a lost and found tour</string>
<string name="attribute_partnership_yes">Partnership cache</string>
- <string name="attribute_partnership_no">No partnership cache</string>
+ <string name="attribute_partnership_no">Not a partnership cache</string>
<string name="attribute_fee_yes">Access or parking fee required</string>
<string name="attribute_fee_no">Access or parking fee not required</string>
<string name="attribute_rappelling_yes">Climbing gear required</string>
@@ -991,7 +1033,7 @@
<string name="attribute_hunting_yes">Hunting</string>
<string name="attribute_hunting_no">No hunting</string>
<string name="attribute_danger_yes">Dangerous area</string>
- <string name="attribute_danger_no">No dangerous area</string>
+ <string name="attribute_danger_no">Not a dangerous area</string>
<string name="attribute_thorn_yes">Thorns</string>
<string name="attribute_thorn_no">No thorns</string>
<string name="attribute_wheelchair_yes">Wheelchair accessible</string>
@@ -1017,7 +1059,7 @@
<string name="attribute_food_yes">Food nearby</string>
<string name="attribute_food_no">No food nearby</string>
<string name="attribute_oc_only_yes">Only loggable at Opencaching</string>
- <string name="attribute_oc_only_no">Not only loggable at Opencaching</string>
+ <string name="attribute_oc_only_no">Not loggable only at Opencaching</string>
<string name="attribute_link_only_yes">Hyperlink to another caching portal only</string>
<string name="attribute_link_only_no">Not only a hyperlink to another caching portal</string>
<string name="attribute_letterbox_yes">Letterbox (needs stamp)</string>
@@ -1029,7 +1071,7 @@
<string name="attribute_swamp_yes">Swamp or marsh</string>
<string name="attribute_swamp_no">No swamp or marsh</string>
<string name="attribute_hills_yes">Hilly area</string>
- <string name="attribute_hills_no">No hilly area</string>
+ <string name="attribute_hills_no">Not a hilly area</string>
<string name="attribute_easy_climbing_yes">Lightweight climbing</string>
<string name="attribute_easy_climbing_no">No lightweight climbing</string>
<string name="attribute_poi_yes">Point of interest</string>
@@ -1068,8 +1110,8 @@
<string name="attribute_investigation_no">No investigation</string>
<string name="attribute_puzzle_yes">Puzzle / Mystery</string>
<string name="attribute_puzzle_no">No puzzle / mystery</string>
- <string name="attribute_arithmetic_yes">Arithmetical problem</string>
- <string name="attribute_arithmetic_no">No arithmetical problem</string>
+ <string name="attribute_arithmetic_yes">Arithmetic problem</string>
+ <string name="attribute_arithmetic_no">No arithmetic problem</string>
<string name="attribute_other_cache_yes">Other cache type</string>
<string name="attribute_other_cache_no">No other cache type</string>
<string name="attribute_ask_owner_yes">Ask owner for start conditions</string>
@@ -1080,7 +1122,6 @@
<string name="attribute_geotour_no">Not part of GeoTour</string>
<!-- next things -->
- <string name="legal_note">To use the services of Geocaching.com, terms and conditions of the <a href="http://www.geocaching.com/about/termsofuse.aspx">Groundspeak disclaimer</a> have to be agreed.</string>
<string name="quote">To make geocaching easier, to make users lazier.</string>
<string name="powered_by">carnero</string>
<!-- Note: Links here are just for appearance. See AboutActivity to make changes -->
@@ -1098,15 +1139,33 @@
<string name="status_new_rc" tools:ignore="UnusedResources">New release candidate available.\nClick to install.</string>
<string name="status_geocaching_change" tools:ignore="UnusedResources">Recent changes on geocaching.com broke c:geo.\nWe are working on it, check again soon.</string>
<string name="status_geocaching_livemap" tools:ignore="UnusedResources">Recent changes on geocaching.com broke the live map feature.\nWe are working on it, check again soon.</string>
+ <string name="status_closeout_warning" tools:ignore="UnusedResources">You appear to be using a version of Android older than 2.1. Future releases of c:geo might no longer be available for your device.</string>
<!-- text-to-speech for compass view -->
<string name="tts_service">Talking compass</string>
<string name="tts_start">Start talking</string>
<string name="tts_stop">Stop talking</string>
- <string name="tts_kilometers">%s kilometers</string>
- <string name="tts_meters">%s meters</string>
- <string name="tts_miles">%s miles</string>
- <string name="tts_feet">%s feet</string>
+ <string name="tts_one_kilometer">one kilometer</string>
+ <plurals name="tts_kilometers">
+ <item quantity="one">%s kilometer</item>
+ <item quantity="other">%s kilometers</item>
+ </plurals>
+ <string name="tts_one_meter">one meter</string>
+ <plurals name="tts_meters">
+ <item quantity="one">%s meter</item>
+ <item quantity="other">%s meters</item>
+ </plurals>
+ <string name="tts_one_mile">one mile</string>
+ <plurals name="tts_miles">
+ <item quantity="one">%s mile</item>
+ <item quantity="other">%s miles</item>
+ </plurals>
+ <string name="tts_one_foot">one foot</string>
+ <plurals name="tts_feet">
+ <item quantity="one">%s foot</item>
+ <item quantity="other">%s feet</item>
+ </plurals>
+ <string name="tts_one_oclock">one o\'clock</string>
<string name="tts_oclock">%s o\'clock</string>
<!-- various -->
@@ -1117,4 +1176,4 @@
<item quantity="other">%d days ago</item>
</plurals>
-</resources> \ No newline at end of file
+</resources>
diff --git a/main/res/values/strings_not_translatable.xml b/main/res/values/strings_not_translatable.xml
index 1f9c4cf..d9f803a 100644
--- a/main/res/values/strings_not_translatable.xml
+++ b/main/res/values/strings_not_translatable.xml
@@ -1,177 +1,100 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
- <string-array name="waypoint_coordinate_formats" translatable="false">
- <item>@string/waypoint_coordinate_formats_plain</item>
- <item>DDD.DDDDD°</item>
- <item>DDD°MM.MMM\'</item>
- <item>DDD°MM\'SS.SSS\"</item>
- </string-array>
-
- <!-- distance units -->
- <string name="unit_m" translatable="false">m</string>
- <string name="unit_km" translatable="false">km</string>
- <string name="unit_ft" translatable="false">ft</string>
- <string name="unit_yd" translatable="false">yd</string>
- <string name="unit_mi" translatable="false">mi</string>
-
- <!-- distance units -->
- <string-array name="distance_units" translatable="false">
- <item>@string/unit_m</item>
- <item>@string/unit_km</item>
- <item>@string/unit_ft</item>
- <item>@string/unit_yd</item>
- <item>@string/unit_mi</item>
- </string-array>
-
- <string name="init_select_themefolder" translatable="false">…</string>
- <string name="init_select_map_directory" translatable="false">…</string>
- <string name="init_select_gpx_exportdir" translatable="false">…</string>
- <string name="init_select_gpx_importdir" translatable="false">…</string>
-
- <!-- upload image scaling -->
- <integer-array name="log_image_scale_values">
- <item>-1</item>
- <item>512</item>
- <item>640</item>
- <item>800</item>
- <item>1024</item>
- </integer-array>
-
- <!-- contributors -->
- <string name="contributors" translatable="false">\n
- · <a href="http://carnero.cc/">carnero</a> as the father of c:geo\n
- \n
- · 0xErnie (localization DE)\n
- · <a href="mailto:bazsy@freemail.hu">Balazs Szabo (Bazsy1983)</a> (loc. HU)\n
- · Bananeweizen (code, loc. DE)\n
- · blafoo (code, localization DE)\n
- · Bonemaro (tester)\n
- · BudBundi (localization DE, tester)\n
- · campbeb (code)\n
- · Charles (localization FR)\n
- · Denny (localization DA)\n
- · Eisbehr (code)\n
- · F. Coello (localization ES)\n
- · Filipe C. (code)\n
- · <a href="http://www.hunterthornsberry.com">Hunter275</a> (tester)\n
- · <a href="http://iirojappinen.com/">Iiro Jäppinen</a> (graphic)\n
- · inkantis (localization PL)\n
- · <a href="http://www.jaytech.cz/">Jan Žatecký</a> (graphic)\n
- · <a href="http://joachim-wilke.de/">JoWi24</a> (code)\n
- · <a href="http://github.com/koem">Karsten Priegnitz</a> (code, artwork computation)\n
- · <a href="http://www.geocaching.com/email/?guid=d11a3e3d-7db0-4d43-87f2-7893238844a6">Lineflyer</a> (tester, support, localization DE)\n
- · Ludovic Valente (localization FR)\n
- · marco-jacob (code, loc. DE)\n
- · MichielK (code, loc. NL)\n
- · mucek4 (code, open source project leader)\n
- · ncorreia (code, localization PT)\n
- · Pascal (localization NL)\n
- · Pavol Babinčák (code, loc. SK)\n
- · Peter (localization HU)\n
- · <a href="https://github.com/Portree-Kid">Portree Kid</a> (code)\n
- · Rainer S. (code)\n
- · Ray (code, loc. JA)\n
- · <a href="http://seromenho.com/">Ricardo Seromenho</a> (localization PT)\n
- · RoadRunner- (code, loc. DE)\n
- · <a href="http://www.blueskysoftware.it/">RomNexus6</a> (localization IT)\n
- · <a href="http://www.sammyshp.de/">SammysHP</a> (code, localization DE)\n
- · <a href="http://www.rfc1149.net/sam.html">Samuel Tardieu</a> (code, localization FR)\n
- · serenity (localization DE)\n
- · Shan, a.k.a. ShakurNO (localization NO)\n
- · Shizo87 (tester)\n
- · stephanme/Geoteufel (code)\n
- · thiasB (code, loc. DE EN)\n
- · YraFyra (code, loc. SV)\n
- · zenobios (code, loc. DE EN)\n
- \n
- · <a href="http://code.google.com/p/mapsforge/">Mapsforge</a> (OSM-rendering)\n
- · <a href="http://thenounproject.com/">The Noun Project</a> (basis for attribute icons)\n
- · <a href="http://commons.apache.org/">The Apache Commons Project</a>\n
- · <a href="http://androidicons.com/">Android Icons</a> (<a href="https://creativecommons.org/licenses/by/3.0/">CC-BY 3.0</a>)\n
- · <a href="http://rrze-icon-set.berlios.de/index.html">RRZE Icon set</a> (<a href="http://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA 3.0</a>)\n </string>
-
- <!-- cache menu -->
- <string name="cache_menu_sygic" translatable="false">Sygic</string>
-
- <!-- changelog -->
- <string name="changelog" translatable="false">\n
- <b>2013.06.05</b>\n
- <b>Bugfixing:</b>\n
- · Adaption to changes on gc.com (Logging date could be wrong in some cases)\n
- \n
- \n
- <b>2013.05.31</b>\n
- <b>Bugfixing:</b>\n
- · Adaption to changes on gc.com (cache and TB log not possible, cache attributes not shown)\n
- · Pictures in logs are now loaded in standard resolution like on the website to improve performance\n
- · Corrected missing information and performance issues on nearby search for basic members\n
- \n
- \n <b>2013.05.22</b>\n <b>Bugfixing:</b>\n
- · Fixed and improved nearby search for basic members after gc.com changes\n
- · Avoid inconsistency of logbook while pictures are loaded in the background\n
- \n
- \n <b>2013.05.18</b>\n <b>Bugfixing:</b>\n
- · Correction for compatibility issue with tablet devices\n
- \n
- \n <b>2013.05.16</b>\n <b>Bugfixing:</b>\n
- · Adaption to changes on gc.com (live map)\n
- \n
- \n <b>2013.05.13</b>\n <b>Bugfixing:</b>\n
- · Twitter option was not shown on logging page\n
- · Disable trail on map did only work after refresh of the map\n
- · Stability improvements when selecting log pictures to be attached\n
- · Remove accidentely appended spaces in searches\n
- · Stability improvements for GPX import and export\n
- · Do not duplicate waypoints retrieved from the personal note when updating a cache\n
- · Fixed a possible crash when device is rotated while cache list is shown\n
- · Fixed a possible crash in \"Any destination\" menu\n
- · Ignore hide setting when searching for owned caches\n
- \n
- \n <b>2013.04.03</b>\n <b>New Features/Functions:</b>\n
- · Support of attaching pictures to logs\n
- · Support of opencaching.de online API in live map and nearby search\n
- · Support for searching opencaching.nl caches\n
- · Alphabetical sorting of OSM:Offline maps in map selection\n
- · Color markers also in trackable logbook\n
- · Edit cache type filter by clicking on filter bar\n
- · Inverse sorting of cache lists (hit the same menu again)\n
- · View pager for trackable activity\n
- · Menu item to delete past events\n
- · Settings: Option to ask for list to store caches\n
- · Change list in cache details\n
- · Ability to select \"All\" list from main screen\n
- · Default log type for event caches will be \"Attended\" if \"Will attend\" was logged before\n
- · Improved and extended cache type detection on live map\n
- · Waypoints can be marked as visited\n
- · Possibility to delete offline logs in lists\n
- · Support of language specific characters in log text equally to the website\n
- \n <b>Bugfixing:</b>\n
- · Final flag icon lost when updating cache with self defined final\n
- · Bad selection in directory chooser\n
- · Log type \"Retract Listing\" now parsed correctly\n
- · Active cache detail page now remembered when rotating device\n
- · Replaced the term \"GC-Code\" by \"Geocode\"\n
- · Improvements for light theme\n
- · Share function uses short URL again\n
- · Offline log marker now shown after autosave of log\n
- · GPX export no longer exports waypoints without coordinates\n
- · Corrections for light scheme on Adnroid 2.x devices\n
- · Avoid crash if logging page is opened while not connected correctly\n
- \n <a href="https://github.com/cgeo/cgeo/issues?milestone=9&amp;state=closed">Detailed list of all changes</a>\n
- \n <b>Known Limitations/Bugs:</b>\n
- · Live map:\n
- Approximated coords due to limitations on the GC-website\n
- Be aware: If navigation is started directly from live map it may also use the approximated coords!\n
- In fast mode the cache type might be wrong in rare cases\n
- On low zoom owned/found caches may not be hidden anymore\n
- · Other:\n
- Log images with huge size cause a long loading time\n
- After uploading log images they are only shown in the logview after refreshing the cache\n
- The personal note added to a cache is not synced to geocaching.com but will be overruled by personal notes on geocaching.com\n
- On devices with HD display resolution OSM maps might not work. Please use Google maps in this case.\n
- A huge amount of pictures on the image tab of a cache might cause a crash\n <b>Old releases</b>\n
- · Please refer to the release notes on the <a href="http://www.cgeo.org">c:geo-website</a>.\n
- \n</string>
-
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <string-array name="waypoint_coordinate_formats" translatable="false">
+ <item>@string/waypoint_coordinate_formats_plain</item>
+ <item>DDD.DDDDD°</item>
+ <item>DDD°MM.MMM\'</item>
+ <item>DDD°MM\'SS.SSS\"</item>
+ </string-array>
+
+ <!-- distance units -->
+ <string name="unit_m" translatable="false">m</string>
+ <string name="unit_km" translatable="false">km</string>
+ <string name="unit_ft" translatable="false">ft</string>
+ <string name="unit_yd" translatable="false">yd</string>
+ <string name="unit_mi" translatable="false">mi</string>
+
+ <!-- distance units -->
+ <string-array name="distance_units" translatable="false">
+ <item>@string/unit_m</item>
+ <item>@string/unit_km</item>
+ <item>@string/unit_ft</item>
+ <item>@string/unit_yd</item>
+ <item>@string/unit_mi</item>
+ </string-array>
+
+ <!-- upload image scaling -->
+ <integer-array name="log_image_scale_values">
+ <item>-1</item>
+ <item>512</item>
+ <item>640</item>
+ <item>800</item>
+ <item>1024</item>
+ </integer-array>
+
+ <string name="settings_gc_legal_note_url" translatable="false">http://www.geocaching.com/about/termsofuse.aspx</string>
+ <string name="settings_offline_maps_url" translatable="false">http://faq.cgeo.org/#3_12</string>
+ <string name="settings_themes_url" translatable="false">http://faq.cgeo.org/#3_26</string>
+ <string name="settings_send2cgeo_url" translatable="false">http://send2.cgeo.org/</string>
+ <string name="settings_facebook_login_url" translatable="false">http://faq.cgeo.org/#1_38</string>
+
+ <!-- contributors -->
+ <string name="contributors" translatable="false">\n
+ · <a href="http://carnero.cc/">carnero</a> as the father of c:geo\n
+ \n
+ · 0xErnie (localization DE)\n
+ · <a href="mailto:bazsy@freemail.hu">Balazs Szabo (Bazsy1983)</a> (loc. HU)\n
+ · Bananeweizen (code, loc. DE)\n
+ · blafoo (code, localization DE)\n
+ · Bonemaro (tester)\n
+ · BudBundi (localization DE, tester)\n
+ · campbeb (code)\n
+ · Charles (localization FR)\n
+ · Denny (localization DA)\n
+ · Eisbehr (code)\n
+ · F. Coello (localization ES)\n
+ · Filipe C. (code)\n
+ · <a href="http://www.hunterthornsberry.com">Hunter275</a> (tester)\n
+ · <a href="http://iirojappinen.com/">Iiro Jäppinen</a> (graphic)\n
+ · inkantis (localization PL)\n
+ · <a href="http://www.jaytech.cz/">Jan Žatecký</a> (graphic)\n
+ · <a href="http://joachim-wilke.de/">JoWi24</a> (code)\n
+ · <a href="http://github.com/koem">Karsten Priegnitz</a> (code, artwork computation)\n
+ · <a href="http://www.geocaching.com/email/?guid=d11a3e3d-7db0-4d43-87f2-7893238844a6">Lineflyer</a> (tester, support, localization DE)\n
+ · Ludovic Valente (localization FR)\n
+ · marco-jacob (code, loc. DE)\n
+ · MichielK (code, loc. NL)\n
+ · <a href="http://www.linkedin.com/in/mieczyslawtorchala">Mieczyslaw Torchala</a> (localization PL)\n
+ · mucek4 (code, open source project leader)\n
+ · ncorreia (code, localization PT)\n
+ · Pascal (localization NL)\n
+ · Pavol Babinčák (code, loc. SK)\n
+ · Peter (localization HU)\n
+ · <a href="https://github.com/Portree-Kid">Portree Kid</a> (code)\n
+ · Rainer S. (code)\n
+ · Ray (code, loc. JA)\n
+ · <a href="http://seromenho.com/">Ricardo Seromenho</a> (localization PT)\n
+ · RoadRunner- (code, loc. DE)\n
+ · <a href="http://www.blueskysoftware.it/">RomNexus6</a> (localization IT)\n
+ · <a href="http://www.sammyshp.de/">SammysHP</a> (code, localization DE)\n
+ · <a href="http://www.rfc1149.net/sam.html">Samuel Tardieu</a> (code, localization FR)\n
+ · serenity (localization DE)\n
+ · Shan, a.k.a. ShakurNO (localization NO)\n
+ · Shizo87 (tester)\n
+ · stephanme/Geoteufel (code)\n
+ · thiasB (code, loc. DE EN)\n
+ · YraFyra (code, loc. SV)\n
+ · zenobios (code, loc. DE EN)\n
+ \n
+ · <a href="http://code.google.com/p/mapsforge/">Mapsforge</a> (OSM-rendering)\n
+ · <a href="http://thenounproject.com/">The Noun Project</a> (basis for attribute icons)\n
+ · <a href="http://commons.apache.org/">The Apache Commons Project</a>\n
+ · <a href="http://androidicons.com/">Android Icons</a> (<a href="https://creativecommons.org/licenses/by/3.0/">CC-BY 3.0</a>)\n
+ · <a href="http://rrze-icon-set.berlios.de/index.html">RRZE Icon set</a> (<a href="http://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA 3.0</a>)\n
+ </string>
+
+ <!-- cache menu -->
+ <string name="cache_menu_sygic" translatable="false">Sygic</string>
+
</resources>
diff --git a/main/res/values/styles.xml b/main/res/values/styles.xml
index da60d0c..fed8e1e 100644
--- a/main/res/values/styles.xml
+++ b/main/res/values/styles.xml
@@ -193,6 +193,21 @@
<item name="android:background">@drawable/count_bcg</item>
<item name="android:text"></item>
</style>
+ <style name="icon_mainscreen_cell_counter">
+ <item name="android:layout_width">74dip</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:orientation">vertical</item>
+ </style>
+ <style name="icon_mainscreen_cell" parent="icon_mainscreen_cell_counter">
+ <item name="android:layout_margin">4dip</item>
+ </style>
+ <style name="icon_mainscreen_row">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">fill_parent</item>
+ <item name="android:layout_margin">4dip</item>
+ <item name="android:gravity">center_horizontal</item>
+ <item name="android:orientation">horizontal</item>
+ </style>
<!-- current location -->
<style name="location_current">
diff --git a/main/res/values/themes.xml b/main/res/values/themes.xml
index ef0e2ff..ed64ef5 100644
--- a/main/res/values/themes.xml
+++ b/main/res/values/themes.xml
@@ -23,9 +23,6 @@
<style name="dark" parent="cgeo">
- <!-- system values -->
-
-
<!-- own values: colors -->
<item name="text_color">@color/text_dark</item>
<item name="text_color_headline">@color/text_headline_dark</item>
@@ -55,9 +52,6 @@
<style name="light" parent="cgeo">
- <!-- system values -->
-
-
<!-- own values: colors -->
<item name="android:windowBackground">@color/just_white</item>
<item name="text_color">@color/text_light</item>
@@ -97,9 +91,6 @@
<!-- TODO: Popup probably doesn't need all these fields set. Should delete unnecessary ones. -->
<style name="popup_dark" parent="cgeo_popup">
- <!-- system values -->
-
-
<!-- own values: colors -->
<item name="just_color">@color/just_black</item>
<item name="text_color">@color/text_dark</item>
@@ -134,9 +125,6 @@
<!-- TODO: Popup probably doesn't need all these fields set. Should delete unnecessary ones. -->
<style name="popup_light" parent="cgeo_popup">
- <!-- system values -->
-
-
<!-- own values: colors -->
<item name="android:windowBackground">@color/just_white</item>
<item name="text_color">@color/text_light</item>
@@ -164,5 +152,29 @@
<!-- own values: other -->
<item name="compass">1</item>
</style>
+
+ <style name="settings" parent="android:Theme">
+ <item name="settings_cloud">@drawable/settings_cloud_white</item>
+ <item name="settings_details">@drawable/settings_details_white</item>
+ <item name="settings_eye">@drawable/settings_eye_white</item>
+ <item name="settings_map">@drawable/settings_map_white</item>
+ <item name="settings_arrow">@drawable/settings_arrow_white</item>
+ <item name="settings_nut">@drawable/settings_nut_white</item>
+ <item name="settings_pen">@drawable/settings_pen_white</item>
+ <item name="settings_sdcard">@drawable/settings_sdcard_white</item>
+ <item name="settings_info_icon">@drawable/settings_info_icon_white</item>
+ </style>
+ <style name="settings.light" parent="android:Theme.Light">
+ <item name="settings_cloud">@drawable/settings_cloud_black</item>
+ <item name="settings_details">@drawable/settings_details_black</item>
+ <item name="settings_eye">@drawable/settings_eye_black</item>
+ <item name="settings_map">@drawable/settings_map_black</item>
+ <item name="settings_arrow">@drawable/settings_arrow_black</item>
+ <item name="settings_nut">@drawable/settings_nut_black</item>
+ <item name="settings_pen">@drawable/settings_pen_black</item>
+ <item name="settings_sdcard">@drawable/settings_sdcard_black</item>
+ <item name="settings_info_icon">@drawable/settings_info_icon_black</item>
+ </style>
+
</resources> \ No newline at end of file
diff --git a/main/res/xml/preferences.xml b/main/res/xml/preferences.xml
new file mode 100644
index 0000000..660a411
--- /dev/null
+++ b/main/res/xml/preferences.xml
@@ -0,0 +1,433 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:cgeo="http://schemas.android.com/apk/res/cgeo.geocaching"
+ android:key="@string/pref_fakekey_main_screen" >
+
+ <PreferenceScreen
+ android:title="@string/settings_title_services"
+ android:icon="?attr/settings_cloud"
+ android:key="@string/pref_fakekey_services_screen" >
+
+ <PreferenceCategory
+ android:title="@string/settings_title_gc" >
+
+ <cgeo.geocaching.settings.CheckBoxWithPopupPreference
+ android:key="@string/pref_connectorGCActive"
+ android:title="@string/settings_activate_gc"
+ cgeo:title="@string/settings_title_gc"
+ cgeo:text="@string/settings_gc_legal_note"
+ cgeo:url="@string/settings_gc_legal_note_url"
+ cgeo:urlButton="@string/settings_goto_url_button"
+ android:defaultValue="true" />
+ <EditTextPreference
+ android:key="@string/pref_username"
+ android:title="@string/init_username"
+ android:dialogTitle="@string/init_username"
+ android:hint="@string/init_username"
+ android:dependency="@string/pref_connectorGCActive"
+ android:singleLine="true"
+ android:imeOptions="actionDone" />
+ <cgeo.geocaching.settings.EditPasswordPreference
+ android:key="@string/pref_password"
+ android:title="@string/init_password"
+ android:dialogTitle="@string/init_password"
+ android:hint="@string/init_password"
+ android:inputType="textPassword"
+ android:dependency="@string/pref_connectorGCActive"
+ android:singleLine="true"
+ android:imeOptions="actionDone" />
+ <cgeo.geocaching.settings.CheckGcCredentialsPreference
+ android:title="@string/init_login"
+ android:dependency="@string/pref_connectorGCActive" />
+ <PreferenceScreen
+ android:title="@string/settings_title_basicmembers"
+ android:key="@string/pref_fakekey_basicmembers_screen"
+ android:dependency="@string/pref_connectorGCActive" >
+ <CheckBoxPreference
+ android:key="@string/pref_showcaptcha"
+ android:title="@string/init_captcha"
+ android:summary="@string/init_summary_captcha"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_loaddirectionimg"
+ android:title="@string/init_loaddirectionimg"
+ android:summary="@string/init_summary_loaddirectionimg"
+ android:defaultValue="true" />
+ </PreferenceScreen>
+ <cgeo.geocaching.settings.InfoPreference
+ android:title="@string/settings_info_facebook_login_title"
+ android:text="@string/settings_info_facebook_login"
+ cgeo:url="@string/settings_facebook_login_url"
+ cgeo:urlButton="@string/settings_goto_url_button" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/init_oc" >
+
+ <CheckBoxPreference
+ android:key="@string/pref_connectorOCActive"
+ android:title="@string/settings_activate_oc"
+ android:defaultValue="false" />
+ <cgeo.geocaching.settings.TextPreference
+ android:layout="@layout/text_preference"
+ android:text="@string/init_oc_de_description"
+ android:dependency="@string/pref_connectorOCActive" />
+ <cgeo.geocaching.settings.AuthorizeOcDePreference
+ android:key="@string/pref_fakekey_ocde_authorization"
+ android:dependency="@string/pref_connectorOCActive" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/init_gcvote" >
+
+ <cgeo.geocaching.settings.EditPasswordPreference
+ android:key="@string/pref_pass_vote"
+ android:title="@string/init_password"
+ android:dialogTitle="@string/init_password"
+ android:hint="@string/init_password"
+ android:inputType="textPassword"
+ android:singleLine="true"
+ android:imeOptions="actionDone" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/init_twitter" >
+
+ <CheckBoxPreference
+ android:key="@string/pref_twitter"
+ android:title="@string/settings_activate_twitter"
+ android:defaultValue="false" />
+ <cgeo.geocaching.settings.TextPreference
+ android:layout="@layout/text_preference"
+ android:text="@string/about_twitter"
+ android:dependency="@string/pref_twitter" />
+ <cgeo.geocaching.settings.AuthorizeTwitterPreference
+ android:key="@string/pref_fakekey_twitter_authorization"
+ android:dependency="@string/pref_twitter" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/init_sendToCgeo" >
+
+ <cgeo.geocaching.settings.InfoPreference
+ android:title="@string/settings_info_send2cgeo_title"
+ android:text="@string/init_sendToCgeo_description"
+ cgeo:url="@string/settings_send2cgeo_url"
+ cgeo:urlButton="@string/settings_goto_url_button" />
+ <EditTextPreference
+ android:key="@string/pref_webDeviceName"
+ android:title="@string/init_sendToCgeo_name"
+ android:dialogTitle="@string/init_sendToCgeo_name"
+ android:singleLine="true"
+ android:imeOptions="actionDone" />
+ <cgeo.geocaching.settings.RegisterSend2CgeoPreference
+ android:title="@string/init_sendToCgeo_register" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/settings_category_browser" >
+
+ <CheckBoxPreference
+ android:key="@string/pref_nativeUa"
+ android:title="@string/init_use_native_ua"
+ android:summary="@string/init_summary_use_native_ua"
+ android:defaultValue="false" />
+
+ </PreferenceCategory>
+
+ </PreferenceScreen>
+
+ <PreferenceScreen
+ android:title="@string/settings_title_appearance"
+ android:icon="?attr/settings_eye" >
+
+ <CheckBoxPreference
+ android:key="@string/pref_skin"
+ android:title="@string/init_skin"
+ android:summary="@string/init_summary_skin"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_showaddress"
+ android:title="@string/init_address"
+ android:summary="@string/init_summary_address"
+ android:defaultValue="true" />
+ <CheckBoxPreference
+ android:key="@string/pref_useenglish"
+ android:title="@string/init_useenglish"
+ android:summary="@string/init_summary_useenglish"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_units"
+ android:title="@string/init_units"
+ android:summary="@string/init_summary_units"
+ android:defaultValue="false" />
+
+ </PreferenceScreen>
+
+ <PreferenceScreen
+ android:title="@string/settings_title_cachedetails"
+ android:icon="?attr/settings_details" >
+
+ <CheckBoxPreference
+ android:key="@string/pref_autoloaddesc"
+ android:title="@string/init_autoload"
+ android:summary="@string/init_summary_autoload"
+ android:defaultValue="true" />
+ <CheckBoxPreference
+ android:key="@string/pref_ratingwanted"
+ android:title="@string/init_ratingwanted"
+ android:summary="@string/init_summary_ratingwanted"
+ android:defaultValue="true" />
+ <CheckBoxPreference
+ android:key="@string/pref_friendlogswanted"
+ android:title="@string/init_friendlogswanted"
+ android:summary="@string/init_summary_friendlogswanted"
+ android:defaultValue="true" />
+ <CheckBoxPreference
+ android:key="@string/pref_opendetailslastpage"
+ android:title="@string/init_openlastdetailspage"
+ android:summary="@string/init_summary_openlastdetailspage"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_livelist"
+ android:title="@string/init_livelist"
+ android:summary="@string/init_summary_livelist"
+ android:defaultValue="true" />
+ <CheckBoxPreference
+ android:key="@string/pref_excludemine"
+ android:title="@string/init_exclude"
+ android:summary="@string/init_summary_exclude"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_excludedisabled"
+ android:title="@string/init_disabled"
+ android:summary="@string/init_summary_disabled"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_plainLogs"
+ android:title="@string/init_plain_logs"
+ android:summary="@string/init_summary_plain_logs"
+ android:defaultValue="false" />
+
+ </PreferenceScreen>
+
+ <PreferenceScreen
+ android:title="@string/settings_title_map"
+ android:icon="?attr/settings_map" >
+
+ <PreferenceCategory
+ android:title="@string/settings_title_map_data" >
+
+ <ListPreference
+ android:key="@string/pref_mapsource"
+ android:title="@string/init_mapsource_select"
+ android:dialogTitle="@string/init_mapsource_select"
+ android:defaultValue="0" />
+
+ <cgeo.geocaching.settings.InfoPreference
+ android:title="@string/settings_info_offline_maps_title"
+ android:text="@string/settings_info_offline_maps"
+ cgeo:url="@string/settings_offline_maps_url"
+ cgeo:urlButton="@string/settings_goto_url_button" />
+
+ <Preference
+ android:key="@string/pref_mapDirectory"
+ android:title="@string/init_map_directory_description" />
+
+ <cgeo.geocaching.settings.InfoPreference
+ android:title="@string/settings_info_themes_title"
+ android:text="@string/settings_info_themes"
+ cgeo:url="@string/settings_themes_url"
+ cgeo:urlButton="@string/settings_goto_url_button" />
+
+ <Preference
+ android:key="@string/pref_renderthemepath"
+ android:title="@string/init_rendertheme_folder" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/settings_title_map_content" >
+
+ <Preference
+ android:title="@string/init_showwaypoints"
+ android:summary="@string/init_showwaypoint_description"
+ android:selectable="false" />
+ <cgeo.geocaching.settings.WpThresholdPreference
+ android:key="@string/pref_gcshowwaypointsthreshold"
+ android:layout="@layout/wp_threshold_preference" />
+
+ <CheckBoxPreference
+ android:key="@string/pref_maptrail"
+ android:title="@string/init_maptrail"
+ android:summary="@string/init_summary_maptrail"
+ android:defaultValue="true" />
+
+ </PreferenceCategory>
+
+ </PreferenceScreen>
+
+ <PreferenceScreen
+ android:title="@string/settings_title_logging"
+ android:icon="?attr/settings_pen" >
+
+ <PreferenceCategory
+ android:title="@string/init_signature">
+
+ <cgeo.geocaching.settings.LogSignaturePreference
+ android:key="@string/pref_signature"
+ android:title="@string/init_signature" />
+ <CheckBoxPreference
+ android:key="@string/pref_sigautoinsert"
+ android:title="@string/init_sigautoinsert"
+ android:defaultValue="true" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/settings_category_logging_other">
+
+ <CheckBoxPreference
+ android:key="@string/pref_trackautovisit"
+ android:title="@string/init_trackautovisit"
+ android:summary="@string/init_summary_trackautovisit"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_log_offline"
+ android:title="@string/init_log_offline"
+ android:summary="@string/init_summary_log_offline"
+ android:defaultValue="false" />
+
+ </PreferenceCategory>
+
+ </PreferenceScreen>
+
+ <PreferenceScreen
+ android:title="@string/settings_title_offlinedata"
+ android:icon="?attr/settings_sdcard" >
+
+ <CheckBoxPreference
+ android:key="@string/pref_offlinemaps"
+ android:title="@string/init_offline"
+ android:summary="@string/init_summary_offline"
+ android:defaultValue="true" />
+ <CheckBoxPreference
+ android:key="@string/pref_offlinewpmaps"
+ android:title="@string/init_offline_wp"
+ android:summary="@string/init_summary_offline_wp"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_logimages"
+ android:title="@string/init_save_log_img"
+ android:summary="@string/init_summary_save_log_img"
+ android:defaultValue="false" />
+ <CheckBoxPreference
+ android:key="@string/pref_choose_list"
+ android:title="@string/init_choose_list"
+ android:summary="@string/init_summary_choose_list"
+ android:defaultValue="false" />
+
+ </PreferenceScreen>
+
+ <PreferenceScreen
+ android:title="@string/settings_title_navigation"
+ android:icon="?attr/settings_arrow" >
+
+ <PreferenceCategory
+ android:title="@string/init_default_navigation_tool" >
+
+ <cgeo.geocaching.settings.TextPreference
+ android:layout="@layout/text_preference"
+ android:text="@string/init_default_navigation_tool_description" />
+
+ <ListPreference
+ android:key="@string/pref_defaultNavigationTool"
+ android:title="@string/init_default_navigation_tool_select"
+ android:dialogTitle="@string/init_default_navigation_tool_select"
+ android:defaultValue="0" />
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/init_secondary_navigation_tool" >
+
+ <cgeo.geocaching.settings.TextPreference
+ android:layout="@layout/text_preference"
+ android:text="@string/init_default_navigation_tool_2_description" />
+
+ <ListPreference
+ android:key="@string/pref_defaultNavigationTool2"
+ android:title="@string/init_default_navigation_tool_select"
+ android:dialogTitle="@string/init_default_navigation_tool_select"
+ android:defaultValue="0" />
+
+ </PreferenceCategory>
+
+ </PreferenceScreen>
+
+ <PreferenceScreen
+ android:title="@string/settings_title_system"
+ android:icon="?attr/settings_nut" >
+
+ <PreferenceCategory
+ android:title="@string/settings_title_gpx" >
+
+ <Preference
+ android:key="@string/pref_gpxExportDir"
+ android:title="@string/init_gpx_exportdir" />
+ <Preference
+ android:key="@string/pref_gpxImportDir"
+ android:title="@string/init_gpx_importdir" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/init_backup" >
+
+ <cgeo.geocaching.settings.TextPreference
+ android:key="@string/pref_fakekey_preference_backup_info"
+ android:layout="@layout/text_preference"
+ android:text="@string/init_backup_note" />
+ <Preference
+ android:key="@string/pref_fakekey_preference_backup"
+ android:title="@string/init_backup_backup" />
+ <Preference
+ android:key="@string/pref_fakekey_preference_restore"
+ android:title="@string/init_backup_restore" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/init_dbonsdcard_title" >
+
+ <cgeo.geocaching.settings.TextPreference
+ android:layout="@layout/text_preference"
+ android:text="@string/init_dbonsdcard_note" />
+ <CheckBoxPreference
+ android:key="@string/pref_dbonsdcard"
+ android:title="@string/init_dbonsdcard"
+ android:defaultValue="false" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/init_debug_title" >
+
+ <cgeo.geocaching.settings.TextPreference
+ android:layout="@layout/text_preference"
+ android:text="@string/init_debug_note" />
+ <CheckBoxPreference
+ android:key="@string/pref_debug"
+ android:title="@string/init_debug"
+ android:defaultValue="false" />
+
+ </PreferenceCategory>
+
+ </PreferenceScreen>
+
+</PreferenceScreen>
diff --git a/main/src/cgeo/geocaching/AboutActivity.java b/main/src/cgeo/geocaching/AboutActivity.java
index f947655..ef59cee 100644
--- a/main/src/cgeo/geocaching/AboutActivity.java
+++ b/main/src/cgeo/geocaching/AboutActivity.java
@@ -9,16 +9,20 @@ import com.googlecode.androidannotations.annotations.Click;
import com.googlecode.androidannotations.annotations.EActivity;
import com.googlecode.androidannotations.annotations.ViewById;
+import org.apache.commons.lang3.StringUtils;
+
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
+import android.view.View;
import android.widget.TextView;
@EActivity
public class AboutActivity extends AbstractActivity {
@ViewById(R.id.about_version_string) protected TextView version;
@ViewById(R.id.contributors) protected TextView contributors;
- @ViewById(R.id.changelog) protected TextView changeLog;
+ @ViewById(R.id.changelog_master) protected TextView changeLogMaster;
+ @ViewById(R.id.changelog_release) protected TextView changeLogRelease;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -30,7 +34,13 @@ public class AboutActivity extends AbstractActivity {
void initializeViews() {
version.setText(Version.getVersionName(this));
contributors.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- changeLog.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ changeLogRelease.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ final String changeLogMasterString = getString(R.string.changelog_master);
+ if (StringUtils.isBlank(changeLogMasterString)) {
+ changeLogMaster.setVisibility(View.GONE);
+ } else {
+ changeLogMaster.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ }
}
@Click(R.id.donate)
diff --git a/main/src/cgeo/geocaching/AbstractLoggingActivity.java b/main/src/cgeo/geocaching/AbstractLoggingActivity.java
index 78da757..c3ba7d2 100644
--- a/main/src/cgeo/geocaching/AbstractLoggingActivity.java
+++ b/main/src/cgeo/geocaching/AbstractLoggingActivity.java
@@ -1,10 +1,13 @@
package cgeo.geocaching;
import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.gc.GCConnector;
import cgeo.geocaching.connector.gc.GCSmiliesProvider;
import cgeo.geocaching.connector.gc.GCSmiliesProvider.Smiley;
+import cgeo.geocaching.connector.trackable.TravelBugConnector;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.LogTemplateProvider;
import cgeo.geocaching.utils.LogTemplateProvider.LogContext;
import cgeo.geocaching.utils.LogTemplateProvider.LogTemplate;
@@ -23,12 +26,12 @@ public abstract class AbstractLoggingActivity extends AbstractActivity {
getMenuInflater().inflate(R.menu.abstract_logging_activity, menu);
final SubMenu menuLog = menu.findItem(R.id.menu_templates).getSubMenu();
- for (LogTemplate template : LogTemplateProvider.getTemplates()) {
+ for (final LogTemplate template : LogTemplateProvider.getTemplates()) {
menuLog.add(0, template.getItemId(), 0, template.getResourceId());
}
final SubMenu menuSmilies = menu.findItem(R.id.menu_smilies).getSubMenu();
- for (Smiley smiley : GCSmiliesProvider.getSmilies()) {
+ for (final Smiley smiley : GCSmiliesProvider.getSmilies()) {
menuSmilies.add(0, smiley.getItemId(), 0, smiley.text);
}
@@ -46,7 +49,7 @@ public abstract class AbstractLoggingActivity extends AbstractActivity {
smileyVisible = true;
}
final Trackable trackable = getLogContext().getTrackable();
- if (trackable != null && ConnectorFactory.getConnector(trackable).equals(GCConnector.getInstance())) {
+ if (trackable != null && ConnectorFactory.getConnector(trackable).equals(TravelBugConnector.getInstance())) {
smileyVisible = true;
}
@@ -83,6 +86,6 @@ public abstract class AbstractLoggingActivity extends AbstractActivity {
protected void insertIntoLog(String newText, final boolean moveCursor) {
final EditText log = (EditText) findViewById(R.id.log);
- insertAtPosition(log, newText, moveCursor);
+ ActivityMixin.insertAtPosition(log, newText, moveCursor);
}
}
diff --git a/main/src/cgeo/geocaching/AbstractPopupActivity.java b/main/src/cgeo/geocaching/AbstractPopupActivity.java
index 73dc86d..1cf0353 100644
--- a/main/src/cgeo/geocaching/AbstractPopupActivity.java
+++ b/main/src/cgeo/geocaching/AbstractPopupActivity.java
@@ -2,12 +2,14 @@ package cgeo.geocaching;
import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.activity.ActivityMixin;
+import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.gcvote.GCVote;
import cgeo.geocaching.gcvote.GCVoteRating;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Units;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.CacheDetailsCreator;
import cgeo.geocaching.ui.LoggingUI;
import cgeo.geocaching.utils.GeoDirHandler;
@@ -46,7 +48,7 @@ public abstract class AbstractPopupActivity extends AbstractActivity {
public void handleMessage(Message msg) {
try {
details.addRating(cache);
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing
}
}
@@ -62,7 +64,7 @@ public abstract class AbstractPopupActivity extends AbstractActivity {
cacheDistance.bringToFront();
}
onUpdateGeoData(geo);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("Failed to UpdateLocation location.");
}
}
@@ -205,8 +207,9 @@ public abstract class AbstractPopupActivity extends AbstractActivity {
menu.findItem(R.id.menu_navigate).setVisible(visible);
menu.findItem(R.id.menu_caches_around).setVisible(visible);
+ menu.findItem(R.id.menu_default_navigation).setTitle(NavigationAppFactory.getDefaultNavigationApplication().getName());
LoggingUI.onPrepareOptionsMenu(menu, cache);
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing
}
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index f473bb4..ac9b156 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -4,6 +4,7 @@ import butterknife.InjectView;
import butterknife.Views;
import cgeo.calendar.ICalendar;
+import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.activity.AbstractViewPagerActivity;
import cgeo.geocaching.activity.Progress;
import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
@@ -14,13 +15,13 @@ import cgeo.geocaching.connector.gc.GCConnector;
import cgeo.geocaching.enumerations.CacheAttribute;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.enumerations.LoadFlags.SaveFlag;
-import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.geopoint.GeopointFormatter;
import cgeo.geocaching.geopoint.Units;
import cgeo.geocaching.network.HtmlImage;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.AbstractCachingPageViewCreator;
import cgeo.geocaching.ui.AnchorAwareLinkMovementMethod;
import cgeo.geocaching.ui.CacheDetailsCreator;
@@ -29,10 +30,13 @@ import cgeo.geocaching.ui.DecryptTextClickListener;
import cgeo.geocaching.ui.EditNoteDialog;
import cgeo.geocaching.ui.EditNoteDialog.EditNoteDialogListener;
import cgeo.geocaching.ui.Formatter;
+import cgeo.geocaching.ui.HtmlImageCounter;
import cgeo.geocaching.ui.ImagesList;
+import cgeo.geocaching.ui.IndexOutOfBoundsAvoidingTextView;
import cgeo.geocaching.ui.LoggingUI;
+import cgeo.geocaching.ui.OwnerActionsClickListener;
import cgeo.geocaching.ui.WeakReferenceHandler;
-import cgeo.geocaching.utils.TextUtils;
+import cgeo.geocaching.ui.logs.CacheLogsViewCreator;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.ClipboardUtils;
import cgeo.geocaching.utils.CryptUtils;
@@ -42,6 +46,9 @@ import cgeo.geocaching.utils.ImageUtils;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.MatcherWrapper;
import cgeo.geocaching.utils.RunnableWithArgument;
+import cgeo.geocaching.utils.SimpleCancellableHandler;
+import cgeo.geocaching.utils.SimpleHandler;
+import cgeo.geocaching.utils.TextUtils;
import cgeo.geocaching.utils.TranslationUtils;
import cgeo.geocaching.utils.UnknownTagsHandler;
@@ -101,14 +108,12 @@ import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.TextView.BufferType;
+import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Comparator;
import java.util.EnumSet;
import java.util.List;
import java.util.Locale;
-import java.util.Map;
-import java.util.Map.Entry;
import java.util.regex.Pattern;
/**
@@ -148,6 +153,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private Geocache cache;
private final Progress progress = new Progress();
+
private SearchResult search;
private EditNoteDialogListener editNoteDialogListener;
@@ -159,24 +165,9 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return;
}
- try {
- final StringBuilder dist = new StringBuilder();
-
- if (geo.getCoords() != null && cache != null && cache.getCoords() != null) {
- dist.append(Units.getDistanceFromKilometers(geo.getCoords().distanceTo(cache.getCoords())));
- }
-
- if (cache != null && cache.getElevation() != null) {
- if (geo.getAltitude() != 0.0) {
- final float diff = (float) (cache.getElevation() - geo.getAltitude());
- dist.append(' ').append(Units.getElevation(diff));
- }
- }
-
- cacheDistanceView.setText(dist.toString());
+ if (geo.getCoords() != null && cache != null && cache.getCoords() != null) {
+ cacheDistanceView.setText(Units.getDistanceFromKilometers(geo.getCoords().distanceTo(cache.getCoords())));
cacheDistanceView.bringToFront();
- } catch (Exception e) {
- Log.w("Failed to update location.");
}
}
};
@@ -192,12 +183,6 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// some views that must be available from everywhere // TODO: Reference can block GC?
private TextView cacheDistanceView;
- private Handler cacheChangeNotificationHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- notifyDataSetChanged();
- }
- };
protected ImagesList imagesList;
@Override
@@ -232,9 +217,9 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// try to get data from URI
if (geocode == null && guid == null && uri != null) {
- String uriHost = uri.getHost().toLowerCase(Locale.US);
- String uriPath = uri.getPath().toLowerCase(Locale.US);
- String uriQuery = uri.getQuery();
+ final String uriHost = uri.getHost().toLowerCase(Locale.US);
+ final String uriPath = uri.getPath().toLowerCase(Locale.US);
+ final String uriQuery = uri.getQuery();
if (uriQuery != null) {
Log.i("Opening URI: " + uriHost + uriPath + "?" + uriQuery);
@@ -292,7 +277,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return;
}
- final LoadCacheHandler loadCacheHandler = new LoadCacheHandler();
+ final LoadCacheHandler loadCacheHandler = new LoadCacheHandler(this, progress);
try {
String title = res.getString(R.string.cache);
@@ -302,11 +287,11 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
title = geocode;
}
progress.show(this, title, res.getString(R.string.cache_dialog_loading_details), true, loadCacheHandler.cancelMessage());
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing, we lost the window
}
- ImageView defaultNavigationImageView = (ImageView) findViewById(R.id.defaultNavigation);
+ final ImageView defaultNavigationImageView = (ImageView) findViewById(R.id.defaultNavigation);
defaultNavigationImageView.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
@@ -375,7 +360,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
switch (viewId) {
case R.id.value: // coordinates, gc-code, name
clickedItemText = ((TextView) view).getText();
- String itemTitle = (String) ((TextView) ((View) view.getParent()).findViewById(R.id.name)).getText();
+ final String itemTitle = (String) ((TextView) ((View) view.getParent()).findViewById(R.id.name)).getText();
buildOptionsContextmenu(menu, viewId, itemTitle, true);
break;
case R.id.shortdesc:
@@ -384,7 +369,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
break;
case R.id.longdesc:
// combine short and long description
- String shortDesc = cache.getShortDescription();
+ final String shortDesc = cache.getShortDescription();
if (StringUtils.isBlank(shortDesc)) {
clickedItemText = ((TextView) view).getText();
} else {
@@ -433,7 +418,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
break;
}
}
- } catch (Exception e) {
+ } catch (final Exception e) {
}
}
break;
@@ -579,8 +564,8 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
menu.findItem(MENU_CALENDAR).setVisible(cache.canBeAddedToCalendar());
menu.findItem(MENU_CACHES_AROUND).setVisible(null != cache.getCoords() && cache.supportsCachesAround());
menu.findItem(MENU_BROWSER).setVisible(cache.canOpenInBrowser());
+ LoggingUI.onPrepareOptionsMenu(menu, cache);
}
- LoggingUI.onPrepareOptionsMenu(menu, cache);
return super.onPrepareOptionsMenu(menu);
}
@@ -623,44 +608,56 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return true;
}
- private class LoadCacheHandler extends CancellableHandler {
+ private final static class LoadCacheHandler extends SimpleCancellableHandler {
+
+ public LoadCacheHandler(CacheDetailActivity activity, Progress progress) {
+ super(activity, progress);
+ }
+
@Override
public void handleRegularMessage(final Message msg) {
if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
updateStatusMsg((String) msg.obj);
} else {
+ CacheDetailActivity activity = ((CacheDetailActivity) activityRef.get());
+ if (activity == null) {
+ return;
+ }
+ SearchResult search = activity.getSearch();
if (search == null) {
- showToast(res.getString(R.string.err_dwld_details_failed));
-
- progress.dismiss();
- finish();
+ showToast(R.string.err_dwld_details_failed);
+ dismissProgress();
+ finishActivity();
return;
}
if (search.getError() != null) {
- showToast(res.getString(R.string.err_dwld_details_failed) + " " + search.getError().getErrorString(res) + ".");
-
- progress.dismiss();
- finish();
+ activity.showToast(activity.getResources().getString(R.string.err_dwld_details_failed) + " " + search.getError().getErrorString(activity.getResources()) + ".");
+ dismissProgress();
+ finishActivity();
return;
}
- updateStatusMsg(res.getString(R.string.cache_dialog_loading_details_status_render));
+ updateStatusMsg(activity.getResources().getString(R.string.cache_dialog_loading_details_status_render));
// Data loaded, we're ready to show it!
- notifyDataSetChanged();
+ activity.notifyDataSetChanged();
}
}
private void updateStatusMsg(final String msg) {
- progress.setMessage(res.getString(R.string.cache_dialog_loading_details)
+ CacheDetailActivity activity = ((CacheDetailActivity) activityRef.get());
+ if (activity == null) {
+ return;
+ }
+ setProgressMessage(activity.getResources().getString(R.string.cache_dialog_loading_details)
+ "\n\n"
+ msg);
}
@Override
public void handleCancel(final Object extra) {
- finish();
+ finishActivity();
}
}
@@ -680,7 +677,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
// allow cache to notify CacheDetailActivity when it changes so it can be reloaded
- cache.setChangeNotificationHandler(cacheChangeNotificationHandler);
+ cache.setChangeNotificationHandler(new ChangeNotificationHandler(this, progress));
// action bar: title and icon
if (StringUtils.isNotBlank(cache.getName())) {
@@ -788,7 +785,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
.setPositiveButton(getString(android.R.string.yes), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
- Intent intent = new Intent(Intent.ACTION_VIEW);
+ final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(ICalendar.CALENDAR_ADDON_URI));
startActivity(intent);
}
@@ -832,95 +829,15 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
NavigationAppFactory.showNavigationMenu(this, cache, null, null, true, true);
}
- /**
- * Listener for clicks on username
- */
- private class UserActionsClickListener implements View.OnClickListener {
-
- @Override
- public void onClick(View view) {
- if (view == null) {
- return;
- }
- if (!cache.supportsUserActions()) {
- return;
- }
-
- clickedItemText = ((TextView) view).getText().toString();
- showUserActionsDialog(clickedItemText);
- }
- }
-
- /**
- * Listener for clicks on owner name
- */
- private class OwnerActionsClickListener implements View.OnClickListener {
-
- @Override
- public void onClick(View view) {
- if (view == null) {
- return;
- }
- if (!cache.supportsUserActions()) {
- return;
- }
-
- // Use real owner name vice the one owner chose to display
- if (StringUtils.isNotBlank(cache.getOwnerUserId())) {
- clickedItemText = cache.getOwnerUserId();
- } else {
- clickedItemText = ((TextView) view).getText().toString();
- }
- showUserActionsDialog(clickedItemText);
- }
- }
-
- /**
- * Opens a dialog to do actions on an username
- */
- private void showUserActionsDialog(final CharSequence name) {
- final CharSequence[] items = { res.getString(R.string.user_menu_view_hidden),
- res.getString(R.string.user_menu_view_found),
- res.getString(R.string.user_menu_open_browser),
- res.getString(R.string.user_menu_send_message)
- };
-
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setTitle(res.getString(R.string.user_menu_title) + " " + name);
- builder.setItems(items, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int item) {
- switch (item) {
- case 0:
- cgeocaches.startActivityOwner(CacheDetailActivity.this, name.toString());
- return;
- case 1:
- cgeocaches.startActivityUserName(CacheDetailActivity.this, name.toString());
- return;
- case 2:
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/profile/?u=" + Network.encode(name.toString()))));
- return;
- case 3:
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/email/?u=" + Network.encode(name.toString()))));
- return;
- default:
- break;
- }
- }
- });
- AlertDialog alert = builder.create();
- alert.show();
- }
-
private void loadCacheImages() {
if (imagesList != null) {
return;
}
- PageViewCreator creator = getViewCreator(Page.IMAGES);
+ final PageViewCreator creator = getViewCreator(Page.IMAGES);
if (creator == null) {
return;
}
- View imageView = creator.getView();
+ final View imageView = creator.getView();
if (imageView == null) {
return;
}
@@ -1062,12 +979,12 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
noAttributeIconsFound = true;
- for (String attributeName : cache.getAttributes()) {
+ for (final String attributeName : cache.getAttributes()) {
// check if another attribute icon fits in this row
attributeRow.measure(0, 0);
- int rowWidth = attributeRow.getMeasuredWidth();
- FrameLayout fl = (FrameLayout) getLayoutInflater().inflate(R.layout.attribute_image, null);
- ImageView iv = (ImageView) fl.getChildAt(0);
+ final int rowWidth = attributeRow.getMeasuredWidth();
+ final FrameLayout fl = (FrameLayout) getLayoutInflater().inflate(R.layout.attribute_image, null);
+ final ImageView iv = (ImageView) fl.getChildAt(0);
if ((parentWidth - rowWidth) < iv.getLayoutParams().width) {
// make a new row
attributeRow = newAttributeIconsRow();
@@ -1083,14 +1000,14 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// strike through?
if (strikethru) {
// generate strikethru image with same properties as attribute image
- ImageView strikethruImage = new ImageView(CacheDetailActivity.this);
+ final ImageView strikethruImage = new ImageView(CacheDetailActivity.this);
strikethruImage.setLayoutParams(iv.getLayoutParams());
d = res.getDrawable(R.drawable.attribute__strikethru);
strikethruImage.setImageDrawable(d);
fl.addView(strikethruImage);
}
} else {
- Drawable d = res.getDrawable(R.drawable.attribute_unknown);
+ final Drawable d = res.getDrawable(R.drawable.attribute_unknown);
iv.setImageDrawable(d);
}
@@ -1101,7 +1018,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
private LinearLayout newAttributeIconsRow() {
- LinearLayout rowLayout = new LinearLayout(CacheDetailActivity.this);
+ final LinearLayout rowLayout = new LinearLayout(CacheDetailActivity.this);
rowLayout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT));
rowLayout.setOrientation(LinearLayout.HORIZONTAL);
@@ -1166,7 +1083,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
final CacheDetailsCreator details = new CacheDetailsCreator(CacheDetailActivity.this, detailsList);
// cache name (full name)
- Spannable span = (new Spannable.Factory()).newSpannable(Html.fromHtml(cache.getName()).toString());
+ final Spannable span = (new Spannable.Factory()).newSpannable(Html.fromHtml(cache.getName()).toString());
if (cache.isDisabled() || cache.isArchived()) { // strike
span.setSpan(new StrikethroughSpan(), 0, span.toString().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
@@ -1199,18 +1116,18 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// cache author
if (StringUtils.isNotBlank(cache.getOwnerDisplayName()) || StringUtils.isNotBlank(cache.getOwnerUserId())) {
- TextView ownerView = details.add(R.string.cache_owner, "");
+ final TextView ownerView = details.add(R.string.cache_owner, "");
if (StringUtils.isNotBlank(cache.getOwnerDisplayName())) {
ownerView.setText(cache.getOwnerDisplayName(), TextView.BufferType.SPANNABLE);
} else { // OwnerReal guaranteed to be not blank based on above
ownerView.setText(cache.getOwnerUserId(), TextView.BufferType.SPANNABLE);
}
- ownerView.setOnClickListener(new OwnerActionsClickListener());
+ ownerView.setOnClickListener(new OwnerActionsClickListener(cache));
}
// cache hidden
if (cache.getHiddenDate() != null) {
- long time = cache.getHiddenDate().getTime();
+ final long time = cache.getHiddenDate().getTime();
if (time > 0) {
String dateString = Formatter.formatFullDate(time);
if (cache.isEventCache()) {
@@ -1227,7 +1144,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// cache coordinates
if (cache.getCoords() != null) {
- TextView valueView = details.add(R.string.cache_coordinates, cache.getCoords().toString());
+ final TextView valueView = details.add(R.string.cache_coordinates, cache.getCoords().toString());
valueView.setOnClickListener(new CoordinatesFormatSwitcher(cache.getCoords()));
registerForContextMenu(valueView);
}
@@ -1241,31 +1158,31 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
updateOfflineBox(view, cache, res, new RefreshCacheClickListener(), new DropCacheClickListener(), new StoreCacheClickListener());
// watchlist
- Button buttonWatchlistAdd = (Button) view.findViewById(R.id.add_to_watchlist);
- Button buttonWatchlistRemove = (Button) view.findViewById(R.id.remove_from_watchlist);
+ final Button buttonWatchlistAdd = (Button) view.findViewById(R.id.add_to_watchlist);
+ final Button buttonWatchlistRemove = (Button) view.findViewById(R.id.remove_from_watchlist);
buttonWatchlistAdd.setOnClickListener(new AddToWatchlistClickListener());
buttonWatchlistRemove.setOnClickListener(new RemoveFromWatchlistClickListener());
updateWatchlistBox();
// favorite points
- Button buttonFavPointAdd = (Button) view.findViewById(R.id.add_to_favpoint);
- Button buttonFavPointRemove = (Button) view.findViewById(R.id.remove_from_favpoint);
+ final Button buttonFavPointAdd = (Button) view.findViewById(R.id.add_to_favpoint);
+ final Button buttonFavPointRemove = (Button) view.findViewById(R.id.remove_from_favpoint);
buttonFavPointAdd.setOnClickListener(new FavoriteAddClickListener());
buttonFavPointRemove.setOnClickListener(new FavoriteRemoveClickListener());
updateFavPointBox();
// list
- Button buttonChangeList = (Button) view.findViewById(R.id.change_list);
+ final Button buttonChangeList = (Button) view.findViewById(R.id.change_list);
buttonChangeList.setOnClickListener(new ChangeListClickListener());
updateListBox();
// data license
- IConnector connector = ConnectorFactory.getConnector(cache);
+ final IConnector connector = ConnectorFactory.getConnector(cache);
if (connector != null) {
- String license = connector.getLicenseText(cache);
+ final String license = connector.getLicenseText(cache);
if (StringUtils.isNotBlank(license)) {
view.findViewById(R.id.license_box).setVisibility(View.VISIBLE);
- TextView licenseView = ((TextView) view.findViewById(R.id.license));
+ final TextView licenseView = ((TextView) view.findViewById(R.id.license));
licenseView.setText(Html.fromHtml(license), BufferType.SPANNABLE);
licenseView.setClickable(true);
licenseView.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
@@ -1277,49 +1194,6 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return view;
}
- private class StoreCacheHandler extends CancellableHandler {
- @Override
- public void handleRegularMessage(Message msg) {
- if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
- updateStatusMsg((String) msg.obj);
- } else {
- storeThread = null;
- CacheDetailActivity.this.notifyDataSetChanged(); // reload cache details
- }
- }
-
- private void updateStatusMsg(final String msg) {
- progress.setMessage(res.getString(R.string.cache_dialog_offline_save_message)
- + "\n\n"
- + msg);
- }
- }
-
- private class RefreshCacheHandler extends CancellableHandler {
- @Override
- public void handleRegularMessage(Message msg) {
- if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
- updateStatusMsg((String) msg.obj);
- } else {
- refreshThread = null;
- CacheDetailActivity.this.notifyDataSetChanged(); // reload cache details
- }
- }
-
- private void updateStatusMsg(final String msg) {
- progress.setMessage(res.getString(R.string.cache_dialog_refresh_message)
- + "\n\n"
- + msg);
- }
- }
-
- private class DropCacheHandler extends Handler {
- @Override
- public void handleMessage(Message msg) {
- CacheDetailActivity.this.notifyDataSetChanged();
- }
- }
-
private class StoreCacheClickListener implements View.OnClickListener {
@Override
public void onClick(View arg0) {
@@ -1343,7 +1217,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
protected void storeCache(int listId) {
- final StoreCacheHandler storeCacheHandler = new StoreCacheHandler();
+ final StoreCacheHandler storeCacheHandler = new StoreCacheHandler(CacheDetailActivity.this, progress);
progress.show(CacheDetailActivity.this, res.getString(R.string.cache_dialog_offline_save_title), res.getString(R.string.cache_dialog_offline_save_message), true, storeCacheHandler.cancelMessage());
@@ -1369,7 +1243,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return;
}
- final RefreshCacheHandler refreshCacheHandler = new RefreshCacheHandler();
+ final RefreshCacheHandler refreshCacheHandler = new RefreshCacheHandler(CacheDetailActivity.this, progress);
progress.show(CacheDetailActivity.this, res.getString(R.string.cache_dialog_refresh_title), res.getString(R.string.cache_dialog_refresh_message), true, refreshCacheHandler.cancelMessage());
@@ -1394,6 +1268,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
public void run() {
cache.store(listId, handler);
+ storeThread = null;
}
}
@@ -1407,7 +1282,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
public void run() {
cache.refresh(cache.getListId(), handler);
-
+ refreshThread = null;
handler.sendEmptyMessage(0);
}
}
@@ -1420,24 +1295,22 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return;
}
- final DropCacheHandler dropCacheHandler = new DropCacheHandler();
-
progress.show(CacheDetailActivity.this, res.getString(R.string.cache_dialog_offline_drop_title), res.getString(R.string.cache_dialog_offline_drop_message), true, null);
- new DropCacheThread(dropCacheHandler).start();
+ new DropCacheThread(new ChangeNotificationHandler(CacheDetailActivity.this, progress)).start();
}
}
private class DropCacheThread extends Thread {
+ private Handler handler;
- private Handler handler = null;
-
- public DropCacheThread(Handler handlerIn) {
- handler = handlerIn;
+ public DropCacheThread(Handler handler) {
+ super();
+ this.handler = handler;
}
@Override
public void run() {
- cache.drop(handler);
+ cache.drop(this.handler);
}
}
@@ -1469,7 +1342,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
public void onClick(View arg0) {
doExecute(R.string.cache_dialog_watchlist_add_title,
R.string.cache_dialog_watchlist_add_message,
- new WatchlistAddThread(new WatchlistHandler()));
+ new WatchlistAddThread(new WatchlistHandler(CacheDetailActivity.this, progress)));
}
}
@@ -1481,7 +1354,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
public void onClick(View arg0) {
doExecute(R.string.cache_dialog_watchlist_remove_title,
R.string.cache_dialog_watchlist_remove_message,
- new WatchlistRemoveThread(new WatchlistHandler()));
+ new WatchlistRemoveThread(new WatchlistHandler(CacheDetailActivity.this, progress)));
}
}
@@ -1495,6 +1368,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
public void run() {
+ watchlistThread = null;
handler.sendEmptyMessage(ConnectorFactory.getConnector(cache).addToWatchlist(cache) ? 1 : -1);
}
}
@@ -1509,6 +1383,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
public void run() {
+ watchlistThread = null;
handler.sendEmptyMessage(ConnectorFactory.getConnector(cache).removeFromWatchlist(cache) ? 1 : -1);
}
}
@@ -1523,6 +1398,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
public void run() {
+ watchlistThread = null;
handler.sendEmptyMessage(GCConnector.addToFavorites(cache) ? 1 : -1);
}
}
@@ -1537,22 +1413,11 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
public void run() {
+ watchlistThread = null;
handler.sendEmptyMessage(GCConnector.removeFromFavorites(cache) ? 1 : -1);
}
}
- private class FavoriteUpdateHandler extends Handler {
- @Override
- public void handleMessage(Message msg) {
- progress.dismiss();
- if (msg.what == -1) {
- showToast(res.getString(R.string.err_favorite_failed));
- } else {
- CacheDetailActivity.this.notifyDataSetChanged(); // reload cache details
- }
- }
- }
-
/**
* Listener for "add to favorites" button
*/
@@ -1561,7 +1426,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
public void onClick(View arg0) {
doExecute(R.string.cache_dialog_favorite_add_title,
R.string.cache_dialog_favorite_add_message,
- new FavoriteAddThread(new FavoriteUpdateHandler()));
+ new FavoriteAddThread(new FavoriteUpdateHandler(CacheDetailActivity.this, progress)));
}
}
@@ -1573,7 +1438,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
public void onClick(View arg0) {
doExecute(R.string.cache_dialog_favorite_remove_title,
R.string.cache_dialog_favorite_remove_message,
- new FavoriteRemoveThread(new FavoriteUpdateHandler()));
+ new FavoriteRemoveThread(new FavoriteUpdateHandler(CacheDetailActivity.this, progress)));
}
}
@@ -1613,15 +1478,15 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* shows/hides buttons, sets text in watchlist box
*/
private void updateWatchlistBox() {
- LinearLayout layout = (LinearLayout) view.findViewById(R.id.watchlist_box);
- boolean supportsWatchList = cache.supportsWatchList();
+ final LinearLayout layout = (LinearLayout) view.findViewById(R.id.watchlist_box);
+ final boolean supportsWatchList = cache.supportsWatchList();
layout.setVisibility(supportsWatchList ? View.VISIBLE : View.GONE);
if (!supportsWatchList) {
return;
}
- Button buttonAdd = (Button) view.findViewById(R.id.add_to_watchlist);
- Button buttonRemove = (Button) view.findViewById(R.id.remove_from_watchlist);
- TextView text = (TextView) view.findViewById(R.id.watchlist_text);
+ final Button buttonAdd = (Button) view.findViewById(R.id.add_to_watchlist);
+ final Button buttonRemove = (Button) view.findViewById(R.id.remove_from_watchlist);
+ final TextView text = (TextView) view.findViewById(R.id.watchlist_text);
if (cache.isOnWatchlist() || cache.isOwner()) {
buttonAdd.setVisibility(View.GONE);
@@ -1647,15 +1512,15 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* shows/hides buttons, sets text in watchlist box
*/
private void updateFavPointBox() {
- LinearLayout layout = (LinearLayout) view.findViewById(R.id.favpoint_box);
- boolean supportsFavoritePoints = cache.supportsFavoritePoints();
+ final LinearLayout layout = (LinearLayout) view.findViewById(R.id.favpoint_box);
+ final boolean supportsFavoritePoints = cache.supportsFavoritePoints();
layout.setVisibility(supportsFavoritePoints ? View.VISIBLE : View.GONE);
if (!supportsFavoritePoints || cache.isOwner() || !Settings.isPremiumMember()) {
return;
}
- Button buttonAdd = (Button) view.findViewById(R.id.add_to_favpoint);
- Button buttonRemove = (Button) view.findViewById(R.id.remove_from_favpoint);
- TextView text = (TextView) view.findViewById(R.id.favpoint_text);
+ final Button buttonAdd = (Button) view.findViewById(R.id.add_to_favpoint);
+ final Button buttonRemove = (Button) view.findViewById(R.id.remove_from_favpoint);
+ final TextView text = (TextView) view.findViewById(R.id.favpoint_text);
if (cache.isFavorite()) {
buttonAdd.setVisibility(View.GONE);
@@ -1680,15 +1545,15 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* shows/hides/updates list box
*/
private void updateListBox() {
- View box = view.findViewById(R.id.list_box);
+ final View box = view.findViewById(R.id.list_box);
if (cache.isOffline()) {
// show box
box.setVisibility(View.VISIBLE);
// update text
- TextView text = (TextView) view.findViewById(R.id.list_text);
- StoredList list = cgData.getList(cache.getListId());
+ final TextView text = (TextView) view.findViewById(R.id.list_text);
+ final StoredList list = cgData.getList(cache.getListId());
if (list != null) {
text.setText(res.getString(R.string.cache_list_text) + " " + list.title);
} else {
@@ -1701,22 +1566,6 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
- /**
- * Handler, called when watchlist add or remove is done
- */
- private class WatchlistHandler extends Handler {
- @Override
- public void handleMessage(Message msg) {
- watchlistThread = null;
- progress.dismiss();
- if (msg.what == -1) {
- showToast(res.getString(R.string.err_watchlist_failed));
- } else {
- CacheDetailActivity.this.notifyDataSetChanged(); // reload cache details
- }
- }
- }
-
private class PreviewMapTask extends AsyncTask<Void, Void, BitmapDrawable> {
@Override
protected BitmapDrawable doInBackground(Void... parameters) {
@@ -1733,7 +1582,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
return ImageUtils.scaleBitmapToFitDisplay(image);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("CacheDetailActivity.PreviewMapTask", e);
return null;
}
@@ -1757,12 +1606,11 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
((ImageView) view.findViewById(R.id.map_preview)).setImageDrawable(image);
view.findViewById(R.id.map_preview_box).setVisibility(View.VISIBLE);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("CacheDetailActivity.PreviewMapTask", e);
}
}
}
-
}
protected class DescriptionViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
@@ -1789,7 +1637,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (Settings.isAutoLoadDescription()) {
loadLongDescription();
} else {
- Button showDesc = (Button) view.findViewById(R.id.show_description);
+ final Button showDesc = (Button) view.findViewById(R.id.show_description);
showDesc.setVisibility(View.VISIBLE);
showDesc.setOnClickListener(new View.OnClickListener() {
@Override
@@ -1815,6 +1663,18 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
});
+ final Button personalNoteUpload = (Button) view.findViewById(R.id.upload_personalnote);
+ if (cache.isOffline() && ConnectorFactory.getConnector(cache).supportsPersonalNote()) {
+ personalNoteUpload.setVisibility(View.VISIBLE);
+ personalNoteUpload.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ uploadPersonalNote();
+ }
+ });
+ } else {
+ personalNoteUpload.setVisibility(View.GONE);
+ }
// cache hint and spoiler images
final View hintBoxView = view.findViewById(R.id.hint_box);
@@ -1885,6 +1745,21 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
+ Thread currentThread;
+
+ private void uploadPersonalNote() {
+ final SimpleCancellableHandler myHandler = new SimpleCancellableHandler(CacheDetailActivity.this, progress);
+
+ Message cancelMessage = myHandler.cancelMessage(res.getString(R.string.cache_personal_note_upload_cancelled));
+ progress.show(CacheDetailActivity.this, res.getString(R.string.cache_personal_note_uploading), res.getString(R.string.cache_personal_note_uploading), true, cancelMessage);
+
+ if (currentThread != null) {
+ currentThread.interrupt();
+ }
+ currentThread = new UploadPersonalNoteThread(cache, myHandler);
+ currentThread.start();
+ }
+
private void setPersonalNote() {
final String personalNote = cache.getPersonalNote();
personalNoteView.setText(personalNote, TextView.BufferType.SPANNABLE);
@@ -1896,7 +1771,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
private void loadLongDescription() {
- Button showDesc = (Button) view.findViewById(R.id.show_description);
+ final Button showDesc = (Button) view.findViewById(R.id.show_description);
showDesc.setVisibility(View.GONE);
showDesc.setOnClickListener(null);
view.findViewById(R.id.loading).setVisibility(View.VISIBLE);
@@ -1938,21 +1813,6 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
editNoteDialogListener.onFinishEditNoteDialog(note);
}
- private static class HtmlImageCounter implements Html.ImageGetter {
-
- private int imageCount = 0;
-
- @Override
- public Drawable getDrawable(String url) {
- imageCount++;
- return null;
- }
-
- public int getImageCount() {
- return imageCount;
- }
- }
-
/**
* Loads the description in background. <br />
* <br />
@@ -1965,14 +1825,14 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
*/
private class LoadDescriptionTask extends AsyncTask<Object, Void, Void> {
private final View loadingIndicatorView;
- private final TextView descriptionView;
+ private final IndexOutOfBoundsAvoidingTextView descriptionView;
private final String descriptionString;
private Spanned description;
private final View shortDescView;
public LoadDescriptionTask(final String description, final View descriptionView, final View loadingIndicatorView, final View shortDescView) {
this.descriptionString = description;
- this.descriptionView = (TextView) descriptionView;
+ this.descriptionView = (IndexOutOfBoundsAvoidingTextView) descriptionView;
this.loadingIndicatorView = loadingIndicatorView;
this.shortDescView = shortDescView;
}
@@ -1981,7 +1841,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
protected Void doInBackground(Object... params) {
try {
// Fast preview: parse only HTML without loading any images
- HtmlImageCounter imageCounter = new HtmlImageCounter();
+ final HtmlImageCounter imageCounter = new HtmlImageCounter();
final UnknownTagsHandler unknownTagsHandler = new UnknownTagsHandler();
description = Html.fromHtml(descriptionString, imageCounter, unknownTagsHandler);
publishProgress();
@@ -2008,7 +1868,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (needsRefresh) {
publishProgress();
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("LoadDescriptionTask: ", e);
}
return null;
@@ -2023,7 +1883,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (StringUtils.isNotBlank(descriptionString)) {
try {
descriptionView.setText(description, TextView.BufferType.SPANNABLE);
- } catch (Exception e) {
+ } catch (final Exception e) {
// On 4.1, there is sometimes a crash on measuring the layout: https://code.google.com/p/android/issues/detail?id=35412
Log.e("Android bug setting text: ", e);
// remove the formatting by converting to a simple string
@@ -2045,7 +1905,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (shortDescView != null) {
final String shortDescription = cache.getShortDescription();
if (StringUtils.isNotBlank(shortDescription)) {
- int index = descriptionString.indexOf(shortDescription);
+ final int index = descriptionString.indexOf(shortDescription);
if (index >= 0 && index < 200) {
shortDescView.setVisibility(View.GONE);
}
@@ -2074,7 +1934,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (Settings.isLightSkin()) {
backcolor = color.white;
- for (Pattern pattern : LIGHT_COLOR_PATTERNS) {
+ for (final Pattern pattern : LIGHT_COLOR_PATTERNS) {
final MatcherWrapper matcher = new MatcherWrapper(pattern, text);
if (matcher.find()) {
view.setBackgroundResource(color.darker_gray);
@@ -2084,7 +1944,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
} else {
backcolor = color.black;
- for (Pattern pattern : DARK_COLOR_PATTERNS) {
+ for (final Pattern pattern : DARK_COLOR_PATTERNS) {
final MatcherWrapper matcher = new MatcherWrapper(pattern, text);
if (matcher.find()) {
view.setBackgroundResource(color.darker_gray);
@@ -2096,176 +1956,6 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
- private class LogsViewCreator extends AbstractCachingPageViewCreator<ListView> {
- private final boolean allLogs;
-
- LogsViewCreator(boolean allLogs) {
- this.allLogs = allLogs;
- }
-
- @Override
- public ListView getDispatchedView() {
- if (cache == null) {
- // something is really wrong
- return null;
- }
-
- view = (ListView) getLayoutInflater().inflate(R.layout.cachedetail_logs_page, null);
-
- // log count
- final Map<LogType, Integer> logCounts = cache.getLogCounts();
- if (logCounts != null) {
- final List<Entry<LogType, Integer>> sortedLogCounts = new ArrayList<Entry<LogType, Integer>>(logCounts.size());
- for (Entry<LogType, Integer> entry : logCounts.entrySet()) {
- // it may happen that the label is unknown -> then avoid any output for this type
- if (entry.getKey() != LogType.PUBLISH_LISTING && entry.getKey().getL10n() != null) {
- sortedLogCounts.add(entry);
- }
- }
-
- if (!sortedLogCounts.isEmpty()) {
- // sort the log counts by type id ascending. that way the FOUND, DNF log types are the first and most visible ones
- Collections.sort(sortedLogCounts, new Comparator<Entry<LogType, Integer>>() {
-
- @Override
- public int compare(Entry<LogType, Integer> logCountItem1, Entry<LogType, Integer> logCountItem2) {
- return logCountItem1.getKey().compareTo(logCountItem2.getKey());
- }
- });
-
- ArrayList<String> labels = new ArrayList<String>(sortedLogCounts.size());
- for (Entry<LogType, Integer> pair : sortedLogCounts) {
- labels.add(pair.getValue() + "× " + pair.getKey().getL10n());
- }
-
- final TextView countView = new TextView(CacheDetailActivity.this);
- countView.setText(res.getString(R.string.cache_log_types) + ": " + StringUtils.join(labels, ", "));
- view.addHeaderView(countView, null, false);
- }
- }
-
- final List<LogEntry> logs = allLogs ? cache.getLogs() : cache.getFriendsLogs();
- view.setAdapter(new ArrayAdapter<LogEntry>(CacheDetailActivity.this, R.layout.logs_item, logs) {
- final UserActionsClickListener userActionsClickListener = new UserActionsClickListener();
- final DecryptTextClickListener decryptTextClickListener = new DecryptTextClickListener();
-
- @Override
- public View getView(final int position, final View convertView, final ViewGroup parent) {
- View rowView = convertView;
- if (null == rowView) {
- rowView = getLayoutInflater().inflate(R.layout.logs_item, null);
- }
- LogViewHolder holder = (LogViewHolder) rowView.getTag();
- if (null == holder) {
- holder = new LogViewHolder(rowView);
- }
- holder.setPosition(position);
-
- final LogEntry log = getItem(position);
-
- if (log.date > 0) {
- holder.date.setText(Formatter.formatShortDateVerbally(log.date));
- holder.date.setVisibility(View.VISIBLE);
- } else {
- holder.date.setVisibility(View.GONE);
- }
-
- holder.type.setText(log.type.getL10n());
- holder.author.setText(StringEscapeUtils.unescapeHtml4(log.author));
-
- // finds count
- holder.countOrLocation.setVisibility(View.VISIBLE);
- if (log.found == -1) {
- holder.countOrLocation.setVisibility(View.GONE);
- } else {
- holder.countOrLocation.setText(res.getQuantityString(R.plurals.cache_counts, log.found, log.found));
- }
-
- // logtext, avoid parsing HTML if not necessary
- String logText = log.log;
- if (TextUtils.containsHtml(logText)) {
- logText = log.getDisplayText();
- // Fast preview: parse only HTML without loading any images
- HtmlImageCounter imageCounter = new HtmlImageCounter();
- final UnknownTagsHandler unknownTagsHandler = new UnknownTagsHandler();
- holder.text.setText(Html.fromHtml(logText, imageCounter, unknownTagsHandler), TextView.BufferType.SPANNABLE);
- if (imageCounter.getImageCount() > 0) {
- // Complete view: parse again with loading images - if necessary ! If there are any images causing problems the user can see at least the preview
- LogImageLoader loader = new LogImageLoader(holder);
- loader.execute(logText);
- }
- }
- else {
- holder.text.setText(logText, TextView.BufferType.SPANNABLE);
- }
-
- // images
- if (log.hasLogImages()) {
- holder.images.setText(log.getImageTitles());
- holder.images.setVisibility(View.VISIBLE);
- holder.images.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- ImagesActivity.startActivityLogImages(CacheDetailActivity.this, cache.getGeocode(), new ArrayList<Image>(log.getLogImages()));
- }
- });
- } else {
- holder.images.setVisibility(View.GONE);
- }
-
- // colored marker
- int marker = log.type.markerId;
- if (marker != 0) {
- holder.marker.setVisibility(View.VISIBLE);
- holder.marker.setImageResource(marker);
- }
- else {
- holder.marker.setVisibility(View.GONE);
- }
-
- if (null == convertView) {
- // if convertView != null then this listeners are already set
- holder.author.setOnClickListener(userActionsClickListener);
- holder.text.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- holder.text.setOnClickListener(decryptTextClickListener);
- registerForContextMenu(holder.text);
- }
-
- return rowView;
- }
- });
-
- return view;
- }
-
- /** Loads the Log Images outside the ui thread. */
-
- private class LogImageLoader extends AsyncTask<String, Progress, Spanned> {
- final private LogViewHolder holder;
- final private int position;
-
- public LogImageLoader(LogViewHolder holder) {
- this.holder = holder;
- this.position = holder.getPosition();
- }
-
- @Override
- protected Spanned doInBackground(String... logtext) {
- return Html.fromHtml(logtext[0], new HtmlImage(cache.getGeocode(), false, cache.getListId(), false), null); //, TextView.BufferType.SPANNABLE)
- }
-
- @Override
- protected void onPostExecute(Spanned result) {
- // Ensure that this holder and its view still references the right item before updating the text.
- if (position == holder.getPosition()) {
- holder.text.setText(result);
- }
- }
-
- }
-
- }
-
private class WaypointsViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
@Override
@@ -2315,7 +2005,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// visited
if (wpt.isVisited()) {
- TypedValue a = new TypedValue();
+ final TypedValue a = new TypedValue();
getTheme().resolveAttribute(R.attr.text_color_grey, a, true);
if (a.type >= TypedValue.TYPE_FIRST_COLOR_INT && a.type <= TypedValue.TYPE_LAST_COLOR_INT) {
// really should be just a color!
@@ -2402,9 +2092,9 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
view.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
- Object selection = arg0.getItemAtPosition(arg2);
+ final Object selection = arg0.getItemAtPosition(arg2);
if (selection instanceof Trackable) {
- Trackable trackable = (Trackable) selection;
+ final Trackable trackable = (Trackable) selection;
TrackableActivity.startActivity(CacheDetailActivity.this, trackable.getGuid(), trackable.getGeocode(), trackable.getName());
}
}
@@ -2449,10 +2139,10 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
*/
private AlertDialog createResetCacheCoordinatesDialog(final Geocache cache, final Waypoint wpt) {
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.waypoint_reset_cache_coords);
- String[] items = new String[] { res.getString(R.string.waypoint_localy_reset_cache_coords), res.getString(R.string.waypoint_reset_local_and_remote_cache_coords) };
+ final String[] items = new String[] { res.getString(R.string.waypoint_localy_reset_cache_coords), res.getString(R.string.waypoint_reset_local_and_remote_cache_coords) };
builder.setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {
@Override
@@ -2504,7 +2194,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private final boolean local;
private final boolean remote;
private final Waypoint wpt;
- private ProgressDialog progress;
+ private final ProgressDialog progress;
public static final int LOCAL = 0;
public static final int ON_WEBSITE = 1;
@@ -2534,7 +2224,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
handler.sendEmptyMessage(LOCAL);
}
- IConnector con = ConnectorFactory.getConnector(cache);
+ final IConnector con = ConnectorFactory.getConnector(cache);
if (remote && con.supportsOwnCoordinates()) {
runOnUiThread(new Runnable() {
@Override
@@ -2564,6 +2254,29 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
+ private class UploadPersonalNoteThread extends Thread {
+ private Geocache cache = null;
+ private CancellableHandler handler = null;
+
+ public UploadPersonalNoteThread(Geocache cache, CancellableHandler handler) {
+ this.cache = cache;
+ this.handler = handler;
+ }
+
+ @Override
+ public void run() {
+ IConnector con = ConnectorFactory.getConnector(cache);
+ if (con.supportsPersonalNote()) {
+ con.uploadPersonalNote(cache);
+ }
+ Message msg = Message.obtain();
+ Bundle bundle = new Bundle();
+ bundle.putString(SimpleCancellableHandler.SUCCESS_TEXT, res.getString(R.string.cache_personal_note_upload_done));
+ msg.setData(bundle);
+ handler.sendMessage(msg);
+ }
+ }
+
@Override
protected String getTitle(Page page) {
// show number of waypoints directly in waypoint title
@@ -2606,10 +2319,10 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return new DescriptionViewCreator();
case LOGS:
- return new LogsViewCreator(true);
+ return new CacheLogsViewCreator(this, true);
case LOGSFRIENDS:
- return new LogsViewCreator(false);
+ return new CacheLogsViewCreator(this, false);
case WAYPOINTS:
return new WaypointsViewCreator();
@@ -2635,7 +2348,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
final Button offlineStore = (Button) view.findViewById(R.id.offline_store);
if (cache.isOffline()) {
- long diff = (System.currentTimeMillis() / (60 * 1000)) - (cache.getDetailedUpdate() / (60 * 1000)); // minutes
+ final long diff = (System.currentTimeMillis() / (60 * 1000)) - (cache.getDetailedUpdate() / (60 * 1000)); // minutes
String ago;
if (diff < 15) {
@@ -2668,4 +2381,99 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
offlineRefresh.setClickable(true);
}
+ public Geocache getCache() {
+ return cache;
+ }
+
+ public SearchResult getSearch() {
+ return search;
+ }
+
+ private static final class StoreCacheHandler extends SimpleCancellableHandler {
+
+ public StoreCacheHandler(CacheDetailActivity activity, Progress progress) {
+ super(activity, progress);
+ }
+
+ @Override
+ public void handleRegularMessage(Message msg) {
+ if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
+ updateStatusMsg(R.string.cache_dialog_offline_save_message, (String) msg.obj);
+ } else {
+ notifyDatasetChanged(activityRef);
+ }
+ }
+ }
+
+ private static final class RefreshCacheHandler extends SimpleCancellableHandler {
+
+ public RefreshCacheHandler(CacheDetailActivity activity, Progress progress) {
+ super(activity, progress);
+ }
+
+ @Override
+ public void handleRegularMessage(Message msg) {
+ if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
+ updateStatusMsg(R.string.cache_dialog_refresh_message, (String) msg.obj);
+ } else {
+ notifyDatasetChanged(activityRef);
+ }
+ }
+ }
+
+ private static final class ChangeNotificationHandler extends SimpleHandler {
+
+ public ChangeNotificationHandler(CacheDetailActivity activity, Progress progress) {
+ super(activity, progress);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ notifyDatasetChanged(activityRef);
+ }
+ }
+
+ private static final class FavoriteUpdateHandler extends SimpleHandler {
+
+ public FavoriteUpdateHandler(CacheDetailActivity activity, Progress progress) {
+ super(activity, progress);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ if (msg.what == -1) {
+ dismissProgress();
+ showToast(R.string.err_favorite_failed);
+ } else {
+ notifyDatasetChanged(activityRef);
+ }
+ }
+ }
+
+ /**
+ * Handler, called when watchlist add or remove is done
+ */
+ private static final class WatchlistHandler extends SimpleHandler {
+
+ public WatchlistHandler(CacheDetailActivity activity, Progress progress) {
+ super(activity, progress);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ if (msg.what == -1) {
+ dismissProgress();
+ showToast(R.string.err_watchlist_failed);
+ } else {
+ notifyDatasetChanged(activityRef);
+ }
+ }
+ }
+
+ private static void notifyDatasetChanged(WeakReference<AbstractActivity> activityRef) {
+ CacheDetailActivity activity = ((CacheDetailActivity) activityRef.get());
+ if (activity != null) {
+ activity.notifyDataSetChanged();
+ }
+ }
}
diff --git a/main/src/cgeo/geocaching/CachePopup.java b/main/src/cgeo/geocaching/CachePopup.java
index 39a896a..873801e 100644
--- a/main/src/cgeo/geocaching/CachePopup.java
+++ b/main/src/cgeo/geocaching/CachePopup.java
@@ -4,6 +4,7 @@ import cgeo.geocaching.activity.Progress;
import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.network.Network;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.CacheDetailsCreator;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.Log;
diff --git a/main/src/cgeo/geocaching/CompassActivity.java b/main/src/cgeo/geocaching/CompassActivity.java
index 4f8af08..64be52d 100644
--- a/main/src/cgeo/geocaching/CompassActivity.java
+++ b/main/src/cgeo/geocaching/CompassActivity.java
@@ -7,6 +7,7 @@ import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Units;
import cgeo.geocaching.maps.CGeoMap;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.speech.SpeechService;
import cgeo.geocaching.ui.CompassView;
import cgeo.geocaching.utils.GeoDirHandler;
@@ -16,8 +17,10 @@ import org.apache.commons.lang3.StringUtils;
import android.content.Context;
import android.content.Intent;
+import android.content.res.Configuration;
import android.hardware.Sensor;
import android.hardware.SensorManager;
+import android.media.AudioManager;
import android.os.Bundle;
import android.speech.tts.TextToSpeech.Engine;
import android.view.Menu;
@@ -94,6 +97,9 @@ public class CompassActivity extends AbstractActivity {
setCacheInfo();
Views.inject(this);
+
+ // make sure we can control the TTS volume
+ setVolumeControlStream(AudioManager.STREAM_MUSIC);
}
@Override
@@ -118,6 +124,20 @@ public class CompassActivity extends AbstractActivity {
}
@Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+
+ setContentView(R.layout.compass_activity);
+ Views.inject(this);
+
+ setTitle();
+ setDestCoords();
+ setCacheInfo();
+
+ geoDirHandler.updateAll();
+ }
+
+ @Override
public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.compass_activity_options, menu);
menu.findItem(R.id.menu_switch_compass_gps).setVisible(hasMagneticFieldSensor);
@@ -127,8 +147,7 @@ public class CompassActivity extends AbstractActivity {
final IWaypoint coordinate = coordinates.get(i);
subMenu.add(0, COORDINATES_OFFSET + i, 0, coordinate.getName() + " (" + coordinate.getCoordType() + ")");
}
- }
- else {
+ } else {
menu.findItem(R.id.menu_select_destination).setVisible(false);
}
return true;
@@ -199,8 +218,7 @@ public class CompassActivity extends AbstractActivity {
protected void onActivityResult(int request, int result, Intent data) {
if (request == REQUEST_TTS_DATA_CHECK && result == Engine.CHECK_VOICE_DATA_PASS) {
SpeechService.startService(this, dstCoords);
- }
- else {
+ } else {
Log.i("TTS failed to start. Request: " + request + " result: " + result);
startActivity(new Intent(Engine.ACTION_INSTALL_TTS_DATA));
}
@@ -248,8 +266,7 @@ public class CompassActivity extends AbstractActivity {
if (geo.getCoords() != null) {
if (geo.getSatellitesVisible() >= 0) {
navSatellites.setText(res.getString(R.string.loc_sat) + ": " + geo.getSatellitesFixed() + "/" + geo.getSatellitesVisible());
- }
- else {
+ } else {
navSatellites.setText("");
}
navType.setText(res.getString(geo.getLocationProvider().resourceId));
@@ -260,12 +277,7 @@ public class CompassActivity extends AbstractActivity {
navAccuracy.setText(null);
}
- if (geo.getAltitude() != 0.0f) {
- final String humanAlt = Units.getDistanceFromMeters((float) geo.getAltitude());
- navLocation.setText(geo.getCoords() + " | " + humanAlt);
- } else {
- navLocation.setText(geo.getCoords().toString());
- }
+ navLocation.setText(geo.getCoords().toString());
updateDistanceInfo(geo);
} else {
diff --git a/main/src/cgeo/geocaching/DirectionProvider.java b/main/src/cgeo/geocaching/DirectionProvider.java
index 37b184a..b4fb86c 100644
--- a/main/src/cgeo/geocaching/DirectionProvider.java
+++ b/main/src/cgeo/geocaching/DirectionProvider.java
@@ -27,6 +27,8 @@ public class DirectionProvider extends MemorySubject<Float> implements SensorEve
@Override
protected void onFirstObserver() {
+ @SuppressWarnings("deprecation")
+ // This will be removed when using a new location service. Until then, it is okay to be used.
final Sensor defaultSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
sensorManager.registerListener(this, defaultSensor, SensorManager.SENSOR_DELAY_NORMAL);
}
diff --git a/main/src/cgeo/geocaching/EditWaypointActivity.java b/main/src/cgeo/geocaching/EditWaypointActivity.java
index dce49a3..56ee959 100644
--- a/main/src/cgeo/geocaching/EditWaypointActivity.java
+++ b/main/src/cgeo/geocaching/EditWaypointActivity.java
@@ -10,10 +10,11 @@ import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.geopoint.DistanceParser;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.GeopointFormatter;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.dialog.CoordinatesInputDialog;
-import cgeo.geocaching.utils.TextUtils;
import cgeo.geocaching.utils.GeoDirHandler;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.TextUtils;
import com.googlecode.androidannotations.annotations.EActivity;
import com.googlecode.androidannotations.annotations.Extra;
@@ -233,7 +234,7 @@ public class EditWaypointActivity extends AbstractActivity {
private void initializeDistanceUnitSelector() {
distanceUnits = new ArrayList<String>(Arrays.asList(res.getStringArray(R.array.distance_units)));
if (initViews) {
- distanceUnitSelector.setSelection(Settings.isUseMetricUnits() ? 0 : 2); //0:m, 2:ft
+ distanceUnitSelector.setSelection(Settings.isUseImperialUnits() ? 2 : 0); //0:m, 2:ft
}
}
@@ -344,7 +345,8 @@ public class EditWaypointActivity extends AbstractActivity {
double distance;
try {
- distance = DistanceParser.parseDistance(distanceText, Settings.isUseMetricUnits());
+ distance = DistanceParser.parseDistance(distanceText,
+ !Settings.isUseImperialUnits());
} catch (NumberFormatException e) {
showToast(res.getString(R.string.err_parse_dist));
return;
@@ -358,7 +360,8 @@ public class EditWaypointActivity extends AbstractActivity {
final String name = StringUtils.isNotEmpty(givenName) ? givenName : res.getString(R.string.waypoint) + " " + (wpCount + 1);
final String noteText = note.getText().toString().trim();
final Geopoint coordsToSave = coords;
- final WaypointType type = wpTypes.get(waypointTypeSelector.getSelectedItemPosition());
+ final int selectedTypeIndex = waypointTypeSelector.getSelectedItemPosition();
+ final WaypointType type = selectedTypeIndex >= 0 ? wpTypes.get(selectedTypeIndex) : waypoint.getWaypointType();
final boolean visited = visitedCheckBox.isChecked();
final ProgressDialog progress = ProgressDialog.show(EditWaypointActivity.this, getString(R.string.cache), getString(R.string.waypoint_being_saved), true);
final Handler finishHandler = new Handler() {
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index 1972c7a..3c69197 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -23,6 +23,7 @@ import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.files.GPXParser;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.network.HtmlImage;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.LazyInitializedList;
import cgeo.geocaching.utils.Log;
@@ -85,7 +86,6 @@ public class Geocache implements ICache, IWaypoint {
private String location = null;
private Geopoint coords = null;
private boolean reliableLatLon = false;
- private Double elevation = null;
private String personalNote = null;
/**
* lazy initialized
@@ -106,20 +106,20 @@ public class Geocache implements ICache, IWaypoint {
private float myVote = 0; // valid ratings are larger than zero
private int inventoryItems = 0;
private boolean onWatchlist = false;
- private List<String> attributes = new LazyInitializedList<String>() {
+ private final List<String> attributes = new LazyInitializedList<String>() {
@Override
public List<String> call() {
return cgData.loadAttributes(geocode);
}
};
- private List<Waypoint> waypoints = new LazyInitializedList<Waypoint>() {
+ private final List<Waypoint> waypoints = new LazyInitializedList<Waypoint>() {
@Override
public List<Waypoint> call() {
return cgData.loadWaypoints(geocode);
}
};
private List<Image> spoilers = null;
- private List<LogEntry> logs = new LazyInitializedList<LogEntry>() {
+ private final List<LogEntry> logs = new LazyInitializedList<LogEntry>() {
@Override
public List<LogEntry> call() {
return cgData.loadLogs(geocode);
@@ -135,6 +135,7 @@ public class Geocache implements ICache, IWaypoint {
private String nameForSorting;
private final EnumSet<StorageLocation> storageLocation = EnumSet.of(StorageLocation.HEAP);
private boolean finalDefined = false;
+ private boolean logPasswordRequired = false;
private int zoomlevel = Tile.ZOOMLEVEL_MAX + 1;
private static final Pattern NUMBER_PATTERN = Pattern.compile("\\d+");
@@ -277,11 +278,14 @@ public class Geocache implements ICache, IWaypoint {
if (coords == null) {
coords = other.coords;
}
- if (elevation == null) {
- elevation = other.elevation;
- }
- if (personalNote == null) { // don't use StringUtils.isBlank here. Otherwise we cannot recognize a note which was deleted on GC
+ // don't use StringUtils.isBlank here. Otherwise we cannot recognize a note which was deleted on GC
+ if (personalNote == null) {
personalNote = other.personalNote;
+ } else if (other.personalNote != null && !personalNote.equals(other.personalNote)) {
+ final PersonalNote myNote = new PersonalNote(this);
+ final PersonalNote otherNote = new PersonalNote(other);
+ final PersonalNote mergedNote = myNote.mergeWith(otherNote);
+ personalNote = mergedNote.toString();
}
if (StringUtils.isBlank(getShortDescription())) {
shortdesc = other.getShortDescription();
@@ -313,7 +317,7 @@ public class Geocache implements ICache, IWaypoint {
this.setWaypoints(other.waypoints, false);
}
else {
- ArrayList<Waypoint> newPoints = new ArrayList<Waypoint>(waypoints);
+ final ArrayList<Waypoint> newPoints = new ArrayList<Waypoint>(waypoints);
Waypoint.mergeWayPoints(newPoints, other.waypoints, false);
this.setWaypoints(newPoints, false);
}
@@ -340,12 +344,10 @@ public class Geocache implements ICache, IWaypoint {
// if cache has ORIGINAL type waypoint ... it is considered that it has modified coordinates, otherwise not
userModifiedCoords = false;
- if (waypoints != null) {
- for (Waypoint wpt : waypoints) {
- if (wpt.getWaypointType() == WaypointType.ORIGINAL) {
- userModifiedCoords = true;
- break;
- }
+ for (final Waypoint wpt : waypoints) {
+ if (wpt.getWaypointType() == WaypointType.ORIGINAL) {
+ userModifiedCoords = true;
+ break;
}
}
@@ -396,7 +398,6 @@ public class Geocache implements ICache, IWaypoint {
StringUtils.equalsIgnoreCase(cacheId, other.cacheId) &&
(direction != null ? direction.equals(other.direction) : null == other.direction) &&
(distance != null ? distance.equals(other.distance) : null == other.distance) &&
- (elevation != null ? elevation.equals(other.elevation) : null == other.elevation) &&
rating == other.rating &&
votes == other.votes &&
myVote == other.myVote &&
@@ -459,7 +460,7 @@ public class Geocache implements ICache, IWaypoint {
fromActivity.showToast(((Activity) fromActivity).getResources().getString(R.string.err_cannot_log_visit));
return;
}
- Intent logVisitIntent = new Intent((Activity) fromActivity, LogCacheActivity.class);
+ final Intent logVisitIntent = new Intent((Activity) fromActivity, LogCacheActivity.class);
logVisitIntent.putExtra(LogCacheActivity.EXTRAS_ID, cacheId);
logVisitIntent.putExtra(LogCacheActivity.EXTRAS_GEOCODE, geocode);
@@ -478,7 +479,7 @@ public class Geocache implements ICache, IWaypoint {
}
final boolean status = cgData.saveLogOffline(geocode, date.getTime(), logType, log);
- Resources res = fromActivity.getResources();
+ final Resources res = fromActivity.getResources();
if (status) {
ActivityMixin.showToast(fromActivity, res.getString(R.string.info_log_saved));
cgData.saveVisitDate(geocode);
@@ -671,7 +672,7 @@ public class Geocache implements ICache, IWaypoint {
*/
private void initializeCacheTexts() {
if (description == null || shortdesc == null || hint == null || location == null) {
- Geocache partial = cgData.loadCacheTexts(this.getGeocode());
+ final Geocache partial = cgData.loadCacheTexts(this.getGeocode());
if (description == null) {
setDescription(partial.getDescription());
}
@@ -746,7 +747,7 @@ public class Geocache implements ICache, IWaypoint {
return;
}
- StringBuilder subject = new StringBuilder("Geocache ");
+ final StringBuilder subject = new StringBuilder("Geocache ");
subject.append(geocode);
if (StringUtils.isNotBlank(name)) {
subject.append(" - ").append(name);
@@ -787,11 +788,6 @@ public class Geocache implements ICache, IWaypoint {
}
@Override
- public boolean isWatchlist() {
- return onWatchlist;
- }
-
- @Override
public Date getHiddenDate() {
return hidden;
}
@@ -938,14 +934,6 @@ public class Geocache implements ICache, IWaypoint {
this.reliableLatLon = reliableLatLon;
}
- public Double getElevation() {
- return elevation;
- }
-
- public void setElevation(Double elevation) {
- this.elevation = elevation;
- }
-
public void setShortDescription(String shortdesc) {
this.shortdesc = shortdesc;
}
@@ -986,6 +974,7 @@ public class Geocache implements ICache, IWaypoint {
this.inventoryItems = inventoryItems;
}
+ @Override
public boolean isOnWatchlist() {
return onWatchlist;
}
@@ -1018,7 +1007,7 @@ public class Geocache implements ICache, IWaypoint {
}
finalDefined = false;
if (waypoints != null) {
- for (Waypoint waypoint : waypoints) {
+ for (final Waypoint waypoint : waypoints) {
waypoint.setGeocode(geocode);
if (waypoint.isFinalWithCoords()) {
finalDefined = true;
@@ -1039,8 +1028,8 @@ public class Geocache implements ICache, IWaypoint {
* @return only the logs of friends, never <code>null</code>
*/
public List<LogEntry> getFriendsLogs() {
- ArrayList<LogEntry> friendLogs = new ArrayList<LogEntry>();
- for (LogEntry log : logs) {
+ final ArrayList<LogEntry> friendLogs = new ArrayList<LogEntry>();
+ for (final LogEntry log : logs) {
if (log.friend) {
friendLogs.add(log);
}
@@ -1133,7 +1122,7 @@ public class Geocache implements ICache, IWaypoint {
}
public void setPersonalNote(String personalNote) {
- this.personalNote = personalNote;
+ this.personalNote = StringUtils.trimToNull(personalNote);
}
public void setDisabled(boolean disabled) {
@@ -1255,7 +1244,7 @@ public class Geocache implements ICache, IWaypoint {
*/
private void resetFinalDefined() {
finalDefined = false;
- for (Waypoint wp : waypoints) {
+ for (final Waypoint wp : waypoints) {
if (wp.isFinalWithCoords()) {
finalDefined = true;
break;
@@ -1403,14 +1392,14 @@ public class Geocache implements ICache, IWaypoint {
addOrChangeWaypoint(waypoint, false);
count++;
}
- } catch (Geopoint.ParseException e) {
+ } catch (final Geopoint.ParseException e) {
// ignore
}
note = note.substring(matcher.start() + 1);
matcher = new MatcherWrapper(coordPattern, note);
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Geocache.parseWaypointsFromNote", e);
}
}
@@ -1420,7 +1409,7 @@ public class Geocache implements ICache, IWaypoint {
*/
private static WaypointType parseWaypointType(final String input) {
final String lowerInput = StringUtils.substring(input, 0, 20).toLowerCase(Locale.getDefault());
- for (WaypointType wpType : WaypointType.values()) {
+ for (final WaypointType wpType : WaypointType.values()) {
if (lowerInput.contains(wpType.getL10n().toLowerCase(Locale.getDefault()))) {
return wpType;
}
@@ -1478,12 +1467,16 @@ public class Geocache implements ICache, IWaypoint {
}
public void store(final int listId, CancellableHandler handler) {
- int newListId = listId < StoredList.STANDARD_LIST_ID
+ final int newListId = listId < StoredList.STANDARD_LIST_ID
? Math.max(getListId(), StoredList.STANDARD_LIST_ID)
: listId;
storeCache(this, null, newListId, false, handler);
}
+ public int getZoomLevel() {
+ return this.zoomlevel;
+ }
+
public void setZoomlevel(int zoomlevel) {
this.zoomlevel = zoomlevel;
}
@@ -1509,7 +1502,7 @@ public class Geocache implements ICache, IWaypoint {
cgData.removeCache(getGeocode(), EnumSet.of(RemoveFlag.REMOVE_CACHE));
handler.sendMessage(Message.obtain());
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("cache.drop: ", e);
}
}
@@ -1608,7 +1601,7 @@ public class Geocache implements ICache, IWaypoint {
// store spoilers
if (CollectionUtils.isNotEmpty(cache.getSpoilers())) {
- for (Image oneSpoiler : cache.getSpoilers()) {
+ for (final Image oneSpoiler : cache.getSpoilers()) {
imgGetter.getDrawable(oneSpoiler.getUrl());
}
}
@@ -1619,9 +1612,9 @@ public class Geocache implements ICache, IWaypoint {
// store images from logs
if (Settings.isStoreLogImages()) {
- for (LogEntry log : cache.getLogs()) {
+ for (final LogEntry log : cache.getLogs()) {
if (log.hasLogImages()) {
- for (Image oneLogImg : log.getLogImages()) {
+ for (final Image oneLogImg : log.getLogImages()) {
imgGetter.getDrawable(oneLogImg.getUrl());
}
}
@@ -1644,7 +1637,7 @@ public class Geocache implements ICache, IWaypoint {
if (handler != null) {
handler.sendMessage(Message.obtain());
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Geocache.storeCache", e);
}
}
@@ -1697,7 +1690,7 @@ public class Geocache implements ICache, IWaypoint {
if (hours >= 0 && hours < 24 && minutes >= 0 && minutes < 60) {
return String.valueOf(hours * 60 + minutes);
}
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
// cannot happen, but static code analysis doesn't know
}
}
@@ -1712,7 +1705,7 @@ public class Geocache implements ICache, IWaypoint {
if (hours >= 0 && hours < 24) {
return String.valueOf(hours * 60);
}
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
// cannot happen, but static code analysis doesn't know
}
}
@@ -1741,9 +1734,9 @@ public class Geocache implements ICache, IWaypoint {
}
public List<Image> getImages() {
- List<Image> result = new ArrayList<Image>();
+ final List<Image> result = new ArrayList<Image>();
result.addAll(getSpoilers());
- for (LogEntry log : getLogs()) {
+ for (final LogEntry log : getLogs()) {
result.addAll(log.getLogImages());
}
return result;
@@ -1761,7 +1754,7 @@ public class Geocache implements ICache, IWaypoint {
* the cache, so the result might be wrong.
*/
public boolean hasOwnLog(LogType logType) {
- for (LogEntry logEntry : getLogs()) {
+ for (final LogEntry logEntry : getLogs()) {
if (logEntry.type == logType && logEntry.isOwn()) {
return true;
}
@@ -1772,4 +1765,12 @@ public class Geocache implements ICache, IWaypoint {
public int getMapMarkerId() {
return getConnector().getCacheMapMarkerId(isDisabled() || isArchived());
}
+
+ public boolean isLogPasswordRequired() {
+ return logPasswordRequired;
+ }
+
+ public void setLogPasswordRequired(boolean required) {
+ logPasswordRequired = required;
+ }
}
diff --git a/main/src/cgeo/geocaching/GpxFileListActivity.java b/main/src/cgeo/geocaching/GpxFileListActivity.java
index de0be21..8b10d5b 100644
--- a/main/src/cgeo/geocaching/GpxFileListActivity.java
+++ b/main/src/cgeo/geocaching/GpxFileListActivity.java
@@ -4,6 +4,7 @@ import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.IConnector;
import cgeo.geocaching.files.AbstractFileListActivity;
import cgeo.geocaching.files.GPXImporter;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.GPXListAdapter;
import org.apache.commons.lang3.StringUtils;
diff --git a/main/src/cgeo/geocaching/IBasicCache.java b/main/src/cgeo/geocaching/IBasicCache.java
deleted file mode 100644
index 7e9ef11..0000000
--- a/main/src/cgeo/geocaching/IBasicCache.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- *
- */
-package cgeo.geocaching;
-
-import cgeo.geocaching.enumerations.CacheSize;
-import cgeo.geocaching.enumerations.CacheType;
-
-public interface IBasicCache extends ILogable, ICoordinates {
-
- public abstract String getGuid();
-
- /**
- * @return Tradi, multi etc.
- */
- public abstract CacheType getType();
-
- /**
- * @return Micro, small etc.
- */
- public abstract CacheSize getSize();
-
- /**
- * @return true if the user already found the cache
- *
- */
- public abstract boolean isFound();
-
- /**
- * @return true if the cache is disabled, false else
- */
- public abstract boolean isDisabled();
-
- /**
- * @return Difficulty assessment
- */
- public abstract float getDifficulty();
-
- /**
- * @return Terrain assessment
- */
- public abstract float getTerrain();
-
-
-
-}
diff --git a/main/src/cgeo/geocaching/ICache.java b/main/src/cgeo/geocaching/ICache.java
index 6d0d89a..b99d877 100644
--- a/main/src/cgeo/geocaching/ICache.java
+++ b/main/src/cgeo/geocaching/ICache.java
@@ -3,6 +3,8 @@
*/
package cgeo.geocaching;
+import cgeo.geocaching.enumerations.CacheSize;
+import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LogType;
import java.util.Date;
@@ -12,7 +14,7 @@ import java.util.Map;
/**
* Basic interface for caches
*/
-public interface ICache extends IBasicCache {
+public interface ICache extends ILogable, ICoordinates {
/**
* @return Displayed owner, might differ from the real owner
@@ -63,7 +65,6 @@ public interface ICache extends IBasicCache {
/**
* @return Guid
*/
- @Override
public String getGuid();
/**
@@ -93,7 +94,7 @@ public interface ICache extends IBasicCache {
* @return true if the cache is on the watchlist of the user
*
*/
- public boolean isWatchlist();
+ public boolean isOnWatchlist();
/**
* @return The date the cache has been hidden
@@ -129,4 +130,35 @@ public interface ICache extends IBasicCache {
* @return normalized, cached name which sort also correct for numerical parts in the name
*/
public String getNameForSorting();
+
+ /**
+ * @return Tradi, multi etc.
+ */
+ CacheType getType();
+
+ /**
+ * @return Micro, small etc.
+ */
+ CacheSize getSize();
+
+ /**
+ * @return true if the user already found the cache
+ *
+ */
+ boolean isFound();
+
+ /**
+ * @return true if the cache is disabled, false else
+ */
+ boolean isDisabled();
+
+ /**
+ * @return Difficulty assessment
+ */
+ float getDifficulty();
+
+ /**
+ * @return Terrain assessment
+ */
+ float getTerrain();
}
diff --git a/main/src/cgeo/geocaching/IGeoData.java b/main/src/cgeo/geocaching/IGeoData.java
index 252fd4f..c5ef698 100644
--- a/main/src/cgeo/geocaching/IGeoData.java
+++ b/main/src/cgeo/geocaching/IGeoData.java
@@ -13,7 +13,6 @@ public interface IGeoData {
public boolean isPseudoLocation();
public Geopoint getCoords();
- public double getAltitude();
public float getBearing();
public float getSpeed();
public float getAccuracy();
diff --git a/main/src/cgeo/geocaching/ImageSelectActivity.java b/main/src/cgeo/geocaching/ImageSelectActivity.java
index 39824a9..52f9a7e 100644
--- a/main/src/cgeo/geocaching/ImageSelectActivity.java
+++ b/main/src/cgeo/geocaching/ImageSelectActivity.java
@@ -5,6 +5,7 @@ import butterknife.Views;
import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.compatibility.Compatibility;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.ImageUtils;
import cgeo.geocaching.utils.Log;
@@ -283,7 +284,6 @@ public class ImageSelectActivity extends AbstractActivity {
image = BitmapFactory.decodeFile(filePath);
}
final BitmapDrawable scaledImage = ImageUtils.scaleBitmapTo(image, maxXY, maxXY);
- image = null;
final String uploadFilename = getOutputImageFile().getPath();
ImageUtils.storeBitmap(scaledImage.getBitmap(), Bitmap.CompressFormat.JPEG, 75, uploadFilename);
return uploadFilename;
diff --git a/main/src/cgeo/geocaching/ImagesActivity.java b/main/src/cgeo/geocaching/ImagesActivity.java
index 030b3f7..0b80d53 100644
--- a/main/src/cgeo/geocaching/ImagesActivity.java
+++ b/main/src/cgeo/geocaching/ImagesActivity.java
@@ -1,6 +1,7 @@
package cgeo.geocaching;
import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.ImagesList;
import cgeo.geocaching.ui.ImagesList.ImageType;
@@ -57,7 +58,8 @@ public class ImagesActivity extends AbstractActivity {
return;
}
- offline = cgData.isOffline(geocode, null) && (imgType == ImageType.SpoilerImages || Settings.isStoreLogImages());
+ offline = cgData.isOffline(geocode, null) && (imgType == ImageType.SpoilerImages
+ || Settings.isStoreLogImages());
}
@Override
diff --git a/main/src/cgeo/geocaching/LogCacheActivity.java b/main/src/cgeo/geocaching/LogCacheActivity.java
index 62c94ce..e11af0f 100644
--- a/main/src/cgeo/geocaching/LogCacheActivity.java
+++ b/main/src/cgeo/geocaching/LogCacheActivity.java
@@ -8,6 +8,7 @@ import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.enumerations.LogTypeTrackable;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.gcvote.GCVote;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.twitter.Twitter;
import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.dialog.DateDialog;
@@ -71,6 +72,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
private Button postButton = null;
private CheckBox tweetCheck = null;
private LinearLayout tweetBox = null;
+ private LinearLayout logPasswordBox = null;
private boolean tbChanged = false;
private SparseArray<TrackableLog> actionButtons;
@@ -252,6 +254,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
postButton = (Button) findViewById(R.id.post);
tweetBox = (LinearLayout) findViewById(R.id.tweet_box);
tweetCheck = (CheckBox) findViewById(R.id.tweet);
+ logPasswordBox = (LinearLayout) findViewById(R.id.log_password_box);
// initialize with default values
setDefaultValues();
@@ -302,6 +305,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
tweetCheck.setChecked(true);
updateTweetBox(typeSelected);
+ updateLogPasswordBox(typeSelected);
final Button imageButton = (Button) findViewById(R.id.image_btn);
imageButton.setOnClickListener(new View.OnClickListener() {
@@ -377,6 +381,8 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
final EditText logView = (EditText) findViewById(R.id.log);
logView.setText(StringUtils.EMPTY);
+ final EditText logPasswordView = (EditText) findViewById(R.id.log_password);
+ logPasswordView.setText(StringUtils.EMPTY);
updateImageButton();
@@ -418,7 +424,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
- final boolean voteAvailable = Settings.isGCvoteLogin() && typeSelected == LogType.FOUND_IT && StringUtils.isNotBlank(cache.getGuid()) && cache.supportsGCVote();
+ final boolean voteAvailable = Settings.isGCvoteLogin() && (typeSelected == LogType.FOUND_IT || typeSelected == LogType.ATTENDED || typeSelected == LogType.WEBCAM_PHOTO_TAKEN) && StringUtils.isNotBlank(cache.getGuid()) && cache.supportsGCVote();
menu.findItem(SUBMENU_VOTE).setVisible(voteAvailable);
return true;
@@ -484,13 +490,21 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
private void updateTweetBox(LogType type) {
- if (type == LogType.FOUND_IT && Settings.isUseTwitter()) {
+ if (type == LogType.FOUND_IT && Settings.isUseTwitter() && Settings.isTwitterLoginValid()) {
tweetBox.setVisibility(View.VISIBLE);
} else {
tweetBox.setVisibility(View.GONE);
}
}
+ private void updateLogPasswordBox(LogType type) {
+ if (type == LogType.FOUND_IT && cache.isLogPasswordRequired()) {
+ logPasswordBox.setVisibility(View.VISIBLE);
+ } else {
+ logPasswordBox.setVisibility(View.GONE);
+ }
+ }
+
private class DateListener implements View.OnClickListener {
@Override
@@ -507,7 +521,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
final String message = res.getString(StringUtils.isBlank(imageUri.getPath()) ?
R.string.log_saving :
R.string.log_saving_and_uploading);
- new Poster(LogCacheActivity.this, message).execute(currentLogText());
+ new Poster(LogCacheActivity.this, message).execute(currentLogText(), currentLogPassword());
}
}
@@ -520,8 +534,9 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
@Override
protected StatusCode doInBackgroundInternal(final String[] logTexts) {
final String log = logTexts[0];
+ final String logPwd = logTexts.length > 1 ? logTexts[1] : null;
try {
- final LogResult logResult = loggingManager.postLog(cache, typeSelected, date, log, trackables);
+ final LogResult logResult = loggingManager.postLog(cache, typeSelected, date, log, logPwd, trackables);
if (logResult.getPostLogResult() == StatusCode.NO_ERROR) {
final LogEntry logNow = new LogEntry(date, typeSelected, log);
@@ -593,6 +608,10 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
return ((EditText) findViewById(R.id.log)).getText().toString();
}
+ private String currentLogPassword() {
+ return ((EditText) findViewById(R.id.log_password)).getText().toString();
+ }
+
@Override
protected LogContext getLogContext() {
return new LogContext(cache);
diff --git a/main/src/cgeo/geocaching/LogEntry.java b/main/src/cgeo/geocaching/LogEntry.java
index df1038f..0121424 100644
--- a/main/src/cgeo/geocaching/LogEntry.java
+++ b/main/src/cgeo/geocaching/LogEntry.java
@@ -1,6 +1,7 @@
package cgeo.geocaching;
import cgeo.geocaching.enumerations.LogType;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.DateUtils;
import cgeo.geocaching.utils.MatcherWrapper;
@@ -37,7 +38,7 @@ public final class LogEntry {
this(Settings.getUsername(), dateInMilliSeconds, type, text);
}
- public LogEntry(final String author, long dateInMilliSeconds, final LogType type, final String text) {
+ public LogEntry(final String author, final long dateInMilliSeconds, final LogType type, final String text) {
this.author = author;
this.date = dateInMilliSeconds;
this.type = type;
@@ -50,7 +51,7 @@ public final class LogEntry {
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
@@ -108,7 +109,7 @@ public final class LogEntry {
public String getDisplayText() {
if (Settings.getPlainLogs()) {
MatcherWrapper matcher = new MatcherWrapper(PATTERN_REMOVE_COLORS, log);
- return matcher.replaceAll("");
+ return matcher.replaceAll(StringUtils.EMPTY);
}
return log;
}
diff --git a/main/src/cgeo/geocaching/LogTrackableActivity.java b/main/src/cgeo/geocaching/LogTrackableActivity.java
index 1f6feb7..f0dd7f9 100644
--- a/main/src/cgeo/geocaching/LogTrackableActivity.java
+++ b/main/src/cgeo/geocaching/LogTrackableActivity.java
@@ -9,6 +9,7 @@ import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.twitter.Twitter;
import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.dialog.DateDialog;
@@ -223,7 +224,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
typeSelected = type;
typeButton.setText(typeSelected.getL10n());
- if (Settings.isUseTwitter()) {
+ if (Settings.isUseTwitter() && Settings.isTwitterLoginValid()) {
tweetBox.setVisibility(View.VISIBLE);
} else {
tweetBox.setVisibility(View.GONE);
diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java
index 03a1d0d..24b4a58 100644
--- a/main/src/cgeo/geocaching/MainActivity.java
+++ b/main/src/cgeo/geocaching/MainActivity.java
@@ -5,17 +5,18 @@ import butterknife.Views;
import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.connector.ConnectorFactory;
-import cgeo.geocaching.connector.IConnector;
-import cgeo.geocaching.connector.gc.Login;
-import cgeo.geocaching.connector.oc.OCApiLiveConnector;
+import cgeo.geocaching.connector.capability.ILogin;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Units;
import cgeo.geocaching.maps.CGeoMap;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.SettingsActivity;
import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.utils.GeoDirHandler;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.ProcessUtils;
import cgeo.geocaching.utils.RunnableWithArgument;
import cgeo.geocaching.utils.Version;
@@ -30,19 +31,19 @@ import android.app.AlertDialog.Builder;
import android.app.SearchManager;
import android.content.DialogInterface;
import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.location.Address;
import android.location.Geocoder;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
+import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
+import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.ArrayList;
@@ -53,8 +54,6 @@ import java.util.List;
import java.util.Locale;
public class MainActivity extends AbstractActivity {
- @InjectView(R.id.user_info_gc) protected TextView userInfoViewGc;
- @InjectView(R.id.user_info_ocde) protected TextView userInfoViewOcDe;
@InjectView(R.id.nav_satellites) protected TextView navSatellites;
@InjectView(R.id.filter_button_title)protected TextView filterTitle;
@InjectView(R.id.map) protected ImageView findOnMap;
@@ -63,10 +62,11 @@ public class MainActivity extends AbstractActivity {
@InjectView(R.id.any_button) protected ImageView any;
@InjectView(R.id.filter_button) protected ImageView filter;
@InjectView(R.id.nearest) protected ImageView nearestView;
- @InjectView(R.id.nav_type) protected TextView navType ;
- @InjectView(R.id.nav_accuracy) protected TextView navAccuracy ;
- @InjectView(R.id.nav_location) protected TextView navLocation ;
- @InjectView(R.id.offline_count) protected TextView countBubble ;
+ @InjectView(R.id.nav_type) protected TextView navType;
+ @InjectView(R.id.nav_accuracy) protected TextView navAccuracy;
+ @InjectView(R.id.nav_location) protected TextView navLocation;
+ @InjectView(R.id.offline_count) protected TextView countBubble;
+ @InjectView(R.id.info_area) protected LinearLayout infoArea;
private static final String SCAN_INTENT = "com.google.zxing.client.android.SCAN";
public static final int SEARCH_REQUEST_CODE = 2;
@@ -79,84 +79,66 @@ public class MainActivity extends AbstractActivity {
private boolean addressObtaining = false;
private boolean initialized = false;
- final private UpdateLocation locationUpdater = new UpdateLocation();
+ private final UpdateLocation locationUpdater = new UpdateLocation();
private Handler updateUserInfoHandler = new Handler() {
@Override
- public void handleMessage(Message msg) {
-
- //TODO: Rework to be fully dynamic
- if (Settings.isGCConnectorActive()) {
- StringBuilder userInfo = new StringBuilder("geocaching.com").append(Formatter.SEPARATOR);
- if (Login.isActualLoginStatus()) {
- userInfo.append(Login.getActualUserName());
- if (Login.getActualCachesFound() >= 0) {
- userInfo.append(" (").append(String.valueOf(Login.getActualCachesFound())).append(')');
- }
- userInfo.append(Formatter.SEPARATOR);
- }
- userInfo.append(Login.getActualStatus());
+ public void handleMessage(final Message msg) {
- userInfoViewGc.setText(userInfo.toString());
- userInfoViewGc.setVisibility(View.VISIBLE);
- }
- else {
- userInfoViewGc.setVisibility(View.GONE);
- }
+ // Get active connectors with login status
+ ILogin[] loginConns = ConnectorFactory.getActiveLiveConnectors();
- if (Settings.isOCConnectorActive()) {
- StringBuilder userInfo = new StringBuilder("opencaching.de").append(Formatter.SEPARATOR);
- IConnector conn = ConnectorFactory.getConnector("OCXXXX");
- if (conn instanceof OCApiLiveConnector) {
- OCApiLiveConnector ocapiConn = (OCApiLiveConnector) conn;
- if (ocapiConn.supportsPersonalization()) {
- userInfo.append(ocapiConn.getUserName());
- int count = ocapiConn.getCachesFound();
- if (count >= 0) {
- userInfo.append(" (").append(String.valueOf(count)).append(')');
- }
- } else {
- userInfo.append("Anonymous");
+ // Update UI
+ infoArea.removeAllViews();
+ LayoutInflater inflater = getLayoutInflater();
+
+ for (ILogin conn : loginConns) {
+
+ TextView connectorInfo = (TextView) inflater.inflate(R.layout.main_activity_connectorstatus, null);
+ infoArea.addView(connectorInfo);
+
+ StringBuilder userInfo = new StringBuilder(conn.getName()).append(Formatter.SEPARATOR);
+ if (conn.isLoggedIn()) {
+ userInfo.append(conn.getUserName());
+ if (conn.getCachesFound() >= 0) {
+ userInfo.append(" (").append(String.valueOf(conn.getCachesFound())).append(')');
}
+ userInfo.append(Formatter.SEPARATOR);
}
- userInfoViewOcDe.setText(userInfo.toString());
- userInfoViewOcDe.setVisibility(View.VISIBLE);
- }
- else {
- userInfoViewOcDe.setVisibility(View.GONE);
- }
+ userInfo.append(conn.getLoginStatusString());
+ connectorInfo.setText(userInfo);
+ }
}
};
private Handler obtainAddressHandler = new Handler() {
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
try {
if (CollectionUtils.isNotEmpty(addresses)) {
final Address address = addresses.get(0);
- final StringBuilder addText = new StringBuilder();
+ final ArrayList<String> addressParts = new ArrayList<String>();
- if (address.getCountryName() != null) {
- addText.append(address.getCountryName());
+ final String countryName = address.getCountryName();
+ if (countryName != null) {
+ addressParts.add(countryName);
}
- if (address.getLocality() != null) {
- if (addText.length() > 0) {
- addText.append(", ");
- }
- addText.append(address.getLocality());
- } else if (address.getAdminArea() != null) {
- if (addText.length() > 0) {
- addText.append(", ");
+ final String locality = address.getLocality();
+ if (locality != null) {
+ addressParts.add(locality);
+ } else {
+ final String adminArea = address.getAdminArea();
+ if (adminArea != null) {
+ addressParts.add(adminArea);
}
- addText.append(address.getAdminArea());
}
addCoords = app.currentGeo().getCoords();
- navLocation.setText(addText.toString());
+ navLocation.setText(StringUtils.join(addressParts, ", "));
}
} catch (Exception e) {
// nothing
@@ -201,7 +183,7 @@ public class MainActivity extends AbstractActivity {
private Handler firstLoginHandler = new Handler() {
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
try {
final StatusCode reason = (StatusCode) msg.obj;
@@ -215,7 +197,7 @@ public class MainActivity extends AbstractActivity {
};
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
// don't call the super implementation with the layout argument, as that would set the wrong theme
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
@@ -236,7 +218,7 @@ public class MainActivity extends AbstractActivity {
}
@Override
- public void onConfigurationChanged(Configuration newConfig) {
+ public void onConfigurationChanged(final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
init();
@@ -274,31 +256,20 @@ public class MainActivity extends AbstractActivity {
}
@Override
- public boolean onCreateOptionsMenu(Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.main_activity_options, menu);
return true;
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(final Menu menu) {
super.onPrepareOptionsMenu(menu);
- MenuItem item = menu.findItem(R.id.menu_scan);
- if (item != null) {
- item.setEnabled(isIntentAvailable(SCAN_INTENT));
- }
+ menu.findItem(R.id.menu_scan).setEnabled(ProcessUtils.isIntentAvailable(SCAN_INTENT));
return true;
}
- public static boolean isIntentAvailable(String intent) {
- final PackageManager packageManager = cgeoapplication.getInstance().getPackageManager();
- final List<ResolveInfo> list = packageManager.queryIntentActivities(
- new Intent(intent), PackageManager.MATCH_DEFAULT_ONLY);
-
- return CollectionUtils.isNotEmpty(list);
- }
-
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
final int id = item.getItemId();
switch (id) {
case R.id.menu_about:
@@ -328,7 +299,7 @@ public class MainActivity extends AbstractActivity {
}
@Override
- public void onActivityResult(int requestCode, int resultCode, Intent intent) {
+ public void onActivityResult(final int requestCode, final int resultCode, final Intent intent) {
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
if (scanResult != null) {
String scan = scanResult.getContents();
@@ -364,7 +335,7 @@ public class MainActivity extends AbstractActivity {
initialized = true;
Settings.setLanguage(Settings.isUseEnglish());
- Settings.getLogin();
+ Settings.getGcLogin();
if (app.firstRun) {
(new FirstLoginThread()).start();
@@ -373,7 +344,7 @@ public class MainActivity extends AbstractActivity {
findOnMap.setClickable(true);
findOnMap.setOnClickListener(new OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
cgeoFindOnMap(v);
}
});
@@ -381,18 +352,18 @@ public class MainActivity extends AbstractActivity {
findByOffline.setClickable(true);
findByOffline.setOnClickListener(new OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
cgeoFindByOffline(v);
}
});
findByOffline.setOnLongClickListener(new View.OnLongClickListener() {
@Override
- public boolean onLongClick(View v) {
+ public boolean onLongClick(final View v) {
new StoredList.UserInterface(MainActivity.this).promptForListSelection(R.string.list_title, new RunnableWithArgument<Integer>() {
@Override
- public void run(Integer selectedListId) {
+ public void run(final Integer selectedListId) {
Settings.saveLastList(selectedListId);
cgeocaches.startActivityOffline(MainActivity.this);
}
@@ -405,7 +376,7 @@ public class MainActivity extends AbstractActivity {
advanced.setClickable(true);
advanced.setOnClickListener(new OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
cgeoSearch(v);
}
});
@@ -413,7 +384,7 @@ public class MainActivity extends AbstractActivity {
any.setClickable(true);
any.setOnClickListener(new OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
cgeoPoint(v);
}
});
@@ -421,14 +392,14 @@ public class MainActivity extends AbstractActivity {
filter.setClickable(true);
filter.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
selectGlobalTypeFilter();
}
});
filter.setOnLongClickListener(new View.OnLongClickListener() {
@Override
- public boolean onLongClick(View v) {
+ public boolean onLongClick(final View v) {
selectGlobalTypeFilter();
return true;
}
@@ -458,7 +429,7 @@ public class MainActivity extends AbstractActivity {
Collections.sort(sorted, new Comparator<CacheType>() {
@Override
- public int compare(CacheType left, CacheType right) {
+ public int compare(final CacheType left, final CacheType right) {
return left.getL10n().compareToIgnoreCase(right.getL10n());
}
});
@@ -480,7 +451,7 @@ public class MainActivity extends AbstractActivity {
builder.setSingleChoiceItems(items, checkedItem, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int position) {
+ public void onClick(final DialogInterface dialog, final int position) {
CacheType cacheType = cacheTypes.get(position);
Settings.setCacheType(cacheType);
setFilterTitle();
@@ -505,7 +476,7 @@ public class MainActivity extends AbstractActivity {
.setCancelable(false)
.setPositiveButton(getString(android.R.string.yes), new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int id) {
+ public void onClick(final DialogInterface dialog, final int id) {
dialog.dismiss();
cgData.resetNewlyCreatedDatabase();
app.restoreDatabase(MainActivity.this);
@@ -513,7 +484,7 @@ public class MainActivity extends AbstractActivity {
})
.setNegativeButton(getString(android.R.string.no), new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int id) {
+ public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
cgData.resetNewlyCreatedDatabase();
}
@@ -533,7 +504,7 @@ public class MainActivity extends AbstractActivity {
nearestView.setClickable(true);
nearestView.setOnClickListener(new OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
cgeoFindNearest(v);
}
});
@@ -557,12 +528,7 @@ public class MainActivity extends AbstractActivity {
(new ObtainAddressThread()).start();
}
} else {
- if (geo.getAltitude() != 0.0) {
- final String humanAlt = Units.getDistanceFromKilometers((float) geo.getAltitude() / 1000);
- navLocation.setText(geo.getCoords() + " | " + humanAlt);
- } else {
- navLocation.setText(geo.getCoords().toString());
- }
+ navLocation.setText(geo.getCoords().toString());
}
} else {
if (nearestView.isClickable()) {
@@ -585,7 +551,7 @@ public class MainActivity extends AbstractActivity {
* @param v
* unused here but needed since this method is referenced from XML layout
*/
- public void cgeoFindOnMap(View v) {
+ public void cgeoFindOnMap(final View v) {
findOnMap.setPressed(true);
CGeoMap.startActivityLiveMap(this);
}
@@ -594,7 +560,7 @@ public class MainActivity extends AbstractActivity {
* @param v
* unused here but needed since this method is referenced from XML layout
*/
- public void cgeoFindNearest(View v) {
+ public void cgeoFindNearest(final View v) {
if (app.currentGeo().getCoords() == null) {
return;
}
@@ -607,7 +573,7 @@ public class MainActivity extends AbstractActivity {
* @param v
* unused here but needed since this method is referenced from XML layout
*/
- public void cgeoFindByOffline(View v) {
+ public void cgeoFindByOffline(final View v) {
findByOffline.setPressed(true);
cgeocaches.startActivityOffline(this);
}
@@ -616,7 +582,7 @@ public class MainActivity extends AbstractActivity {
* @param v
* unused here but needed since this method is referenced from XML layout
*/
- public void cgeoSearch(View v) {
+ public void cgeoSearch(final View v) {
advanced.setPressed(true);
startActivity(new Intent(this, SearchActivity.class));
}
@@ -625,7 +591,7 @@ public class MainActivity extends AbstractActivity {
* @param v
* unused here but needed since this method is referenced from XML layout
*/
- public void cgeoPoint(View v) {
+ public void cgeoPoint(final View v) {
any.setPressed(true);
startActivity(new Intent(this, NavigateAnyPointActivity.class));
}
@@ -634,7 +600,7 @@ public class MainActivity extends AbstractActivity {
* @param v
* unused here but needed since this method is referenced from XML layout
*/
- public void cgeoFilter(View v) {
+ public void cgeoFilter(final View v) {
filter.setPressed(true);
filter.performClick();
}
@@ -643,7 +609,7 @@ public class MainActivity extends AbstractActivity {
* @param v
* unused here but needed since this method is referenced from XML layout
*/
- public void cgeoNavSettings(View v) {
+ public void cgeoNavSettings(final View v) {
startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));
}
@@ -651,7 +617,7 @@ public class MainActivity extends AbstractActivity {
private Handler countBubbleHandler = new Handler() {
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
try {
if (countBubbleCnt == 0) {
countBubble.setVisibility(View.GONE);
@@ -728,36 +694,11 @@ public class MainActivity extends AbstractActivity {
return;
}
- //TODO: Rework to be fully dynamic
- if (Settings.isGCConnectorActive()) {
- // login
- final StatusCode status = Login.login();
-
- if (status == StatusCode.NO_ERROR) {
- app.firstRun = false;
- Login.detectGcCustomDate();
- updateUserInfoHandler.sendEmptyMessage(-1);
- }
-
- if (app.showLoginToast) {
- firstLoginHandler.sendMessage(firstLoginHandler.obtainMessage(0, status));
- app.showLoginToast = false;
+ ILogin[] conns = ConnectorFactory.getActiveLiveConnectors();
- // invoke settings activity to insert login details
- if (status == StatusCode.NO_LOGIN_INFO_STORED) {
- SettingsActivity.startActivity(MainActivity.this);
- }
- }
- }
- if (Settings.isOCConnectorActive()) {
- IConnector conn = ConnectorFactory.getConnector("OCXXXX");
- if (conn instanceof OCApiLiveConnector) {
- OCApiLiveConnector ocapiConn = (OCApiLiveConnector) conn;
- if (ocapiConn.supportsPersonalization()) {
- ocapiConn.retrieveUserInfo();
- }
- updateUserInfoHandler.sendEmptyMessage(-1);
- }
+ for (ILogin conn : conns) {
+ conn.login(firstLoginHandler, MainActivity.this);
+ updateUserInfoHandler.sendEmptyMessage(-1);
}
}
}
@@ -793,7 +734,7 @@ public class MainActivity extends AbstractActivity {
* @param view
* unused here but needed since this method is referenced from XML layout
*/
- public void showAbout(View view) {
+ public void showAbout(final View view) {
AboutActivity_.intent(this).start();
}
@@ -801,7 +742,7 @@ public class MainActivity extends AbstractActivity {
* @param view
* unused here but needed since this method is referenced from XML layout
*/
- public void goSearch(View view) {
+ public void goSearch(final View view) {
onSearchRequested();
}
diff --git a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java
index 6f94944..be4ef05 100644
--- a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java
+++ b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java
@@ -8,6 +8,7 @@ import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
import cgeo.geocaching.geopoint.DistanceParser;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.GeopointFormatter;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.AbstractViewHolder;
import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.dialog.CoordinatesInputDialog;
@@ -61,7 +62,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
private int contextMenuItemPosition;
- private String distanceUnit = "";
+ private String distanceUnit = StringUtils.EMPTY;
protected static class ViewHolder extends AbstractViewHolder {
@InjectView(R.id.simple_way_point_longitude) protected TextView longitude;
@@ -259,12 +260,12 @@ public class NavigateAnyPointActivity extends AbstractActivity {
private void initializeDistanceUnitSelector() {
if (StringUtils.isBlank(distanceUnit)) {
- if (Settings.isUseMetricUnits()) {
- distanceUnitSelector.setSelection(0); // m
- distanceUnit = res.getStringArray(R.array.distance_units)[0];
- } else {
+ if (Settings.isUseImperialUnits()) {
distanceUnitSelector.setSelection(2); // ft
distanceUnit = res.getStringArray(R.array.distance_units)[2];
+ } else {
+ distanceUnitSelector.setSelection(0); // m
+ distanceUnit = res.getStringArray(R.array.distance_units)[0];
}
}
@@ -519,7 +520,8 @@ public class NavigateAnyPointActivity extends AbstractActivity {
double distance;
try {
- distance = DistanceParser.parseDistance(distanceText, Settings.isUseMetricUnits());
+ distance = DistanceParser.parseDistance(distanceText,
+ !Settings.isUseImperialUnits());
} catch (NumberFormatException e) {
showToast(res.getString(R.string.err_parse_dist));
return null;
diff --git a/main/src/cgeo/geocaching/PersonalNote.java b/main/src/cgeo/geocaching/PersonalNote.java
new file mode 100644
index 0000000..82e88f7
--- /dev/null
+++ b/main/src/cgeo/geocaching/PersonalNote.java
@@ -0,0 +1,106 @@
+package cgeo.geocaching;
+
+import org.apache.commons.lang3.StringUtils;
+
+
+public class PersonalNote {
+ private static final String SEPARATOR = "\n--\n";
+ private String cgeoNote;
+ private String providerNote;
+ private boolean isOffline;
+
+ private PersonalNote() {
+ // Empty default constructor
+ }
+
+ public PersonalNote(final Geocache cache) {
+ this.isOffline = cache.isOffline();
+ final String personalNote = cache.getPersonalNote();
+ if (StringUtils.isEmpty(personalNote)) {
+ return;
+ }
+ final String[] notes = StringUtils.splitByWholeSeparator(personalNote, SEPARATOR);
+ if (notes.length > 1) {
+ this.cgeoNote = notes[0];
+ this.providerNote = notes[1];
+ } else {
+ this.providerNote = notes[0];
+ }
+ }
+
+ public final PersonalNote mergeWith(final PersonalNote other) {
+ if (StringUtils.isEmpty(cgeoNote) && StringUtils.isEmpty(other.cgeoNote)) {
+ return mergeOnlyProviderNotes(other);
+ }
+ final PersonalNote result = new PersonalNote();
+ if (cgeoNote != null && other.cgeoNote != null) {
+ if (other.isOffline) {
+ result.cgeoNote = other.cgeoNote;
+ } else {
+ result.cgeoNote = cgeoNote;
+ }
+ }
+ if (other.cgeoNote != null) {
+ result.cgeoNote = other.cgeoNote;
+ } else {
+ result.cgeoNote = cgeoNote;
+ }
+ if (providerNote != null && other.providerNote != null) {
+ if (isOffline) {
+ result.providerNote = providerNote;
+ } else {
+ result.providerNote = other.providerNote;
+ }
+ }
+ if (providerNote != null) {
+ result.providerNote = providerNote;
+ } else {
+ result.providerNote = other.providerNote;
+ }
+ return result;
+ }
+
+ /**
+ * Merge different provider notes from c:geo and provider.
+ *
+ * @param other
+ * The note to merge
+ * @return PersonalNote The merged note
+ */
+ private PersonalNote mergeOnlyProviderNotes(final PersonalNote other) {
+ final PersonalNote result = new PersonalNote();
+ if (StringUtils.isNotEmpty(other.providerNote) && StringUtils.isNotEmpty(providerNote)) {
+ if (providerNote.equals(other.providerNote)) {
+ result.providerNote = providerNote;
+ return result;
+ }
+ if (other.isOffline) {
+ result.cgeoNote = other.providerNote;
+ result.providerNote = providerNote;
+ } else {
+ result.cgeoNote = providerNote;
+ result.providerNote = other.providerNote;
+ }
+ }
+ return result;
+ }
+
+ @Override
+ public final String toString() {
+ final StringBuilder builder = new StringBuilder();
+ if (cgeoNote != null) {
+ builder.append(cgeoNote).append(SEPARATOR);
+ }
+ builder.append(providerNote);
+ return builder.toString();
+ }
+
+ public final String getCgeoNote() {
+ return cgeoNote;
+ }
+
+ public final String getProviderNote() {
+ return providerNote;
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/SearchActivity.java b/main/src/cgeo/geocaching/SearchActivity.java
index c2a7b6d..6285cda 100644
--- a/main/src/cgeo/geocaching/SearchActivity.java
+++ b/main/src/cgeo/geocaching/SearchActivity.java
@@ -10,6 +10,7 @@ import cgeo.geocaching.connector.capability.ISearchByGeocode;
import cgeo.geocaching.connector.trackable.TrackableConnector;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.GeopointFormatter;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.dialog.CoordinatesInputDialog;
import cgeo.geocaching.utils.EditUtils;
import cgeo.geocaching.utils.GeoDirHandler;
@@ -126,9 +127,7 @@ public class SearchActivity extends AbstractActivity {
final IConnector connector = ConnectorFactory.getConnector(geocode);
if (connector instanceof ISearchByGeocode) {
- final Intent cachesIntent = new Intent(this, CacheDetailActivity.class);
- cachesIntent.putExtra(Intents.EXTRA_GEOCODE, geocode.toUpperCase(Locale.US));
- startActivity(cachesIntent);
+ CacheDetailActivity.startActivity(this, geocode.toUpperCase(Locale.US));
return true;
}
@@ -150,7 +149,7 @@ public class SearchActivity extends AbstractActivity {
}
private void init() {
- Settings.getLogin();
+ Settings.getGcLogin();
buttonLatitude.setOnClickListener(new FindByCoordsAction());
buttonLongitude.setOnClickListener(new FindByCoordsAction());
diff --git a/main/src/cgeo/geocaching/SearchResult.java b/main/src/cgeo/geocaching/SearchResult.java
index 4cef95e..5053a85 100644
--- a/main/src/cgeo/geocaching/SearchResult.java
+++ b/main/src/cgeo/geocaching/SearchResult.java
@@ -24,6 +24,7 @@ import java.util.Set;
public class SearchResult implements Parcelable {
final private Set<String> geocodes;
+ final private Set<String> filteredGeocodes;
private StatusCode error = null;
private String url = "";
public String[] viewstates = null;
@@ -55,6 +56,7 @@ public class SearchResult implements Parcelable {
*/
public SearchResult(final SearchResult searchResult) {
geocodes = new HashSet<String>(searchResult.geocodes);
+ filteredGeocodes = new HashSet<String>(searchResult.filteredGeocodes);
error = searchResult.error;
url = searchResult.url;
viewstates = searchResult.viewstates;
@@ -70,6 +72,7 @@ public class SearchResult implements Parcelable {
public SearchResult(final Collection<String> geocodes, final int total) {
this.geocodes = new HashSet<String>(geocodes.size());
this.geocodes.addAll(geocodes);
+ this.filteredGeocodes = new HashSet<String>();
this.setTotal(total);
}
@@ -86,6 +89,9 @@ public class SearchResult implements Parcelable {
final ArrayList<String> list = new ArrayList<String>();
in.readStringList(list);
geocodes = new HashSet<String>(list);
+ final ArrayList<String> filteredList = new ArrayList<String>();
+ in.readStringList(filteredList);
+ filteredGeocodes = new HashSet<String>(filteredList);
error = (StatusCode) in.readSerializable();
url = in.readString();
final int length = in.readInt();
@@ -121,6 +127,7 @@ public class SearchResult implements Parcelable {
@Override
public void writeToParcel(final Parcel out, final int flags) {
out.writeStringArray(geocodes.toArray(new String[geocodes.size()]));
+ out.writeStringArray(filteredGeocodes.toArray(new String[filteredGeocodes.size()]));
out.writeSerializable(error);
out.writeString(url);
if (viewstates == null) {
@@ -193,16 +200,21 @@ public class SearchResult implements Parcelable {
result.geocodes.clear();
final ArrayList<Geocache> cachesForVote = new ArrayList<Geocache>();
final Set<Geocache> caches = cgData.loadCaches(geocodes, LoadFlags.LOAD_CACHE_OR_DB);
+ int excluded = 0;
for (Geocache cache : caches) {
// Is there any reason to exclude the cache from the list?
final boolean excludeCache = (excludeDisabled && cache.isDisabled()) ||
(excludeMine && (cache.isOwner() || cache.isFound())) ||
(!cacheType.contains(cache));
- if (!excludeCache) {
+ if (excludeCache) {
+ excluded++;
+ } else {
result.addAndPutInCache(cache);
cachesForVote.add(cache);
}
}
+ // decrease maximum number of caches by filtered ones
+ result.setTotal(result.getTotal() - excluded);
GCVote.loadRatings(cachesForVote);
return result;
}
@@ -247,4 +259,19 @@ public class SearchResult implements Parcelable {
return false;
}
+ public void addFilteredGeocodes(Set<String> cachedMissingFromSearch) {
+ filteredGeocodes.addAll(cachedMissingFromSearch);
+ }
+
+ public Set<String> getFilteredGeocodes() {
+ return Collections.unmodifiableSet(filteredGeocodes);
+ }
+
+ public void addSearchResult(SearchResult other) {
+ if (other != null) {
+ addGeocodes(other.geocodes);
+ addFilteredGeocodes(other.filteredGeocodes);
+ }
+ }
+
}
diff --git a/main/src/cgeo/geocaching/SelectMapfileActivity.java b/main/src/cgeo/geocaching/SelectMapfileActivity.java
index aa6d46a..8f82288 100644
--- a/main/src/cgeo/geocaching/SelectMapfileActivity.java
+++ b/main/src/cgeo/geocaching/SelectMapfileActivity.java
@@ -3,6 +3,7 @@ package cgeo.geocaching;
import cgeo.geocaching.files.AbstractFileListActivity;
import cgeo.geocaching.files.IFileSelectionView;
import cgeo.geocaching.files.LocalStorage;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.FileSelectionListAdapter;
import android.content.Context;
@@ -19,7 +20,7 @@ public class SelectMapfileActivity extends AbstractFileListActivity<FileSelectio
super("map");
}
- String mapFile;
+ private String mapFile;
@Override
public void onCreate(Bundle savedInstanceState) {
diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java
deleted file mode 100644
index 7a5db12..0000000
--- a/main/src/cgeo/geocaching/Settings.java
+++ /dev/null
@@ -1,1494 +0,0 @@
-package cgeo.geocaching;
-
-import cgeo.geocaching.apps.cache.navi.NavigationAppFactory.NavigationAppsEnum;
-import cgeo.geocaching.connector.gc.GCConstants;
-import cgeo.geocaching.connector.gc.Login;
-import cgeo.geocaching.enumerations.CacheType;
-import cgeo.geocaching.enumerations.LiveMapStrategy.Strategy;
-import cgeo.geocaching.enumerations.LogType;
-import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.maps.MapProviderFactory;
-import cgeo.geocaching.maps.google.GoogleMapProvider;
-import cgeo.geocaching.maps.interfaces.GeoPointImpl;
-import cgeo.geocaching.maps.interfaces.MapProvider;
-import cgeo.geocaching.maps.interfaces.MapSource;
-import cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider;
-import cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider.OfflineMapSource;
-import cgeo.geocaching.utils.CryptUtils;
-import cgeo.geocaching.utils.FileUtils;
-import cgeo.geocaching.utils.FileUtils.FileSelector;
-import cgeo.geocaching.utils.Log;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.os.Environment;
-import android.preference.PreferenceManager;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-/**
- * General c:geo preferences/settings set by the user
- */
-public final class Settings {
-
- private static final String KEY_TEMP_TWITTER_TOKEN_SECRET = "temp-token-secret";
- private static final String KEY_TEMP_TWITTER_TOKEN_PUBLIC = "temp-token-public";
- private static final String KEY_HELP_SHOWN = "helper";
- private static final String KEY_ANYLONGITUDE = "anylongitude";
- private static final String KEY_ANYLATITUDE = "anylatitude";
- private static final String KEY_USE_OFFLINEMAPS = "offlinemaps";
- private static final String KEY_USE_OFFLINEWPMAPS = "offlinewpmaps";
- private static final String KEY_WEB_DEVICE_CODE = "webDeviceCode";
- private static final String KEY_WEBDEVICE_NAME = "webDeviceName";
- private static final String KEY_MAP_LIVE = "maplive";
- private static final String KEY_MAP_SOURCE = "mapsource";
- private static final String KEY_USE_TWITTER = "twitter";
- private static final String KEY_SHOW_ADDRESS = "showaddress";
- private static final String KEY_SHOW_CAPTCHA = "showcaptcha";
- private static final String KEY_MAP_TRAIL = "maptrail";
- private static final String KEY_LAST_MAP_ZOOM = "mapzoom";
- private static final String KEY_LAST_MAP_LAT = "maplat";
- private static final String KEY_LAST_MAP_LON = "maplon";
- private static final String KEY_LIVE_LIST = "livelist";
- private static final String KEY_METRIC_UNITS = "units";
- private static final String KEY_SKIN = "skin";
- private static final String KEY_LAST_USED_LIST = "lastlist";
- private static final String KEY_CACHE_TYPE = "cachetype";
- private static final String KEY_TWITTER_TOKEN_SECRET = "tokensecret";
- private static final String KEY_TWITTER_TOKEN_PUBLIC = "tokenpublic";
- private static final String KEY_VERSION = "version";
- private static final String KEY_LOAD_DESCRIPTION = "autoloaddesc";
- private static final String KEY_RATING_WANTED = "ratingwanted";
- private static final String KEY_ELEVATION_WANTED = "elevationwanted";
- private static final String KEY_FRIENDLOGS_WANTED = "friendlogswanted";
- private static final String KEY_USE_ENGLISH = "useenglish";
- private static final String KEY_USE_COMPASS = "usecompass";
- private static final String KEY_AUTO_VISIT_TRACKABLES = "trackautovisit";
- private static final String KEY_AUTO_INSERT_SIGNATURE = "sigautoinsert";
- private static final String KEY_ALTITUDE_CORRECTION = "altcorrection";
- private static final String KEY_STORE_LOG_IMAGES = "logimages";
- private static final String KEY_EXCLUDE_DISABLED = "excludedisabled";
- private static final String KEY_EXCLUDE_OWN = "excludemine";
- private static final String KEY_MAPFILE = "mfmapfile";
- private static final String KEY_SIGNATURE = "signature";
- private static final String KEY_GCVOTE_PASSWORD = "pass-vote";
- private static final String KEY_PASSWORD = "password";
- private static final String KEY_USERNAME = "username";
- private static final String KEY_MEMBER_STATUS = "memberstatus";
- private static final String KEY_COORD_INPUT_FORMAT = "coordinputformat";
- private static final String KEY_LOG_OFFLINE = "log_offline";
- private static final String KEY_CHOOSE_LIST = "choose_list";
- private static final String KEY_LOAD_DIRECTION_IMG = "loaddirectionimg";
- private static final String KEY_GC_CUSTOM_DATE = "gccustomdate";
- private static final String KEY_SHOW_WAYPOINTS_THRESHOLD = "gcshowwaypointsthreshold";
- private static final String KEY_COOKIE_STORE = "cookiestore";
- private static final String KEY_OPEN_LAST_DETAILS_PAGE = "opendetailslastpage";
- private static final String KEY_LAST_DETAILS_PAGE = "lastdetailspage";
- private static final String KEY_DEFAULT_NAVIGATION_TOOL = "defaultNavigationTool";
- private static final String KEY_DEFAULT_NAVIGATION_TOOL_2 = "defaultNavigationTool2";
- private static final String KEY_LIVE_MAP_STRATEGY = "livemapstrategy";
- private static final String KEY_DEBUG = "debug";
- private static final String KEY_HIDE_LIVE_MAP_HINT = "hidelivemaphint";
- private static final String KEY_LIVE_MAP_HINT_SHOW_COUNT = "livemaphintshowcount";
- private static final String KEY_SETTINGS_VERSION = "settingsversion";
- private static final String KEY_DB_ON_SDCARD = "dbonsdcard";
- private static final String KEY_LAST_TRACKABLE_ACTION = "trackableaction";
- private static final String KEY_SHARE_AFTER_EXPORT = "shareafterexport";
- private static final String KEY_GPX_EXPORT_DIR = "gpxExportDir";
- private static final String KEY_RENDER_THEME_BASE_FOLDER = "renderthemepath";
- private static final String KEY_RENDER_THEME_FILE_PATH = "renderthemefile";
- private static final String KEY_GPX_IMPORT_DIR = "gpxImportDir";
- private static final String KEY_PLAIN_LOGS = "plainLogs";
- private static final String KEY_NATIVE_UA = "nativeUa";
- private static final String KEY_MAP_DIRECTORY = "mapDirectory";
- private static final String KEY_CONNECTOR_GC_ACTIVE = "connectorGCActive";
- private static final String KEY_CONNECTOR_OC_ACTIVE = "connectorOCActive";
- private static final String KEY_LOG_IMAGE_SCALE = "logImageScale";
- private static final String KEY_OCDE_TOKEN_SECRET = "ocde_tokensecret";
- private static final String KEY_OCDE_TOKEN_PUBLIC = "ocde_tokenpublic";
- private static final String KEY_TEMP_OCDE_TOKEN_SECRET = "ocde-temp-token-secret";
- private static final String KEY_TEMP_OCDE_TOKEN_PUBLIC = "ocde-temp-token-public";
-
-
- private final static int unitsMetric = 1;
-
- // twitter api keys
- private final static String keyConsumerPublic = CryptUtils.rot13("ESnsCvAv3kEupF1GCR3jGj");
- private final static String keyConsumerSecret = CryptUtils.rot13("7vQWceACV9umEjJucmlpFe9FCMZSeqIqfkQ2BnhV9x");
-
- private interface PrefRunnable {
- void edit(final Editor edit);
- }
-
- public enum coordInputFormatEnum {
- Plain,
- Deg,
- Min,
- Sec;
-
- public static coordInputFormatEnum fromInt(int id) {
- final coordInputFormatEnum[] values = coordInputFormatEnum.values();
- if (id < 0 || id >= values.length) {
- return Min;
- }
- return values[id];
- }
- }
-
- private static String username = null;
- private static String password = null;
-
- private static final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(cgeoapplication.getInstance().getBaseContext());
- static {
- migrateSettings();
- Log.setDebugUnsaved(sharedPrefs.getBoolean(KEY_DEBUG, false));
- }
-
- // maps
- private static MapProvider mapProvider = null;
- private static String cacheTwitterMessage = "I found [NAME] ([URL])";
-
- private Settings() {
- // this class is not to be instantiated;
- }
-
- private static void migrateSettings() {
- // migrate from non standard file location and integer based boolean types
- if (sharedPrefs.getInt(KEY_SETTINGS_VERSION, 0) < 1) {
- final String oldPreferencesName = "cgeo.pref";
- final SharedPreferences old = cgeoapplication.getInstance().getSharedPreferences(oldPreferencesName, Context.MODE_PRIVATE);
- final Editor e = sharedPrefs.edit();
-
- e.putString(KEY_TEMP_TWITTER_TOKEN_SECRET, old.getString(KEY_TEMP_TWITTER_TOKEN_SECRET, null));
- e.putString(KEY_TEMP_TWITTER_TOKEN_PUBLIC, old.getString(KEY_TEMP_TWITTER_TOKEN_PUBLIC, null));
- e.putBoolean(KEY_HELP_SHOWN, old.getInt(KEY_HELP_SHOWN, 0) != 0);
- e.putFloat(KEY_ANYLONGITUDE, old.getFloat(KEY_ANYLONGITUDE, 0));
- e.putFloat(KEY_ANYLATITUDE, old.getFloat(KEY_ANYLATITUDE, 0));
- e.putBoolean(KEY_USE_OFFLINEMAPS, 0 != old.getInt(KEY_USE_OFFLINEMAPS, 1));
- e.putBoolean(KEY_USE_OFFLINEWPMAPS, 0 != old.getInt(KEY_USE_OFFLINEWPMAPS, 0));
- e.putString(KEY_WEB_DEVICE_CODE, old.getString(KEY_WEB_DEVICE_CODE, null));
- e.putString(KEY_WEBDEVICE_NAME, old.getString(KEY_WEBDEVICE_NAME, null));
- e.putBoolean(KEY_MAP_LIVE, old.getInt(KEY_MAP_LIVE, 1) != 0);
- e.putInt(KEY_MAP_SOURCE, old.getInt(KEY_MAP_SOURCE, 0));
- e.putBoolean(KEY_USE_TWITTER, 0 != old.getInt(KEY_USE_TWITTER, 0));
- e.putBoolean(KEY_SHOW_ADDRESS, 0 != old.getInt(KEY_SHOW_ADDRESS, 1));
- e.putBoolean(KEY_SHOW_CAPTCHA, old.getBoolean(KEY_SHOW_CAPTCHA, false));
- e.putBoolean(KEY_MAP_TRAIL, old.getInt(KEY_MAP_TRAIL, 1) != 0);
- e.putInt(KEY_LAST_MAP_ZOOM, old.getInt(KEY_LAST_MAP_ZOOM, 14));
- e.putBoolean(KEY_LIVE_LIST, 0 != old.getInt(KEY_LIVE_LIST, 1));
- e.putBoolean(KEY_METRIC_UNITS, old.getInt(KEY_METRIC_UNITS, unitsMetric) == unitsMetric);
- e.putBoolean(KEY_SKIN, old.getInt(KEY_SKIN, 0) != 0);
- e.putInt(KEY_LAST_USED_LIST, old.getInt(KEY_LAST_USED_LIST, StoredList.STANDARD_LIST_ID));
- e.putString(KEY_CACHE_TYPE, old.getString(KEY_CACHE_TYPE, CacheType.ALL.id));
- e.putString(KEY_TWITTER_TOKEN_SECRET, old.getString(KEY_TWITTER_TOKEN_SECRET, null));
- e.putString(KEY_TWITTER_TOKEN_PUBLIC, old.getString(KEY_TWITTER_TOKEN_PUBLIC, null));
- e.putInt(KEY_VERSION, old.getInt(KEY_VERSION, 0));
- e.putBoolean(KEY_LOAD_DESCRIPTION, 0 != old.getInt(KEY_LOAD_DESCRIPTION, 1));
- e.putBoolean(KEY_RATING_WANTED, old.getBoolean(KEY_RATING_WANTED, true));
- e.putBoolean(KEY_ELEVATION_WANTED, old.getBoolean(KEY_ELEVATION_WANTED, false));
- e.putBoolean(KEY_FRIENDLOGS_WANTED, old.getBoolean(KEY_FRIENDLOGS_WANTED, true));
- e.putBoolean(KEY_USE_ENGLISH, old.getBoolean(KEY_USE_ENGLISH, false));
- e.putBoolean(KEY_USE_COMPASS, 0 != old.getInt(KEY_USE_COMPASS, 1));
- e.putBoolean(KEY_AUTO_VISIT_TRACKABLES, old.getBoolean(KEY_AUTO_VISIT_TRACKABLES, false));
- e.putBoolean(KEY_AUTO_INSERT_SIGNATURE, old.getBoolean(KEY_AUTO_INSERT_SIGNATURE, false));
- e.putInt(KEY_ALTITUDE_CORRECTION, old.getInt(KEY_ALTITUDE_CORRECTION, 0));
- e.putBoolean(KEY_STORE_LOG_IMAGES, old.getBoolean(KEY_STORE_LOG_IMAGES, false));
- e.putBoolean(KEY_EXCLUDE_DISABLED, 0 != old.getInt(KEY_EXCLUDE_DISABLED, 0));
- e.putBoolean(KEY_EXCLUDE_OWN, 0 != old.getInt(KEY_EXCLUDE_OWN, 0));
- e.putString(KEY_MAPFILE, old.getString(KEY_MAPFILE, null));
- e.putString(KEY_SIGNATURE, old.getString(KEY_SIGNATURE, null));
- e.putString(KEY_GCVOTE_PASSWORD, old.getString(KEY_GCVOTE_PASSWORD, null));
- e.putString(KEY_PASSWORD, old.getString(KEY_PASSWORD, null));
- e.putString(KEY_USERNAME, old.getString(KEY_USERNAME, null));
- e.putString(KEY_MEMBER_STATUS, old.getString(KEY_MEMBER_STATUS, ""));
- e.putInt(KEY_COORD_INPUT_FORMAT, old.getInt(KEY_COORD_INPUT_FORMAT, 0));
- e.putBoolean(KEY_LOG_OFFLINE, old.getBoolean(KEY_LOG_OFFLINE, false));
- e.putBoolean(KEY_CHOOSE_LIST, old.getBoolean(KEY_CHOOSE_LIST, false));
- e.putBoolean(KEY_LOAD_DIRECTION_IMG, old.getBoolean(KEY_LOAD_DIRECTION_IMG, true));
- e.putString(KEY_GC_CUSTOM_DATE, old.getString(KEY_GC_CUSTOM_DATE, null));
- e.putInt(KEY_SHOW_WAYPOINTS_THRESHOLD, old.getInt(KEY_SHOW_WAYPOINTS_THRESHOLD, 0));
- e.putString(KEY_COOKIE_STORE, old.getString(KEY_COOKIE_STORE, null));
- e.putBoolean(KEY_OPEN_LAST_DETAILS_PAGE, old.getBoolean(KEY_OPEN_LAST_DETAILS_PAGE, false));
- e.putInt(KEY_LAST_DETAILS_PAGE, old.getInt(KEY_LAST_DETAILS_PAGE, 1));
- e.putInt(KEY_DEFAULT_NAVIGATION_TOOL, old.getInt(KEY_DEFAULT_NAVIGATION_TOOL, NavigationAppsEnum.COMPASS.id));
- e.putInt(KEY_DEFAULT_NAVIGATION_TOOL_2, old.getInt(KEY_DEFAULT_NAVIGATION_TOOL_2, NavigationAppsEnum.INTERNAL_MAP.id));
- e.putInt(KEY_LIVE_MAP_STRATEGY, old.getInt(KEY_LIVE_MAP_STRATEGY, Strategy.AUTO.id));
- e.putBoolean(KEY_DEBUG, old.getBoolean(KEY_DEBUG, false));
- e.putBoolean(KEY_HIDE_LIVE_MAP_HINT, old.getInt(KEY_HIDE_LIVE_MAP_HINT, 0) != 0);
- e.putInt(KEY_LIVE_MAP_HINT_SHOW_COUNT, old.getInt(KEY_LIVE_MAP_HINT_SHOW_COUNT, 0));
-
- e.putInt(KEY_SETTINGS_VERSION, 1); // mark migrated
- e.commit();
- }
- }
-
- public static void setLanguage(boolean useEnglish) {
- final Configuration config = new Configuration();
- config.locale = useEnglish ? new Locale("en") : Locale.getDefault();
- final Resources resources = cgeoapplication.getInstance().getResources();
- resources.updateConfiguration(config, resources.getDisplayMetrics());
- }
-
- public static boolean isLogin() {
- final String preUsername = sharedPrefs.getString(KEY_USERNAME, null);
- final String prePassword = sharedPrefs.getString(KEY_PASSWORD, null);
-
- return !StringUtils.isBlank(preUsername) && !StringUtils.isBlank(prePassword);
- }
-
- /**
- * Get login and password information.
- *
- * @return a pair (login, password) or null if no valid information is stored
- */
- public static ImmutablePair<String, String> getLogin() {
- if (username == null || password == null) {
- final String preUsername = sharedPrefs.getString(KEY_USERNAME, null);
- final String prePassword = sharedPrefs.getString(KEY_PASSWORD, null);
-
- if (preUsername == null || prePassword == null) {
- return null;
- }
-
- username = preUsername;
- password = prePassword;
- }
- return new ImmutablePair<String, String>(username, password);
- }
-
- public static String getUsername() {
- return username != null ? username : sharedPrefs.getString(KEY_USERNAME, null);
- }
-
- public static boolean setLogin(final String username, final String password) {
- Settings.username = username;
- Settings.password = password;
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) {
- // erase username and password
- edit.remove(KEY_USERNAME);
- edit.remove(KEY_PASSWORD);
- } else {
- // save username and password
- edit.putString(KEY_USERNAME, username);
- edit.putString(KEY_PASSWORD, password);
- }
- }
- });
- }
-
- public static boolean isGCConnectorActive() {
- return sharedPrefs.getBoolean(KEY_CONNECTOR_GC_ACTIVE, true);
- }
-
- public static boolean setGCConnectorActive(final boolean isActive) {
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_CONNECTOR_GC_ACTIVE, isActive);
- }
- });
- }
-
- public static boolean isPremiumMember() {
- // Basic Member, Premium Member, ???
- String memberStatus = Settings.getMemberStatus();
- if (memberStatus == null) {
- return false;
- }
- return GCConstants.MEMBER_STATUS_PM.equalsIgnoreCase(memberStatus);
- }
-
- public static String getMemberStatus() {
- return sharedPrefs.getString(KEY_MEMBER_STATUS, "");
- }
-
- public static boolean setMemberStatus(final String memberStatus) {
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- if (StringUtils.isBlank(memberStatus)) {
- edit.remove(KEY_MEMBER_STATUS);
- } else {
- edit.putString(KEY_MEMBER_STATUS, memberStatus);
- }
- }
- });
- }
-
- public static boolean isOCConnectorActive() {
- return sharedPrefs.getBoolean(KEY_CONNECTOR_OC_ACTIVE, false);
- }
-
- public static boolean setOCConnectorActive(final boolean isActive) {
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_CONNECTOR_OC_ACTIVE, isActive);
- }
- });
- }
-
- public static String getOCDETokenPublic() {
- return sharedPrefs.getString(KEY_OCDE_TOKEN_PUBLIC, "");
- }
-
- public static String getOCDETokenSecret() {
- return sharedPrefs.getString(KEY_OCDE_TOKEN_SECRET, "");
- }
-
- public static void setOCDETokens(final String tokenPublic, final String tokenSecret, boolean enableOcDe) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_OCDE_TOKEN_PUBLIC, tokenPublic);
- edit.putString(KEY_OCDE_TOKEN_SECRET, tokenSecret);
- if (tokenPublic != null) {
- edit.remove(KEY_TEMP_OCDE_TOKEN_PUBLIC);
- edit.remove(KEY_TEMP_OCDE_TOKEN_SECRET);
- }
- }
- });
- setOCConnectorActive(enableOcDe);
- }
-
- public static void setOCDETempTokens(final String tokenPublic, final String tokenSecret) {
- editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_TEMP_OCDE_TOKEN_PUBLIC, tokenPublic);
- edit.putString(KEY_TEMP_OCDE_TOKEN_SECRET, tokenSecret);
- }
- });
- }
-
- public static ImmutablePair<String, String> getTempOCDEToken() {
- String tokenPublic = sharedPrefs.getString(KEY_TEMP_OCDE_TOKEN_PUBLIC, null);
- String tokenSecret = sharedPrefs.getString(KEY_TEMP_OCDE_TOKEN_SECRET, null);
- return new ImmutablePair<String, String>(tokenPublic, tokenSecret);
- }
-
- public static boolean isGCvoteLogin() {
- final String preUsername = sharedPrefs.getString(KEY_USERNAME, null);
- final String prePassword = sharedPrefs.getString(KEY_GCVOTE_PASSWORD, null);
-
- return !StringUtils.isBlank(preUsername) && !StringUtils.isBlank(prePassword);
- }
-
- public static boolean setGCvoteLogin(final String password) {
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- if (StringUtils.isBlank(password)) {
- // erase password
- edit.remove(KEY_GCVOTE_PASSWORD);
- } else {
- // save password
- edit.putString(KEY_GCVOTE_PASSWORD, password);
- }
- }
- });
- }
-
- public static ImmutablePair<String, String> getGCvoteLogin() {
- final String username = sharedPrefs.getString(KEY_USERNAME, null);
- final String password = sharedPrefs.getString(KEY_GCVOTE_PASSWORD, null);
-
- if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) {
- return null;
- }
-
- return new ImmutablePair<String, String>(username, password);
- }
-
- public static boolean setSignature(final String signature) {
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- if (StringUtils.isBlank(signature)) {
- // erase signature
- edit.remove(KEY_SIGNATURE);
- } else {
- // save signature
- edit.putString(KEY_SIGNATURE, signature);
- }
- }
- });
- }
-
- public static String getSignature() {
- return sharedPrefs.getString(KEY_SIGNATURE, null);
- }
-
- public static boolean setCookieStore(final String cookies) {
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(final Editor edit) {
- if (StringUtils.isBlank(cookies)) {
- // erase cookies
- edit.remove(KEY_COOKIE_STORE);
- } else {
- // save cookies
- edit.putString(KEY_COOKIE_STORE, cookies);
- }
- }
- });
- }
-
- public static String getCookieStore() {
- return sharedPrefs.getString(KEY_COOKIE_STORE, null);
- }
-
- /**
- * @param cacheType
- * The cache type used for future filtering
- */
- public static void setCacheType(final CacheType cacheType) {
- editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- if (cacheType == null) {
- edit.remove(KEY_CACHE_TYPE);
- } else {
- edit.putString(KEY_CACHE_TYPE, cacheType.id);
- }
- }
- });
- }
-
- public static void setLiveMap(final boolean live) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_MAP_LIVE, live);
- }
- });
- }
-
- public static int getLastList() {
- return sharedPrefs.getInt(KEY_LAST_USED_LIST, StoredList.STANDARD_LIST_ID);
- }
-
- public static void saveLastList(final int listId) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_LAST_USED_LIST, listId);
- }
- });
- }
-
- public static void setWebNameCode(final String name, final String code) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
-
- edit.putString(KEY_WEBDEVICE_NAME, name);
- edit.putString(KEY_WEB_DEVICE_CODE, code);
- }
- });
- }
-
- public static MapProvider getMapProvider() {
- if (mapProvider == null) {
- mapProvider = getMapSource().getMapProvider();
- }
- return mapProvider;
- }
-
- public static String getMapFile() {
- return sharedPrefs.getString(KEY_MAPFILE, null);
- }
-
- public static boolean setMapFile(final String mapFile) {
- boolean result = editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_MAPFILE, mapFile);
- }
- });
- if (mapFile != null) {
- setMapFileDirectory(new File(mapFile).getParent());
- }
- return result;
- }
-
- public static String getMapFileDirectory() {
- final String mapDir = sharedPrefs.getString(KEY_MAP_DIRECTORY, null);
- if (mapDir != null) {
- return mapDir;
- }
- final String mapFile = getMapFile();
- if (mapFile != null) {
- return new File(mapFile).getParent();
- }
- return null;
- }
-
- public static boolean setMapFileDirectory(final String mapFileDirectory) {
- return editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_MAP_DIRECTORY, mapFileDirectory);
- MapsforgeMapProvider.getInstance().updateOfflineMaps();
- }
- });
- }
-
- public static boolean isValidMapFile() {
- return isValidMapFile(getMapFile());
- }
-
- public static boolean isValidMapFile(final String mapFileIn) {
- return MapsforgeMapProvider.isValidMapFile(mapFileIn);
- }
-
- public static coordInputFormatEnum getCoordInputFormat() {
- return coordInputFormatEnum.fromInt(sharedPrefs.getInt(KEY_COORD_INPUT_FORMAT, 0));
- }
-
- public static void setCoordInputFormat(final coordInputFormatEnum format) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_COORD_INPUT_FORMAT, format.ordinal());
- }
- });
- }
-
- static void setLogOffline(final boolean offline) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_LOG_OFFLINE, offline);
- }
- });
- }
-
- public static boolean getLogOffline() {
- return sharedPrefs.getBoolean(KEY_LOG_OFFLINE, false);
- }
-
- static void setChooseList(final boolean choose) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_CHOOSE_LIST, choose);
- }
- });
- }
-
- public static boolean getChooseList() {
- return sharedPrefs.getBoolean(KEY_CHOOSE_LIST, false);
- }
-
- static void setLoadDirImg(final boolean value) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_LOAD_DIRECTION_IMG, value);
- }
- });
- }
-
- public static boolean getLoadDirImg() {
- return !isPremiumMember() && sharedPrefs.getBoolean(KEY_LOAD_DIRECTION_IMG, true);
- }
-
- public static void setGcCustomDate(final String format) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_GC_CUSTOM_DATE, format);
- }
- });
- }
-
- /**
- * @return User selected date format on GC.com
- * @see Login#gcCustomDateFormats
- */
- public static String getGcCustomDate() {
- return sharedPrefs.getString(KEY_GC_CUSTOM_DATE, null);
- }
-
- public static boolean isExcludeMyCaches() {
- return sharedPrefs.getBoolean(KEY_EXCLUDE_OWN, false);
- }
-
- /**
- * edit some settings without knowing how to get the settings editor or how to commit
- *
- * @param runnable
- * @return
- */
- private static boolean editSharedSettings(final PrefRunnable runnable) {
- final SharedPreferences.Editor prefsEdit = sharedPrefs.edit();
- runnable.edit(prefsEdit);
- return prefsEdit.commit();
- }
-
- public static void setExcludeMine(final boolean exclude) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_EXCLUDE_OWN, exclude);
- }
- });
- }
-
- public static void setUseEnglish(final boolean english) {
- editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_USE_ENGLISH, english);
- setLanguage(english);
- }
- });
- }
-
- public static boolean isUseEnglish() {
- return sharedPrefs.getBoolean(KEY_USE_ENGLISH, false);
- }
-
- public static boolean isShowAddress() {
- return sharedPrefs.getBoolean(KEY_SHOW_ADDRESS, true);
- }
-
- public static void setShowAddress(final boolean showAddress) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_SHOW_ADDRESS, showAddress);
- }
- });
- }
-
- public static boolean isShowCaptcha() {
- return !isPremiumMember() && sharedPrefs.getBoolean(KEY_SHOW_CAPTCHA, false);
- }
-
- public static void setShowCaptcha(final boolean showCaptcha) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_SHOW_CAPTCHA, showCaptcha);
- }
- });
- }
-
- public static boolean isExcludeDisabledCaches() {
- return sharedPrefs.getBoolean(KEY_EXCLUDE_DISABLED, false);
- }
-
- public static void setExcludeDisabledCaches(final boolean exclude) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_EXCLUDE_DISABLED, exclude);
- }
- });
- }
-
- public static boolean isStoreOfflineMaps() {
- return sharedPrefs.getBoolean(KEY_USE_OFFLINEMAPS, true);
- }
-
- public static void setStoreOfflineMaps(final boolean offlineMaps) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_USE_OFFLINEMAPS, offlineMaps);
- }
- });
- }
-
- public static boolean isStoreOfflineWpMaps() {
- return sharedPrefs.getBoolean(KEY_USE_OFFLINEWPMAPS, false);
- }
-
- public static void setStoreOfflineWpMaps(final boolean offlineMaps) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_USE_OFFLINEWPMAPS, offlineMaps);
- }
- });
- }
-
- public static boolean isStoreLogImages() {
- return sharedPrefs.getBoolean(KEY_STORE_LOG_IMAGES, false);
- }
-
- public static void setStoreLogImages(final boolean storeLogImages) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_STORE_LOG_IMAGES, storeLogImages);
- }
- });
- }
-
- public static boolean isAutoLoadDescription() {
- return sharedPrefs.getBoolean(KEY_LOAD_DESCRIPTION, true);
- }
-
- public static void setAutoLoadDesc(final boolean autoLoad) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_LOAD_DESCRIPTION, autoLoad);
- }
- });
- }
-
- public static boolean isRatingWanted() {
- return sharedPrefs.getBoolean(KEY_RATING_WANTED, true);
- }
-
- public static void setRatingWanted(final boolean ratingWanted) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_RATING_WANTED, ratingWanted);
- }
- });
- }
-
- public static boolean isElevationWanted() {
- return sharedPrefs.getBoolean(KEY_ELEVATION_WANTED, false);
- }
-
- public static void setElevationWanted(final boolean elevationWanted) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_ELEVATION_WANTED, elevationWanted);
- }
- });
- }
-
- public static boolean isFriendLogsWanted() {
- if (!isLogin()) {
- // don't show a friends log if the user is anonymous
- return false;
- }
- return sharedPrefs.getBoolean(KEY_FRIENDLOGS_WANTED, true);
- }
-
- public static void setFriendLogsWanted(final boolean friendLogsWanted) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_FRIENDLOGS_WANTED, friendLogsWanted);
- }
- });
- }
-
- public static boolean isLiveList() {
- return sharedPrefs.getBoolean(KEY_LIVE_LIST, true);
- }
-
- public static void setLiveList(final boolean liveList) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_LIVE_LIST, liveList);
- }
- });
- }
-
- public static boolean isTrackableAutoVisit() {
- return sharedPrefs.getBoolean(KEY_AUTO_VISIT_TRACKABLES, false);
- }
-
- public static void setTrackableAutoVisit(final boolean autoVisit) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_AUTO_VISIT_TRACKABLES, autoVisit);
- }
- });
- }
-
- public static boolean isAutoInsertSignature() {
- return sharedPrefs.getBoolean(KEY_AUTO_INSERT_SIGNATURE, false);
- }
-
- public static void setAutoInsertSignature(final boolean autoInsert) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_AUTO_INSERT_SIGNATURE, autoInsert);
- }
- });
- }
-
- public static boolean isUseMetricUnits() {
- return sharedPrefs.getBoolean(KEY_METRIC_UNITS, true);
- }
-
- public static void setUseMetricUnits(final boolean metric) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_METRIC_UNITS, metric);
- }
- });
- }
-
- public static boolean isLiveMap() {
- return sharedPrefs.getBoolean(KEY_MAP_LIVE, true);
- }
-
- public static boolean isMapTrail() {
- return sharedPrefs.getBoolean(KEY_MAP_TRAIL, true);
- }
-
- public static void setMapTrail(final boolean showTrail) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_MAP_TRAIL, showTrail);
- }
- });
- }
-
- public static int getMapZoom() {
- return sharedPrefs.getInt(KEY_LAST_MAP_ZOOM, 14);
- }
-
- public static void setMapZoom(final int mapZoomLevel) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_LAST_MAP_ZOOM, mapZoomLevel);
- }
- });
- }
-
- public static GeoPointImpl getMapCenter() {
- return getMapProvider().getMapItemFactory()
- .getGeoPointBase(new Geopoint(sharedPrefs.getInt(KEY_LAST_MAP_LAT, 0) / 1e6,
- sharedPrefs.getInt(KEY_LAST_MAP_LON, 0) / 1e6));
- }
-
- public static void setMapCenter(final GeoPointImpl mapViewCenter) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_LAST_MAP_LAT, mapViewCenter.getLatitudeE6());
- edit.putInt(KEY_LAST_MAP_LON, mapViewCenter.getLongitudeE6());
- }
- });
- }
-
- public static MapSource getMapSource() {
- final int id = getConvertedMapId();
- final MapSource map = MapProviderFactory.getMapSource(id);
- if (map != null) {
- // don't use offline maps if the map file is not valid
- if ((!(map instanceof OfflineMapSource)) || (isValidMapFile())) {
- return map;
- }
- }
- // fallback to first available map
- return MapProviderFactory.getDefaultSource();
- }
-
- private final static int GOOGLEMAP_BASEID = 30;
- private final static int MAP = 1;
- private final static int SATELLITE = 2;
-
- private final static int MFMAP_BASEID = 40;
- private final static int MAPNIK = 1;
- private final static int CYCLEMAP = 3;
- private final static int OFFLINE = 4;
-
- /**
- * convert old preference ids for maps (based on constant values) into new hash based ids
- *
- * @return
- */
- private static int getConvertedMapId() {
- final int id = sharedPrefs.getInt(KEY_MAP_SOURCE, 0);
- switch (id) {
- case GOOGLEMAP_BASEID + MAP:
- return GoogleMapProvider.GOOGLE_MAP_ID.hashCode();
- case GOOGLEMAP_BASEID + SATELLITE:
- return GoogleMapProvider.GOOGLE_SATELLITE_ID.hashCode();
- case MFMAP_BASEID + MAPNIK:
- return MapsforgeMapProvider.MAPSFORGE_MAPNIK_ID.hashCode();
- case MFMAP_BASEID + CYCLEMAP:
- return MapsforgeMapProvider.MAPSFORGE_CYCLEMAP_ID.hashCode();
- case MFMAP_BASEID + OFFLINE: {
- final String mapFile = Settings.getMapFile();
- if (StringUtils.isNotEmpty(mapFile)) {
- return mapFile.hashCode();
- }
- break;
- }
- default:
- break;
- }
- return id;
- }
-
- public static void setMapSource(final MapSource newMapSource) {
- if (!MapProviderFactory.isSameActivity(getMapSource(), newMapSource)) {
- mapProvider = null;
- }
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_MAP_SOURCE, newMapSource.getNumericalId());
- }
- });
- if (newMapSource instanceof OfflineMapSource) {
- setMapFile(((OfflineMapSource) newMapSource).getFileName());
- }
- }
-
- public static void setAnyCoordinates(final Geopoint coords) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- if (null != coords) {
- edit.putFloat(KEY_ANYLATITUDE, (float) coords.getLatitude());
- edit.putFloat(KEY_ANYLONGITUDE, (float) coords.getLongitude());
- } else {
- edit.remove(KEY_ANYLATITUDE);
- edit.remove(KEY_ANYLONGITUDE);
- }
- }
- });
-
- }
-
- public static Geopoint getAnyCoordinates() {
- if (sharedPrefs.contains(KEY_ANYLATITUDE) && sharedPrefs.contains(KEY_ANYLONGITUDE)) {
- float lat = sharedPrefs.getFloat(KEY_ANYLATITUDE, 0);
- float lon = sharedPrefs.getFloat(KEY_ANYLONGITUDE, 0);
- return new Geopoint(lat, lon);
- }
- return null;
- }
-
- public static boolean isUseCompass() {
- return sharedPrefs.getBoolean(KEY_USE_COMPASS, true);
- }
-
- public static void setUseCompass(final boolean useCompass) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_USE_COMPASS, useCompass);
- }
- });
- }
-
- public static boolean isHelpShown() {
- return sharedPrefs.getBoolean(KEY_HELP_SHOWN, false);
- }
-
- public static void setHelpShown() {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_HELP_SHOWN, true);
- }
- });
- }
-
- public static boolean isLightSkin() {
- return sharedPrefs.getBoolean(KEY_SKIN, false);
- }
-
- public static void setLightSkin(final boolean lightSkin) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_SKIN, lightSkin);
- }
- });
- }
-
- public static String getKeyConsumerPublic() {
- return keyConsumerPublic;
- }
-
- public static String getKeyConsumerSecret() {
- return keyConsumerSecret;
- }
-
- public static int getAltCorrection() {
- return sharedPrefs.getInt(KEY_ALTITUDE_CORRECTION, 0);
- }
-
- public static boolean setAltCorrection(final int altitude) {
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_ALTITUDE_CORRECTION, altitude);
- }
- });
- }
-
- public static String getWebDeviceCode() {
- return sharedPrefs.getString(KEY_WEB_DEVICE_CODE, null);
- }
-
- public static String getWebDeviceName() {
- return sharedPrefs.getString(KEY_WEBDEVICE_NAME, null);
- }
-
- /**
- * @return The cache type used for filtering or ALL if no filter is active. Returns never null
- */
- public static CacheType getCacheType() {
- return CacheType.getById(sharedPrefs.getString(KEY_CACHE_TYPE, CacheType.ALL.id));
- }
-
- /**
- * The Threshold for the showing of child waypoints
- *
- * @return
- */
-
- public static int getWayPointsThreshold() {
- return sharedPrefs.getInt(KEY_SHOW_WAYPOINTS_THRESHOLD, 0);
- }
-
- public static void setShowWaypointsThreshold(final int threshold) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_SHOW_WAYPOINTS_THRESHOLD, threshold);
- }
- });
- }
-
- public static boolean isUseTwitter() {
- return sharedPrefs.getBoolean(KEY_USE_TWITTER, false);
- }
-
- public static void setUseTwitter(final boolean useTwitter) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_USE_TWITTER, useTwitter);
- }
- });
- }
-
- public static boolean isTwitterLoginValid() {
- return !StringUtils.isBlank(getTokenPublic()) && !StringUtils.isBlank(getTokenSecret());
- }
-
- public static String getTokenPublic() {
- return sharedPrefs.getString(KEY_TWITTER_TOKEN_PUBLIC, null);
- }
-
- public static String getTokenSecret() {
- return sharedPrefs.getString(KEY_TWITTER_TOKEN_SECRET, null);
-
- }
-
- public static int getVersion() {
- return sharedPrefs.getInt(KEY_VERSION, 0);
- }
-
- public static void setTwitterTokens(final String tokenPublic, final String tokenSecret, boolean enableTwitter) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_TWITTER_TOKEN_PUBLIC, tokenPublic);
- edit.putString(KEY_TWITTER_TOKEN_SECRET, tokenSecret);
- if (tokenPublic != null) {
- edit.remove(KEY_TEMP_TWITTER_TOKEN_PUBLIC);
- edit.remove(KEY_TEMP_TWITTER_TOKEN_SECRET);
- }
- }
- });
- setUseTwitter(enableTwitter);
- }
-
- public static void setTwitterTempTokens(final String tokenPublic, final String tokenSecret) {
- editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_TEMP_TWITTER_TOKEN_PUBLIC, tokenPublic);
- edit.putString(KEY_TEMP_TWITTER_TOKEN_SECRET, tokenSecret);
- }
- });
- }
-
- public static ImmutablePair<String, String> getTempToken() {
- String tokenPublic = sharedPrefs.getString(KEY_TEMP_TWITTER_TOKEN_PUBLIC, null);
- String tokenSecret = sharedPrefs.getString(KEY_TEMP_TWITTER_TOKEN_SECRET, null);
- return new ImmutablePair<String, String>(tokenPublic, tokenSecret);
- }
-
- public static void setVersion(final int version) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_VERSION, version);
- }
- });
- }
-
- public static boolean isOpenLastDetailsPage() {
- return sharedPrefs.getBoolean(KEY_OPEN_LAST_DETAILS_PAGE, false);
- }
-
- public static void setOpenLastDetailsPage(final boolean openLastPage) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_OPEN_LAST_DETAILS_PAGE, openLastPage);
- }
- });
- }
-
- public static int getLastDetailsPage() {
- return sharedPrefs.getInt(KEY_LAST_DETAILS_PAGE, 1);
- }
-
- public static void setLastDetailsPage(final int index) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_LAST_DETAILS_PAGE, index);
- }
- });
- }
-
- public static int getDefaultNavigationTool() {
- return sharedPrefs.getInt(KEY_DEFAULT_NAVIGATION_TOOL, NavigationAppsEnum.COMPASS.id);
- }
-
- public static void setDefaultNavigationTool(final int defaultNavigationTool) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_DEFAULT_NAVIGATION_TOOL, defaultNavigationTool);
- }
- });
- }
-
- public static int getDefaultNavigationTool2() {
- return sharedPrefs.getInt(KEY_DEFAULT_NAVIGATION_TOOL_2, NavigationAppsEnum.INTERNAL_MAP.id);
- }
-
- public static void setDefaultNavigationTool2(final int defaultNavigationTool) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_DEFAULT_NAVIGATION_TOOL_2, defaultNavigationTool);
- }
- });
- }
-
- public static Strategy getLiveMapStrategy() {
- return Strategy.getById(sharedPrefs.getInt(KEY_LIVE_MAP_STRATEGY, Strategy.AUTO.id));
- }
-
- public static void setLiveMapStrategy(final Strategy strategy) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_LIVE_MAP_STRATEGY, strategy.id);
- }
- });
- }
-
- public static boolean isDebug() {
- return Log.isDebug();
- }
-
- public static void setDebug(final boolean debug) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_DEBUG, debug);
- }
- });
- Log.setDebugUnsaved(debug);
- }
-
- public static boolean getHideLiveMapHint() {
- return sharedPrefs.getBoolean(KEY_HIDE_LIVE_MAP_HINT, false);
- }
-
- public static void setHideLiveHint(final boolean hide) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_HIDE_LIVE_MAP_HINT, hide);
- }
- });
- }
-
- public static int getLiveMapHintShowCount() {
- return sharedPrefs.getInt(KEY_LIVE_MAP_HINT_SHOW_COUNT, 0);
- }
-
- public static void setLiveMapHintShowCount(final int showCount) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_LIVE_MAP_HINT_SHOW_COUNT, showCount);
- }
- });
- }
-
- public static boolean isDbOnSDCard() {
- return sharedPrefs.getBoolean(KEY_DB_ON_SDCARD, false);
- }
-
- public static void setDbOnSDCard(final boolean dbOnSDCard) {
- editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_DB_ON_SDCARD, dbOnSDCard);
- }
- });
- }
-
- public static String getGpxExportDir() {
- return sharedPrefs.getString(KEY_GPX_EXPORT_DIR, Environment.getExternalStorageDirectory().getPath() + "/gpx");
- }
-
- public static void setGpxExportDir(final String gpxExportDir) {
- editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_GPX_EXPORT_DIR, gpxExportDir);
- }
- });
- }
-
- public static String getGpxImportDir() {
- return sharedPrefs.getString(KEY_GPX_IMPORT_DIR, Environment.getExternalStorageDirectory().getPath() + "/gpx");
- }
-
- public static void setGpxImportDir(final String gpxImportDir) {
- editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_GPX_IMPORT_DIR, gpxImportDir);
- }
- });
- }
-
- public static boolean getShareAfterExport() {
- return sharedPrefs.getBoolean(KEY_SHARE_AFTER_EXPORT, true);
- }
-
- public static void setShareAfterExport(final boolean shareAfterExport) {
- editSharedSettings(new PrefRunnable() {
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_SHARE_AFTER_EXPORT, shareAfterExport);
- }
- });
- }
-
- public static int getTrackableAction() {
- return sharedPrefs.getInt(KEY_LAST_TRACKABLE_ACTION, LogType.RETRIEVED_IT.id);
- }
-
- public static void setTrackableAction(final int trackableAction) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_LAST_TRACKABLE_ACTION, trackableAction);
- }
- });
- }
-
- public static String getCustomRenderThemeBaseFolder() {
- return sharedPrefs.getString(KEY_RENDER_THEME_BASE_FOLDER, "");
- }
-
- public static boolean setCustomRenderThemeBaseFolder(final String customRenderThemeBaseFolder) {
- return editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_RENDER_THEME_BASE_FOLDER, customRenderThemeBaseFolder);
- }
- });
- }
-
- public static String getCustomRenderThemeFilePath() {
- return sharedPrefs.getString(KEY_RENDER_THEME_FILE_PATH, "");
- }
-
- public static void setCustomRenderThemeFile(final String customRenderThemeFile) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putString(KEY_RENDER_THEME_FILE_PATH, customRenderThemeFile);
- }
- });
- }
-
- public static File[] getMapThemeFiles() {
-
- File directory = new File(Settings.getCustomRenderThemeBaseFolder());
-
- List<File> result = new ArrayList<File>();
-
- FileUtils.listDir(result, directory, new ExtensionsBasedFileSelector(new String[] { "xml" }), null);
-
- return result.toArray(new File[result.size()]);
- }
-
- private static class ExtensionsBasedFileSelector extends FileSelector {
-
- private final String[] extensions;
-
- public ExtensionsBasedFileSelector(String[] extensions) {
- this.extensions = extensions;
- }
-
- @Override
- public boolean isSelected(File file) {
- String filename = file.getName();
- for (String ext : extensions) {
- if (StringUtils.endsWithIgnoreCase(filename, ext)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public boolean shouldEnd() {
- return false;
- }
- }
-
- public static boolean getPlainLogs() {
- return sharedPrefs.getBoolean(KEY_PLAIN_LOGS, false);
- }
-
- public static void setPlainLogs(final boolean plainLogs) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_PLAIN_LOGS, plainLogs);
- }
- });
- }
-
- public static boolean getUseNativeUa() {
- return sharedPrefs.getBoolean(KEY_NATIVE_UA, false);
- }
-
- public static void setUseNativeUa(final boolean useNativeUa) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putBoolean(KEY_NATIVE_UA, useNativeUa);
- }
- });
- }
-
- public static String getCacheTwitterMessage() {
- // TODO make customizable from UI
- return cacheTwitterMessage;
- }
-
- public static String getTrackableTwitterMessage() {
- // TODO make customizable from UI
- return "I touched [NAME] ([URL])!";
- }
-
- public static void setCacheTwitterMessage(final String message) {
- cacheTwitterMessage = message;
- }
-
- public static int getLogImageScale() {
- return sharedPrefs.getInt(KEY_LOG_IMAGE_SCALE, -1);
- }
-
- public static void setLogImageScale(final int scale) {
- editSharedSettings(new PrefRunnable() {
-
- @Override
- public void edit(Editor edit) {
- edit.putInt(KEY_LOG_IMAGE_SCALE, scale);
- }
- });
- }
-}
diff --git a/main/src/cgeo/geocaching/SettingsActivity.java b/main/src/cgeo/geocaching/SettingsActivity.java
deleted file mode 100644
index 872d5ee..0000000
--- a/main/src/cgeo/geocaching/SettingsActivity.java
+++ /dev/null
@@ -1,1069 +0,0 @@
-package cgeo.geocaching;
-
-import cgeo.geocaching.activity.AbstractActivity;
-import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
-import cgeo.geocaching.apps.cache.navi.NavigationAppFactory.NavigationAppsEnum;
-import cgeo.geocaching.compatibility.Compatibility;
-import cgeo.geocaching.connector.gc.Login;
-import cgeo.geocaching.connector.oc.OCAuthorizationActivity;
-import cgeo.geocaching.enumerations.StatusCode;
-import cgeo.geocaching.files.SimpleDirChooser;
-import cgeo.geocaching.maps.MapProviderFactory;
-import cgeo.geocaching.maps.interfaces.MapSource;
-import cgeo.geocaching.network.Cookies;
-import cgeo.geocaching.network.Network;
-import cgeo.geocaching.network.Parameters;
-import cgeo.geocaching.twitter.TwitterAuthorizationActivity;
-import cgeo.geocaching.ui.Formatter;
-import cgeo.geocaching.utils.Log;
-import cgeo.geocaching.utils.LogTemplateProvider;
-import cgeo.geocaching.utils.LogTemplateProvider.LogTemplate;
-import cgeo.geocaching.utils.RunnableWithArgument;
-
-import ch.boye.httpclientandroidlib.HttpResponse;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.openintents.intents.FileManagerIntents;
-
-import android.app.ProgressDialog;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.Configuration;
-import android.graphics.drawable.Drawable;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.view.ContextMenu;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemSelectedListener;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.EditText;
-import android.widget.Spinner;
-import android.widget.TextView;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class SettingsActivity extends AbstractActivity {
-
- private final static int SELECT_MAPFILE_REQUEST = 1;
- private final static int SELECT_GPX_EXPORT_REQUEST = 2;
- private final static int SELECT_GPX_IMPORT_REQUEST = 3;
- private final static int SELECT_THEMEFOLDER_REQUEST = 4;
-
- private ProgressDialog loginDialog = null;
- private ProgressDialog webDialog = null;
- private boolean enableTemplatesMenu = false;
- private Handler logInHandler = new Handler() {
-
- @Override
- public void handleMessage(Message msg) {
- try {
- if (loginDialog != null && loginDialog.isShowing()) {
- loginDialog.dismiss();
- }
-
- if (msg.obj == null || (msg.obj instanceof Drawable)) {
- helpDialog(res.getString(R.string.init_login_popup), res.getString(R.string.init_login_popup_ok),
- (Drawable) msg.obj);
- } else {
- helpDialog(res.getString(R.string.init_login_popup),
- res.getString(R.string.init_login_popup_failed_reason) + " " +
- ((StatusCode) msg.obj).getErrorString(res) + ".");
- }
- } catch (Exception e) {
- showToast(res.getString(R.string.err_login_failed));
-
- Log.e("SettingsActivity.logInHandler", e);
- }
-
- if (loginDialog != null && loginDialog.isShowing()) {
- loginDialog.dismiss();
- }
-
- init();
- }
- };
-
- private Handler webAuthHandler = new Handler() {
-
- @Override
- public void handleMessage(Message msg) {
- try {
- if (webDialog != null && webDialog.isShowing()) {
- webDialog.dismiss();
- }
-
- if (msg.what > 0) {
- helpDialog(res.getString(R.string.init_sendToCgeo), res.getString(R.string.init_sendToCgeo_register_ok).replace("####", String.valueOf(msg.what)));
- } else {
- helpDialog(res.getString(R.string.init_sendToCgeo), res.getString(R.string.init_sendToCgeo_register_fail));
- }
- } catch (Exception e) {
- showToast(res.getString(R.string.init_sendToCgeo_register_fail));
-
- Log.e("SettingsActivity.webHandler", e);
- }
-
- if (webDialog != null && webDialog.isShowing()) {
- webDialog.dismiss();
- }
-
- init();
- }
- };
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState, R.layout.settings_activity);
-
- init();
- }
-
- @Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
-
- init();
- }
-
- @Override
- public void onPause() {
- saveValues();
- super.onPause();
- }
-
- @Override
- public void onStop() {
- saveValues();
- Compatibility.dataChanged(getPackageName());
- super.onStop();
- }
-
- @Override
- public void onDestroy() {
- saveValues();
-
- super.onDestroy();
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- getMenuInflater().inflate(R.menu.settings_activity_options, menu);
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- if (item.getItemId() == R.id.menu_clear) {
- ((EditText) findViewById(R.id.username)).setText("");
- ((EditText) findViewById(R.id.password)).setText("");
- ((EditText) findViewById(R.id.passvote)).setText("");
-
- if (saveValues()) {
- showToast(res.getString(R.string.init_cleared));
- } else {
- showToast(res.getString(R.string.err_init_cleared));
- }
-
- finish();
- }
-
- return false;
- }
-
- @Override
- public void onCreateContextMenu(ContextMenu menu, View v,
- ContextMenuInfo menuInfo) {
- if (enableTemplatesMenu) {
- menu.setHeaderTitle(R.string.init_signature_template_button);
- for (LogTemplate template : LogTemplateProvider.getTemplates()) {
- menu.add(0, template.getItemId(), 0, template.getResourceId());
- }
- }
- }
-
- @Override
- public boolean onContextItemSelected(MenuItem item) {
- LogTemplate template = LogTemplateProvider.getTemplate(item.getItemId());
- if (template != null) {
- return insertSignatureTemplate(template);
- }
- return super.onContextItemSelected(item);
- }
-
- private boolean insertSignatureTemplate(final LogTemplate template) {
- EditText sig = (EditText) findViewById(R.id.signature);
- String insertText = "[" + template.getTemplateString() + "]";
- insertAtPosition(sig, insertText, true);
- return true;
- }
-
- public void init() {
-
- // geocaching.com settings
- final CheckBox gcCheck = (CheckBox) findViewById(R.id.gc_option);
- gcCheck.setChecked(Settings.isGCConnectorActive());
- gcCheck.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setGCConnectorActive(gcCheck.isChecked());
- }
- });
- final ImmutablePair<String, String> login = Settings.getLogin();
- if (login != null) {
- ((EditText) findViewById(R.id.username)).setText(login.left);
- ((EditText) findViewById(R.id.password)).setText(login.right);
- }
-
- Button logMeIn = (Button) findViewById(R.id.log_me_in);
- logMeIn.setOnClickListener(new LoginListener());
-
- TextView legalNote = (TextView) findViewById(R.id.legal_note);
- legalNote.setClickable(true);
- legalNote.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View arg0) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/about/termsofuse.aspx")));
- }
- });
-
- // opencaching.de settings
- final CheckBox ocCheck = (CheckBox) findViewById(R.id.oc_option);
- ocCheck.setChecked(Settings.isOCConnectorActive());
- ocCheck.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setOCConnectorActive(ocCheck.isChecked());
- }
- });
-
- Button checkOCUser = (Button) findViewById(R.id.register_oc_de);
- checkOCUser.setOnClickListener(new OCDEAuthorizeCgeoListener());
-
- // gcvote settings
- final ImmutablePair<String, String> gcvoteLogin = Settings.getGCvoteLogin();
- if (null != gcvoteLogin && null != gcvoteLogin.right) {
- ((EditText) findViewById(R.id.passvote)).setText(gcvoteLogin.right);
- }
-
- // Twitter settings
- Button authorizeTwitter = (Button) findViewById(R.id.authorize_twitter);
- authorizeTwitter.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View arg0) {
- Intent authIntent = new Intent(SettingsActivity.this, TwitterAuthorizationActivity.class);
- startActivity(authIntent);
- }
- });
-
- final CheckBox twitterButton = (CheckBox) findViewById(R.id.twitter_option);
- twitterButton.setChecked(Settings.isUseTwitter() && Settings.isTwitterLoginValid());
- twitterButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setUseTwitter(twitterButton.isChecked());
- if (Settings.isUseTwitter() && !Settings.isTwitterLoginValid()) {
- Intent authIntent = new Intent(SettingsActivity.this, TwitterAuthorizationActivity.class);
- startActivity(authIntent);
- }
-
- twitterButton.setChecked(Settings.isUseTwitter());
- }
- });
-
- // Signature settings
- EditText sigEdit = (EditText) findViewById(R.id.signature);
- if (sigEdit.getText().length() == 0) {
- sigEdit.setText(Settings.getSignature());
- }
- Button sigBtn = (Button) findViewById(R.id.signature_help);
- sigBtn.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- helpDialog(res.getString(R.string.init_signature_help_title), res.getString(R.string.init_signature_help_text));
- }
- });
- Button templates = (Button) findViewById(R.id.signature_template);
- registerForContextMenu(templates);
- templates.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- enableTemplatesMenu = true;
- openContextMenu(v);
- enableTemplatesMenu = false;
- }
- });
- final CheckBox autoinsertButton = (CheckBox) findViewById(R.id.sigautoinsert);
- autoinsertButton.setChecked(Settings.isAutoInsertSignature());
- autoinsertButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setAutoInsertSignature(autoinsertButton.isChecked());
- }
- });
-
- // Cache details
- final CheckBox autoloadButton = (CheckBox) findViewById(R.id.autoload);
- autoloadButton.setChecked(Settings.isAutoLoadDescription());
- autoloadButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setAutoLoadDesc(autoloadButton.isChecked());
- }
- });
-
- final CheckBox ratingWantedButton = (CheckBox) findViewById(R.id.ratingwanted);
- ratingWantedButton.setChecked(Settings.isRatingWanted());
- ratingWantedButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setRatingWanted(ratingWantedButton.isChecked());
- }
- });
-
- final CheckBox elevationWantedButton = (CheckBox) findViewById(R.id.elevationwanted);
- elevationWantedButton.setChecked(Settings.isElevationWanted());
- elevationWantedButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setElevationWanted(elevationWantedButton.isChecked());
- }
- });
-
- final CheckBox friendLogsWantedButton = (CheckBox) findViewById(R.id.friendlogswanted);
- friendLogsWantedButton.setChecked(Settings.isFriendLogsWanted());
- friendLogsWantedButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setFriendLogsWanted(friendLogsWantedButton.isChecked());
- }
- });
-
- final CheckBox openLastDetailsPageButton = (CheckBox) findViewById(R.id.openlastdetailspage);
- openLastDetailsPageButton.setChecked(Settings.isOpenLastDetailsPage());
- openLastDetailsPageButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setOpenLastDetailsPage(openLastDetailsPageButton.isChecked());
- }
- });
-
- // Other settings
- final CheckBox skinButton = (CheckBox) findViewById(R.id.skin);
- skinButton.setChecked(Settings.isLightSkin());
- skinButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setLightSkin(skinButton.isChecked());
- }
- });
-
- final CheckBox addressButton = (CheckBox) findViewById(R.id.address);
- addressButton.setChecked(Settings.isShowAddress());
- addressButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setShowAddress(addressButton.isChecked());
- }
- });
-
- final CheckBox captchaButton = (CheckBox) findViewById(R.id.captcha);
- captchaButton.setEnabled(!Settings.isPremiumMember());
- captchaButton.setChecked(Settings.isShowCaptcha());
- captchaButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setShowCaptcha(captchaButton.isChecked());
- }
- });
-
- final CheckBox dirImgButton = (CheckBox) findViewById(R.id.loaddirectionimg);
- dirImgButton.setEnabled(!Settings.isPremiumMember());
- dirImgButton.setChecked(Settings.getLoadDirImg());
- dirImgButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setLoadDirImg(!Settings.getLoadDirImg());
- dirImgButton.setChecked(Settings.getLoadDirImg());
- }
- });
-
- final CheckBox useEnglishButton = (CheckBox) findViewById(R.id.useenglish);
- useEnglishButton.setChecked(Settings.isUseEnglish());
- useEnglishButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setUseEnglish(useEnglishButton.isChecked());
- }
- });
-
- final CheckBox excludeButton = (CheckBox) findViewById(R.id.exclude);
- excludeButton.setChecked(Settings.isExcludeMyCaches());
- excludeButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setExcludeMine(excludeButton.isChecked());
- }
- });
-
- final CheckBox disabledButton = (CheckBox) findViewById(R.id.disabled);
- disabledButton.setChecked(Settings.isExcludeDisabledCaches());
- disabledButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setExcludeDisabledCaches(disabledButton.isChecked());
- }
- });
-
- TextView showWaypointsThreshold = (TextView) findViewById(R.id.showwaypointsthreshold);
- showWaypointsThreshold.setText(String.valueOf(Settings.getWayPointsThreshold()));
-
- final CheckBox autovisitButton = (CheckBox) findViewById(R.id.trackautovisit);
- autovisitButton.setChecked(Settings.isTrackableAutoVisit());
- autovisitButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setTrackableAutoVisit(autovisitButton.isChecked());
- }
- });
-
- final CheckBox offlineButton = (CheckBox) findViewById(R.id.offline);
- offlineButton.setChecked(Settings.isStoreOfflineMaps());
- offlineButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setStoreOfflineMaps(offlineButton.isChecked());
- }
- });
-
- final CheckBox offlineWpButton = (CheckBox) findViewById(R.id.offline_wp);
- offlineWpButton.setChecked(Settings.isStoreOfflineWpMaps());
- offlineWpButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setStoreOfflineWpMaps(offlineWpButton.isChecked());
- }
- });
-
- final CheckBox saveLogImgButton = (CheckBox) findViewById(R.id.save_log_img);
- saveLogImgButton.setChecked(Settings.isStoreLogImages());
- saveLogImgButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setStoreLogImages(saveLogImgButton.isChecked());
- }
- });
-
- final CheckBox livelistButton = (CheckBox) findViewById(R.id.livelist);
- livelistButton.setChecked(Settings.isLiveList());
- livelistButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setLiveList(livelistButton.isChecked());
- }
- });
-
- final CheckBox unitsButton = (CheckBox) findViewById(R.id.units);
- unitsButton.setChecked(!Settings.isUseMetricUnits());
- unitsButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setUseMetricUnits(!unitsButton.isChecked());
- }
- });
-
- final CheckBox logOffline = (CheckBox) findViewById(R.id.log_offline);
- logOffline.setChecked(Settings.getLogOffline());
- logOffline.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setLogOffline(!Settings.getLogOffline());
- logOffline.setChecked(Settings.getLogOffline());
- }
- });
-
- final CheckBox chooseList = (CheckBox) findViewById(R.id.choose_list);
- chooseList.setChecked(Settings.getChooseList());
- chooseList.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setChooseList(!Settings.getChooseList());
- chooseList.setChecked(Settings.getChooseList());
- }
- });
-
- final CheckBox plainLogs = (CheckBox) findViewById(R.id.plain_logs);
- plainLogs.setChecked(Settings.getPlainLogs());
- plainLogs.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setPlainLogs(!Settings.getPlainLogs());
- plainLogs.setChecked(Settings.getPlainLogs());
- }
- });
-
- // Workaround for cspire customers on mobile connections #1843
- final CheckBox useNativeUserAgent = (CheckBox) findViewById(R.id.use_native_ua);
- useNativeUserAgent.setChecked(Settings.getUseNativeUa());
- useNativeUserAgent.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setUseNativeUa(!Settings.getUseNativeUa());
- useNativeUserAgent.setChecked(Settings.getUseNativeUa());
- }
- });
-
- // Altitude settings
- EditText altitudeEdit = (EditText) findViewById(R.id.altitude);
- altitudeEdit.setText(String.valueOf(Settings.getAltCorrection()));
-
- //Send2cgeo settings
- String webDeviceName = Settings.getWebDeviceName();
-
- if (StringUtils.isNotBlank(webDeviceName)) {
- ((EditText) findViewById(R.id.webDeviceName)).setText(webDeviceName);
- } else {
- String s = android.os.Build.MODEL;
- ((EditText) findViewById(R.id.webDeviceName)).setText(s);
- }
-
- Button webAuth = (Button) findViewById(R.id.sendToCgeo_register);
- webAuth.setOnClickListener(new WebAuthListener());
-
- // Map source settings
- updateMapSourceMenu();
-
- Button selectMapDirectory = (Button) findViewById(R.id.select_map_directory);
- selectMapDirectory.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Intent selectIntent = new Intent(SettingsActivity.this, SelectMapfileActivity.class);
- startActivityForResult(selectIntent, SELECT_MAPFILE_REQUEST);
- }
- });
-
- // Theme folder settings
- initThemefolderEdittext(false);
-
- Button selectThemefolder = (Button) findViewById(R.id.select_themefolder);
- selectThemefolder.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- selectDirectory(Settings.getCustomRenderThemeBaseFolder(), SELECT_THEMEFOLDER_REQUEST);
- }
- });
-
- // GPX Export directory
- final EditText gpxExportDir = (EditText) findViewById(R.id.gpx_exportdir);
- gpxExportDir.setText(Settings.getGpxExportDir());
- Button selectGpxExportDir = (Button) findViewById(R.id.select_gpx_exportdir);
- selectGpxExportDir.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- selectDirectory(Settings.getGpxExportDir(), SELECT_GPX_EXPORT_REQUEST);
- }
- });
-
- // GPX Import directory
- final EditText gpxImportDir = (EditText) findViewById(R.id.gpx_importdir);
- gpxImportDir.setText(Settings.getGpxImportDir());
- Button selectGpxImportDir = (Button) findViewById(R.id.select_gpx_importdir);
- selectGpxImportDir.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- selectDirectory(Settings.getGpxImportDir(), SELECT_GPX_IMPORT_REQUEST);
- }
- });
-
- // Display trail on map
- final CheckBox trailButton = (CheckBox) findViewById(R.id.trail);
- trailButton.setChecked(Settings.isMapTrail());
- trailButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setMapTrail(trailButton.isChecked());
- }
- });
-
- // Default navigation tool settings
- Spinner defaultNavigationToolSelector = (Spinner) findViewById(R.id.default_navigation_tool);
- final List<NavigationAppsEnum> apps = NavigationAppFactory.getInstalledDefaultNavigationApps();
- ArrayAdapter<NavigationAppsEnum> naviAdapter = new ArrayAdapter<NavigationAppsEnum>(this, android.R.layout.simple_spinner_item, apps) {
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- TextView textView = (TextView) super.getView(position, convertView, parent);
- textView.setText(getItem(position).app.getName());
- return textView;
- }
-
- @Override
- public View getDropDownView(int position, View convertView, ViewGroup parent) {
- TextView textView = (TextView) super.getDropDownView(position, convertView, parent);
- textView.setText(getItem(position).app.getName());
- return textView;
- }
- };
- naviAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- defaultNavigationToolSelector.setAdapter(naviAdapter);
- int defaultNavigationTool = Settings.getDefaultNavigationTool();
- int ordinal = 0;
- for (int i = 0; i < apps.size(); i++) {
- if (apps.get(i).id == defaultNavigationTool) {
- ordinal = i;
- break;
- }
- }
- defaultNavigationToolSelector.setSelection(ordinal);
- defaultNavigationToolSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
- @Override
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
- NavigationAppsEnum item = (NavigationAppsEnum) parent.getItemAtPosition(position);
- if (item != null) {
- Settings.setDefaultNavigationTool(item.id);
- }
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> arg0) {
- // noop
- }
- });
-
- // 2nd Default navigation tool settings
- Spinner defaultNavigationTool2Selector = (Spinner) findViewById(R.id.default_navigation_tool_2);
- // final List<NavigationAppsEnum> apps = NavigationAppFactory.getInstalledNavigationApps(this);
- ArrayAdapter<NavigationAppsEnum> navi2Adapter = new ArrayAdapter<NavigationAppsEnum>(this, android.R.layout.simple_spinner_item, apps) {
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- TextView textView = (TextView) super.getView(position, convertView, parent);
- textView.setText(getItem(position).app.getName());
- return textView;
- }
-
- @Override
- public View getDropDownView(int position, View convertView, ViewGroup parent) {
- TextView textView = (TextView) super.getDropDownView(position, convertView, parent);
- textView.setText(getItem(position).app.getName());
- return textView;
- }
- };
- navi2Adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- defaultNavigationTool2Selector.setAdapter(navi2Adapter);
- int defaultNavigationTool2 = Settings.getDefaultNavigationTool2();
- int ordinal2 = 0;
- for (int i = 0; i < apps.size(); i++) {
- if (apps.get(i).id == defaultNavigationTool2) {
- ordinal2 = i;
- break;
- }
- }
- defaultNavigationTool2Selector.setSelection(ordinal2);
- defaultNavigationTool2Selector.setOnItemSelectedListener(new OnItemSelectedListener() {
- @Override
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
- NavigationAppsEnum item = (NavigationAppsEnum) parent.getItemAtPosition(position);
- if (item != null) {
- Settings.setDefaultNavigationTool2(item.id);
- }
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> arg0) {
- // noop
- }
- });
-
- refreshBackupLabel();
-
- // Database location
- refreshDbOnSDCardSetting();
-
- final CheckBox dbOnSDCardButton = (CheckBox) findViewById(R.id.dbonsdcard);
- dbOnSDCardButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- app.moveDatabase(SettingsActivity.this);
- }
- });
-
- // Debug settings
- final CheckBox debugButton = (CheckBox) findViewById(R.id.debug);
- debugButton.setChecked(Settings.isDebug());
- debugButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Settings.setDebug(!Settings.isDebug());
- debugButton.setChecked(Settings.isDebug());
- }
- });
- }
-
- private void updateMapSourceMenu() {
- Collection<String> mapSourceNames = new ArrayList<String>();
- for (MapSource mapSource : MapProviderFactory.getMapSources()) {
- mapSourceNames.add(mapSource.getName());
- }
- Spinner mapSourceSelector = (Spinner) findViewById(R.id.mapsource);
- ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(this, android.R.layout.simple_spinner_item, mapSourceNames.toArray(new String[mapSourceNames.size()]));
- adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- mapSourceSelector.setAdapter(adapter);
- final int index = MapProviderFactory.getMapSources().indexOf(Settings.getMapSource());
- mapSourceSelector.setSelection(index);
- mapSourceSelector.setOnItemSelectedListener(new ChangeMapSourceListener());
-
- initMapDirectoryEdittext(false);
- }
-
- private void initMapDirectoryEdittext(boolean setFocus) {
- final EditText mapDirectoryEdit = (EditText) findViewById(R.id.map_directory);
- mapDirectoryEdit.setText(Settings.getMapFileDirectory());
- if (setFocus) {
- mapDirectoryEdit.requestFocus();
- }
- }
-
- private void initThemefolderEdittext(boolean setFocus) {
- EditText themeFileEdit = (EditText) findViewById(R.id.themefolder);
- themeFileEdit.setText(Settings.getCustomRenderThemeBaseFolder());
- if (setFocus) {
- themeFileEdit.requestFocus();
- }
- }
-
- /**
- * @param view
- * unused here but needed since this method is referenced from XML layout
- */
- public void backup(View view) {
- // avoid overwriting an existing backup with an empty database (can happen directly after reinstalling the app)
- if (cgData.getAllCachesCount() == 0) {
- helpDialog(res.getString(R.string.init_backup), res.getString(R.string.init_backup_unnecessary));
- return;
- }
-
- final ProgressDialog dialog = ProgressDialog.show(this, res.getString(R.string.init_backup), res.getString(R.string.init_backup_running), true, false);
- new Thread() {
- @Override
- public void run() {
- final String backupFileName = cgData.backupDatabase();
- runOnUiThread(new Runnable() {
- @Override
- public void run() {
- dialog.dismiss();
- helpDialog(res.getString(R.string.init_backup_backup),
- backupFileName != null ? res.getString(R.string.init_backup_success) + "\n" + backupFileName : res.getString(R.string.init_backup_failed));
- refreshBackupLabel();
- }
- });
- }
- }.start();
- }
-
- private void refreshBackupLabel() {
- TextView lastBackup = (TextView) findViewById(R.id.backup_last);
- File lastBackupFile = cgData.getRestoreFile();
- if (lastBackupFile != null) {
- lastBackup.setText(res.getString(R.string.init_backup_last) + " " + Formatter.formatTime(lastBackupFile.lastModified()) + ", " + Formatter.formatDate(lastBackupFile.lastModified()));
- } else {
- lastBackup.setText(res.getString(R.string.init_backup_last_no));
- }
- }
-
- private void refreshDbOnSDCardSetting() {
- final CheckBox dbOnSDCardButton = (CheckBox) findViewById(R.id.dbonsdcard);
- dbOnSDCardButton.setChecked(Settings.isDbOnSDCard());
- }
-
- /**
- * @param view
- * unused here but needed since this method is referenced from XML layout
- */
- public void restore(View view) {
- app.restoreDatabase(this);
- }
-
- public boolean saveValues() {
- String usernameNew = StringUtils.trimToEmpty(((EditText) findViewById(R.id.username)).getText().toString());
- String passwordNew = StringUtils.trimToEmpty(((EditText) findViewById(R.id.password)).getText().toString());
- String passvoteNew = StringUtils.trimToEmpty(((EditText) findViewById(R.id.passvote)).getText().toString());
- // don't trim signature, user may want to have whitespace at the beginning
- String signatureNew = ((EditText) findViewById(R.id.signature)).getText().toString();
- String mapDirectoryNew = StringUtils.trimToEmpty(((EditText) findViewById(R.id.map_directory)).getText().toString());
- String themesDirectoryNew = StringUtils.trimToEmpty(((EditText) findViewById(R.id.themefolder)).getText().toString());
-
- String altitudeNew = StringUtils.trimToNull(((EditText) findViewById(R.id.altitude)).getText().toString());
- int altitudeNewInt = parseNumber(altitudeNew, 0);
-
- TextView field = (TextView) findViewById(R.id.showwaypointsthreshold);
- final int waypointThreshold = parseNumber(field.getText().toString(), 5);
-
- final boolean status1 = Settings.setLogin(usernameNew, passwordNew);
- final boolean status2 = Settings.setGCvoteLogin(passvoteNew);
- final boolean status3 = Settings.setSignature(signatureNew);
- final boolean status4 = Settings.setAltCorrection(altitudeNewInt);
- final boolean status5 = Settings.setMapFileDirectory(mapDirectoryNew);
- final boolean status6 = Settings.setCustomRenderThemeBaseFolder(themesDirectoryNew);
- Settings.setShowWaypointsThreshold(waypointThreshold);
-
- String importNew = StringUtils.trimToEmpty(((EditText) findViewById(R.id.gpx_importdir)).getText().toString());
- String exportNew = StringUtils.trimToEmpty(((EditText) findViewById(R.id.gpx_exportdir)).getText().toString());
- Settings.setGpxImportDir(importNew);
- Settings.setGpxExportDir(exportNew);
-
- return status1 && status2 && status3 && status4 && status5 && status6;
- }
-
- /**
- * Returns the integer value from the string
- *
- * @param field
- * the field to retrieve the integer value from
- * @param defaultValue
- * the default value
- * @return either the field content or the default value
- */
-
- static private int parseNumber(final String number, int defaultValue) {
- try {
- return Integer.parseInt(number);
- } catch (NumberFormatException e) {
- return defaultValue;
- }
- }
-
- private static class ChangeMapSourceListener implements OnItemSelectedListener {
-
- @Override
- public void onItemSelected(AdapterView<?> arg0, View arg1, int position,
- long arg3) {
- Settings.setMapSource(MapProviderFactory.getMapSources().get(position));
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> arg0) {
- arg0.setSelection(MapProviderFactory.getMapSources().indexOf(Settings.getMapSource()));
- }
- }
-
- private class LoginListener implements View.OnClickListener {
-
- @Override
- public void onClick(View arg0) {
- final String username = ((EditText) findViewById(R.id.username)).getText().toString();
- final String password = ((EditText) findViewById(R.id.password)).getText().toString();
-
- if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) {
- showToast(res.getString(R.string.err_missing_auth));
- return;
- }
-
- loginDialog = ProgressDialog.show(SettingsActivity.this, res.getString(R.string.init_login_popup), res.getString(R.string.init_login_popup_working), true);
- loginDialog.setCancelable(false);
-
- Settings.setLogin(username, password);
- Cookies.clearCookies();
-
- (new Thread() {
-
- @Override
- public void run() {
- final StatusCode loginResult = Login.login();
- Object payload = loginResult;
- if (loginResult == StatusCode.NO_ERROR) {
- Login.detectGcCustomDate();
- payload = Login.downloadAvatarAndGetMemberStatus();
- }
- logInHandler.obtainMessage(0, payload).sendToTarget();
- }
- }).start();
- }
- }
-
- private class OCDEAuthorizeCgeoListener implements View.OnClickListener {
-
- @Override
- public void onClick(View v) {
- Intent authIntent = new Intent(SettingsActivity.this, OCAuthorizationActivity.class);
- startActivity(authIntent);
- }
- }
-
- private class WebAuthListener implements View.OnClickListener {
-
- @Override
- public void onClick(View arg0) {
- final String deviceName = ((EditText) findViewById(R.id.webDeviceName)).getText().toString();
- final String deviceCode = Settings.getWebDeviceCode();
-
- if (StringUtils.isBlank(deviceName)) {
- showToast(res.getString(R.string.err_missing_device_name));
- return;
- }
-
- webDialog = ProgressDialog.show(SettingsActivity.this, res.getString(R.string.init_sendToCgeo), res.getString(R.string.init_sendToCgeo_registering), true);
- webDialog.setCancelable(false);
-
- (new Thread() {
-
- @Override
- public void run() {
- int pin = 0;
-
- final String nam = StringUtils.defaultString(deviceName);
- final String cod = StringUtils.defaultString(deviceCode);
-
- final Parameters params = new Parameters("name", nam, "code", cod);
- HttpResponse response = Network.getRequest("http://send2.cgeo.org/auth.html", params);
-
- if (response != null && response.getStatusLine().getStatusCode() == 200) {
- //response was OK
- String[] strings = Network.getResponseData(response).split(",");
- try {
- pin = Integer.parseInt(strings[1].trim());
- } catch (Exception e) {
- Log.e("webDialog", e);
- }
- String code = strings[0];
- Settings.setWebNameCode(nam, code);
- }
-
- webAuthHandler.sendEmptyMessage(pin);
- }
- }).start();
- }
- }
-
- @Override
- protected void onActivityResult(int requestCode, int resultCode, final Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
- if (resultCode != RESULT_OK) {
- return;
- }
-
- switch (requestCode) {
- case SELECT_MAPFILE_REQUEST:
- if (data.hasExtra(Intents.EXTRA_MAP_FILE)) {
- final String mapFile = data.getStringExtra(Intents.EXTRA_MAP_FILE);
- Settings.setMapFile(mapFile);
- if (!Settings.isValidMapFile(Settings.getMapFile())) {
- showToast(res.getString(R.string.warn_invalid_mapfile));
- }
- }
- updateMapSourceMenu();
- initMapDirectoryEdittext(true);
- break;
- case SELECT_GPX_EXPORT_REQUEST:
- checkDirectory(resultCode, data, R.id.gpx_exportdir, new RunnableWithArgument<String>() {
-
- @Override
- public void run(String directory) {
- Settings.setGpxExportDir(directory);
- }
- });
- break;
- case SELECT_GPX_IMPORT_REQUEST:
- checkDirectory(resultCode, data, R.id.gpx_importdir, new RunnableWithArgument<String>() {
-
- @Override
- public void run(String directory) {
- Settings.setGpxImportDir(directory);
- }
- });
- break;
- case SELECT_THEMEFOLDER_REQUEST:
- checkDirectory(resultCode, data, R.id.themefolder, new RunnableWithArgument<String>() {
-
- @Override
- public void run(String directory) {
- Settings.setCustomRenderThemeBaseFolder(directory);
- }
- });
- break;
- default:
- throw new IllegalArgumentException();
- }
- }
-
- private void checkDirectory(int resultCode, Intent data, int textField, RunnableWithArgument<String> runnableSetDir) {
- if (resultCode != RESULT_OK) {
- return;
- }
- final String directory = new File(data.getData().getPath()).getAbsolutePath();
- if (StringUtils.isNotBlank(directory)) {
- runnableSetDir.run(directory);
- EditText directoryText = (EditText) findViewById(textField);
- directoryText.setText(directory);
- directoryText.requestFocus();
- }
- }
-
- private void selectDirectory(String startDirectory, int directoryKind) {
- try {
- final Intent dirChooser = new Intent(FileManagerIntents.ACTION_PICK_DIRECTORY);
- if (StringUtils.isNotBlank(startDirectory)) {
- dirChooser.setData(Uri.fromFile(new File(startDirectory)));
- }
- dirChooser.putExtra(FileManagerIntents.EXTRA_TITLE, res.getString(R.string.simple_dir_chooser_title));
- dirChooser.putExtra(FileManagerIntents.EXTRA_BUTTON_TEXT, res.getString(android.R.string.ok));
- startActivityForResult(dirChooser, directoryKind);
- } catch (android.content.ActivityNotFoundException ex) {
- // OI file manager not available
- final Intent dirChooser = new Intent(this, SimpleDirChooser.class);
- dirChooser.putExtra(Intents.EXTRA_START_DIR, startDirectory);
- startActivityForResult(dirChooser, directoryKind);
- }
- }
-
- public static void startActivity(Context fromActivity) {
- final Intent initIntent = new Intent(fromActivity, SettingsActivity.class);
- fromActivity.startActivity(initIntent);
- }
-
-}
diff --git a/main/src/cgeo/geocaching/StaticMapsActivity.java b/main/src/cgeo/geocaching/StaticMapsActivity.java
index 4658262..2268df9 100644
--- a/main/src/cgeo/geocaching/StaticMapsActivity.java
+++ b/main/src/cgeo/geocaching/StaticMapsActivity.java
@@ -33,7 +33,7 @@ public class StaticMapsActivity extends AbstractActivity {
private static final String EXTRAS_GEOCODE = "geocode";
@Extra(EXTRAS_DOWNLOAD) boolean download = false;
- @Extra(EXTRAS_WAYPOINT) Integer waypoint_id = null;
+ @Extra(EXTRAS_WAYPOINT) Integer waypointId = null;
@Extra(EXTRAS_GEOCODE) String geocode = null;
private final List<Bitmap> maps = new ArrayList<Bitmap>();
@@ -43,7 +43,7 @@ public class StaticMapsActivity extends AbstractActivity {
private final Handler loadMapsHandler = new Handler() {
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
if (waitDialog != null) {
waitDialog.dismiss();
}
@@ -92,7 +92,7 @@ public class StaticMapsActivity extends AbstractActivity {
}
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState, R.layout.staticmaps_activity);
if (geocode == null) {
@@ -107,12 +107,6 @@ public class StaticMapsActivity extends AbstractActivity {
(new LoadMapsThread()).start();
}
- @Override
- public void onResume() {
- super.onResume();
-
- }
-
private class LoadMapsThread extends Thread {
@Override
@@ -120,11 +114,11 @@ public class StaticMapsActivity extends AbstractActivity {
try {
// try downloading 2 times
for (int trials = 0; trials < 2; trials++) {
- for (int level = 1; level <= 5; level++) {
+ for (int level = 1; level <= StaticMapsProvider.MAPS_LEVEL_MAX; level++) {
try {
- if (waypoint_id != null) {
+ if (waypointId != null) {
final Geocache cache = cgData.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
- final Bitmap image = StaticMapsProvider.getWaypointMap(geocode, cache.getWaypointById(waypoint_id), level);
+ final Bitmap image = StaticMapsProvider.getWaypointMap(geocode, cache.getWaypointById(waypointId), level);
if (image != null) {
maps.add(image);
}
@@ -158,12 +152,12 @@ public class StaticMapsActivity extends AbstractActivity {
private boolean downloadStaticMaps() {
final Geocache cache = cgData.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
- if (waypoint_id == null) {
+ if (waypointId == null) {
showToast(res.getString(R.string.info_storing_static_maps));
StaticMapsProvider.storeCacheStaticMap(cache, true);
return cache.hasStaticMap();
}
- final Waypoint waypoint = cache.getWaypointById(waypoint_id);
+ final Waypoint waypoint = cache.getWaypointById(waypointId);
if (waypoint != null) {
showToast(res.getString(R.string.info_storing_static_maps));
// refresh always removes old waypoint files
@@ -178,7 +172,7 @@ public class StaticMapsActivity extends AbstractActivity {
public static void startActivity(final Context activity, final String geocode, final boolean download, final Waypoint waypoint) {
StaticMapsActivity_.IntentBuilder_ builder = StaticMapsActivity_.intent(activity).geocode(geocode).download(download);
if (waypoint != null) {
- builder.waypoint_id(waypoint.getId());
+ builder.waypointId(waypoint.getId());
}
builder.start();
}
diff --git a/main/src/cgeo/geocaching/StaticMapsProvider.java b/main/src/cgeo/geocaching/StaticMapsProvider.java
index 9a4c00b..2555b80 100644
--- a/main/src/cgeo/geocaching/StaticMapsProvider.java
+++ b/main/src/cgeo/geocaching/StaticMapsProvider.java
@@ -6,6 +6,7 @@ import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.geopoint.GeopointFormatter.Format;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.Log;
import ch.boye.httpclientandroidlib.HttpResponse;
@@ -23,7 +24,8 @@ import android.view.WindowManager;
import java.io.File;
import java.util.concurrent.TimeUnit;
-public class StaticMapsProvider {
+public final class StaticMapsProvider {
+ static final int MAPS_LEVEL_MAX = 5;
private static final String PREFIX_PREVIEW = "preview";
private static final String GOOGLE_STATICMAP_URL = "http://maps.google.com/maps/api/staticmap";
private static final String SATELLITE = "satellite";
@@ -31,16 +33,22 @@ public class StaticMapsProvider {
private static final String WAYPOINT_PREFIX = "wp";
private static final String MAP_FILENAME_PREFIX = "map_";
private static final String MARKERS_URL = "http://status.cgeo.org/assets/markers/";
- /** We assume there is no real usable image with less than 1k */
+
+ /** We assume there is no real usable image with less than 1k. */
private static final int MIN_MAP_IMAGE_BYTES = 1000;
+
/** ThreadPool restricting this to 1 Thread. **/
- private static final BlockingThreadPool pool = new BlockingThreadPool(1, Thread.MIN_PRIORITY);
+ private static final BlockingThreadPool POOL = new BlockingThreadPool(1, Thread.MIN_PRIORITY);
+
+ private StaticMapsProvider() {
+ // utility class
+ }
- private static File getMapFile(final String geocode, String prefix, final boolean createDirs) {
+ private static File getMapFile(final String geocode, final String prefix, final boolean createDirs) {
return LocalStorage.getStorageFile(geocode, MAP_FILENAME_PREFIX + prefix, false, createDirs);
}
- private static void downloadDifferentZooms(final String geocode, String markerUrl, String prefix, String latlonMap, int edge, final Parameters waypoints) {
+ private static void downloadDifferentZooms(final String geocode, final String markerUrl, final String prefix, final String latlonMap, final int edge, final Parameters waypoints) {
downloadMap(geocode, 20, SATELLITE, markerUrl, prefix + '1', "", latlonMap, edge, edge, waypoints);
downloadMap(geocode, 18, SATELLITE, markerUrl, prefix + '2', "", latlonMap, edge, edge, waypoints);
downloadMap(geocode, 16, ROADMAP, markerUrl, prefix + '3', "", latlonMap, edge, edge, waypoints);
@@ -48,7 +56,7 @@ public class StaticMapsProvider {
downloadMap(geocode, 11, ROADMAP, markerUrl, prefix + '5', "", latlonMap, edge, edge, waypoints);
}
- private static void downloadMap(String geocode, int zoom, String mapType, String markerUrl, String prefix, String shadow, String latlonMap, int width, int height, final Parameters waypoints) {
+ private static void downloadMap(final String geocode, final int zoom, final String mapType, final String markerUrl, final String prefix, final String shadow, final String latlonMap, final int width, final int height, final Parameters waypoints) {
final Parameters params = new Parameters(
"center", latlonMap,
"zoom", String.valueOf(zoom),
@@ -79,7 +87,7 @@ public class StaticMapsProvider {
}
}
- public static void downloadMaps(Geocache cache) {
+ public static void downloadMaps(final Geocache cache) {
if ((!Settings.isStoreOfflineMaps() && !Settings.isStoreOfflineWpMaps()) || StringUtils.isBlank(cache.getGeocode())) {
return;
}
@@ -109,19 +117,19 @@ public class StaticMapsProvider {
* @param edge
* The boundings
*/
- private static void refreshAllWpStaticMaps(Geocache cache, int edge) {
+ private static void refreshAllWpStaticMaps(final Geocache cache, final int edge) {
LocalStorage.deleteFilesWithPrefix(cache.getGeocode(), MAP_FILENAME_PREFIX + WAYPOINT_PREFIX);
for (Waypoint waypoint : cache.getWaypoints()) {
storeWaypointStaticMap(cache.getGeocode(), edge, waypoint, false);
}
}
- public static void storeWaypointStaticMap(Geocache cache, Waypoint waypoint, boolean waitForResult) {
+ public static void storeWaypointStaticMap(final Geocache cache, final Waypoint waypoint, final boolean waitForResult) {
int edge = StaticMapsProvider.guessMaxDisplaySide();
storeWaypointStaticMap(cache.getGeocode(), edge, waypoint, waitForResult);
}
- private static void storeWaypointStaticMap(final String geocode, int edge, Waypoint waypoint, final boolean waitForResult) {
+ private static void storeWaypointStaticMap(final String geocode, final int edge, final Waypoint waypoint, final boolean waitForResult) {
if (geocode == null) {
Log.e("storeWaypointStaticMap - missing input parameter geocode");
return;
@@ -141,7 +149,7 @@ public class StaticMapsProvider {
}
}
- public static void storeCacheStaticMap(Geocache cache, final boolean waitForResult) {
+ public static void storeCacheStaticMap(final Geocache cache, final boolean waitForResult) {
int edge = guessMaxDisplaySide();
storeCacheStaticMap(cache, edge, waitForResult);
}
@@ -178,7 +186,7 @@ public class StaticMapsProvider {
}
private static void downloadMaps(final String geocode, final String markerUrl, final String prefix, final String latlonMap, final int edge,
- final Parameters waypoints, boolean waitForResult) {
+ final Parameters waypoints, final boolean waitForResult) {
if (waitForResult) {
downloadDifferentZooms(geocode, markerUrl, prefix, latlonMap, edge, waypoints);
}
@@ -190,7 +198,7 @@ public class StaticMapsProvider {
}
};
try {
- pool.add(currentTask, 20, TimeUnit.SECONDS);
+ POOL.add(currentTask, 20, TimeUnit.SECONDS);
} catch (InterruptedException e) {
Log.e("StaticMapsProvider.downloadMaps error adding task", e);
}
@@ -214,13 +222,13 @@ public class StaticMapsProvider {
return MARKERS_URL + "marker_waypoint_" + type + ".png";
}
- public static void removeWpStaticMaps(Waypoint waypoint, final String geocode) {
+ public static void removeWpStaticMaps(final Waypoint waypoint, final String geocode) {
if (waypoint == null) {
return;
}
int waypointId = waypoint.getId();
int waypointMapHash = waypoint.getStaticMapsHashcode();
- for (int level = 1; level <= 5; level++) {
+ for (int level = 1; level <= MAPS_LEVEL_MAX; level++) {
try {
StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + '_' + level, false).delete();
} catch (Exception e) {
@@ -243,7 +251,7 @@ public class StaticMapsProvider {
if (StringUtils.isBlank(geocode)) {
return false;
}
- for (int level = 1; level <= 5; level++) {
+ for (int level = 1; level <= MAPS_LEVEL_MAX; level++) {
File mapFile = StaticMapsProvider.getMapFile(geocode, String.valueOf(level), false);
if (mapFile.exists()) {
return true;
@@ -259,10 +267,10 @@ public class StaticMapsProvider {
* @param waypoint
* @return <code>true</code> if at least one map file exists; <code>false</code> otherwise
*/
- public static boolean hasStaticMapForWaypoint(String geocode, Waypoint waypoint) {
+ public static boolean hasStaticMapForWaypoint(final String geocode, final Waypoint waypoint) {
int waypointId = waypoint.getId();
int waypointMapHash = waypoint.getStaticMapsHashcode();
- for (int level = 1; level <= 5; level++) {
+ for (int level = 1; level <= MAPS_LEVEL_MAX; level++) {
File mapFile = StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + "_" + level, false);
if (mapFile.exists()) {
return true;
@@ -278,10 +286,10 @@ public class StaticMapsProvider {
* @param waypoint
* @return <code>true</code> if all map files exist; <code>false</code> otherwise
*/
- public static boolean hasAllStaticMapsForWaypoint(String geocode, Waypoint waypoint) {
+ public static boolean hasAllStaticMapsForWaypoint(final String geocode, final Waypoint waypoint) {
int waypointId = waypoint.getId();
int waypointMapHash = waypoint.getStaticMapsHashcode();
- for (int level = 1; level <= 5; level++) {
+ for (int level = 1; level <= MAPS_LEVEL_MAX; level++) {
File mapFile = StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + "_" + level, false);
boolean mapExists = mapFile.exists();
if (!mapExists) {
@@ -295,13 +303,13 @@ public class StaticMapsProvider {
return decodeFile(StaticMapsProvider.getMapFile(geocode, PREFIX_PREVIEW, false));
}
- public static Bitmap getWaypointMap(final String geocode, Waypoint waypoint, int level) {
+ public static Bitmap getWaypointMap(final String geocode, final Waypoint waypoint, final int level) {
int waypointId = waypoint.getId();
int waypointMapHash = waypoint.getStaticMapsHashcode();
return decodeFile(StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + "_" + level, false));
}
- public static Bitmap getCacheMap(final String geocode, int level) {
+ public static Bitmap getCacheMap(final String geocode, final int level) {
return decodeFile(StaticMapsProvider.getMapFile(geocode, String.valueOf(level), false));
}
diff --git a/main/src/cgeo/geocaching/StatusFragment.java b/main/src/cgeo/geocaching/StatusFragment.java
index 5a9a5b4..e0e714a 100644
--- a/main/src/cgeo/geocaching/StatusFragment.java
+++ b/main/src/cgeo/geocaching/StatusFragment.java
@@ -57,7 +57,7 @@ public class StatusFragment extends Fragment {
@Override
public void handleMessage(final Message msg) {
final Status data = (Status) msg.obj;
- updateDisplay(data != null && data.message != null ? data : null);
+ updateDisplay(data != null && data.message != null ? data : Status.defaultStatus());
}
private void updateDisplay(final Status data) {
diff --git a/main/src/cgeo/geocaching/StoredList.java b/main/src/cgeo/geocaching/StoredList.java
index b92ce9a..55a155c 100644
--- a/main/src/cgeo/geocaching/StoredList.java
+++ b/main/src/cgeo/geocaching/StoredList.java
@@ -71,7 +71,7 @@ public final class StoredList {
promptForListSelection(titleId, runAfterwards, false, -1);
}
- public void promptForListSelection(final int titleId, final RunnableWithArgument<Integer> runAfterwards, final boolean onlyMoveTargets, final int exceptListId) {
+ public void promptForListSelection(final int titleId, final RunnableWithArgument<Integer> runAfterwards, final boolean onlyConcreteLists, final int exceptListId) {
final List<StoredList> lists = getSortedLists();
if (lists == null) {
@@ -89,7 +89,7 @@ public final class StoredList {
for (StoredList list : lists) {
listsTitle.add(list.getTitleAndCount());
}
- if (!onlyMoveTargets) {
+ if (!onlyConcreteLists) {
listsTitle.add("<" + res.getString(R.string.list_menu_all_lists) + ">");
}
listsTitle.add("<" + res.getString(R.string.list_menu_create) + ">");
@@ -101,7 +101,7 @@ public final class StoredList {
builder.setItems(listsTitle.toArray(items), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int itemId) {
- if (itemId == lists.size() && !onlyMoveTargets) {
+ if (itemId == lists.size() && !onlyConcreteLists) {
// all lists
runAfterwards.run(StoredList.ALL_LIST_ID);
} else if (itemId >= lists.size()) {
diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java
index 77f7526..d1f323c 100644
--- a/main/src/cgeo/geocaching/TrackableActivity.java
+++ b/main/src/cgeo/geocaching/TrackableActivity.java
@@ -7,17 +7,18 @@ import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.activity.AbstractViewPagerActivity;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.trackable.TrackableConnector;
+import cgeo.geocaching.connector.trackable.TravelBugConnector;
import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.geopoint.Units;
import cgeo.geocaching.network.HtmlImage;
-import cgeo.geocaching.network.Network;
import cgeo.geocaching.ui.AbstractCachingPageViewCreator;
import cgeo.geocaching.ui.AnchorAwareLinkMovementMethod;
import cgeo.geocaching.ui.CacheDetailsCreator;
import cgeo.geocaching.ui.Formatter;
+import cgeo.geocaching.ui.UserActionsClickListener;
+import cgeo.geocaching.ui.logs.TrackableLogsViewCreator;
import cgeo.geocaching.utils.HtmlUtils;
import cgeo.geocaching.utils.Log;
-import cgeo.geocaching.utils.TextUtils;
import cgeo.geocaching.utils.UnknownTagsHandler;
import org.apache.commons.lang3.StringUtils;
@@ -32,16 +33,12 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Html;
-import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
-import android.widget.ListView;
-import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
@@ -61,12 +58,12 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
this.resId = resId;
}
}
+
private Trackable trackable = null;
private String geocode = null;
private String name = null;
private String guid = null;
private String id = null;
- private String contextMenuUser = null;
private LayoutInflater inflater = null;
private ProgressDialog waitDialog = null;
private final Handler loadTrackableHandler = new Handler() {
@@ -192,52 +189,6 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
}
@Override
- public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo info) {
- super.onCreateContextMenu(menu, view, info);
- final int viewId = view.getId();
-
- if (viewId == R.id.author) { // Log item author
- contextMenuUser = ((TextView) view).getText().toString();
- } else { // Trackable owner, and user holding trackable now
- final RelativeLayout itemLayout = (RelativeLayout) view.getParent();
- final TextView itemName = (TextView) itemLayout.findViewById(R.id.name);
-
- final String selectedName = itemName.getText().toString();
- if (selectedName.equals(res.getString(R.string.trackable_owner))) {
- contextMenuUser = trackable.getOwner();
- } else if (selectedName.equals(res.getString(R.string.trackable_spotted))) {
- contextMenuUser = trackable.getSpottedName();
- }
- }
-
- menu.setHeaderTitle(res.getString(R.string.user_menu_title) + " " + contextMenuUser);
- menu.add(viewId, 1, 0, res.getString(R.string.user_menu_view_hidden));
- menu.add(viewId, 2, 0, res.getString(R.string.user_menu_view_found));
- menu.add(viewId, 3, 0, res.getString(R.string.user_menu_open_browser));
- menu.add(viewId, 4, 0, res.getString(R.string.user_menu_send_message));
- }
-
- @Override
- public boolean onContextItemSelected(final MenuItem item) {
- switch (item.getItemId()) {
- case 1:
- cgeocaches.startActivityOwner(this, contextMenuUser);
- return true;
- case 2:
- cgeocaches.startActivityUserName(this, contextMenuUser);
- return true;
- case 3:
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/profile/?u=" + Network.encode(contextMenuUser))));
- return true;
- case 4:
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/email/?u=" + Network.encode(contextMenuUser))));
- return true;
- default:
- return false;
- }
- }
-
- @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.trackable_activity, menu);
return true;
@@ -281,30 +232,26 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
@Override
public void run() {
- trackable = cgData.loadTrackable(geocode);
-
- if (trackable == null || trackable.isLoggable()) {
- final TrackableConnector trackableConnector = ConnectorFactory.getTrackableConnector(geocode);
- trackable = trackableConnector.searchTrackable(geocode, guid, id);
- }
- handler.sendMessage(Message.obtain());
- }
- }
-
- private class UserActionsListener implements View.OnClickListener {
-
- @Override
- public void onClick(View view) {
- if (view == null) {
- return;
+ if (StringUtils.isNotEmpty(geocode)) {
+ trackable = cgData.loadTrackable(geocode);
+
+ if (trackable == null || trackable.isLoggable()) {
+ // iterate over the connectors as some codes may be handled by multiple connectors
+ for (final TrackableConnector trackableConnector : ConnectorFactory.getTrackableConnectors()) {
+ if (trackableConnector.canHandleTrackable(geocode)) {
+ trackable = trackableConnector.searchTrackable(geocode, guid, id);
+ if (trackable != null) {
+ break;
+ }
+ }
+ }
+ }
}
-
- try {
- registerForContextMenu(view);
- openContextMenu(view);
- } catch (final Exception e) {
- Log.e("TrackableActivity.UserActionsListener.onClick ", e);
+ // fall back to GC search by GUID
+ if (trackable == null) {
+ trackable = TravelBugConnector.getInstance().searchTrackable(geocode, guid, id);
}
+ handler.sendMessage(Message.obtain());
}
}
@@ -367,7 +314,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
case DETAILS:
return new DetailsViewCreator();
case LOGS:
- return new LogsViewCreator();
+ return new TrackableLogsViewCreator(this, trackable);
default:
throw new IllegalArgumentException();
}
@@ -388,98 +335,6 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
return new ImmutablePair<List<? extends Page>, Integer>(pages, 0);
}
- public class LogsViewCreator extends AbstractCachingPageViewCreator<ListView> {
-
- @Override
- public ListView getDispatchedView() {
- view = (ListView) getLayoutInflater().inflate(R.layout.trackable_logs_view, null);
-
- if (trackable != null && trackable.getLogs() != null) {
- view.setAdapter(new ArrayAdapter<LogEntry>(TrackableActivity.this, R.layout.logs_item, trackable.getLogs()) {
- @Override
- public View getView(int position, View convertView, android.view.ViewGroup parent) {
- View rowView = convertView;
- if (null == rowView) {
- rowView = getLayoutInflater().inflate(R.layout.logs_item, null);
- }
- LogViewHolder holder = (LogViewHolder) rowView.getTag();
- if (null == holder) {
- holder = new LogViewHolder(rowView);
- }
-
- final LogEntry log = getItem(position);
- fillViewHolder(holder, log);
- return rowView;
- }
- });
- }
- return view;
- }
-
- protected void fillViewHolder(LogViewHolder holder, final LogEntry log) {
- if (log.date > 0) {
- holder.date.setText(Formatter.formatShortDateVerbally(log.date));
- }
-
- holder.type.setText(log.type.getL10n());
- holder.author.setText(Html.fromHtml(log.author), TextView.BufferType.SPANNABLE);
-
- if (StringUtils.isBlank(log.cacheName)) {
- holder.countOrLocation.setVisibility(View.GONE);
- } else {
- holder.countOrLocation.setText(Html.fromHtml(log.cacheName));
- final String cacheGuid = log.cacheGuid;
- final String cacheName = log.cacheName;
- holder.countOrLocation.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View arg0) {
- CacheDetailActivity.startActivityGuid(TrackableActivity.this, cacheGuid, Html.fromHtml(cacheName).toString());
- }
- });
- }
-
- final TextView logView = holder.text;
- logView.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
-
- String logText = log.log;
- if (TextUtils.containsHtml(logText)) {
- logText = log.getDisplayText();
- logView.setText(Html.fromHtml(logText, new HtmlImage(null, false, StoredList.TEMPORARY_LIST_ID, false), null), TextView.BufferType.SPANNABLE);
- }
- else {
- logView.setText(logText);
- }
-
- final ImageView statusMarker = holder.marker;
- // colored marker
- final int marker = log.type.markerId;
- if (marker != 0) {
- statusMarker.setVisibility(View.VISIBLE);
- statusMarker.setImageResource(marker);
- }
- else {
- statusMarker.setVisibility(View.GONE);
- }
-
- // images
- if (log.hasLogImages()) {
- holder.images.setText(log.getImageTitles());
- holder.images.setVisibility(View.VISIBLE);
- holder.images.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- ImagesActivity.startActivityLogImages(TrackableActivity.this, trackable.getGeocode(), new ArrayList<Image>(log.getLogImages()));
- }
- });
- } else {
- holder.images.setVisibility(View.GONE);
- }
-
- holder.author.setOnClickListener(new UserActionsListener());
- }
-
- }
-
public class DetailsViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
@InjectView(R.id.goal_box) protected LinearLayout goalBox;
@@ -523,7 +378,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
final TextView owner = details.add(R.string.trackable_owner, res.getString(R.string.trackable_unknown));
if (StringUtils.isNotBlank(trackable.getOwner())) {
owner.setText(Html.fromHtml(trackable.getOwner()), TextView.BufferType.SPANNABLE);
- owner.setOnClickListener(new UserActionsListener());
+ owner.setOnClickListener(new UserActionsClickListener());
}
// trackable spotted
@@ -567,7 +422,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
}
});
} else if (Trackable.SPOTTED_USER == trackable.getSpottedType()) {
- spotted.setOnClickListener(new UserActionsListener());
+ spotted.setOnClickListener(new UserActionsClickListener());
}
}
diff --git a/main/src/cgeo/geocaching/activity/AbstractActivity.java b/main/src/cgeo/geocaching/activity/AbstractActivity.java
index 964ef96..9aca35e 100644
--- a/main/src/cgeo/geocaching/activity/AbstractActivity.java
+++ b/main/src/cgeo/geocaching/activity/AbstractActivity.java
@@ -2,7 +2,7 @@ package cgeo.geocaching.activity;
import butterknife.Views;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.compatibility.Compatibility;
import cgeo.geocaching.network.Cookies;
@@ -83,33 +83,6 @@ public abstract class AbstractActivity extends FragmentActivity implements IAbst
ActivityMixin.invalidateOptionsMenu(this);
}
- /**
- * insert text into the EditText at the current cursor position
- *
- * @param editText
- * @param insertText
- * @param moveCursor
- * place the cursor after the inserted text
- */
- public static void insertAtPosition(final EditText editText, final String insertText, final boolean moveCursor) {
- int selectionStart = editText.getSelectionStart();
- int selectionEnd = editText.getSelectionEnd();
- int start = Math.min(selectionStart, selectionEnd);
- int end = Math.max(selectionStart, selectionEnd);
-
- final String content = editText.getText().toString();
- String completeText;
- if (start > 0 && !Character.isWhitespace(content.charAt(start - 1))) {
- completeText = " " + insertText;
- } else {
- completeText = insertText;
- }
-
- editText.getText().replace(start, end, completeText);
- int newCursor = moveCursor ? start + completeText.length() : start;
- editText.setSelection(newCursor, newCursor);
- }
-
protected void onCreate(final Bundle savedInstanceState, final int resourceLayoutID) {
super.onCreate(savedInstanceState);
diff --git a/main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java b/main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java
index 0345633..952726e 100644
--- a/main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java
+++ b/main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java
@@ -93,7 +93,7 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
- ((ViewPager) container).removeView((View) object);
+ container.removeView((View) object);
}
@Override
@@ -123,7 +123,7 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
// Result from getView() is maybe cached, but it should be valid because the
// creator should be informed about data-changes with notifyDataSetChanged()
view = creator.getView();
- ((ViewPager) container).addView(view, 0);
+ container.addView(view, 0);
}
} catch (Exception e) {
Log.e("ViewPagerAdapter.instantiateItem ", e);
diff --git a/main/src/cgeo/geocaching/activity/ActivityMixin.java b/main/src/cgeo/geocaching/activity/ActivityMixin.java
index 12ab0be..699d5ab 100644
--- a/main/src/cgeo/geocaching/activity/ActivityMixin.java
+++ b/main/src/cgeo/geocaching/activity/ActivityMixin.java
@@ -2,7 +2,7 @@ package cgeo.geocaching.activity;
import cgeo.geocaching.MainActivity;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.compatibility.Compatibility;
import org.apache.commons.lang3.StringUtils;
@@ -16,6 +16,7 @@ import android.os.Build;
import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;
+import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
@@ -79,6 +80,10 @@ public final class ActivityMixin {
return R.style.popup_dark;
}
+ public static void showToast(final Activity activity, final int resId) {
+ ActivityMixin.showToast(activity, activity.getString(resId));
+ }
+
public static void showToast(final Activity activity, final String text) {
if (StringUtils.isNotBlank(text)) {
Toast toast = Toast.makeText(activity, text, Toast.LENGTH_LONG);
@@ -130,4 +135,31 @@ public final class ActivityMixin {
public static void invalidateOptionsMenu(Activity activity) {
Compatibility.invalidateOptionsMenu(activity);
}
+
+ /**
+ * insert text into the EditText at the current cursor position
+ *
+ * @param editText
+ * @param insertText
+ * @param moveCursor
+ * place the cursor after the inserted text
+ */
+ public static void insertAtPosition(final EditText editText, final String insertText, final boolean moveCursor) {
+ int selectionStart = editText.getSelectionStart();
+ int selectionEnd = editText.getSelectionEnd();
+ int start = Math.min(selectionStart, selectionEnd);
+ int end = Math.max(selectionStart, selectionEnd);
+
+ final String content = editText.getText().toString();
+ String completeText;
+ if (start > 0 && !Character.isWhitespace(content.charAt(start - 1))) {
+ completeText = " " + insertText;
+ } else {
+ completeText = insertText;
+ }
+
+ editText.getText().replace(start, end, completeText);
+ int newCursor = moveCursor ? start + completeText.length() : start;
+ editText.setSelection(newCursor, newCursor);
+ }
}
diff --git a/main/src/cgeo/geocaching/apps/AbstractApp.java b/main/src/cgeo/geocaching/apps/AbstractApp.java
index ef56f87..7b6b3d9 100644
--- a/main/src/cgeo/geocaching/apps/AbstractApp.java
+++ b/main/src/cgeo/geocaching/apps/AbstractApp.java
@@ -1,10 +1,11 @@
package cgeo.geocaching.apps;
import cgeo.geocaching.Geocache;
-import cgeo.geocaching.MainActivity;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.utils.ProcessUtils;
+import org.apache.commons.lang3.StringUtils;
+
import android.content.Intent;
public abstract class AbstractApp implements App {
@@ -26,10 +27,10 @@ public abstract class AbstractApp implements App {
@Override
public boolean isInstalled() {
- if (ProcessUtils.isInstalled(packageName)) {
+ if (StringUtils.isNotEmpty(packageName) && ProcessUtils.isLaunchable(packageName)) {
return true;
}
- return MainActivity.isIntentAvailable(intent);
+ return ProcessUtils.isIntentAvailable(intent);
}
protected Intent getLaunchIntent() {
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/GoogleNavigationApp.java b/main/src/cgeo/geocaching/apps/cache/navi/GoogleNavigationApp.java
index 1019b0f..a3532a5 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/GoogleNavigationApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/GoogleNavigationApp.java
@@ -27,22 +27,28 @@ abstract class GoogleNavigationApp extends AbstractPointNavigationApp {
try {
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri
.parse("google.navigation:ll=" + coords.getLatitude() + ","
- + coords.getLongitude() + mode)));
+ + coords.getLongitude() + "&mode=" + mode)));
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.i("GoogleNavigationApp.navigate: No navigation application available.", e);
}
}
static class GoogleNavigationWalkingApp extends GoogleNavigationApp {
GoogleNavigationWalkingApp() {
- super(R.string.cache_menu_navigation_walk, "&mode=w");
+ super(R.string.cache_menu_navigation_walk, "w");
}
}
static class GoogleNavigationDrivingApp extends GoogleNavigationApp {
GoogleNavigationDrivingApp() {
- super(R.string.cache_menu_navigation_drive, "&mode=d");
+ super(R.string.cache_menu_navigation_drive, "d");
+ }
+ }
+
+ static class GoogleNavigationBikeApp extends GoogleNavigationApp {
+ GoogleNavigationBikeApp() {
+ super(R.string.cache_menu_navigation_bike, "b");
}
}
} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
index 5545936..4db889d 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
@@ -1,8 +1,8 @@
package cgeo.geocaching.apps.cache.navi;
import cgeo.geocaching.Geocache;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.activity.ActivityMixin;
@@ -11,6 +11,7 @@ import cgeo.geocaching.apps.App;
import cgeo.geocaching.apps.cache.CacheBeaconApp;
import cgeo.geocaching.apps.cache.GccApp;
import cgeo.geocaching.apps.cache.WhereYouGoApp;
+import cgeo.geocaching.apps.cache.navi.GoogleNavigationApp.GoogleNavigationBikeApp;
import cgeo.geocaching.apps.cache.navi.GoogleNavigationApp.GoogleNavigationDrivingApp;
import cgeo.geocaching.apps.cache.navi.GoogleNavigationApp.GoogleNavigationWalkingApp;
import cgeo.geocaching.geopoint.Geopoint;
@@ -59,6 +60,10 @@ public final class NavigationAppFactory extends AbstractAppFactory {
*/
GOOGLE_NAVIGATION_WALK(new GoogleNavigationWalkingApp(), 12),
/**
+ * Google Navigation in walking mode
+ */
+ GOOGLE_NAVIGATION_BIKE(new GoogleNavigationBikeApp(), 21),
+ /**
* Google Maps Directions
*/
GOOGLE_MAPS_DIRECTIONS(new GoogleMapsDirectionApp(), 13),
@@ -134,7 +139,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
builder.setTitle(R.string.cache_menu_navigate);
final List<NavigationAppsEnum> items = new ArrayList<NavigationAppFactory.NavigationAppsEnum>();
final int defaultNavigationTool = Settings.getDefaultNavigationTool();
- for (NavigationAppsEnum navApp : getInstalledNavigationApps()) {
+ for (final NavigationAppsEnum navApp : getInstalledNavigationApps()) {
if ((showInternalMap || !(navApp.app instanceof InternalMap)) &&
(showDefaultNavigation || defaultNavigationTool != navApp.id)) {
boolean add = false;
@@ -161,8 +166,8 @@ public final class NavigationAppFactory extends AbstractAppFactory {
builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int item) {
- NavigationAppsEnum selectedItem = adapter.getItem(item);
- App app = selectedItem.app;
+ final NavigationAppsEnum selectedItem = adapter.getItem(item);
+ final App app = selectedItem.app;
if (cache != null) {
navigateCache(activity, cache, app);
}
@@ -185,7 +190,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
*/
public static List<NavigationAppsEnum> getInstalledNavigationApps() {
final List<NavigationAppsEnum> installedNavigationApps = new ArrayList<NavigationAppsEnum>();
- for (NavigationAppsEnum appEnum : NavigationAppsEnum.values()) {
+ for (final NavigationAppsEnum appEnum : NavigationAppsEnum.values()) {
if (appEnum.app.isInstalled()) {
installedNavigationApps.add(appEnum);
}
@@ -200,7 +205,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
*/
public static List<NavigationAppsEnum> getInstalledDefaultNavigationApps() {
final List<NavigationAppsEnum> installedNavigationApps = new ArrayList<NavigationAppsEnum>();
- for (NavigationAppsEnum appEnum : NavigationAppsEnum.values()) {
+ for (final NavigationAppsEnum appEnum : NavigationAppsEnum.values()) {
if (appEnum.app.isInstalled() && appEnum.app.isDefaultNavigationApp()) {
installedNavigationApps.add(appEnum);
}
@@ -225,9 +230,9 @@ public final class NavigationAppFactory extends AbstractAppFactory {
* @param menu
*/
public static void addMenuItems(final Menu menu, final Geocache cache) {
- for (NavigationAppsEnum navApp : getInstalledNavigationApps()) {
+ for (final NavigationAppsEnum navApp : getInstalledNavigationApps()) {
if (navApp.app instanceof CacheNavigationApp) {
- CacheNavigationApp cacheApp = (CacheNavigationApp) navApp.app;
+ final CacheNavigationApp cacheApp = (CacheNavigationApp) navApp.app;
if (cacheApp.isEnabled(cache)) {
menu.add(0, MENU_ITEM_OFFSET + navApp.id, 0, navApp.app.getName());
}
@@ -236,9 +241,9 @@ public final class NavigationAppFactory extends AbstractAppFactory {
}
public static void addMenuItems(final Menu menu, final Waypoint waypoint) {
- for (NavigationAppsEnum navApp : getInstalledNavigationApps()) {
+ for (final NavigationAppsEnum navApp : getInstalledNavigationApps()) {
if (navApp.app instanceof WaypointNavigationApp) {
- WaypointNavigationApp waypointApp = (WaypointNavigationApp) navApp.app;
+ final WaypointNavigationApp waypointApp = (WaypointNavigationApp) navApp.app;
if (waypointApp.isEnabled(waypoint)) {
menu.add(0, MENU_ITEM_OFFSET + navApp.id, 0, navApp.app.getName());
}
@@ -262,7 +267,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
private static void navigateCache(Activity activity, Geocache cache, App app) {
if (app instanceof CacheNavigationApp) {
- CacheNavigationApp cacheApp = (CacheNavigationApp) app;
+ final CacheNavigationApp cacheApp = (CacheNavigationApp) app;
cacheApp.navigate(activity, cache);
}
}
@@ -275,21 +280,21 @@ public final class NavigationAppFactory extends AbstractAppFactory {
private static void navigateWaypoint(Activity activity, Waypoint waypoint, App app) {
if (app instanceof WaypointNavigationApp) {
- WaypointNavigationApp waypointApp = (WaypointNavigationApp) app;
+ final WaypointNavigationApp waypointApp = (WaypointNavigationApp) app;
waypointApp.navigate(activity, waypoint);
}
}
private static void navigateGeopoint(Activity activity, Geopoint destination, App app) {
if (app instanceof GeopointNavigationApp) {
- GeopointNavigationApp geopointApp = (GeopointNavigationApp) app;
+ final GeopointNavigationApp geopointApp = (GeopointNavigationApp) app;
geopointApp.navigate(activity, destination);
}
}
private static App getAppFromMenuItem(MenuItem item) {
final int id = item.getItemId();
- for (NavigationAppsEnum navApp : NavigationAppsEnum.values()) {
+ for (final NavigationAppsEnum navApp : NavigationAppsEnum.values()) {
if (MENU_ITEM_OFFSET + navApp.id == id) {
return navApp.app;
}
@@ -362,7 +367,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
private static App getNavigationAppForId(final int navigationAppId) {
final List<NavigationAppsEnum> installedNavigationApps = getInstalledNavigationApps();
- for (NavigationAppsEnum navigationApp : installedNavigationApps) {
+ for (final NavigationAppsEnum navigationApp : installedNavigationApps) {
if (navigationApp.id == navigationAppId) {
return navigationApp.app;
}
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java b/main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java
index 012b94f..e2c0828 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/StreetviewApp.java
@@ -4,6 +4,7 @@ import cgeo.geocaching.R;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.utils.ProcessUtils;
import android.app.Activity;
import android.content.ActivityNotFoundException;
@@ -12,13 +13,16 @@ import android.net.Uri;
class StreetviewApp extends AbstractPointNavigationApp {
+ private static final String PACKAGE_NAME_STREET_VIEW = "com.google.android.street";
+ private static final boolean INSTALLED = ProcessUtils.isInstalled(PACKAGE_NAME_STREET_VIEW);
+
StreetviewApp() {
super(getString(R.string.cache_menu_streetview), null);
}
@Override
public boolean isInstalled() {
- return true;
+ return INSTALLED;
}
@Override
@@ -26,7 +30,7 @@ class StreetviewApp extends AbstractPointNavigationApp {
try {
activity.startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("google.streetview:cbll=" + point.getLatitude() + "," + point.getLongitude())));
- } catch (ActivityNotFoundException e) {
+ } catch (final ActivityNotFoundException e) {
ActivityMixin.showToast(activity, cgeoapplication.getInstance().getString(R.string.err_application_no));
}
}
diff --git a/main/src/cgeo/geocaching/cgData.java b/main/src/cgeo/geocaching/cgData.java
index 2ef5b27..87710fb 100644
--- a/main/src/cgeo/geocaching/cgData.java
+++ b/main/src/cgeo/geocaching/cgData.java
@@ -1,5 +1,7 @@
package cgeo.geocaching;
+import cgeo.geocaching.connector.IConnector;
+import cgeo.geocaching.connector.gc.Tile;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LoadFlags;
@@ -11,6 +13,7 @@ import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Viewport;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.Log;
import org.apache.commons.collections.CollectionUtils;
@@ -59,18 +62,52 @@ public class cgData {
DATABASE,
}
- /** The list of fields needed for mapping. */
- private static final String[] CACHE_COLUMNS = new String[] {
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
- "updated", "reason", "detailed", "detailedupdate", "visiteddate", "geocode", "cacheid", "guid", "type", "name", "owner", "owner_real", "hidden", "hint", "size",
- // 15 16 17 18 19 20 21 22 23
- "difficulty", "direction", "distance", "terrain", "latlon", "location", "elevation", "personal_note", "shortdesc",
- // 24 25 26 27 28 29 30 31 32
- "favourite_cnt", "rating", "votes", "myvote", "disabled", "archived", "members", "found", "favourite",
- // 33 34 35 36 37 38 39 40 41 42
- "inventoryunknown", "onWatchlist", "reliable_latlon", "coordsChanged", "latitude", "longitude", "finalDefined", "_id", "inventorycoins", "inventorytags"
- // reason is replaced by listId in Geocache
- };
+ // Columns and indices for the cache data
+ private static final String QUERY_CACHE_DATA =
+ "SELECT " +
+ "cg_caches.updated," + // 0
+ "cg_caches.reason," + // 1
+ "cg_caches.detailed," + // 2
+ "cg_caches.detailedupdate," + // 3
+ "cg_caches.visiteddate," + // 4
+ "cg_caches.geocode," + // 5
+ "cg_caches.cacheid," + // 6
+ "cg_caches.guid," + // 7
+ "cg_caches.type," + // 8
+ "cg_caches.name," + // 9
+ "cg_caches.owner," + // 10
+ "cg_caches.owner_real," + // 11
+ "cg_caches.hidden," + // 12
+ "cg_caches.hint," + // 13
+ "cg_caches.size," + // 14
+ "cg_caches.difficulty," + // 15
+ "cg_caches.direction," + // 16
+ "cg_caches.distance," + // 17
+ "cg_caches.terrain," + // 18
+ "cg_caches.latlon," + // 19
+ "cg_caches.location," + // 20
+ "cg_caches.personal_note," + // 21
+ "cg_caches.shortdesc," + // 22
+ "cg_caches.favourite_cnt," + // 23
+ "cg_caches.rating," + // 24
+ "cg_caches.votes," + // 25
+ "cg_caches.myvote," + // 26
+ "cg_caches.disabled," + // 27
+ "cg_caches.archived," + // 28
+ "cg_caches.members," + // 29
+ "cg_caches.found," + // 30
+ "cg_caches.favourite," + // 31
+ "cg_caches.inventoryunknown," + // 32
+ "cg_caches.onWatchlist," + // 33
+ "cg_caches.reliable_latlon," + // 34
+ "cg_caches.coordsChanged," + // 35
+ "cg_caches.latitude," + // 36
+ "cg_caches.longitude," + // 37
+ "cg_caches.finalDefined," + // 38
+ "cg_caches._id," + // 39
+ "cg_caches.inventorycoins," + // 40
+ "cg_caches.inventorytags," + // 41
+ "cg_caches.logPasswordRequired"; // 42
//TODO: remove "latlon" field from cache table
@@ -83,10 +120,9 @@ public class cgData {
/**
* holds the column indexes of the cache table to avoid lookups
*/
- private static int[] cacheColumnIndex;
private static CacheCache cacheCache = new CacheCache();
private static SQLiteDatabase database = null;
- private static final int dbVersion = 67;
+ private static final int dbVersion = 68;
public static final int customListIdOffset = 10;
private static final String dbName = "data";
private static final String dbTableCaches = "cg_caches";
@@ -127,7 +163,6 @@ public class cgData {
+ "latitude double, "
+ "longitude double, "
+ "reliable_latlon integer, "
- + "elevation double, "
+ "personal_note text, "
+ "shortdesc text, "
+ "description text, "
@@ -145,7 +180,8 @@ public class cgData {
+ "inventoryunknown integer default 0, "
+ "onWatchlist integer default 0, "
+ "coordsChanged integer default 0, "
- + "finalDefined integer default 0"
+ + "finalDefined integer default 0, "
+ + "logPasswordRequired integer default 0"
+ "); ";
private static final String dbCreateLists = ""
+ "create table " + dbTableLists + " ("
@@ -542,7 +578,6 @@ public class cgData {
+ "latitude double, "
+ "longitude double, "
+ "reliable_latlon integer, "
- + "elevation double, "
+ "personal_note text, "
+ "shortdesc text, "
+ "description text, "
@@ -563,7 +598,7 @@ public class cgData {
db.execSQL(dbCreateCachesTemp);
db.execSQL("insert into " + dbTableCachesTemp + " select _id,updated,detailed,detailedupdate,visiteddate,geocode,reason,cacheid,guid,type,name,own,owner,owner_real," +
- "hidden,hint,size,difficulty,terrain,latlon,location,direction,distance,latitude,longitude, 0,elevation," +
+ "hidden,hint,size,difficulty,terrain,latlon,location,direction,distance,latitude,longitude, 0," +
"personal_note,shortdesc,description,favourite_cnt,rating,votes,myvote,disabled,archived,members,found,favourite,inventorycoins," +
"inventorytags,inventoryunknown,onWatchlist from " + dbTableCaches);
db.execSQL("drop table " + dbTableCaches);
@@ -685,6 +720,15 @@ public class cgData {
}
}
+ // Introduces logPasswordRequired on caches
+ if (oldVersion < 68) {
+ try {
+ db.execSQL("alter table " + dbTableCaches + " add column logPasswordRequired integer default 0");
+ } catch (Exception e) {
+ Log.e("Failed to upgrade to ver. 68", e);
+
+ }
+ }
}
db.setTransactionSuccessful();
@@ -1035,7 +1079,6 @@ public class cgData {
values.put("direction", cache.getDirection());
putCoords(values, cache.getCoords());
values.put("reliable_latlon", cache.isReliableLatLon() ? 1 : 0);
- values.put("elevation", cache.getElevation());
values.put("shortdesc", cache.getShortDescription());
values.put("personal_note", cache.getPersonalNote());
values.put("description", cache.getDescription());
@@ -1052,13 +1095,13 @@ public class cgData {
values.put("onWatchlist", cache.isOnWatchlist() ? 1 : 0);
values.put("coordsChanged", cache.hasUserModifiedCoords() ? 1 : 0);
values.put("finalDefined", cache.hasFinalDefined() ? 1 : 0);
+ values.put("logPasswordRequired", cache.isLogPasswordRequired() ? 1 : 0);
init();
//try to update record else insert fresh..
database.beginTransaction();
- boolean result = false;
try {
saveAttributesWithoutTransaction(cache);
saveOriginalWaypointsWithoutTransaction(cache);
@@ -1074,14 +1117,14 @@ public class cgData {
database.insert(dbTableCaches, null, values);
}
database.setTransactionSuccessful();
- result = true;
+ return true;
} catch (Exception e) {
Log.e("SaveCache", e);
} finally {
database.endTransaction();
}
- return result;
+ return false;
}
private static void saveAttributesWithoutTransaction(final Geocache cache) {
@@ -1128,17 +1171,16 @@ public class cgData {
init();
database.beginTransaction();
- boolean result = false;
try {
saveOriginalWaypointsWithoutTransaction(cache);
database.setTransactionSuccessful();
- result = true;
+ return true;
} catch (Exception e) {
Log.e("saveWaypoints", e);
} finally {
database.endTransaction();
}
- return result;
+ return false;
}
private static void saveOriginalWaypointsWithoutTransaction(final Geocache cache) {
@@ -1332,7 +1374,7 @@ public class cgData {
}
}
- public static boolean saveTrackable(final Trackable trackable) {
+ public static void saveTrackable(final Trackable trackable) {
init();
database.beginTransaction();
@@ -1342,8 +1384,6 @@ public class cgData {
} finally {
database.endTransaction();
}
-
- return true;
}
private static void saveInventoryWithoutTransaction(final String geocode, final List<Trackable> trackables) {
@@ -1478,10 +1518,7 @@ public class cgData {
// do not log the entire collection of geo codes to the debug log. This can be more than 100 KB of text for large lists!
init();
- final StringBuilder query = new StringBuilder("SELECT ");
- for (int i = 0; i < CACHE_COLUMNS.length; i++) {
- query.append(i > 0 ? ", " : "").append(dbTableCaches).append('.').append(CACHE_COLUMNS[i]).append(' ');
- }
+ final StringBuilder query = new StringBuilder(QUERY_CACHE_DATA);
if (loadFlags.contains(LoadFlag.LOAD_OFFLINE_LOG)) {
query.append(',').append(dbTableLogsOffline).append(".log");
}
@@ -1578,71 +1615,58 @@ public class cgData {
private static Geocache createCacheFromDatabaseContent(Cursor cursor) {
Geocache cache = new Geocache();
- if (cacheColumnIndex == null) {
- final int[] local_cci = new int[CACHE_COLUMNS.length]; // use a local variable to avoid having the not yet fully initialized array be visible to other threads
- for (int i = 0; i < CACHE_COLUMNS.length; i++) {
- local_cci[i] = cursor.getColumnIndex(CACHE_COLUMNS[i]);
- }
- cacheColumnIndex = local_cci;
- }
-
- cache.setUpdated(cursor.getLong(cacheColumnIndex[0]));
- cache.setListId(cursor.getInt(cacheColumnIndex[1]));
- cache.setDetailed(cursor.getInt(cacheColumnIndex[2]) == 1);
- cache.setDetailedUpdate(cursor.getLong(cacheColumnIndex[3]));
- cache.setVisitedDate(cursor.getLong(cacheColumnIndex[4]));
- cache.setGeocode(cursor.getString(cacheColumnIndex[5]));
- cache.setCacheId(cursor.getString(cacheColumnIndex[6]));
- cache.setGuid(cursor.getString(cacheColumnIndex[7]));
- cache.setType(CacheType.getById(cursor.getString(cacheColumnIndex[8])));
- cache.setName(cursor.getString(cacheColumnIndex[9]));
- cache.setOwnerDisplayName(cursor.getString(cacheColumnIndex[10]));
- cache.setOwnerUserId(cursor.getString(cacheColumnIndex[11]));
- long dateValue = cursor.getLong(cacheColumnIndex[12]);
+ cache.setUpdated(cursor.getLong(0));
+ cache.setListId(cursor.getInt(1));
+ cache.setDetailed(cursor.getInt(2) == 1);
+ cache.setDetailedUpdate(cursor.getLong(3));
+ cache.setVisitedDate(cursor.getLong(4));
+ cache.setGeocode(cursor.getString(5));
+ cache.setCacheId(cursor.getString(6));
+ cache.setGuid(cursor.getString(7));
+ cache.setType(CacheType.getById(cursor.getString(8)));
+ cache.setName(cursor.getString(9));
+ cache.setOwnerDisplayName(cursor.getString(10));
+ cache.setOwnerUserId(cursor.getString(11));
+ long dateValue = cursor.getLong(12);
if (dateValue != 0) {
cache.setHidden(new Date(dateValue));
}
// do not set cache.hint
- cache.setSize(CacheSize.getById(cursor.getString(cacheColumnIndex[14])));
- cache.setDifficulty(cursor.getFloat(cacheColumnIndex[15]));
- int index = cacheColumnIndex[16];
+ cache.setSize(CacheSize.getById(cursor.getString(14)));
+ cache.setDifficulty(cursor.getFloat(15));
+ int index = 16;
if (cursor.isNull(index)) {
cache.setDirection(null);
} else {
cache.setDirection(cursor.getFloat(index));
}
- index = cacheColumnIndex[17];
+ index = 17;
if (cursor.isNull(index)) {
cache.setDistance(null);
} else {
cache.setDistance(cursor.getFloat(index));
}
- cache.setTerrain(cursor.getFloat(cacheColumnIndex[18]));
+ cache.setTerrain(cursor.getFloat(18));
// do not set cache.location
- cache.setCoords(getCoords(cursor, cacheColumnIndex[37], cacheColumnIndex[38]));
- index = cacheColumnIndex[21];
- if (cursor.isNull(index)) {
- cache.setElevation(null);
- } else {
- cache.setElevation(cursor.getDouble(index));
- }
- cache.setPersonalNote(cursor.getString(cacheColumnIndex[22]));
+ cache.setCoords(getCoords(cursor, 36, 37));
+ cache.setPersonalNote(cursor.getString(21));
// do not set cache.shortdesc
// do not set cache.description
- cache.setFavoritePoints(cursor.getInt(cacheColumnIndex[24]));
- cache.setRating(cursor.getFloat(cacheColumnIndex[25]));
- cache.setVotes(cursor.getInt(cacheColumnIndex[26]));
- cache.setMyVote(cursor.getFloat(cacheColumnIndex[27]));
- cache.setDisabled(cursor.getInt(cacheColumnIndex[28]) == 1);
- cache.setArchived(cursor.getInt(cacheColumnIndex[29]) == 1);
- cache.setPremiumMembersOnly(cursor.getInt(cacheColumnIndex[30]) == 1);
- cache.setFound(cursor.getInt(cacheColumnIndex[31]) == 1);
- cache.setFavorite(cursor.getInt(cacheColumnIndex[32]) == 1);
- cache.setInventoryItems(cursor.getInt(cacheColumnIndex[33]));
- cache.setOnWatchlist(cursor.getInt(cacheColumnIndex[34]) == 1);
- cache.setReliableLatLon(cursor.getInt(cacheColumnIndex[35]) > 0);
- cache.setUserModifiedCoords(cursor.getInt(cacheColumnIndex[36]) > 0);
- cache.setFinalDefined(cursor.getInt(cacheColumnIndex[39]) > 0);
+ cache.setFavoritePoints(cursor.getInt(23));
+ cache.setRating(cursor.getFloat(24));
+ cache.setVotes(cursor.getInt(25));
+ cache.setMyVote(cursor.getFloat(26));
+ cache.setDisabled(cursor.getInt(27) == 1);
+ cache.setArchived(cursor.getInt(28) == 1);
+ cache.setPremiumMembersOnly(cursor.getInt(29) == 1);
+ cache.setFound(cursor.getInt(30) == 1);
+ cache.setFavorite(cursor.getInt(31) == 1);
+ cache.setInventoryItems(cursor.getInt(32));
+ cache.setOnWatchlist(cursor.getInt(33) == 1);
+ cache.setReliableLatLon(cursor.getInt(34) > 0);
+ cache.setUserModifiedCoords(cursor.getInt(35) > 0);
+ cache.setFinalDefined(cursor.getInt(38) > 0);
+ cache.setLogPasswordRequired(cursor.getInt(42) > 0);
Log.d("Loading " + cache.toString() + " (" + cache.getListId() + ") from DB");
@@ -1814,18 +1838,17 @@ public class cgData {
init();
database.beginTransaction();
- boolean success = true;
try {
database.delete(dbTableSearchDestionationHistory, null, null);
database.setTransactionSuccessful();
+ return true;
} catch (Exception e) {
- success = false;
Log.e("Unable to clear searched destinations", e);
} finally {
database.endTransaction();
}
- return success;
+ return false;
}
public static List<LogEntry> loadLogs(String geocode) {
@@ -2665,18 +2688,17 @@ public class cgData {
init();
database.beginTransaction();
- boolean result = false;
try {
database.delete(dbTableSearchDestionationHistory, "_id = " + destination.getId(), null);
database.setTransactionSuccessful();
- result = true;
+ return true;
} catch (Exception e) {
Log.e("Unable to remove searched destination", e);
} finally {
database.endTransaction();
}
- return result;
+ return false;
}
/**
@@ -2963,4 +2985,37 @@ public class cgData {
return false;
}
+ public static Set<String> getCachedMissingFromSearch(final SearchResult searchResult, final Set<Tile> tiles, final IConnector connector, final int maxZoom) {
+
+ // get cached cgeocaches
+ final Set<String> cachedGeocodes = new HashSet<String>();
+ for (Tile tile : tiles) {
+ cachedGeocodes.addAll(cacheCache.getInViewport(tile.getViewport(), CacheType.ALL));
+ }
+ // remove found in search result
+ cachedGeocodes.removeAll(searchResult.getGeocodes());
+
+ // check remaining against viewports
+ Set<String> missingFromSearch = new HashSet<String>();
+ for (String geocode : cachedGeocodes) {
+ if (connector.canHandle(geocode)) {
+ Geocache geocache = cacheCache.getCacheFromCache(geocode);
+ if (geocache.getZoomLevel() <= maxZoom) {
+ boolean found = false;
+ for (Tile tile : tiles) {
+ if (tile.containsPoint(geocache)) {
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ missingFromSearch.add(geocode);
+ }
+ }
+ }
+ }
+
+ return missingFromSearch;
+ }
+
}
diff --git a/main/src/cgeo/geocaching/cgeoapplication.java b/main/src/cgeo/geocaching/cgeoapplication.java
index b8f63ee..b227939 100644
--- a/main/src/cgeo/geocaching/cgeoapplication.java
+++ b/main/src/cgeo/geocaching/cgeoapplication.java
@@ -170,6 +170,10 @@ public class cgeoapplication extends Application {
return dir;
}
+ public Float currentDirection() {
+ return currentDirObject().getMemory();
+ }
+
public StatusUpdater getStatusUpdater() {
return statusUpdater;
}
diff --git a/main/src/cgeo/geocaching/cgeocaches.java b/main/src/cgeo/geocaching/cgeocaches.java
index 40dddd4..5d7841d 100644
--- a/main/src/cgeo/geocaching/cgeocaches.java
+++ b/main/src/cgeo/geocaching/cgeocaches.java
@@ -31,10 +31,9 @@ import cgeo.geocaching.maps.CGeoMap;
import cgeo.geocaching.network.Cookies;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.sorting.CacheComparator;
import cgeo.geocaching.sorting.ComparatorUserInterface;
-import cgeo.geocaching.sorting.EventDateComparator;
-import cgeo.geocaching.sorting.VisitComparator;
import cgeo.geocaching.ui.CacheListAdapter;
import cgeo.geocaching.ui.LoggingUI;
import cgeo.geocaching.ui.WeakReferenceHandler;
@@ -166,18 +165,17 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
*/
private MenuItem navigationMenu;
+ // FIXME: This method has mostly been replaced by the loaders. But it still contains a license agreement check.
public void handleCachesLoaded() {
try {
setAdapter();
updateTitle();
- setDateComparatorForEventList();
-
showFooterMoreCaches();
if (search != null && search.getError() == StatusCode.UNAPPROVED_LICENSE) {
- AlertDialog.Builder dialog = new AlertDialog.Builder(this);
+ final AlertDialog.Builder dialog = new AlertDialog.Builder(this);
dialog.setTitle(res.getString(R.string.license));
dialog.setMessage(res.getString(R.string.err_license));
dialog.setCancelable(true);
@@ -198,7 +196,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
});
- AlertDialog alert = dialog.create();
+ final AlertDialog alert = dialog.create();
alert.show();
} else if (search != null && search.getError() != null) {
showToast(res.getString(R.string.err_download_fail) + ' ' + search.getError().getErrorString(res) + '.');
@@ -211,7 +209,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
setAdapterCurrentCoordinates(false);
- } catch (Exception e) {
+ } catch (final Exception e) {
showToast(res.getString(R.string.err_detail_cache_find_any));
Log.e("cgeocaches.loadCachesHandler", e);
@@ -225,14 +223,14 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
try {
hideLoading();
showProgress(false);
- } catch (Exception e2) {
+ } catch (final Exception e2) {
Log.e("cgeocaches.loadCachesHandler.2", e2);
}
adapter.setSelectMode(false);
}
- private Handler loadCachesHandler = new LoadCachesHandler(this);
+ private final Handler loadCachesHandler = new LoadCachesHandler(this);
private static class LoadCachesHandler extends WeakReferenceHandler<cgeocaches> {
@@ -277,7 +275,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
protected void updateTitle() {
- ArrayList<Integer> numbers = new ArrayList<Integer>();
+ final ArrayList<Integer> numbers = new ArrayList<Integer>();
if (adapter.isFiltered()) {
numbers.add(adapter.getCount());
}
@@ -292,7 +290,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
}
- private Handler loadDetailsHandler = new Handler() {
+ private final Handler loadDetailsHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
@@ -303,8 +301,8 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
adapter.notifyDataSetChanged();
- int secondsElapsed = (int) ((System.currentTimeMillis() - detailProgressTime) / 1000);
- int minutesRemaining = ((detailTotal - detailProgress) * secondsElapsed / ((detailProgress > 0) ? detailProgress : 1) / 60);
+ final int secondsElapsed = (int) ((System.currentTimeMillis() - detailProgressTime) / 1000);
+ final int minutesRemaining = ((detailTotal - detailProgress) * secondsElapsed / ((detailProgress > 0) ? detailProgress : 1) / 60);
progress.setProgress(detailProgress);
if (minutesRemaining < 1) {
@@ -340,7 +338,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
/**
* TODO Possibly parts should be a Thread not a Handler
*/
- private Handler downloadFromWebHandler = new Handler() {
+ private final Handler downloadFromWebHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
setAdapter();
@@ -375,7 +373,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
}
};
- private Handler clearOfflineLogsHandler = new Handler() {
+ private final Handler clearOfflineLogsHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
@@ -391,7 +389,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
};
- private Handler importGpxAttachementFinishedHandler = new Handler() {
+ private final Handler importGpxAttachementFinishedHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
refreshCurrentList();
@@ -413,7 +411,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
// get parameters
Bundle extras = getIntent().getExtras();
if (extras != null) {
- Object typeObject = extras.get(Intents.EXTRA_LIST_TYPE);
+ final Object typeObject = extras.get(Intents.EXTRA_LIST_TYPE);
type = (typeObject instanceof CacheListType) ? (CacheListType) typeObject : CacheListType.OFFLINE;
coords = extras.getParcelable(Intents.EXTRA_COORDS);
}
@@ -478,24 +476,14 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
private void importGpxAttachement() {
- new AlertDialog.Builder(this)
- .setTitle(res.getString(R.string.gpx_import_title))
- .setMessage(res.getString(R.string.gpx_import_confirm))
- .setCancelable(false)
- .setPositiveButton(getString(android.R.string.yes), new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int id) {
- new GPXImporter(cgeocaches.this, listId, importGpxAttachementFinishedHandler).importGPX();
- }
- })
- .setNegativeButton(getString(android.R.string.no), new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int id) {
- dialog.cancel();
- }
- })
- .create()
- .show();
+ new StoredList.UserInterface(this).promptForListSelection(R.string.gpx_import_select_list_title, new RunnableWithArgument<Integer>() {
+
+ @Override
+ public void run(Integer listId) {
+ new GPXImporter(cgeocaches.this, listId, importGpxAttachementFinishedHandler).importGPX();
+ switchListById(listId);
+ }
+ }, true, 0);
}
@Override
@@ -514,7 +502,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
// refresh standard list if it has changed (new caches downloaded)
if (type == CacheListType.OFFLINE && listId >= StoredList.STANDARD_LIST_ID && search != null) {
- SearchResult newSearch = cgData.getBatchOfStoredCaches(coords, Settings.getCacheType(), listId);
+ final SearchResult newSearch = cgData.getBatchOfStoredCaches(coords, Settings.getCacheType(), listId);
if (newSearch != null && newSearch.getTotal() != search.getTotal()) {
refreshCurrentList();
}
@@ -549,7 +537,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
menu.add(0, MENU_SWITCH_SELECT_MODE, 0, res.getString(R.string.caches_select_mode)).setIcon(R.drawable.ic_menu_agenda);
menu.add(0, MENU_INVERT_SELECTION, 0, res.getString(R.string.caches_select_invert)).setIcon(R.drawable.ic_menu_mark);
if (type == CacheListType.OFFLINE) {
- SubMenu subMenu = menu.addSubMenu(0, SUBMENU_MANAGE_OFFLINE, 0, res.getString(R.string.caches_manage)).setIcon(R.drawable.ic_menu_save);
+ final SubMenu subMenu = menu.addSubMenu(0, SUBMENU_MANAGE_OFFLINE, 0, res.getString(R.string.caches_manage)).setIcon(R.drawable.ic_menu_save);
subMenu.add(0, MENU_DROP_CACHES, 0, res.getString(R.string.caches_drop_all)); // delete saved caches
subMenu.add(0, MENU_DROP_CACHES_AND_LIST, 0, res.getString(R.string.caches_drop_all_and_list));
subMenu.add(0, MENU_REFRESH_STORED, 0, res.getString(R.string.cache_offline_refresh)); // download details for all caches
@@ -566,9 +554,9 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
subMenu.add(0, MENU_EXPORT, 0, res.getString(R.string.export)); // export caches
} else {
if (type == CacheListType.HISTORY) {
- SubMenu subMenu = menu.addSubMenu(0, SUBMENU_MANAGE_HISTORY, 0, res.getString(R.string.caches_manage)).setIcon(R.drawable.ic_menu_save);
- subMenu.add(0, MENU_REMOVE_FROM_HISTORY, 0, res.getString(R.string.cache_clear_history)); // remove from history
+ final SubMenu subMenu = menu.addSubMenu(0, SUBMENU_MANAGE_HISTORY, 0, res.getString(R.string.caches_manage)).setIcon(R.drawable.ic_menu_save);
subMenu.add(0, MENU_EXPORT, 0, res.getString(R.string.export)); // export caches
+ subMenu.add(0, MENU_REMOVE_FROM_HISTORY, 0, res.getString(R.string.cache_clear_history)); // remove from history
subMenu.add(0, MENU_CLEAR_OFFLINE_LOGS, 0, res.getString(R.string.caches_clear_offlinelogs));
menu.add(0, MENU_REFRESH_STORED, 0, res.getString(R.string.cache_offline_refresh)).setIcon(R.drawable.ic_menu_set_as);
} else {
@@ -579,7 +567,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
navigationMenu = CacheListAppFactory.addMenuItems(menu, this, res);
if (type == CacheListType.OFFLINE) {
- SubMenu subMenu = menu.addSubMenu(0, SUBMENU_MANAGE_LISTS, 0, res.getString(R.string.list_menu)).setIcon(R.drawable.ic_menu_more);
+ final SubMenu subMenu = menu.addSubMenu(0, SUBMENU_MANAGE_LISTS, 0, res.getString(R.string.list_menu)).setIcon(R.drawable.ic_menu_more);
subMenu.add(0, MENU_CREATE_LIST, 0, res.getString(R.string.list_menu_create));
subMenu.add(0, MENU_DROP_LIST, 0, res.getString(R.string.list_menu_drop));
subMenu.add(0, MENU_RENAME_LIST, 0, res.getString(R.string.list_menu_rename));
@@ -636,12 +624,14 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
if (type == CacheListType.OFFLINE || type == CacheListType.HISTORY) { // only offline list
setMenuItemLabel(menu, MENU_DROP_CACHES, R.string.caches_drop_selected, R.string.caches_drop_all);
- menu.findItem(MENU_DROP_CACHES_AND_LIST).setVisible(!hasSelection && isNonDefaultList && !adapter.isFiltered());
setMenuItemLabel(menu, MENU_REFRESH_STORED, R.string.caches_refresh_selected, R.string.caches_refresh_all);
setMenuItemLabel(menu, MENU_MOVE_TO_LIST, R.string.caches_move_selected, R.string.caches_move_all);
} else { // search and global list (all other than offline and history)
setMenuItemLabel(menu, MENU_REFRESH_STORED, R.string.caches_store_selected, R.string.caches_store_offline);
}
+ if (type == CacheListType.OFFLINE) {
+ menu.findItem(MENU_DROP_CACHES_AND_LIST).setVisible(!hasSelection && isNonDefaultList && !adapter.isFiltered());
+ }
MenuItem item = menu.findItem(MENU_DROP_LIST);
if (item != null) {
@@ -664,7 +654,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
setMenuItemLabel(menu, MENU_REMOVE_FROM_HISTORY, R.string.cache_remove_from_history, R.string.cache_clear_history);
setMenuItemLabel(menu, MENU_EXPORT, R.string.export, R.string.export);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("cgeocaches.onPrepareOptionsMenu", e);
}
@@ -672,7 +662,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
private boolean containsEvents() {
- for (Geocache cache : adapter.getCheckedOrAllCaches()) {
+ for (final Geocache cache : adapter.getCheckedOrAllCaches()) {
if (cache.isEventCache()) {
return true;
}
@@ -681,7 +671,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
private boolean containsOfflineLogs() {
- for (Geocache cache : adapter.getCheckedOrAllCaches()) {
+ for (final Geocache cache : adapter.getCheckedOrAllCaches()) {
if (cache.isLogOffline()) {
return true;
}
@@ -694,7 +684,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
if (menuItem == null) {
return;
}
- boolean hasSelection = adapter != null && adapter.getCheckedCount() > 0;
+ final boolean hasSelection = adapter != null && adapter.getCheckedCount() > 0;
if (hasSelection) {
menuItem.setTitle(res.getString(resIdSelection) + " (" + adapter.getCheckedCount() + ")");
} else {
@@ -704,7 +694,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
@Override
public boolean onOptionsItemSelected(MenuItem item) {
- int itemId = item.getItemId();
+ final int itemId = item.getItemId();
switch (itemId) {
case MENU_SWITCH_SELECT_MODE:
adapter.switchSelectMode();
@@ -794,7 +784,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
public void deletePastEvents() {
final List<Geocache> deletion = new ArrayList<Geocache>();
- for (Geocache cache : adapter.getCheckedOrAllCaches()) {
+ for (final Geocache cache : adapter.getCheckedOrAllCaches()) {
if (cache.isEventCache()) {
final Date eventDate = cache.getHiddenDate();
if (DateUtils.daysSince(eventDate.getTime()) > 0) {
@@ -840,7 +830,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
AdapterContextMenuInfo adapterInfo = null;
try {
adapterInfo = (AdapterContextMenuInfo) info;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("cgeocaches.onCreateContextMenu", e);
}
@@ -897,7 +887,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
AdapterContextMenuInfo adapterInfo = null;
try {
adapterInfo = (AdapterContextMenuInfo) info;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("cgeocaches.onContextItemSelected", e);
}
@@ -917,10 +907,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
NavigationAppFactory.showNavigationMenu(this, cache, null, null);
break;
case MENU_CACHE_DETAILS:
- final Intent cachesIntent = new Intent(this, CacheDetailActivity.class);
- cachesIntent.putExtra(Intents.EXTRA_GEOCODE, cache.getGeocode());
- cachesIntent.putExtra(Intents.EXTRA_NAME, cache.getName());
- startActivity(cachesIntent);
+ CacheDetailActivity.startActivity(this, cache.getGeocode(), cache.getName());
break;
case MENU_DROP_CACHE:
cache.drop(new Handler() {
@@ -1106,7 +1093,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
showProgress(false);
- int etaTime = ((detailTotal * 25) / 60);
+ final int etaTime = ((detailTotal * 25) / 60);
String message;
if (etaTime < 1) {
message = res.getString(R.string.caches_downloading) + " " + res.getString(R.string.caches_eta_ltm);
@@ -1124,7 +1111,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
public void removeFromHistoryCheck() {
- AlertDialog.Builder dialog = new AlertDialog.Builder(this);
+ final AlertDialog.Builder dialog = new AlertDialog.Builder(this);
dialog.setCancelable(true);
dialog.setTitle(res.getString(R.string.caches_removing_from_history));
dialog.setMessage((adapter != null && adapter.getCheckedCount() > 0) ? res.getString(R.string.cache_remove_from_history)
@@ -1143,7 +1130,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
});
- AlertDialog alert = dialog.create();
+ final AlertDialog alert = dialog.create();
alert.show();
}
@@ -1153,7 +1140,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
for (int i = 0; i < geocodes.length; i++) {
geocodes[i] = caches.get(i).getGeocode();
}
- Bundle b = new Bundle();
+ final Bundle b = new Bundle();
b.putStringArray(Intents.EXTRA_CACHELIST, geocodes);
getSupportLoaderManager().initLoader(CacheListLoaderType.REMOVE_FROM_HISTORY.ordinal(), b, this);
}
@@ -1169,7 +1156,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
public void dropStored(final boolean removeListAfterwards) {
- AlertDialog.Builder dialog = new AlertDialog.Builder(this);
+ final AlertDialog.Builder dialog = new AlertDialog.Builder(this);
dialog.setCancelable(true);
dialog.setTitle(res.getString(R.string.caches_drop_stored));
@@ -1194,7 +1181,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
});
- AlertDialog alert = dialog.create();
+ final AlertDialog alert = dialog.create();
alert.show();
}
@@ -1232,7 +1219,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
removeGeoAndDir();
final List<Geocache> cachesWithStaticMaps = new ArrayList<Geocache>(this.caches.size());
- for (Geocache cache : this.caches) {
+ for (final Geocache cache : this.caches) {
if (Settings.isStoreOfflineMaps() && cache.hasStaticMap()) {
cachesWithStaticMaps.add(cache);
continue;
@@ -1244,7 +1231,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
}
- for (Geocache cache : cachesWithStaticMaps) {
+ for (final Geocache cache : cachesWithStaticMaps) {
if (!refreshCache(cache)) {
break;
}
@@ -1276,7 +1263,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
Log.i("Waiting for next cache " + delay + " ms");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("cgeocaches.LoadDetailsThread.sleep", e);
}
}
@@ -1291,10 +1278,10 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
handler.sendEmptyMessage(cacheList.indexOf(cache));
yield();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
Log.i(e.getMessage());
return false;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("cgeocaches.LoadDetailsThread", e);
}
@@ -1334,7 +1321,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
deviceCode = "";
}
final Parameters params = new Parameters("code", deviceCode);
- HttpResponse responseFromWeb = Network.getRequest("http://send2.cgeo.org/read.html", params);
+ final HttpResponse responseFromWeb = Network.getRequest("http://send2.cgeo.org/read.html", params);
if (responseFromWeb != null && responseFromWeb.getStatusLine().getStatusCode() == 200) {
final String response = Network.getResponseData(responseFromWeb);
@@ -1374,7 +1361,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
sleep(500); //Cache was loaded 0.5s
times = 0;
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
Log.e("cgeocaches.LoadFromWebThread.sleep", e);
}
}
@@ -1476,7 +1463,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
return;
}
- StoredList list = cgData.getList(id);
+ final StoredList list = cgData.getList(id);
if (list == null) {
return;
}
@@ -1565,8 +1552,8 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
// apply filter settings (if there's a filter)
- Set<String> geocodes = new HashSet<String>();
- for (Geocache cache : adapter.getFilteredList()) {
+ final Set<String> geocodes = new HashSet<String>();
+ for (final Geocache cache : adapter.getFilteredList()) {
geocodes.add(cache.getGeocode());
}
@@ -1633,32 +1620,6 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
}
}
- /**
- * set date comparator for pure event lists
- *
- * TODO: move this method into the adapter
- */
- private void setDateComparatorForEventList() {
- if (CollectionUtils.isNotEmpty(cacheList)) {
- boolean eventsOnly = true;
- for (Geocache cache : cacheList) {
- if (!cache.isEventCache()) {
- eventsOnly = false;
- break;
- }
- }
- if (eventsOnly) {
- adapter.setComparator(new EventDateComparator());
- }
- else if (type == CacheListType.HISTORY) {
- adapter.setComparator(new VisitComparator());
- }
- else if (adapter.getCacheComparator() != null && adapter.getCacheComparator() instanceof EventDateComparator) {
- adapter.setComparator(null);
- }
- }
- }
-
public static void startActivityNearest(final AbstractActivity context, final Geopoint coordsNow) {
if (!isValidCoords(context, coordsNow)) {
return;
@@ -1726,7 +1687,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
if (type >= CacheListLoaderType.values().length) {
throw new IllegalArgumentException("invalid loader type " + type);
}
- CacheListLoaderType enumType = CacheListLoaderType.values()[type];
+ final CacheListLoaderType enumType = CacheListLoaderType.values()[type];
AbstractSearchLoader loader = null;
switch (enumType) {
case OFFLINE:
@@ -1786,7 +1747,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
loader = new OwnerGeocacheListLoader(app, ownerName);
break;
case MAP:
- //TODO Build Nullloader
+ //TODO Build Null loader
title = res.getString(R.string.map_map);
search = (SearchResult) extras.get(Intents.EXTRA_SEARCH);
replaceCacheListFromSearch();
@@ -1820,6 +1781,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
cacheList.addAll(cachesFromSearchResult);
search = searchIn;
adapter.reFilter();
+ adapter.setInitialComparator();
adapter.forceSort();
adapter.notifyDataSetChanged();
updateTitle();
@@ -1831,7 +1793,7 @@ public class cgeocaches extends AbstractListActivity implements FilteredActivity
@Override
public void onLoaderReset(Loader<SearchResult> arg0) {
- //Not interessting
+ //Not interesting
}
}
diff --git a/main/src/cgeo/geocaching/compatibility/AndroidLevel13.java b/main/src/cgeo/geocaching/compatibility/AndroidLevel13.java
index 4eac205..f08ac22 100644
--- a/main/src/cgeo/geocaching/compatibility/AndroidLevel13.java
+++ b/main/src/cgeo/geocaching/compatibility/AndroidLevel13.java
@@ -23,9 +23,4 @@ public class AndroidLevel13 implements AndroidLevel13Interface {
return dimensions;
}
- @Override
- public int getDisplayHeight() {
- return getDisplaySize().y;
- }
-
}
diff --git a/main/src/cgeo/geocaching/compatibility/AndroidLevel13Emulation.java b/main/src/cgeo/geocaching/compatibility/AndroidLevel13Emulation.java
index 2257d83..ded20cb 100644
--- a/main/src/cgeo/geocaching/compatibility/AndroidLevel13Emulation.java
+++ b/main/src/cgeo/geocaching/compatibility/AndroidLevel13Emulation.java
@@ -16,11 +16,6 @@ public class AndroidLevel13Emulation implements AndroidLevel13Interface {
}
@Override
- public int getDisplayHeight() {
- return getDisplay().getHeight();
- }
-
- @Override
public Point getDisplaySize() {
final Display display = getDisplay();
return new Point(display.getWidth(), display.getHeight());
diff --git a/main/src/cgeo/geocaching/compatibility/AndroidLevel13Interface.java b/main/src/cgeo/geocaching/compatibility/AndroidLevel13Interface.java
index f4e1975..8483e38 100644
--- a/main/src/cgeo/geocaching/compatibility/AndroidLevel13Interface.java
+++ b/main/src/cgeo/geocaching/compatibility/AndroidLevel13Interface.java
@@ -5,7 +5,5 @@ import android.graphics.Point;
public interface AndroidLevel13Interface {
int getDisplayWidth();
- int getDisplayHeight();
-
Point getDisplaySize();
}
diff --git a/main/src/cgeo/geocaching/compatibility/Compatibility.java b/main/src/cgeo/geocaching/compatibility/Compatibility.java
index d846bda..48454ef 100644
--- a/main/src/cgeo/geocaching/compatibility/Compatibility.java
+++ b/main/src/cgeo/geocaching/compatibility/Compatibility.java
@@ -102,10 +102,6 @@ public final class Compatibility {
return level13.getDisplayWidth();
}
- public static int getDisplayHeight() {
- return level13.getDisplayHeight();
- }
-
public static Point getDisplaySize() {
return level13.getDisplaySize();
}
diff --git a/main/src/cgeo/geocaching/connector/AbstractConnector.java b/main/src/cgeo/geocaching/connector/AbstractConnector.java
index 83c1b6f..28ad12b 100644
--- a/main/src/cgeo/geocaching/connector/AbstractConnector.java
+++ b/main/src/cgeo/geocaching/connector/AbstractConnector.java
@@ -31,30 +31,22 @@ public abstract class AbstractConnector implements IConnector {
}
@Override
- public boolean supportsOwnCoordinates() {
+ public boolean supportsPersonalNote() {
return false;
}
- /**
- * Uploading modified coordinates to website
- *
- * @param cache
- * @param wpt
- * @return success
- */
@Override
- public boolean uploadModifiedCoordinates(Geocache cache, Geopoint wpt) {
+ public boolean uploadPersonalNote(Geocache cache) {
throw new UnsupportedOperationException();
}
- /**
- * Uploading personal note to website
- *
- * @param cache
- * @return success
- */
@Override
- public boolean uploadPersonalNote(Geocache cache) {
+ public boolean supportsOwnCoordinates() {
+ return false;
+ }
+
+ @Override
+ public boolean uploadModifiedCoordinates(Geocache cache, Geopoint wpt) {
throw new UnsupportedOperationException();
}
@@ -122,11 +114,6 @@ public abstract class AbstractConnector implements IConnector {
}
@Override
- public String[] getTokens() {
- return null;
- }
-
- @Override
public String getGeocodeFromUrl(final String url) {
final String urlPrefix = getCacheUrlPrefix();
if (StringUtils.startsWith(url, urlPrefix)) {
diff --git a/main/src/cgeo/geocaching/connector/ConnectorFactory.java b/main/src/cgeo/geocaching/connector/ConnectorFactory.java
index 1849e4b..eb09978 100644
--- a/main/src/cgeo/geocaching/connector/ConnectorFactory.java
+++ b/main/src/cgeo/geocaching/connector/ConnectorFactory.java
@@ -4,6 +4,7 @@ import cgeo.geocaching.ICache;
import cgeo.geocaching.R;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.Trackable;
+import cgeo.geocaching.connector.capability.ILogin;
import cgeo.geocaching.connector.capability.ISearchByCenter;
import cgeo.geocaching.connector.capability.ISearchByViewPort;
import cgeo.geocaching.connector.gc.GCConnector;
@@ -25,9 +26,9 @@ import java.util.List;
public final class ConnectorFactory {
private static final UnknownConnector UNKNOWN_CONNECTOR = new UnknownConnector();
- private static final IConnector[] connectors = new IConnector[] {
+ private static final IConnector[] CONNECTORS = new IConnector[] {
GCConnector.getInstance(),
- new OCApiLiveConnector("Opencaching.de", "www.opencaching.de", "OC", R.string.oc_de_okapi_consumer_key, R.string.oc_de_okapi_consumer_secret, ApiSupport.current),
+ new OCApiLiveConnector("opencaching.de", "www.opencaching.de", "OC", R.string.oc_de_okapi_consumer_key, R.string.oc_de_okapi_consumer_secret, ApiSupport.current),
new OCConnector("OpenCaching.CZ", "www.opencaching.cz", "OZ"),
new OCApiConnector("OpenCaching.CO.UK", "www.opencaching.org.uk", "OK", "arU4okouc4GEjMniE2fq", ApiSupport.oldapi),
new OCConnector("OpenCaching.ES", "www.opencachingspain.es", "OC"),
@@ -46,8 +47,8 @@ public final class ConnectorFactory {
public static final UnknownTrackableConnector UNKNOWN_TRACKABLE_CONNECTOR = new UnknownTrackableConnector();
private static final TrackableConnector[] TRACKABLE_CONNECTORS = new TrackableConnector[] {
- new TravelBugConnector(),
- new GeokretyConnector(),
+ new GeokretyConnector(), // GK must be first, as it overlaps with the secret codes of travel bugs
+ TravelBugConnector.getInstance(),
UNKNOWN_TRACKABLE_CONNECTOR // must be last
};
@@ -57,7 +58,7 @@ public final class ConnectorFactory {
static {
final List<ISearchByViewPort> vpConns = new ArrayList<ISearchByViewPort>();
- for (final IConnector conn : connectors) {
+ for (final IConnector conn : CONNECTORS) {
if (conn instanceof ISearchByViewPort) {
vpConns.add((ISearchByViewPort) conn);
}
@@ -65,7 +66,7 @@ public final class ConnectorFactory {
searchByViewPortConns = vpConns.toArray(new ISearchByViewPort[vpConns.size()]);
final List<ISearchByCenter> centerConns = new ArrayList<ISearchByCenter>();
- for (final IConnector conn : connectors) {
+ for (final IConnector conn : CONNECTORS) {
// GCConnector is handled specially, omit it here!
if (conn instanceof ISearchByCenter && !(conn instanceof GCConnector)) {
centerConns.add((ISearchByCenter) conn);
@@ -75,18 +76,28 @@ public final class ConnectorFactory {
}
public static IConnector[] getConnectors() {
- return connectors;
+ return CONNECTORS;
}
public static ISearchByCenter[] getSearchByCenterConnectors() {
return searchByCenterConns;
}
+ public static ILogin[] getActiveLiveConnectors() {
+ final List<ILogin> liveConns = new ArrayList<ILogin>();
+ for (final IConnector conn : CONNECTORS) {
+ if (conn instanceof ILogin && conn.isActivated()) {
+ liveConns.add((ILogin) conn);
+ }
+ }
+ return liveConns.toArray(new ILogin[liveConns.size()]);
+ }
+
public static boolean canHandle(final String geocode) {
if (isInvalidGeocode(geocode)) {
return false;
}
- for (final IConnector connector : connectors) {
+ for (final IConnector connector : CONNECTORS) {
if (connector.canHandle(geocode)) {
return true;
}
@@ -117,7 +128,7 @@ public final class ConnectorFactory {
if (isInvalidGeocode(geocode)) {
return UNKNOWN_CONNECTOR;
}
- for (final IConnector connector : connectors) {
+ for (final IConnector connector : CONNECTORS) {
if (connector.canHandle(geocode)) {
return connector;
}
@@ -136,17 +147,14 @@ public final class ConnectorFactory {
final SearchResult result = new SearchResult();
for (final ISearchByViewPort vpconn : searchByViewPortConns) {
if (vpconn.isActivated()) {
- final SearchResult temp = vpconn.searchByViewport(viewport, tokens);
- if (temp != null) {
- result.addGeocodes(temp.getGeocodes());
- }
+ result.addSearchResult(vpconn.searchByViewport(viewport, tokens));
}
}
return result;
}
public static String getGeocodeFromURL(final String url) {
- for (final IConnector connector : connectors) {
+ for (final IConnector connector : CONNECTORS) {
final String geocode = connector.getGeocodeFromUrl(url);
if (StringUtils.isNotBlank(geocode)) {
return geocode;
@@ -155,4 +163,8 @@ public final class ConnectorFactory {
return null;
}
+ public static TrackableConnector[] getTrackableConnectors() {
+ return TRACKABLE_CONNECTORS;
+ }
+
}
diff --git a/main/src/cgeo/geocaching/connector/IConnector.java b/main/src/cgeo/geocaching/connector/IConnector.java
index c44b946..0c175cd 100644
--- a/main/src/cgeo/geocaching/connector/IConnector.java
+++ b/main/src/cgeo/geocaching/connector/IConnector.java
@@ -129,13 +129,6 @@ public interface IConnector {
public boolean isReliableLatLon(boolean cacheHasReliableLatLon);
/**
- * Return required tokens for specific following actions
- *
- * @return
- */
- public String[] getTokens();
-
- /**
* extract a geocode from the given URL, if this connector can handle that URL somehow
*
* @param url
@@ -144,11 +137,11 @@ public interface IConnector {
public String getGeocodeFromUrl(final String url);
/**
- * enable/disable uploading modified coordinates to website
+ * enable/disable uploading personal note
*
* @return true, when uploading is possible
*/
- public boolean supportsOwnCoordinates();
+ public boolean supportsPersonalNote();
/**
* Uploading personal note to website
@@ -159,7 +152,14 @@ public interface IConnector {
public boolean uploadPersonalNote(Geocache cache);
/**
- * Reseting of modified coordinates on website to details
+ * enable/disable uploading modified coordinates to website
+ *
+ * @return true, when uploading is possible
+ */
+ public boolean supportsOwnCoordinates();
+
+ /**
+ * Resetting of modified coordinates on website to details
*
* @param cache
* @return success
diff --git a/main/src/cgeo/geocaching/connector/ILoggingManager.java b/main/src/cgeo/geocaching/connector/ILoggingManager.java
index f0029f9..c5586b3 100644
--- a/main/src/cgeo/geocaching/connector/ILoggingManager.java
+++ b/main/src/cgeo/geocaching/connector/ILoggingManager.java
@@ -11,10 +11,23 @@ import java.util.List;
public interface ILoggingManager {
+ /**
+ * Post a log for a cache online
+ *
+ * @param cache
+ * @param logType
+ * @param date
+ * @param log
+ * @param logPassword
+ * optional, maybe null
+ * @param trackableLogs
+ * @return
+ */
LogResult postLog(Geocache cache,
LogType logType,
Calendar date,
String log,
+ String logPassword,
List<TrackableLog> trackableLogs);
ImageResult postLogImage(String logId,
diff --git a/main/src/cgeo/geocaching/connector/NoLoggingManager.java b/main/src/cgeo/geocaching/connector/NoLoggingManager.java
index bfea4ca..04a73c1 100644
--- a/main/src/cgeo/geocaching/connector/NoLoggingManager.java
+++ b/main/src/cgeo/geocaching/connector/NoLoggingManager.java
@@ -19,7 +19,7 @@ public class NoLoggingManager implements ILoggingManager {
}
@Override
- public LogResult postLog(Geocache cache, LogType logType, Calendar date, String log, List<TrackableLog> trackableLogs) {
+ public LogResult postLog(Geocache cache, LogType logType, Calendar date, String log, String logPassword, List<TrackableLog> trackableLogs) {
return new LogResult(StatusCode.LOG_POST_ERROR, "");
}
diff --git a/main/src/cgeo/geocaching/connector/capability/ILogin.java b/main/src/cgeo/geocaching/connector/capability/ILogin.java
new file mode 100644
index 0000000..4a839c8
--- /dev/null
+++ b/main/src/cgeo/geocaching/connector/capability/ILogin.java
@@ -0,0 +1,57 @@
+package cgeo.geocaching.connector.capability;
+
+import cgeo.geocaching.connector.IConnector;
+
+import android.content.Context;
+import android.os.Handler;
+
+public interface ILogin extends IConnector {
+
+
+ /**
+ * Contacts the server the connector belongs to
+ * and verifies/establishes authentication and
+ * retrieves information about the current user
+ * (Name, found caches) if applicable.
+ *
+ * @param handler
+ * Handler to receive status feedback
+ * @param fromActivity
+ * Calling activity context
+ * @return true in case of success, false in case of failure
+ */
+ boolean login(Handler handler, Context fromActivity);
+
+ /**
+ * Returns the status of the last {@link}login() request
+ *
+ * @return
+ */
+ boolean isLoggedIn();
+
+ /**
+ * User-centered string describing the current login/connection status
+ *
+ * @return
+ */
+ String getLoginStatusString();
+
+ /**
+ * Name the user has in this connector or empty string if not applicable
+ * It might be necessary to execute login before this information is valid.
+ *
+ * @return
+ */
+ String getUserName();
+
+ /**
+ * Number of caches the user has found in this connector
+ * Normally retrieved/updated with (@see login).
+ * Might be out dated as changes on the connectors site
+ * are generally not notified.
+ *
+ * @return
+ */
+ int getCachesFound();
+
+}
diff --git a/main/src/cgeo/geocaching/connector/gc/GCConnector.java b/main/src/cgeo/geocaching/connector/gc/GCConnector.java
index fab4332..e6fff79 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCConnector.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCConnector.java
@@ -4,16 +4,19 @@ import cgeo.geocaching.Geocache;
import cgeo.geocaching.ICache;
import cgeo.geocaching.R;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.cgData;
+import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.connector.AbstractConnector;
import cgeo.geocaching.connector.ILoggingManager;
+import cgeo.geocaching.connector.capability.ILogin;
import cgeo.geocaching.connector.capability.ISearchByCenter;
import cgeo.geocaching.connector.capability.ISearchByGeocode;
import cgeo.geocaching.connector.capability.ISearchByViewPort;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Viewport;
+import cgeo.geocaching.settings.SettingsActivity;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.Log;
@@ -21,10 +24,12 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import android.app.Activity;
+import android.content.Context;
+import android.os.Handler;
import java.util.regex.Pattern;
-public class GCConnector extends AbstractConnector implements ISearchByGeocode, ISearchByCenter, ISearchByViewPort {
+public class GCConnector extends AbstractConnector implements ISearchByGeocode, ISearchByCenter, ISearchByViewPort, ILogin {
private static final String CACHE_URL_SHORT = "http://coord.info/";
// Double slash is used to force open in browser
@@ -33,7 +38,7 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode,
* Pocket queries downloaded from the website use a numeric prefix. The pocket query creator Android app adds a
* verbatim "pocketquery" prefix.
*/
- private static final Pattern gpxZipFilePattern = Pattern.compile("((\\d{7,})|(pocketquery))" + "(_.+)?" + "\\.zip", Pattern.CASE_INSENSITIVE);
+ private static final Pattern GPX_ZIP_FILE_PATTERN = Pattern.compile("((\\d{7,})|(pocketquery))" + "(_.+)?" + "\\.zip", Pattern.CASE_INSENSITIVE);
/**
* Pattern for GC codes
@@ -74,6 +79,11 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode,
}
@Override
+ public boolean supportsPersonalNote() {
+ return true;
+ }
+
+ @Override
public boolean supportsOwnCoordinates() {
return true;
}
@@ -105,7 +115,7 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode,
@Override
public String getName() {
- return "GeoCaching.com";
+ return "geocaching.com";
}
@Override
@@ -161,7 +171,7 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode,
@Override
public boolean isZippedGPXFile(final String fileName) {
- return gpxZipFilePattern.matcher(fileName).matches();
+ return GPX_ZIP_FILE_PATTERN.matcher(fileName).matches();
}
@Override
@@ -282,4 +292,46 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode,
}
return R.drawable.marker;
}
+
+ @Override
+ public boolean login(Handler handler, Context fromActivity) {
+ // login
+ final StatusCode status = Login.login();
+
+ if (status == StatusCode.NO_ERROR) {
+ cgeoapplication.getInstance().firstRun = false;
+ Login.detectGcCustomDate();
+ }
+
+ if (cgeoapplication.getInstance().showLoginToast && handler != null) {
+ handler.sendMessage(handler.obtainMessage(0, status));
+ cgeoapplication.getInstance().showLoginToast = false;
+
+ // invoke settings activity to insert login details
+ if (status == StatusCode.NO_LOGIN_INFO_STORED && fromActivity != null) {
+ SettingsActivity.jumpToServicesPage(fromActivity);
+ }
+ }
+ return status == StatusCode.NO_ERROR;
+ }
+
+ @Override
+ public String getUserName() {
+ return Login.getActualUserName();
+ }
+
+ @Override
+ public int getCachesFound() {
+ return Login.getActualCachesFound();
+ }
+
+ @Override
+ public String getLoginStatusString() {
+ return Login.getActualStatus();
+ }
+
+ @Override
+ public boolean isLoggedIn() {
+ return Login.isActualLoginStatus();
+ }
}
diff --git a/main/src/cgeo/geocaching/connector/gc/GCConstants.java b/main/src/cgeo/geocaching/connector/gc/GCConstants.java
index f2e2e69..c2aeffd 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCConstants.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCConstants.java
@@ -36,7 +36,7 @@ public final class GCConstants {
public final static Pattern PATTERN_LATLON = Pattern.compile("<span id=\"uxLatLon\"[^>]*>(.*?)</span>");
public final static Pattern PATTERN_LATLON_ORIG = Pattern.compile("\\{\"isUserDefined\":true[^}]+?\"oldLatLngDisplay\":\"([^\"]+)\"\\}");
public final static Pattern PATTERN_LOCATION = Pattern.compile(Pattern.quote("<span id=\"ctl00_ContentBody_Location\">In ") + "(?:<a href=[^>]*>)?(.*?)<");
- public final static Pattern PATTERN_PERSONALNOTE = Pattern.compile("<p id=\"cache_note\"[^>]*>(.*?)</p>");
+ public final static Pattern PATTERN_PERSONALNOTE = Pattern.compile("<p id=\"cache_note\"[^>]*>(.*?)</p>", Pattern.DOTALL);
public final static Pattern PATTERN_NAME = Pattern.compile("<span id=\"ctl00_ContentBody_CacheName\">(.*?)</span>");
public final static Pattern PATTERN_DIFFICULTY = Pattern.compile("<span id=\"ctl00_ContentBody_uxLegendScale\"[^>]*>[^<]*<img src=\"[^\"]*/images/stars/stars([0-9_]+)\\.gif\"");
public final static Pattern PATTERN_TERRAIN = Pattern.compile("<span id=\"ctl00_ContentBody_Localize[\\d]+\"[^>]*>[^<]*<img src=\"[^\"]*/images/stars/stars([0-9_]+)\\.gif\"");
@@ -69,7 +69,7 @@ public final class GCConstants {
public static final String MEMBER_STATUS_RENEW = "<a id=\"ctl00_hlRenew";
public static final String MEMBER_STATUS_PM = "Premium Member";
/** Use replaceAll("[,.]","") on the resulting string before converting to an int */
- public static final Pattern PATTERN_CACHES_FOUND = Pattern.compile("<strong[^>]*>.*?([\\d,.]+) Caches Found");
+ public static final Pattern PATTERN_CACHES_FOUND = Pattern.compile("<strong[^>]*>.*?([\\d,.]+) Caches Found", Pattern.DOTALL);
public static final Pattern PATTERN_AVATAR_IMAGE_PROFILE_PAGE = Pattern.compile("<img src=\"(http://img.geocaching.com/user/avatar/[0-9a-f-]+\\.jpg)\"[^>]*\\salt=\"Avatar\"");
public static final Pattern PATTERN_LOGIN_NAME_LOGIN_PAGE = Pattern.compile("ctl00_ContentBody_lbUsername\">.*<strong>(.*)</strong>");
public static final Pattern PATTERN_CUSTOMDATE = Pattern.compile("<option selected=\"selected\" value=\"([ /Mdy-]+)\">");
@@ -122,11 +122,12 @@ public final class GCConstants {
public final static Pattern PATTERN_SEARCH_DIFFICULTY_TERRAIN = Pattern.compile("<span class=\"small\">([0-5]([\\.,]5)?)/([0-5]([\\.,]5)?)</span><br />");
public final static Pattern PATTERN_SEARCH_CONTAINER = Pattern.compile("<img src=\"/images/icons/container/([^\\.]+)\\.gif\"");
public final static Pattern PATTERN_SEARCH_GEOCODE = Pattern.compile("\\|\\W*(GC[0-9A-Z]+)[^\\|]*\\|");
- public final static Pattern PATTERN_SEARCH_ID = Pattern.compile("name=\"CID\"[^v]*value=\"([0-9]+)\"");
- public final static Pattern PATTERN_SEARCH_FAVORITE = Pattern.compile("<span id=\"ctl00_ContentBody_dlResults_ctl[0-9]+_uxFavoritesValue\" title=\"[^\"]*\" class=\"favorite-rank\">([0-9]+)</span>");
- public final static Pattern PATTERN_SEARCH_TOTALCOUNT = Pattern.compile("<td class=\"PageBuilderWidget\"><span>Total Records[^<]*<b>(\\d+)<\\/b>");
+ public final static Pattern PATTERN_SEARCH_ID = Pattern.compile("name=\"CID\"[^v]*value=\"(\\d+)\"");
+ public final static Pattern PATTERN_SEARCH_FAVORITE = Pattern.compile("favorite-rank\">([0-9,.]+)</span>");
+ public final static Pattern PATTERN_SEARCH_TOTALCOUNT = Pattern.compile("<span>Total Records\\D*(\\d+)<");
public final static Pattern PATTERN_SEARCH_RECAPTCHA = Pattern.compile("<script[^>]*src=\"[^\"]*/recaptcha/api/challenge\\?k=([^\"]+)\"[^>]*>");
public final static Pattern PATTERN_SEARCH_RECAPTCHACHALLENGE = Pattern.compile("challenge : '([^']+)'");
+ public final static Pattern PATTERN_SEARCH_HIDDEN_DATE = Pattern.compile("<span class=\"small\">([\\d-/]{6,10})</span>");
/**
* Patterns for waypoints
diff --git a/main/src/cgeo/geocaching/connector/gc/GCLoggingManager.java b/main/src/cgeo/geocaching/connector/gc/GCLoggingManager.java
index 4f2f8c4..2aa5c75 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCLoggingManager.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCLoggingManager.java
@@ -1,10 +1,10 @@
package cgeo.geocaching.connector.gc;
import cgeo.geocaching.Geocache;
+import cgeo.geocaching.LogCacheActivity;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.TrackableLog;
-import cgeo.geocaching.LogCacheActivity;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.connector.ILoggingManager;
import cgeo.geocaching.connector.ImageResult;
@@ -80,7 +80,7 @@ public class GCLoggingManager implements ILoggingManager, LoaderManager.LoaderCa
}
@Override
- public LogResult postLog(Geocache cache, LogType logType, Calendar date, String log, List<TrackableLog> trackableLogs) {
+ public LogResult postLog(Geocache cache, LogType logType, Calendar date, String log, String logPassword, List<TrackableLog> trackableLogs) {
try {
final ImmutablePair<StatusCode, String> postResult = GCParser.postLog(cache.getGeocode(), cache.getCacheId(), viewstates, logType,
diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java
index 643caf5..4bc55fe 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCMap.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCMap.java
@@ -2,7 +2,7 @@ package cgeo.geocaching.connector.gc;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgData;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.enumerations.CacheSize;
@@ -337,7 +337,7 @@ public class GCMap {
Log.e("GCMap.searchByViewport: No cache parsed for viewport " + viewport);
}
else {
- searchResult.addGeocodes(search.getGeocodes());
+ searchResult.addSearchResult(search);
}
Tile.Cache.add(tile);
}
@@ -349,20 +349,21 @@ public class GCMap {
}
}
+
+ // Check for vanished found caches
+ if (tiles.iterator().next().getZoomlevel() >= Tile.ZOOMLEVEL_MIN_PERSONALIZED) {
+ searchResult.addFilteredGeocodes(cgData.getCachedMissingFromSearch(searchResult, tiles, GCConnector.getInstance(), Tile.ZOOMLEVEL_MIN_PERSONALIZED - 1));
+ }
}
- if (strategy.flags.contains(StrategyFlag.SEARCH_NEARBY)) {
+ if (strategy.flags.contains(StrategyFlag.SEARCH_NEARBY) && Settings.isPremiumMember()) {
final Geopoint center = viewport.getCenter();
if ((lastSearchViewport == null) || !lastSearchViewport.contains(center)) {
//FIXME We don't have a RecaptchaReceiver!?
SearchResult search = GCParser.searchByCoords(center, Settings.getCacheType(), false, null);
if (search != null && !search.isEmpty()) {
final Set<String> geocodes = search.getGeocodes();
- if (Settings.isPremiumMember()) {
- lastSearchViewport = cgData.getBounds(geocodes);
- } else {
- lastSearchViewport = new Viewport(center, center);
- }
+ lastSearchViewport = cgData.getBounds(geocodes);
searchResult.addGeocodes(geocodes);
}
}
diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java
index a58b2cc..e32f72d 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCParser.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java
@@ -5,7 +5,6 @@ import cgeo.geocaching.Image;
import cgeo.geocaching.LogEntry;
import cgeo.geocaching.R;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.Trackable;
import cgeo.geocaching.TrackableLog;
import cgeo.geocaching.Waypoint;
@@ -27,6 +26,7 @@ import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.loaders.RecaptchaReceiver;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.DirectionImage;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.Log;
@@ -53,6 +53,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
+import java.util.Date;
import java.util.EnumSet;
import java.util.GregorianCalendar;
import java.util.List;
@@ -120,6 +121,7 @@ public abstract class GCParser {
final String[] rows = page.split("<tr class=");
final int rows_count = rows.length;
+ int excludedCaches = 0;
for (int z = 1; z < rows_count; z++) {
final Geocache cache = new Geocache();
final String row = rows[z];
@@ -157,6 +159,7 @@ public abstract class GCParser {
if (Settings.isExcludeDisabledCaches() && (cache.isDisabled() || cache.isArchived())) {
// skip disabled and archived caches
+ excludedCaches++;
continue;
}
@@ -176,7 +179,8 @@ public abstract class GCParser {
// cache distance - estimated distance for basic members
final String distance = TextUtils.getMatch(row, GCConstants.PATTERN_SEARCH_DIRECTION_DISTANCE, false, 2, null, false);
if (distance != null) {
- cache.setDistance(DistanceParser.parseDistance(distance, Settings.isUseMetricUnits()));
+ cache.setDistance(DistanceParser.parseDistance(distance,
+ !Settings.isUseImperialUnits()));
}
// difficulty/terrain
@@ -196,6 +200,19 @@ public abstract class GCParser {
final String container = TextUtils.getMatch(row, GCConstants.PATTERN_SEARCH_CONTAINER, false, 1, null, false);
cache.setSize(CacheSize.getById(container));
+ // date hidden, makes sorting event caches easier
+ final String dateHidden = TextUtils.getMatch(row, GCConstants.PATTERN_SEARCH_HIDDEN_DATE, false, 1, null, false);
+ if (StringUtils.isNotBlank(dateHidden)) {
+ try {
+ Date date = Login.parseGcCustomDate(dateHidden);
+ if (date != null) {
+ cache.setHidden(date);
+ }
+ } catch (ParseException e) {
+ Log.e("Error parsing event date from search");
+ }
+ }
+
// cache inventory
final MatcherWrapper matcherTbs = new MatcherWrapper(GCConstants.PATTERN_SEARCH_TRACKABLES, row);
String inventoryPre = null;
@@ -237,7 +254,7 @@ public abstract class GCParser {
// favorite count
try {
- result = TextUtils.getMatch(row, GCConstants.PATTERN_SEARCH_FAVORITE, false, 1, null, true);
+ result = getNumberString(TextUtils.getMatch(row, GCConstants.PATTERN_SEARCH_FAVORITE, false, 1, null, true));
if (null != result) {
cache.setFavoritePoints(Integer.parseInt(result));
}
@@ -252,7 +269,7 @@ public abstract class GCParser {
try {
final String result = TextUtils.getMatch(page, GCConstants.PATTERN_SEARCH_TOTALCOUNT, false, 1, null, true);
if (null != result) {
- searchResult.setTotal(Integer.parseInt(result));
+ searchResult.setTotal(Integer.parseInt(result) - excludedCaches);
}
} catch (final NumberFormatException e) {
Log.w("GCParser.parseSearch: Failed to parse cache count");
@@ -354,32 +371,41 @@ public abstract class GCParser {
return searchResult;
}
- static SearchResult parseCacheFromText(final String page, final CancellableHandler handler) {
+ static SearchResult parseCacheFromText(final String pageIn, final CancellableHandler handler) {
CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_details);
- if (StringUtils.isBlank(page)) {
+ if (StringUtils.isBlank(pageIn)) {
Log.e("GCParser.parseCache: No page given");
return null;
}
final SearchResult searchResult = new SearchResult();
- if (page.contains(GCConstants.STRING_UNPUBLISHED_OTHER) || page.contains(GCConstants.STRING_UNPUBLISHED_OWNER) || page.contains(GCConstants.STRING_UNPUBLISHED_FROM_SEARCH)) {
+ if (pageIn.contains(GCConstants.STRING_UNPUBLISHED_OTHER) || pageIn.contains(GCConstants.STRING_UNPUBLISHED_OWNER) || pageIn.contains(GCConstants.STRING_UNPUBLISHED_FROM_SEARCH)) {
searchResult.setError(StatusCode.UNPUBLISHED_CACHE);
return searchResult;
}
- if (page.contains(GCConstants.STRING_PREMIUMONLY_1) || page.contains(GCConstants.STRING_PREMIUMONLY_2)) {
+ if (pageIn.contains(GCConstants.STRING_PREMIUMONLY_1) || pageIn.contains(GCConstants.STRING_PREMIUMONLY_2)) {
searchResult.setError(StatusCode.PREMIUM_ONLY);
return searchResult;
}
- final String cacheName = Html.fromHtml(TextUtils.getMatch(page, GCConstants.PATTERN_NAME, true, "")).toString();
+ final String cacheName = Html.fromHtml(TextUtils.getMatch(pageIn, GCConstants.PATTERN_NAME, true, "")).toString();
if (GCConstants.STRING_UNKNOWN_ERROR.equalsIgnoreCase(cacheName)) {
searchResult.setError(StatusCode.UNKNOWN_ERROR);
return searchResult;
}
+ // first handle the content with line breaks, then trim everything for easier matching and reduced memory consumption in parsed fields
+ String personalNoteWithLineBreaks = "";
+ MatcherWrapper matcher = new MatcherWrapper(GCConstants.PATTERN_PERSONALNOTE, pageIn);
+ if (matcher.find()) {
+ personalNoteWithLineBreaks = matcher.group(1).trim();
+ }
+
+ final String page = TextUtils.replaceWhitespace(pageIn);
+
final Geocache cache = new Geocache();
cache.setDisabled(page.contains(GCConstants.STRING_DISABLED));
@@ -516,7 +542,7 @@ public abstract class GCParser {
cache.checkFields();
// cache personal note
- cache.setPersonalNote(TextUtils.getMatch(page, GCConstants.PATTERN_PERSONALNOTE, true, cache.getPersonalNote()));
+ cache.setPersonalNote(personalNoteWithLineBreaks);
// cache short description
cache.setShortDescription(TextUtils.getMatch(page, GCConstants.PATTERN_SHORTDESC, true, ""));
@@ -626,7 +652,7 @@ public abstract class GCParser {
while (matcherLog.find()) {
final String typeStr = matcherLog.group(1);
- final String countStr = matcherLog.group(2).replaceAll("[.,]", "");
+ final String countStr = getNumberString(matcherLog.group(2));
if (StringUtils.isNotBlank(typeStr)
&& LogType.UNKNOWN != LogType.getByIconName(typeStr)
@@ -736,6 +762,13 @@ public abstract class GCParser {
return searchResult;
}
+ private static String getNumberString(final String numberWithPunctuation) {
+ if (numberWithPunctuation == null) {
+ return null;
+ }
+ return numberWithPunctuation.replaceAll("[.,]", "");
+ }
+
public static SearchResult searchByNextPage(final SearchResult search, boolean showCaptcha, RecaptchaReceiver recaptchaReceiver) {
if (search == null) {
return search;
@@ -862,7 +895,7 @@ public abstract class GCParser {
}
private static boolean isSearchForMyCaches(final String userName) {
- if (userName.equalsIgnoreCase(Settings.getLogin().left)) {
+ if (userName.equalsIgnoreCase(Settings.getGcLogin().left)) {
Log.i("Overriding users choice because of self search, downloading all caches.");
return true;
}
@@ -1008,7 +1041,7 @@ public abstract class GCParser {
final String uri = new Uri.Builder().scheme("http").authority("www.geocaching.com").path("/seek/log.aspx").encodedQuery("ID=" + cacheid).build().toString();
String page = Login.postRequestLogged(uri, params);
if (!Login.getLoginStatus(page)) {
- Log.e("GCParser.postLogTrackable: Can not log in geocaching");
+ Log.e("GCParser.postLog: Cannot log in geocaching");
return new ImmutablePair<StatusCode, String>(StatusCode.NOT_LOGGED_IN, "");
}
@@ -1103,19 +1136,12 @@ public abstract class GCParser {
* @return status code to indicate success or failure
*/
public static ImmutablePair<StatusCode, String> uploadLogImage(final String logId, final String caption, final String description, final Uri imageUri) {
- final String uri = new Uri.Builder().scheme("http").authority("www.geocaching.com").path("/seek/upload.aspx").encodedQuery("LID=" + logId).build().toString();
-
- String page = Network.getResponseData(Network.getRequest(uri));
+ final String uri = new Uri.Builder().scheme("http").authority("www.geocaching.com").path("/seek/upload.aspx").build().toString();
- if (!Login.getLoginStatus(page)) {
- // Login.isActualLoginStatus() was wrong, we are not logged in
- final StatusCode loginState = Login.login();
- if (loginState == StatusCode.NO_ERROR) {
- page = Network.getResponseData(Network.getRequest(uri));
- } else {
- Log.e("Image upload: No login (error: " + loginState + ')');
- return ImmutablePair.of(StatusCode.NOT_LOGGED_IN, null);
- }
+ final String page = Login.getRequestLogged(uri, new Parameters("LID=", logId));
+ if (StringUtils.isBlank(page)) {
+ Log.e("GCParser.uploadLogImage: No data from server");
+ return new ImmutablePair<StatusCode, String>(StatusCode.UNKNOWN_ERROR, null);
}
final String[] viewstates = Login.getViewstates(page);
@@ -1195,7 +1221,7 @@ public abstract class GCParser {
final String uri = new Uri.Builder().scheme("http").authority("www.geocaching.com").path("/track/log.aspx").encodedQuery("wid=" + tbid).build().toString();
final String page = Login.postRequestLogged(uri, params);
if (!Login.getLoginStatus(page)) {
- Log.e("GCParser.postLogTrackable: Can not log in geocaching");
+ Log.e("GCParser.postLogTrackable: Cannot log in geocaching");
return StatusCode.NOT_LOGGED_IN;
}
@@ -1430,7 +1456,8 @@ public abstract class GCParser {
final String distance = TextUtils.getMatch(page, GCConstants.PATTERN_TRACKABLE_DISTANCE, false, null);
if (null != distance) {
try {
- trackable.setDistance(DistanceParser.parseDistance(distance, Settings.isUseMetricUnits()));
+ trackable.setDistance(DistanceParser.parseDistance(distance,
+ !Settings.isUseImperialUnits()));
} catch (final NumberFormatException e) {
Log.e("GCParser.parseTrackable: Failed to parse distance", e);
}
@@ -1743,16 +1770,6 @@ public abstract class GCParser {
}
}
- if (Settings.isElevationWanted()) {
- if (CancellableHandler.isCancelled(handler)) {
- return;
- }
- CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_elevation);
- if (cache.getCoords() != null) {
- cache.setElevation(cache.getCoords().getElevation());
- }
- }
-
if (Settings.isRatingWanted()) {
if (CancellableHandler.isCancelled(handler)) {
return;
diff --git a/main/src/cgeo/geocaching/connector/gc/IconDecoder.java b/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
index d3a2959..ed44392 100644
--- a/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
+++ b/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.connector.gc;
import cgeo.geocaching.Geocache;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.enumerations.CacheType;
import android.graphics.Bitmap;
@@ -21,7 +21,7 @@ public abstract class IconDecoder {
private static final int CT_MEGAEVENT = 7;
private static final int CT_CITO = 8;
private static final int CT_WEBCAM = 9;
- private static final int CT_WHEREIGO = 10;
+ private static final int CT_WHERIGO = 10;
private static final int CT_VIRTUAL = 11;
private static final int CT_LETTERBOX = 12;
@@ -116,7 +116,7 @@ public abstract class IconDecoder {
case CT_WEBCAM:
cache.setType(CacheType.WEBCAM);
return true;
- case CT_WHEREIGO:
+ case CT_WHERIGO:
cache.setType(CacheType.WHERIGO);
return true;
case CT_VIRTUAL:
@@ -395,12 +395,12 @@ public abstract class IconDecoder {
if (g < 71) {
return CT_MYSTERY;
}
- return r < 153 ? CT_WHEREIGO : CT_WEBCAM;
+ return r < 153 ? CT_WHERIGO : CT_WEBCAM;
}
if (b < 167) {
return r < 157 ? CT_TRADITIONAL : CT_WEBCAM;
}
- return CT_WHEREIGO;
+ return CT_WHERIGO;
}
if (g < 199) {
if (r < 142) {
@@ -450,7 +450,7 @@ public abstract class IconDecoder {
if (b < 252) {
if (r < 243) {
if (r < 225) {
- return CT_WHEREIGO;
+ return CT_WHERIGO;
}
if (b < 232) {
if (g < 228) {
@@ -459,14 +459,14 @@ public abstract class IconDecoder {
return r < 231 ? CT_VIRTUAL : CT_TRADITIONAL;
}
if (r < 236) {
- return CT_WHEREIGO;
+ return CT_WHERIGO;
}
- return r < 240 ? CT_WEBCAM : CT_WHEREIGO;
+ return r < 240 ? CT_WEBCAM : CT_WHERIGO;
}
if (g < 247) {
return r < 245 ? CT_WEBCAM : CT_FOUND;
}
- return CT_WHEREIGO;
+ return CT_WHERIGO;
}
return CT_LETTERBOX;
}
diff --git a/main/src/cgeo/geocaching/connector/gc/Login.java b/main/src/cgeo/geocaching/connector/gc/Login.java
index 413cda4..4b4c93f 100644
--- a/main/src/cgeo/geocaching/connector/gc/Login.java
+++ b/main/src/cgeo/geocaching/connector/gc/Login.java
@@ -1,16 +1,16 @@
package cgeo.geocaching.connector.gc;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.network.Cookies;
import cgeo.geocaching.network.HtmlImage;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
-import cgeo.geocaching.utils.TextUtils;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.MatcherWrapper;
+import cgeo.geocaching.utils.TextUtils;
import ch.boye.httpclientandroidlib.HttpResponse;
@@ -52,9 +52,9 @@ public abstract class Login {
"dd/MM/yyyy"
};
- Map<String, SimpleDateFormat> map = new HashMap<String, SimpleDateFormat>();
+ final Map<String, SimpleDateFormat> map = new HashMap<String, SimpleDateFormat>();
- for (String format : formats) {
+ for (final String format : formats) {
map.put(format, new SimpleDateFormat(format, Locale.ENGLISH));
}
@@ -66,7 +66,7 @@ public abstract class Login {
}
private static StatusCode login(boolean retry) {
- final ImmutablePair<String, String> login = Settings.getLogin();
+ final ImmutablePair<String, String> login = Settings.getGcLogin();
if (login == null || StringUtils.isEmpty(login.left) || StringUtils.isEmpty(login.right)) {
Login.setActualStatus(cgeoapplication.getInstance().getString(R.string.err_login));
@@ -147,8 +147,8 @@ public abstract class Login {
}
public static StatusCode logout() {
- HttpResponse logoutResponse = Network.getRequest("https://www.geocaching.com/login/default.aspx?RESET=Y&redir=http%3a%2f%2fwww.geocaching.com%2fdefault.aspx%3f");
- String logoutData = Network.getResponseData(logoutResponse);
+ final HttpResponse logoutResponse = Network.getRequest("https://www.geocaching.com/login/default.aspx?RESET=Y&redir=http%3a%2f%2fwww.geocaching.com%2fdefault.aspx%3f");
+ final String logoutData = Network.getResponseData(logoutResponse);
if (logoutResponse != null && logoutResponse.getStatusLine().getStatusCode() == 503 && TextUtils.matches(logoutData, GCConstants.PATTERN_MAINTENANCE)) {
return StatusCode.MAINTENANCE;
}
@@ -211,7 +211,7 @@ public abstract class Login {
int cachesCount = 0;
try {
cachesCount = Integer.parseInt(TextUtils.getMatch(page, GCConstants.PATTERN_CACHES_FOUND, true, "0").replaceAll("[,.]", ""));
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
Log.e("getLoginStatus: bad cache count", e);
}
setActualCachesFound(cachesCount);
@@ -276,7 +276,7 @@ public abstract class Login {
}
// No match? There may be no avatar set by user.
Log.d("No avatar set for user");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("Error when retrieving user avatar", e);
}
return null;
@@ -294,7 +294,7 @@ public abstract class Login {
return;
}
- String customDate = TextUtils.getMatch(result, GCConstants.PATTERN_CUSTOMDATE, true, null);
+ final String customDate = TextUtils.getMatch(result, GCConstants.PATTERN_CUSTOMDATE, true, null);
if (null != customDate) {
Settings.setGcCustomDate(customDate);
}
@@ -310,14 +310,14 @@ public abstract class Login {
if (gcCustomDateFormats.containsKey(format)) {
try {
return gcCustomDateFormats.get(format).parse(trimmed);
- } catch (ParseException e) {
+ } catch (final ParseException e) {
}
}
- for (SimpleDateFormat sdf : gcCustomDateFormats.values()) {
+ for (final SimpleDateFormat sdf : gcCustomDateFormats.values()) {
try {
return sdf.parse(trimmed);
- } catch (ParseException e) {
+ } catch (final ParseException e) {
}
}
@@ -347,7 +347,7 @@ public abstract class Login {
return true;
}
- for (String s : a) {
+ for (final String s : a) {
if (StringUtils.isNotEmpty(s)) {
return false;
}
@@ -373,24 +373,24 @@ public abstract class Login {
if (matcherViewstateCount.find()) {
try {
count = Integer.parseInt(matcherViewstateCount.group(1));
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
Log.e("getViewStates", e);
}
}
- String[] viewstates = new String[count];
+ final String[] viewstates = new String[count];
// Get the viewstates
final MatcherWrapper matcherViewstates = new MatcherWrapper(GCConstants.PATTERN_VIEWSTATES, page);
while (matcherViewstates.find()) {
- String sno = matcherViewstates.group(1); // number of viewstate
+ final String sno = matcherViewstates.group(1); // number of viewstate
int no;
if (StringUtils.isEmpty(sno)) {
no = 0;
} else {
try {
no = Integer.parseInt(sno);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
Log.e("getViewStates", e);
no = 0;
}
@@ -436,17 +436,17 @@ public abstract class Login {
* @return
*/
public static String postRequestLogged(final String uri, final Parameters params) {
- HttpResponse response = Network.postRequest(uri, params);
- String data = Network.getResponseData(response);
+ final String data = Network.getResponseData(Network.postRequest(uri, params));
- if (!getLoginStatus(data)) {
- if (login() == StatusCode.NO_ERROR) {
- response = Network.postRequest(uri, params);
- data = Network.getResponseData(response);
- } else {
- Log.i("Working as guest.");
- }
+ if (getLoginStatus(data)) {
+ return data;
+ }
+
+ if (login() == StatusCode.NO_ERROR) {
+ return Network.getResponseData(Network.postRequest(uri, params));
}
+
+ Log.i("Working as guest.");
return data;
}
@@ -458,20 +458,31 @@ public abstract class Login {
* @return
*/
public static String getRequestLogged(final String uri, final Parameters params) {
- final String data = Network.getResponseData(Network.getRequest(uri, params));
+ final String data = Network.getResponseData(Network.getRequest(uri, params), canRemoveWhitespace(uri));
if (getLoginStatus(data)) {
return data;
}
if (login() == StatusCode.NO_ERROR) {
- return Network.getResponseData(Network.getRequest(uri, params));
+ return Network.getResponseData(Network.getRequest(uri, params), canRemoveWhitespace(uri));
}
Log.w("Working as guest.");
return data;
}
+ /**
+ * Unfortunately the cache details page contains user generated whitespace in the personal note, therefore we cannot
+ * remove the white space from cache details pages.
+ *
+ * @param uri
+ * @return
+ */
+ private static boolean canRemoveWhitespace(final String uri) {
+ return !StringUtils.contains(uri, "cache_details");
+ }
+
/** Get user session & session token from the Live Map. Needed for following requests */
public static String[] getMapTokens() {
final HttpResponse response = Network.getRequest(GCConstants.URL_LIVE_MAP);
diff --git a/main/src/cgeo/geocaching/connector/gc/Tile.java b/main/src/cgeo/geocaching/connector/gc/Tile.java
index dd7f352..3177f2c 100644
--- a/main/src/cgeo/geocaching/connector/gc/Tile.java
+++ b/main/src/cgeo/geocaching/connector/gc/Tile.java
@@ -37,6 +37,7 @@ public class Tile {
public static final int TILE_SIZE = 256;
public static final int ZOOMLEVEL_MAX = 18;
public static final int ZOOMLEVEL_MIN = 0;
+ public static final int ZOOMLEVEL_MIN_PERSONALIZED = 12;
static final int[] NUMBER_OF_TILES = new int[ZOOMLEVEL_MAX - ZOOMLEVEL_MIN + 1];
static final int[] NUMBER_OF_PIXELS = new int[ZOOMLEVEL_MAX - ZOOMLEVEL_MIN + 1];
@@ -252,6 +253,10 @@ public class Tile {
return viewPort.contains(point);
}
+ public Viewport getViewport() {
+ return viewPort;
+ }
+
/**
* Calculate needed tiles for the given viewport to cover it with
* max 2x2 tiles
@@ -319,6 +324,10 @@ public class Tile {
public static void add(final Tile tile) {
tileCache.put(tile.hashCode(), tile);
}
+
+ public static void clear() {
+ tileCache.clear();
+ }
}
}
diff --git a/main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java b/main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java
index 4c6db97..5ca2d28 100644
--- a/main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java
+++ b/main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java
@@ -2,13 +2,14 @@ package cgeo.geocaching.connector.oc;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgData;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.connector.ILoggingManager;
+import cgeo.geocaching.connector.capability.ILogin;
import cgeo.geocaching.connector.capability.ISearchByCenter;
import cgeo.geocaching.connector.capability.ISearchByViewPort;
-import cgeo.geocaching.connector.oc.OkapiClient.UserInfo;
+import cgeo.geocaching.connector.oc.UserInfo.UserInfoStatus;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.utils.CryptUtils;
@@ -16,11 +17,13 @@ import cgeo.geocaching.utils.CryptUtils;
import org.apache.commons.lang3.StringUtils;
import android.app.Activity;
+import android.content.Context;
+import android.os.Handler;
-public class OCApiLiveConnector extends OCApiConnector implements ISearchByCenter, ISearchByViewPort {
+public class OCApiLiveConnector extends OCApiConnector implements ISearchByCenter, ISearchByViewPort, ILogin {
private String cS;
- private UserInfo userInfo = new UserInfo(StringUtils.EMPTY, 0, false);
+ private UserInfo userInfo = new UserInfo(StringUtils.EMPTY, 0, UserInfoStatus.NOT_RETRIEVED);
public OCApiLiveConnector(String name, String host, String prefix, int cKResId, int cSResId, ApiSupport apiSupport) {
super(name, host, prefix, CryptUtils.rot13(cgeoapplication.getInstance().getResources().getString(cKResId)), apiSupport);
@@ -104,16 +107,33 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
return getSupportedAuthLevel() == OAuthLevel.Level3;
}
- public boolean retrieveUserInfo() {
- userInfo = OkapiClient.getUserInfo(this);
- return userInfo.isRetrieveSuccessful();
+ @Override
+ public boolean login(Handler handler, Context fromActivity) {
+ if (supportsPersonalization()) {
+ userInfo = OkapiClient.getUserInfo(this);
+ } else {
+ userInfo = new UserInfo(StringUtils.EMPTY, 0, UserInfoStatus.NOT_SUPPORTED);
+ }
+ return userInfo.getStatus() == UserInfoStatus.SUCCESSFUL;
}
- public Object getUserName() {
+ @Override
+ public String getUserName() {
return userInfo.getName();
}
+ @Override
public int getCachesFound() {
return userInfo.getFinds();
}
+
+ @Override
+ public String getLoginStatusString() {
+ return cgeoapplication.getInstance().getString(userInfo.getStatus().resId);
+ }
+
+ @Override
+ public boolean isLoggedIn() {
+ return userInfo.getStatus() == UserInfoStatus.SUCCESSFUL;
+ }
}
diff --git a/main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java b/main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java
index 779c1c5..08d796e 100644
--- a/main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java
+++ b/main/src/cgeo/geocaching/connector/oc/OCAuthorizationActivity.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.connector.oc;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.network.OAuthAuthorizationActivity;
@@ -9,8 +9,6 @@ import org.apache.commons.lang3.tuple.ImmutablePair;
public class OCAuthorizationActivity extends OAuthAuthorizationActivity {
- private final int siteResId = R.string.auth_ocde;
-
public OCAuthorizationActivity() {
super("www.opencaching.de",
"/okapi/services/oauth/request_token",
@@ -38,7 +36,7 @@ public class OCAuthorizationActivity extends OAuthAuthorizationActivity {
@Override
protected String getAuthTitle() {
- return res.getString(siteResId);
+ return res.getString(R.string.auth_ocde);
}
@Override
diff --git a/main/src/cgeo/geocaching/connector/oc/OCConnector.java b/main/src/cgeo/geocaching/connector/oc/OCConnector.java
index 01738c0..29cdd10 100644
--- a/main/src/cgeo/geocaching/connector/oc/OCConnector.java
+++ b/main/src/cgeo/geocaching/connector/oc/OCConnector.java
@@ -12,7 +12,7 @@ public class OCConnector extends AbstractConnector {
private final String host;
private final String name;
private final Pattern codePattern;
- private static final Pattern gpxZipFilePattern = Pattern.compile("oc[a-z]{2,3}\\d{5,}\\.zip", Pattern.CASE_INSENSITIVE);
+ private static final Pattern GPX_ZIP_FILE_PATTERN = Pattern.compile("oc[a-z]{2,3}\\d{5,}\\.zip", Pattern.CASE_INSENSITIVE);
public OCConnector(final String name, final String host, final String prefix) {
this.name = name;
@@ -45,7 +45,7 @@ public class OCConnector extends AbstractConnector {
@Override
public boolean isZippedGPXFile(String fileName) {
- return gpxZipFilePattern.matcher(fileName).matches();
+ return GPX_ZIP_FILE_PATTERN.matcher(fileName).matches();
}
@Override
diff --git a/main/src/cgeo/geocaching/connector/oc/OkapiClient.java b/main/src/cgeo/geocaching/connector/oc/OkapiClient.java
index 3c99bc9..6959adf 100644
--- a/main/src/cgeo/geocaching/connector/oc/OkapiClient.java
+++ b/main/src/cgeo/geocaching/connector/oc/OkapiClient.java
@@ -4,7 +4,6 @@ import cgeo.geocaching.Geocache;
import cgeo.geocaching.Image;
import cgeo.geocaching.LogEntry;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.cgData;
import cgeo.geocaching.cgeoapplication;
@@ -14,6 +13,7 @@ import cgeo.geocaching.connector.LogResult;
import cgeo.geocaching.connector.gc.GCConnector;
import cgeo.geocaching.connector.oc.OCApiConnector.ApiSupport;
import cgeo.geocaching.connector.oc.OCApiConnector.OAuthLevel;
+import cgeo.geocaching.connector.oc.UserInfo.UserInfoStatus;
import cgeo.geocaching.enumerations.CacheAttribute;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
@@ -27,6 +27,7 @@ import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.OAuth;
import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.Log;
import org.apache.commons.lang3.StringUtils;
@@ -50,16 +51,16 @@ import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
-final public class OkapiClient {
+final class OkapiClient {
private static final char SEPARATOR = '|';
private static final String SEPARATOR_STRING = Character.toString(SEPARATOR);
- private static final SimpleDateFormat logDateFormat;
-
+ private static final SimpleDateFormat LOG_DATE_FORMAT;
static {
- logDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ", Locale.US);
- logDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ LOG_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ", Locale.US);
+ LOG_DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
}
+ private static final SimpleDateFormat ISO8601DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.getDefault());
private static final String CACHE_ATTRNAMES = "attrnames";
private static final String WPT_LOCATION = "location";
@@ -93,6 +94,8 @@ final public class OkapiClient {
private static final String CACHE_LOCATION = "location";
private static final String CACHE_NAME = "name";
private static final String CACHE_CODE = "code";
+ private static final String CACHE_REQ_PASSWORD = "req_passwd";
+ private static final String CACHE_MY_NOTES = "my_notes";
private static final String LOG_TYPE = "type";
private static final String LOG_COMMENT = "comment";
@@ -108,9 +111,9 @@ final public class OkapiClient {
// Additional: additional fields for full cache (L3 - only for level 3 auth, current - only for connectors with current api)
private static final String SERVICE_CACHE_CORE_FIELDS = "code|name|location|type|status|difficulty|terrain|size";
private static final String SERVICE_CACHE_CORE_L3_FIELDS = "is_found";
- private static final String SERVICE_CACHE_ADDITIONAL_FIELDS = "owner|founds|notfounds|rating|rating_votes|recommendations|description|hint|images|latest_logs|date_hidden|alt_wpts|attrnames";
+ private static final String SERVICE_CACHE_ADDITIONAL_FIELDS = "owner|founds|notfounds|rating|rating_votes|recommendations|description|hint|images|latest_logs|date_hidden|alt_wpts|attrnames|req_passwd";
private static final String SERVICE_CACHE_ADDITIONAL_CURRENT_FIELDS = "gc_code|attribution_note";
- private static final String SERVICE_CACHE_ADDITIONAL_L3_FIELDS = "is_watched";
+ private static final String SERVICE_CACHE_ADDITIONAL_L3_FIELDS = "is_watched|my_notes";
private static final String METHOD_SEARCH_NEAREST = "services/caches/search/nearest";
private static final String METHOD_SEARCH_BBOX = "services/caches/search/bbox";
@@ -118,12 +121,12 @@ final public class OkapiClient {
public static Geocache getCache(final String geoCode) {
final Parameters params = new Parameters("cache_code", geoCode);
- IConnector connector = ConnectorFactory.getConnector(geoCode);
+ final IConnector connector = ConnectorFactory.getConnector(geoCode);
if (!(connector instanceof OCApiConnector)) {
return null;
}
- OCApiConnector ocapiConn = (OCApiConnector) connector;
+ final OCApiConnector ocapiConn = (OCApiConnector) connector;
params.add("fields", getFullFields(ocapiConn));
params.add("attribution_append", "none");
@@ -137,17 +140,19 @@ final public class OkapiClient {
return parseCache(data);
}
- public static List<Geocache> getCachesAround(final Geopoint center, OCApiConnector connector) {
- String centerString = GeopointFormatter.format(GeopointFormatter.Format.LAT_DECDEGREE_RAW, center) + SEPARATOR + GeopointFormatter.format(GeopointFormatter.Format.LON_DECDEGREE_RAW, center);
+ public static List<Geocache> getCachesAround(final Geopoint center, final OCApiConnector connector) {
+ final String centerString = GeopointFormatter.format(GeopointFormatter.Format.LAT_DECDEGREE_RAW, center) + SEPARATOR + GeopointFormatter.format(GeopointFormatter.Format.LON_DECDEGREE_RAW, center);
final Parameters params = new Parameters("search_method", METHOD_SEARCH_NEAREST);
final Map<String, String> valueMap = new LinkedHashMap<String, String>();
valueMap.put("center", centerString);
valueMap.put("limit", "20");
- addFilterParams(valueMap, connector);
+ return requestCaches(connector, params, valueMap);
+ }
+ private static List<Geocache> requestCaches(final OCApiConnector connector, final Parameters params, final Map<String, String> valueMap) {
+ addFilterParams(valueMap, connector);
params.add("search_params", new JSONObject(valueMap).toString());
-
addRetrieveParams(params, connector);
final JSONObject data = request(connector, OkapiService.SERVICE_SEARCH_AND_RETRIEVE, params);
@@ -160,13 +165,13 @@ final public class OkapiClient {
}
// Assumes level 3 OAuth
- public static List<Geocache> getCachesBBox(final Viewport viewport, OCApiConnector connector) {
+ public static List<Geocache> getCachesBBox(final Viewport viewport, final OCApiConnector connector) {
if (viewport.getLatitudeSpan() == 0 || viewport.getLongitudeSpan() == 0) {
return Collections.emptyList();
}
- String bboxString = GeopointFormatter.format(GeopointFormatter.Format.LAT_DECDEGREE_RAW, viewport.bottomLeft)
+ final String bboxString = GeopointFormatter.format(GeopointFormatter.Format.LAT_DECDEGREE_RAW, viewport.bottomLeft)
+ SEPARATOR + GeopointFormatter.format(GeopointFormatter.Format.LON_DECDEGREE_RAW, viewport.bottomLeft)
+ SEPARATOR + GeopointFormatter.format(GeopointFormatter.Format.LAT_DECDEGREE_RAW, viewport.topRight)
+ SEPARATOR + GeopointFormatter.format(GeopointFormatter.Format.LON_DECDEGREE_RAW, viewport.topRight);
@@ -174,22 +179,10 @@ final public class OkapiClient {
final Map<String, String> valueMap = new LinkedHashMap<String, String>();
valueMap.put("bbox", bboxString);
- addFilterParams(valueMap, connector);
-
- params.add("search_params", new JSONObject(valueMap).toString());
-
- addRetrieveParams(params, connector);
-
- final JSONObject data = request(connector, OkapiService.SERVICE_SEARCH_AND_RETRIEVE, params);
-
- if (data == null) {
- return Collections.emptyList();
- }
-
- return parseCaches(data);
+ return requestCaches(connector, params, valueMap);
}
- public static boolean setWatchState(final Geocache cache, final boolean watched, OCApiConnector connector) {
+ public static boolean setWatchState(final Geocache cache, final boolean watched, final OCApiConnector connector) {
final Parameters params = new Parameters("cache_code", cache.getGeocode());
params.add("watched", watched ? "true" : "false");
@@ -204,15 +197,18 @@ final public class OkapiClient {
return true;
}
- public static LogResult postLog(final Geocache cache, LogType logType, Calendar date, String log, OCApiConnector connector) {
+ public static LogResult postLog(final Geocache cache, final LogType logType, final Calendar date, final String log, final String logPassword, final OCApiConnector connector) {
final Parameters params = new Parameters("cache_code", cache.getGeocode());
params.add("logtype", logType.oc_type);
params.add("comment", log);
params.add("comment_format", "plaintext");
- params.add("when", logDateFormat.format(date.getTime()));
+ params.add("when", LOG_DATE_FORMAT.format(date.getTime()));
if (logType.equals(LogType.NEEDS_MAINTENANCE)) {
params.add("needs_maintenance", "true");
}
+ if (logPassword != null) {
+ params.add("password", logPassword);
+ }
final JSONObject data = request(connector, OkapiService.SERVICE_SUBMIT_LOG, params);
@@ -226,7 +222,7 @@ final public class OkapiClient {
}
return new LogResult(StatusCode.LOG_POST_ERROR, "");
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.postLog", e);
}
return new LogResult(StatusCode.LOG_POST_ERROR, "");
@@ -243,19 +239,20 @@ final public class OkapiClient {
// Get and iterate result list
final JSONObject cachesResponse = response.getJSONObject("results");
if (cachesResponse != null) {
- List<Geocache> caches = new ArrayList<Geocache>(cachesResponse.length());
+ final List<Geocache> caches = new ArrayList<Geocache>(cachesResponse.length());
@SuppressWarnings("unchecked")
+ final
Iterator<String> keys = cachesResponse.keys();
while (keys.hasNext()) {
- String key = keys.next();
- Geocache cache = parseSmallCache(cachesResponse.getJSONObject(key));
+ final String key = keys.next();
+ final Geocache cache = parseSmallCache(cachesResponse.getJSONObject(key));
if (cache != null) {
caches.add(cache);
}
}
return caches;
}
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.parseCachesResult", e);
}
return Collections.emptyList();
@@ -269,7 +266,7 @@ final public class OkapiClient {
parseCoreCache(response, cache);
cgData.saveCache(cache, EnumSet.of(SaveFlag.SAVE_CACHE));
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.parseSmallCache", e);
}
return cache;
@@ -297,9 +294,9 @@ final public class OkapiClient {
cache.setFavoritePoints(response.getInt(CACHE_RECOMMENDATIONS));
// not used: req_password
// Prepend gc-link to description if available
- StringBuilder description = new StringBuilder(500);
+ final StringBuilder description = new StringBuilder(500);
if (!response.isNull("gc_code")) {
- String gccode = response.getString("gc_code");
+ final String gccode = response.getString("gc_code");
description.append(cgeoapplication.getInstance().getResources()
.getString(R.string.cache_listed_on, GCConnector.getInstance().getName()))
.append(": <a href=\"http://coord.info/")
@@ -318,7 +315,7 @@ final public class OkapiClient {
final JSONArray images = response.getJSONArray(CACHE_IMAGES);
if (images != null) {
for (int i = 0; i < images.length(); i++) {
- JSONObject imageResponse = images.getJSONObject(i);
+ final JSONObject imageResponse = images.getJSONObject(i);
if (imageResponse.getBoolean(CACHE_IMAGE_IS_SPOILER)) {
final String title = imageResponse.getString(CACHE_IMAGE_CAPTION);
final String url = absoluteUrl(imageResponse.getString(CACHE_IMAGE_URL), cache.getGeocode());
@@ -336,11 +333,15 @@ final public class OkapiClient {
if (!response.isNull(CACHE_IS_WATCHED)) {
cache.setOnWatchlist(response.getBoolean(CACHE_IS_WATCHED));
}
+ if (!response.isNull(CACHE_MY_NOTES)) {
+ cache.setPersonalNote(response.getString(CACHE_MY_NOTES));
+ }
+ cache.setLogPasswordRequired(response.getBoolean(CACHE_REQ_PASSWORD));
cache.setDetailedUpdatedNow();
// save full detailed caches
cgData.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.parseCache", e);
}
return cache;
@@ -366,7 +367,7 @@ final public class OkapiClient {
}
}
- private static String absoluteUrl(String url, String geocode) {
+ private static String absoluteUrl(final String url, final String geocode) {
final Uri uri = Uri.parse(url);
if (!uri.isAbsolute()) {
@@ -379,16 +380,16 @@ final public class OkapiClient {
return url;
}
- private static String parseUser(JSONObject user) throws JSONException {
+ private static String parseUser(final JSONObject user) throws JSONException {
return user.getString(USER_USERNAME);
}
- private static List<LogEntry> parseLogs(JSONArray logsJSON) {
+ private static List<LogEntry> parseLogs(final JSONArray logsJSON) {
List<LogEntry> result = null;
for (int i = 0; i < logsJSON.length(); i++) {
try {
- JSONObject logResponse = logsJSON.getJSONObject(i);
- LogEntry log = new LogEntry(
+ final JSONObject logResponse = logsJSON.getJSONObject(i);
+ final LogEntry log = new LogEntry(
parseUser(logResponse.getJSONObject(LOG_USER)),
parseDate(logResponse.getString(LOG_DATE)).getTime(),
parseLogType(logResponse.getString(LOG_TYPE)),
@@ -397,23 +398,23 @@ final public class OkapiClient {
result = new ArrayList<LogEntry>();
}
result.add(log);
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.parseLogs", e);
}
}
return result;
}
- private static List<Waypoint> parseWaypoints(JSONArray wptsJson) {
+ private static List<Waypoint> parseWaypoints(final JSONArray wptsJson) {
List<Waypoint> result = null;
for (int i = 0; i < wptsJson.length(); i++) {
try {
- JSONObject wptResponse = wptsJson.getJSONObject(i);
- Waypoint wpt = new Waypoint(wptResponse.getString(WPT_NAME),
+ final JSONObject wptResponse = wptsJson.getJSONObject(i);
+ final Waypoint wpt = new Waypoint(wptResponse.getString(WPT_NAME),
parseWptType(wptResponse.getString(WPT_TYPE)),
false);
wpt.setNote(wptResponse.getString(WPT_DESCRIPTION));
- Geopoint pt = parseCoords(wptResponse.getString(WPT_LOCATION));
+ final Geopoint pt = parseCoords(wptResponse.getString(WPT_LOCATION));
if (pt != null) {
wpt.setCoords(pt);
}
@@ -421,14 +422,14 @@ final public class OkapiClient {
result = new ArrayList<Waypoint>();
}
result.add(wpt);
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.parseWaypoints", e);
}
}
return result;
}
- private static LogType parseLogType(String logType) {
+ private static LogType parseLogType(final String logType) {
if ("Found it".equalsIgnoreCase(logType)) {
return LogType.FOUND_IT;
}
@@ -438,7 +439,7 @@ final public class OkapiClient {
return LogType.NOTE;
}
- private static WaypointType parseWptType(String wptType) {
+ private static WaypointType parseWptType(final String wptType) {
if ("parking".equalsIgnoreCase(wptType)) {
return WaypointType.PARKING;
}
@@ -464,11 +465,10 @@ final public class OkapiClient {
}
private static Date parseDate(final String date) {
- final SimpleDateFormat ISO8601DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.getDefault());
final String strippedDate = date.replaceAll("\\+0([0-9]){1}\\:00", "+0$100");
try {
return ISO8601DATEFORMAT.parse(strippedDate);
- } catch (ParseException e) {
+ } catch (final ParseException e) {
Log.e("OkapiClient.parseDate", e);
}
return null;
@@ -484,19 +484,19 @@ final public class OkapiClient {
return null;
}
- private static List<String> parseAttributes(JSONArray nameList) {
+ private static List<String> parseAttributes(final JSONArray nameList) {
- List<String> result = new ArrayList<String>();
+ final List<String> result = new ArrayList<String>();
for (int i = 0; i < nameList.length(); i++) {
try {
- String name = nameList.getString(i);
- CacheAttribute attr = CacheAttribute.getByOcId(AttributeParser.getOcDeId(name));
+ final String name = nameList.getString(i);
+ final CacheAttribute attr = CacheAttribute.getByOcId(AttributeParser.getOcDeId(name));
if (attr != null) {
result.add(attr.rawName);
}
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.parseAttributes", e);
}
}
@@ -517,7 +517,7 @@ final public class OkapiClient {
double size = 0;
try {
size = response.getDouble(CACHE_SIZE);
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.getCacheSize", e);
}
switch ((int) Math.round(size)) {
@@ -565,7 +565,7 @@ final public class OkapiClient {
return CacheType.UNKNOWN;
}
- private static String getCoreFields(OCApiConnector connector) {
+ private static String getCoreFields(final OCApiConnector connector) {
if (connector == null) {
Log.e("OkapiClient.getCoreFields called with invalid connector");
return StringUtils.EMPTY;
@@ -578,13 +578,13 @@ final public class OkapiClient {
return SERVICE_CACHE_CORE_FIELDS;
}
- private static String getFullFields(OCApiConnector connector) {
+ private static String getFullFields(final OCApiConnector connector) {
if (connector == null) {
Log.e("OkapiClient.getFullFields called with invalid connector");
return StringUtils.EMPTY;
}
- StringBuilder res = new StringBuilder(500);
+ final StringBuilder res = new StringBuilder(500);
res.append(SERVICE_CACHE_CORE_FIELDS);
res.append(SEPARATOR).append(SERVICE_CACHE_ADDITIONAL_FIELDS);
@@ -629,7 +629,7 @@ final public class OkapiClient {
return "en";
}
- private static void addFilterParams(final Map<String, String> valueMap, OCApiConnector connector) {
+ private static void addFilterParams(final Map<String, String> valueMap, final OCApiConnector connector) {
if (!Settings.isExcludeDisabledCaches()) {
valueMap.put("status", "Available|Temporarily unavailable");
}
@@ -642,13 +642,13 @@ final public class OkapiClient {
}
}
- private static void addRetrieveParams(final Parameters params, OCApiConnector connector) {
+ private static void addRetrieveParams(final Parameters params, final OCApiConnector connector) {
params.add("retr_method", METHOD_RETRIEVE_CACHES);
params.add("retr_params", "{\"fields\": \"" + getCoreFields(connector) + "\"}");
params.add("wrap", "true");
}
- private static String getFilterFromType(CacheType cacheType) {
+ private static String getFilterFromType(final CacheType cacheType) {
switch (cacheType) {
case EVENT:
return "Event";
@@ -667,67 +667,40 @@ final public class OkapiClient {
}
}
- public static UserInfo getUserInfo(OCApiLiveConnector connector) {
+ public static UserInfo getUserInfo(final OCApiLiveConnector connector) {
final Parameters params = new Parameters("fields", USER_INFO_FIELDS);
final JSONObject data = request(connector, OkapiService.SERVICE_USER, params);
if (data == null) {
- return new UserInfo(StringUtils.EMPTY, 0, false);
+ return new UserInfo(StringUtils.EMPTY, 0, UserInfoStatus.FAILED);
}
String name = StringUtils.EMPTY;
- int finds = 0;
- boolean success = true;
+ boolean successUserName = false;
if (!data.isNull(USER_USERNAME)) {
try {
name = data.getString(USER_USERNAME);
- } catch (JSONException e) {
+ successUserName = true;
+ } catch (final JSONException e) {
Log.e("OkapiClient.getUserInfo - name", e);
- success = false;
}
- } else {
- success = false;
}
+ int finds = 0;
+ boolean successFinds = false;
+
if (!data.isNull(USER_CACHES_FOUND)) {
try {
finds = data.getInt(USER_CACHES_FOUND);
- } catch (JSONException e) {
+ successFinds = true;
+ } catch (final JSONException e) {
Log.e("OkapiClient.getUserInfo - finds", e);
- success = false;
}
- } else {
- success = false;
- }
-
- return new UserInfo(name, finds, success);
- }
-
- public static class UserInfo {
-
- private final String name;
- private final int finds;
- private final boolean retrieveSuccessful;
-
- UserInfo(String name, int finds, boolean retrieveSuccessful) {
- this.name = name;
- this.finds = finds;
- this.retrieveSuccessful = retrieveSuccessful;
}
- public String getName() {
- return name;
- }
-
- public int getFinds() {
- return finds;
- }
-
- public boolean isRetrieveSuccessful() {
- return retrieveSuccessful;
- }
+ return new UserInfo(name, finds, successUserName && successFinds ? UserInfoStatus.SUCCESSFUL : UserInfoStatus.FAILED);
}
}
diff --git a/main/src/cgeo/geocaching/connector/oc/OkapiLoggingManager.java b/main/src/cgeo/geocaching/connector/oc/OkapiLoggingManager.java
index 8a94218..c995975 100644
--- a/main/src/cgeo/geocaching/connector/oc/OkapiLoggingManager.java
+++ b/main/src/cgeo/geocaching/connector/oc/OkapiLoggingManager.java
@@ -1,8 +1,8 @@
package cgeo.geocaching.connector.oc;
import cgeo.geocaching.Geocache;
-import cgeo.geocaching.TrackableLog;
import cgeo.geocaching.LogCacheActivity;
+import cgeo.geocaching.TrackableLog;
import cgeo.geocaching.connector.ILoggingManager;
import cgeo.geocaching.connector.ImageResult;
import cgeo.geocaching.connector.LogResult;
@@ -19,14 +19,14 @@ import java.util.List;
public class OkapiLoggingManager implements ILoggingManager {
- private final OCApiConnector connector;
+ private final OCApiLiveConnector connector;
private final Geocache cache;
private LogCacheActivity activity;
- private final static List<LogType> standardLogTypes = Arrays.asList(LogType.FOUND_IT, LogType.DIDNT_FIND_IT, LogType.NOTE, LogType.NEEDS_MAINTENANCE);
+ private final static List<LogType> standardLogTypes = Arrays.asList(LogType.FOUND_IT, LogType.DIDNT_FIND_IT, LogType.NOTE);
private final static List<LogType> eventLogTypes = Arrays.asList(LogType.WILL_ATTEND, LogType.ATTENDED, LogType.NOTE);
- public OkapiLoggingManager(Activity activity, OCApiConnector connector, Geocache cache) {
+ public OkapiLoggingManager(Activity activity, OCApiLiveConnector connector, Geocache cache) {
this.connector = connector;
this.cache = cache;
this.activity = (LogCacheActivity) activity;
@@ -38,8 +38,10 @@ public class OkapiLoggingManager implements ILoggingManager {
}
@Override
- public LogResult postLog(Geocache cache, LogType logType, Calendar date, String log, List<TrackableLog> trackableLogs) {
- return OkapiClient.postLog(cache, logType, date, log, connector);
+ public LogResult postLog(Geocache cache, LogType logType, Calendar date, String log, String logPassword, List<TrackableLog> trackableLogs) {
+ final LogResult result = OkapiClient.postLog(cache, logType, date, log, logPassword, connector);
+ connector.login(null, null);
+ return result;
}
@Override
diff --git a/main/src/cgeo/geocaching/connector/oc/UserInfo.java b/main/src/cgeo/geocaching/connector/oc/UserInfo.java
new file mode 100644
index 0000000..0dc0440
--- /dev/null
+++ b/main/src/cgeo/geocaching/connector/oc/UserInfo.java
@@ -0,0 +1,41 @@
+package cgeo.geocaching.connector.oc;
+
+import cgeo.geocaching.R;
+
+public class UserInfo {
+
+ public enum UserInfoStatus {
+ NOT_RETRIEVED(R.string.init_login_popup_working),
+ SUCCESSFUL(R.string.init_login_popup_ok),
+ FAILED(R.string.init_login_popup_failed),
+ NOT_SUPPORTED(R.string.init_login_popup_not_authorized);
+
+ public final int resId;
+
+ UserInfoStatus(int resId) {
+ this.resId = resId;
+ }
+ }
+
+ private final String name;
+ private final int finds;
+ private final UserInfoStatus status;
+
+ UserInfo(String name, int finds, UserInfoStatus status) {
+ this.name = name;
+ this.finds = finds;
+ this.status = status;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public int getFinds() {
+ return finds;
+ }
+
+ public UserInfoStatus getStatus() {
+ return status;
+ }
+}
diff --git a/main/src/cgeo/geocaching/connector/ox/OXConnector.java b/main/src/cgeo/geocaching/connector/ox/OXConnector.java
index eec07e3..af33bb6 100644
--- a/main/src/cgeo/geocaching/connector/ox/OXConnector.java
+++ b/main/src/cgeo/geocaching/connector/ox/OXConnector.java
@@ -3,7 +3,7 @@ package cgeo.geocaching.connector.ox;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.ICache;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.connector.AbstractConnector;
import cgeo.geocaching.connector.capability.ISearchByCenter;
import cgeo.geocaching.connector.capability.ISearchByGeocode;
diff --git a/main/src/cgeo/geocaching/connector/trackable/TravelBugConnector.java b/main/src/cgeo/geocaching/connector/trackable/TravelBugConnector.java
index 9ca7716..0dac6cc 100644
--- a/main/src/cgeo/geocaching/connector/trackable/TravelBugConnector.java
+++ b/main/src/cgeo/geocaching/connector/trackable/TravelBugConnector.java
@@ -10,7 +10,7 @@ public class TravelBugConnector extends AbstractTrackableConnector {
/**
* TB codes really start with TB1, there is no padding or minimum length
*/
- private final static Pattern PATTERN_TB_CODE = Pattern.compile("TB[0-9A-Z]+", Pattern.CASE_INSENSITIVE);
+ private final static Pattern PATTERN_TB_CODE = Pattern.compile("(TB[0-9A-Z]+)|([0-9A-Z]{6})", Pattern.CASE_INSENSITIVE);
@Override
public boolean canHandleTrackable(String geocode) {
@@ -31,4 +31,20 @@ public class TravelBugConnector extends AbstractTrackableConnector {
public Trackable searchTrackable(String geocode, String guid, String id) {
return GCParser.searchTrackable(geocode, guid, id);
}
+
+ /**
+ * initialization on demand holder pattern
+ */
+ private static class Holder {
+ private static final TravelBugConnector INSTANCE = new TravelBugConnector();
+ }
+
+ private TravelBugConnector() {
+ // singleton
+ }
+
+ public static TravelBugConnector getInstance() {
+ return Holder.INSTANCE;
+ }
+
} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/enumerations/CacheType.java b/main/src/cgeo/geocaching/enumerations/CacheType.java
index 8dbadfd..6c63cac 100644
--- a/main/src/cgeo/geocaching/enumerations/CacheType.java
+++ b/main/src/cgeo/geocaching/enumerations/CacheType.java
@@ -28,7 +28,7 @@ public enum CacheType {
LOSTANDFOUND("lostfound", "Lost & Found", "3ea6533d-bb52-42fe-b2d2-79a3424d4728", R.string.lostfound, R.drawable.type_event), // icon missing
PROJECT_APE("ape", "Project Ape Cache", "2555690d-b2bc-4b55-b5ac-0cb704c0b768", R.string.ape, R.drawable.type_ape),
GCHQ("gchq", "Groundspeak HQ", "416f2494-dc17-4b6a-9bab-1a29dd292d8c", R.string.gchq, R.drawable.type_hq),
- GPS_EXHIBIT("gps", "GPS Cache Exhibit", "72e69af2-7986-4990-afd9-bc16cbbb4ce3", R.string.gps, R.drawable.type_traditional), // icon missing
+ GPS_EXHIBIT("gps", "GPS Adventures Exhibit", "72e69af2-7986-4990-afd9-bc16cbbb4ce3", R.string.gps, R.drawable.type_event), // icon missing
BLOCK_PARTY("block", "Groundspeak Block Party", "bc2f3df2-1aab-4601-b2ff-b5091f6c02e3", R.string.block, R.drawable.type_event), // icon missing
UNKNOWN("unknown", "unknown", "", R.string.unknown, R.drawable.type_unknown),
/** No real cache type -> filter */
diff --git a/main/src/cgeo/geocaching/export/FieldnoteExport.java b/main/src/cgeo/geocaching/export/FieldnoteExport.java
index a42a48a..9d0310c 100644
--- a/main/src/cgeo/geocaching/export/FieldnoteExport.java
+++ b/main/src/cgeo/geocaching/export/FieldnoteExport.java
@@ -9,6 +9,8 @@ import cgeo.geocaching.connector.gc.Login;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.utils.AsyncTaskWithProgress;
import cgeo.geocaching.utils.IOUtils;
import cgeo.geocaching.utils.Log;
@@ -70,21 +72,18 @@ class FieldnoteExport extends AbstractExport {
}
private Dialog getExportOptionsDialog(final Geocache[] caches, final Activity activity) {
- AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
// AlertDialog has always dark style, so we have to apply it as well always
- View layout = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.fieldnote_export_dialog, null);
+ final View layout = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.fieldnote_export_dialog, null);
builder.setView(layout);
final CheckBox uploadOption = (CheckBox) layout.findViewById(R.id.upload);
final CheckBox onlyNewOption = (CheckBox) layout.findViewById(R.id.onlynew);
- uploadOption.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- onlyNewOption.setEnabled(uploadOption.isChecked());
- }
- });
+ if (Settings.getFieldnoteExportDate() > 0) {
+ onlyNewOption.setText(getString(R.string.export_fieldnotes_onlynew) + "\n(" + Formatter.formatShortDateTime(activity, Settings.getFieldnoteExportDate()) + ')');
+ }
builder.setPositiveButton(R.string.export, new DialogInterface.OnClickListener() {
@@ -132,13 +131,16 @@ class FieldnoteExport extends AbstractExport {
final StringBuilder fieldNoteBuffer = new StringBuilder();
try {
int i = 0;
- for (Geocache cache : caches) {
+ for (final Geocache cache : caches) {
if (cache.isLogOffline()) {
- appendFieldNote(fieldNoteBuffer, cache, cgData.loadLogOffline(cache.getGeocode()));
+ final LogEntry log = cgData.loadLogOffline(cache.getGeocode());
+ if (!onlyNew || onlyNew && log.date > Settings.getFieldnoteExportDate()) {
+ appendFieldNote(fieldNoteBuffer, cache, log);
+ }
publishProgress(++i);
}
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("FieldnoteExport.ExportTask generation", e);
return false;
}
@@ -151,17 +153,17 @@ class FieldnoteExport extends AbstractExport {
exportLocation.mkdirs();
- SimpleDateFormat fileNameDateFormat = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US);
+ final SimpleDateFormat fileNameDateFormat = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US);
exportFile = new File(exportLocation.toString() + '/' + fileNameDateFormat.format(new Date()) + ".txt");
Writer fileWriter = null;
BufferedOutputStream buffer = null;
try {
- OutputStream os = new FileOutputStream(exportFile);
+ final OutputStream os = new FileOutputStream(exportFile);
buffer = new BufferedOutputStream(os);
fileWriter = new OutputStreamWriter(buffer, CharEncoding.UTF_16);
fileWriter.write(fieldNoteBuffer.toString());
- } catch (IOException e) {
+ } catch (final IOException e) {
Log.e("FieldnoteExport.ExportTask export", e);
return false;
} finally {
@@ -181,17 +183,11 @@ class FieldnoteExport extends AbstractExport {
}
final String uri = "http://www.geocaching.com/my/uploadfieldnotes.aspx";
- String page = Network.getResponseData(Network.getRequest(uri));
+ final String page = Login.getRequestLogged(uri, null);
- if (!Login.getLoginStatus(page)) {
- // Login.isActualLoginStatus() was wrong, we are not logged in
- final StatusCode loginState = Login.login();
- if (loginState == StatusCode.NO_ERROR) {
- page = Network.getResponseData(Network.getRequest(uri));
- } else {
- Log.e("FieldnoteExport.ExportTask upload: No login (error: " + loginState + ')');
- return false;
- }
+ if (StringUtils.isBlank(page)) {
+ Log.e("FieldnoteExport.ExportTask get page: No data from server");
+ return false;
}
final String[] viewstates = Login.getViewstates(page);
@@ -201,10 +197,6 @@ class FieldnoteExport extends AbstractExport {
"__EVENTARGUMENT", "",
"ctl00$ContentBody$btnUpload", "Upload Field Note");
- if (onlyNew) {
- uploadParams.put("ctl00$ContentBody$chkSuppressDate", "on");
- }
-
Login.putViewstates(uploadParams, viewstates);
Network.getResponseData(Network.postRequest(uri, uploadParams, "ctl00$ContentBody$FieldNoteLoader", "text/plain", exportFile));
@@ -222,9 +214,7 @@ class FieldnoteExport extends AbstractExport {
protected void onPostExecuteInternal(Boolean result) {
if (null != activity) {
if (result) {
- // if (onlyNew) {
- // // update last export time in settings when doing it ourself (currently we use the date check from gc.com)
- // }
+ Settings.setFieldnoteExportDate(System.currentTimeMillis());
ActivityMixin.showToast(activity, getName() + ' ' + getString(R.string.export_exportedto) + ": " + exportFile.toString());
diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java
index 0ba1a3c..61be3c5 100644
--- a/main/src/cgeo/geocaching/export/GpxExport.java
+++ b/main/src/cgeo/geocaching/export/GpxExport.java
@@ -1,24 +1,12 @@
package cgeo.geocaching.export;
import cgeo.geocaching.Geocache;
-import cgeo.geocaching.LogEntry;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
-import cgeo.geocaching.Waypoint;
-import cgeo.geocaching.cgData;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.activity.ActivityMixin;
-import cgeo.geocaching.enumerations.CacheAttribute;
-import cgeo.geocaching.enumerations.LoadFlags;
-import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.utils.AsyncTaskWithProgress;
-import cgeo.geocaching.utils.TextUtils;
import cgeo.geocaching.utils.Log;
-import cgeo.geocaching.utils.XmlUtils;
-import cgeo.org.kxml2.io.KXmlSerializer;
-
-import org.apache.commons.lang3.StringUtils;
-import org.xmlpull.v1.XmlSerializer;
import android.app.Activity;
import android.app.AlertDialog;
@@ -39,22 +27,11 @@ import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Locale;
-import java.util.Set;
class GpxExport extends AbstractExport {
- private static final SimpleDateFormat dateFormatZ = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US);
- public static final String PREFIX_XSI = "http://www.w3.org/2001/XMLSchema-instance";
- public static final String PREFIX_GPX = "http://www.topografix.com/GPX/1/0";
- public static final String PREFIX_GROUNDSPEAK = "http://www.groundspeak.com/cache/1/0";
-
- /**
- * During the export, only this number of geocaches is fully loaded into memory.
- */
- public static final int CACHES_PER_BATCH = 100;
protected GpxExport() {
super(getString(R.string.export_gpx));
@@ -62,7 +39,7 @@ class GpxExport extends AbstractExport {
@Override
public void export(final List<Geocache> caches, final Activity activity) {
- String[] geocodes = getGeocodes(caches);
+ final String[] geocodes = getGeocodes(caches);
if (null == activity) {
// No activity given, so no user interaction possible.
// Start export with default parameters.
@@ -75,10 +52,10 @@ class GpxExport extends AbstractExport {
}
private Dialog getExportDialog(final String[] geocodes, final Activity activity) {
- AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
// AlertDialog has always dark style, so we have to apply it as well always
- View layout = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.gpx_export_dialog, null);
+ final View layout = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.gpx_export_dialog, null);
builder.setView(layout);
final TextView text = (TextView) layout.findViewById(R.id.info);
@@ -108,7 +85,7 @@ class GpxExport extends AbstractExport {
}
private static String[] getGeocodes(final List<Geocache> caches) {
- ArrayList<String> allGeocodes = new ArrayList<String>(caches.size());
+ final ArrayList<String> allGeocodes = new ArrayList<String>(caches.size());
for (final Geocache geocache : caches) {
allGeocodes.add(geocache.getGeocode());
}
@@ -117,7 +94,6 @@ class GpxExport extends AbstractExport {
protected class ExportTask extends AsyncTaskWithProgress<String, File> {
private final Activity activity;
- private int countExported = 0;
/**
* Instantiates and configures the task for exporting field notes.
@@ -137,7 +113,7 @@ class GpxExport extends AbstractExport {
return null;
}
- List<String> allGeocodes = new ArrayList<String>(Arrays.asList(geocodes));
+ final List<String> allGeocodes = new ArrayList<String>(Arrays.asList(geocodes));
setMessage(cgeoapplication.getInstance().getResources().getQuantityString(R.plurals.cache_counts, allGeocodes.size(), allGeocodes.size()));
@@ -148,38 +124,21 @@ class GpxExport extends AbstractExport {
final File exportLocation = new File(Settings.getGpxExportDir());
exportLocation.mkdirs();
- final XmlSerializer gpx = new KXmlSerializer();
writer = new BufferedWriter(new FileWriter(exportFile));
- gpx.setOutput(writer);
+ new GpxSerializer().writeGPX(allGeocodes, writer, new GpxSerializer.ProgressListener() {
- gpx.startDocument("UTF-8", true);
- gpx.setPrefix("", PREFIX_GPX);
- gpx.setPrefix("xsi", PREFIX_XSI);
- gpx.setPrefix("groundspeak", PREFIX_GROUNDSPEAK);
- gpx.startTag(PREFIX_GPX, "gpx");
- gpx.attribute("", "version", "1.0");
- gpx.attribute("", "creator", "c:geo - http://www.cgeo.org/");
- gpx.attribute(PREFIX_XSI, "schemaLocation",
- PREFIX_GPX + " http://www.topografix.com/GPX/1/0/gpx.xsd " +
- PREFIX_GROUNDSPEAK + " http://www.groundspeak.com/cache/1/0/1/cache.xsd");
-
- // Split the overall set of geocodes into small chunks. That is a compromise between memory efficiency (because
- // we don't load all caches fully into memory) and speed (because we don't query each cache separately).
- while (!allGeocodes.isEmpty()) {
- final List<String> batch = allGeocodes.subList(0, Math.min(CACHES_PER_BATCH, allGeocodes.size()));
- exportBatch(gpx, batch);
- batch.clear();
- }
-
- gpx.endTag(PREFIX_GPX, "gpx");
- gpx.endDocument();
+ @Override
+ public void publishProgress(int countExported) {
+ ExportTask.this.publishProgress(countExported);
+ }
+ });
} catch (final Exception e) {
Log.e("GpxExport.ExportTask export", e);
if (writer != null) {
try {
writer.close();
- } catch (IOException e1) {
+ } catch (final IOException e1) {
// Ignore double error
}
}
@@ -194,184 +153,13 @@ class GpxExport extends AbstractExport {
return exportFile;
}
- private void exportBatch(final XmlSerializer gpx, Collection<String> geocodesOfBatch) throws IOException {
- Set<Geocache> caches = cgData.loadCaches(geocodesOfBatch, LoadFlags.LOAD_ALL_DB_ONLY);
- for (Geocache cache : caches) {
- gpx.startTag(PREFIX_GPX, "wpt");
- gpx.attribute("", "lat", Double.toString(cache.getCoords().getLatitude()));
- gpx.attribute("", "lon", Double.toString(cache.getCoords().getLongitude()));
-
- final Date hiddenDate = cache.getHiddenDate();
- if (hiddenDate != null) {
- XmlUtils.simpleText(gpx, PREFIX_GPX, "time", dateFormatZ.format(hiddenDate));
- }
-
- XmlUtils.multipleTexts(gpx, PREFIX_GPX,
- "name", cache.getGeocode(),
- "desc", cache.getName(),
- "url", cache.getUrl(),
- "urlname", cache.getName(),
- "sym", cache.isFound() ? "Geocache Found" : "Geocache",
- "type", "Geocache|" + cache.getType().pattern);
-
- gpx.startTag(PREFIX_GROUNDSPEAK, "cache");
- gpx.attribute("", "id", cache.getCacheId());
- gpx.attribute("", "available", !cache.isDisabled() ? "True" : "False");
- gpx.attribute("", "archives", cache.isArchived() ? "True" : "False");
-
- XmlUtils.multipleTexts(gpx, PREFIX_GROUNDSPEAK,
- "name", cache.getName(),
- "placed_by", cache.getOwnerDisplayName(),
- "owner", cache.getOwnerUserId(),
- "type", cache.getType().pattern,
- "container", cache.getSize().id,
- "difficulty", Float.toString(cache.getDifficulty()),
- "terrain", Float.toString(cache.getTerrain()),
- "country", cache.getLocation(),
- "state", "",
- "encoded_hints", cache.getHint());
-
- writeAttributes(gpx, cache);
-
- gpx.startTag(PREFIX_GROUNDSPEAK, "short_description");
- gpx.attribute("", "html", TextUtils.containsHtml(cache.getShortDescription()) ? "True" : "False");
- gpx.text(cache.getShortDescription());
- gpx.endTag(PREFIX_GROUNDSPEAK, "short_description");
-
- gpx.startTag(PREFIX_GROUNDSPEAK, "long_description");
- gpx.attribute("", "html", TextUtils.containsHtml(cache.getDescription()) ? "True" : "False");
- gpx.text(cache.getDescription());
- gpx.endTag(PREFIX_GROUNDSPEAK, "long_description");
-
- writeLogs(gpx, cache);
-
- gpx.endTag(PREFIX_GROUNDSPEAK, "cache");
- gpx.endTag(PREFIX_GPX, "wpt");
-
- writeWaypoints(gpx, cache);
-
- countExported++;
- publishProgress(countExported);
- }
- }
-
- private void writeWaypoints(final XmlSerializer gpx, final Geocache cache) throws IOException {
- List<Waypoint> waypoints = cache.getWaypoints();
- List<Waypoint> ownWaypoints = new ArrayList<Waypoint>(waypoints.size());
- List<Waypoint> originWaypoints = new ArrayList<Waypoint>(waypoints.size());
- for (Waypoint wp : cache.getWaypoints()) {
- if (wp.isUserDefined()) {
- ownWaypoints.add(wp);
- } else {
- originWaypoints.add(wp);
- }
- }
- int maxPrefix = 0;
- for (Waypoint wp : originWaypoints) {
- String prefix = wp.getPrefix();
- try {
- final int numericPrefix = Integer.parseInt(prefix);
- maxPrefix = Math.max(numericPrefix, maxPrefix);
- } catch (NumberFormatException ex) {
- // ignore non numeric prefix, as it should be unique in the list of non-own waypoints already
- }
- writeCacheWaypoint(gpx, wp, prefix);
- }
- // Prefixes must be unique. There use numeric strings as prefixes in OWN waypoints
- for (Waypoint wp : ownWaypoints) {
- maxPrefix++;
- String prefix = StringUtils.leftPad(String.valueOf(maxPrefix), 2, '0');
- writeCacheWaypoint(gpx, wp, prefix);
- }
- }
-
- /**
- * Writes one waypoint entry for cache waypoint.
- *
- * @param cache
- * The
- * @param wp
- * @param prefix
- * @throws IOException
- */
- private void writeCacheWaypoint(final XmlSerializer gpx, final Waypoint wp, final String prefix) throws IOException {
- final Geopoint coords = wp.getCoords();
- // TODO: create some extension to GPX to include waypoint without coords
- if (coords != null) {
- gpx.startTag(PREFIX_GPX, "wpt");
- gpx.attribute("", "lat", Double.toString(coords.getLatitude()));
- gpx.attribute("", "lon", Double.toString(coords.getLongitude()));
- XmlUtils.multipleTexts(gpx, PREFIX_GPX,
- "name", prefix + wp.getGeocode().substring(2),
- "cmt", wp.getNote(),
- "desc", wp.getName(),
- "sym", wp.getWaypointType().toString(), //TODO: Correct identifier string
- "type", "Waypoint|" + wp.getWaypointType().toString()); //TODO: Correct identifier string
- gpx.endTag(PREFIX_GPX, "wpt");
- }
- }
-
- private void writeLogs(final XmlSerializer gpx, final Geocache cache) throws IOException {
- if (cache.getLogs().isEmpty()) {
- return;
- }
- gpx.startTag(PREFIX_GROUNDSPEAK, "logs");
-
- for (LogEntry log : cache.getLogs()) {
- gpx.startTag(PREFIX_GROUNDSPEAK, "log");
- gpx.attribute("", "id", Integer.toString(log.id));
-
- XmlUtils.multipleTexts(gpx, PREFIX_GROUNDSPEAK,
- "date", dateFormatZ.format(new Date(log.date)),
- "type", log.type.type);
-
- gpx.startTag(PREFIX_GROUNDSPEAK, "finder");
- gpx.attribute("", "id", "");
- gpx.text(log.author);
- gpx.endTag(PREFIX_GROUNDSPEAK, "finder");
-
- gpx.startTag(PREFIX_GROUNDSPEAK, "text");
- gpx.attribute("", "encoded", "False");
- gpx.text(log.log);
- gpx.endTag(PREFIX_GROUNDSPEAK, "text");
-
- gpx.endTag(PREFIX_GROUNDSPEAK, "log");
- }
-
- gpx.endTag(PREFIX_GROUNDSPEAK, "logs");
- }
-
- private void writeAttributes(final XmlSerializer gpx, final Geocache cache) throws IOException {
- if (cache.getAttributes().isEmpty()) {
- return;
- }
- //TODO: Attribute conversion required: English verbose name, gpx-id
- gpx.startTag(PREFIX_GROUNDSPEAK, "attributes");
-
- for (String attribute : cache.getAttributes()) {
- final CacheAttribute attr = CacheAttribute.getByRawName(CacheAttribute.trimAttributeName(attribute));
- if (attr == null) {
- continue;
- }
- final boolean enabled = CacheAttribute.isEnabled(attribute);
-
- gpx.startTag(PREFIX_GROUNDSPEAK, "attribute");
- gpx.attribute("", "id", Integer.toString(attr.gcid));
- gpx.attribute("", "inc", enabled ? "1" : "0");
- gpx.text(attr.getL10n(enabled));
- gpx.endTag(PREFIX_GROUNDSPEAK, "attribute");
- }
-
- gpx.endTag(PREFIX_GROUNDSPEAK, "attributes");
- }
-
@Override
protected void onPostExecuteInternal(final File exportFile) {
if (null != activity) {
if (exportFile != null) {
ActivityMixin.showToast(activity, getName() + ' ' + getString(R.string.export_exportedto) + ": " + exportFile.toString());
if (Settings.getShareAfterExport()) {
- Intent shareIntent = new Intent();
+ final Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(exportFile));
shareIntent.setType("application/xml");
diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java
new file mode 100644
index 0000000..2d25296
--- /dev/null
+++ b/main/src/cgeo/geocaching/export/GpxSerializer.java
@@ -0,0 +1,255 @@
+package cgeo.geocaching.export;
+
+import cgeo.geocaching.Geocache;
+import cgeo.geocaching.LogEntry;
+import cgeo.geocaching.Waypoint;
+import cgeo.geocaching.cgData;
+import cgeo.geocaching.enumerations.CacheAttribute;
+import cgeo.geocaching.enumerations.LoadFlags;
+import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.utils.TextUtils;
+import cgeo.geocaching.utils.XmlUtils;
+import cgeo.org.kxml2.io.KXmlSerializer;
+
+import org.apache.commons.lang3.StringUtils;
+import org.xmlpull.v1.XmlSerializer;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
+
+public final class GpxSerializer {
+
+ private static final SimpleDateFormat dateFormatZ = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US);
+ public static final String PREFIX_XSI = "http://www.w3.org/2001/XMLSchema-instance";
+ public static final String PREFIX_GPX = "http://www.topografix.com/GPX/1/0";
+ public static final String PREFIX_GROUNDSPEAK = "http://www.groundspeak.com/cache/1/0";
+
+ /**
+ * During the export, only this number of geocaches is fully loaded into memory.
+ */
+ public static final int CACHES_PER_BATCH = 100;
+
+ /**
+ * counter for exported caches, used for progress reporting
+ */
+ private int countExported;
+ private ProgressListener progressListener;
+ private final XmlSerializer gpx = new KXmlSerializer();
+
+ protected static interface ProgressListener {
+
+ void publishProgress(int countExported);
+
+ }
+
+ public void writeGPX(List<String> allGeocodesIn, Writer writer, final ProgressListener progressListener) throws IOException {
+ // create a copy of the geocode list, as we need to modify it, but it might be immutable
+ final ArrayList<String> allGeocodes = new ArrayList<String>(allGeocodesIn);
+
+ this.progressListener = progressListener;
+ gpx.setOutput(writer);
+
+ gpx.startDocument("UTF-8", true);
+ gpx.setPrefix("", PREFIX_GPX);
+ gpx.setPrefix("xsi", PREFIX_XSI);
+ gpx.setPrefix("groundspeak", PREFIX_GROUNDSPEAK);
+ gpx.startTag(PREFIX_GPX, "gpx");
+ gpx.attribute("", "version", "1.0");
+ gpx.attribute("", "creator", "c:geo - http://www.cgeo.org/");
+ gpx.attribute(PREFIX_XSI, "schemaLocation",
+ PREFIX_GPX + " http://www.topografix.com/GPX/1/0/gpx.xsd " +
+ PREFIX_GROUNDSPEAK + " http://www.groundspeak.com/cache/1/0/1/cache.xsd");
+
+ // Split the overall set of geocodes into small chunks. That is a compromise between memory efficiency (because
+ // we don't load all caches fully into memory) and speed (because we don't query each cache separately).
+ while (!allGeocodes.isEmpty()) {
+ final List<String> batch = allGeocodes.subList(0, Math.min(CACHES_PER_BATCH, allGeocodes.size()));
+ exportBatch(gpx, batch);
+ batch.clear();
+ }
+
+ gpx.endTag(PREFIX_GPX, "gpx");
+ gpx.endDocument();
+ }
+
+ private void exportBatch(final XmlSerializer gpx, Collection<String> geocodesOfBatch) throws IOException {
+ final Set<Geocache> caches = cgData.loadCaches(geocodesOfBatch, LoadFlags.LOAD_ALL_DB_ONLY);
+ for (final Geocache cache : caches) {
+ gpx.startTag(PREFIX_GPX, "wpt");
+ gpx.attribute("", "lat", Double.toString(cache.getCoords().getLatitude()));
+ gpx.attribute("", "lon", Double.toString(cache.getCoords().getLongitude()));
+
+ final Date hiddenDate = cache.getHiddenDate();
+ if (hiddenDate != null) {
+ XmlUtils.simpleText(gpx, PREFIX_GPX, "time", dateFormatZ.format(hiddenDate));
+ }
+
+ XmlUtils.multipleTexts(gpx, PREFIX_GPX,
+ "name", cache.getGeocode(),
+ "desc", cache.getName(),
+ "url", cache.getUrl(),
+ "urlname", cache.getName(),
+ "sym", cache.isFound() ? "Geocache Found" : "Geocache",
+ "type", "Geocache|" + cache.getType().pattern);
+
+ gpx.startTag(PREFIX_GROUNDSPEAK, "cache");
+ gpx.attribute("", "id", cache.getCacheId());
+ gpx.attribute("", "available", !cache.isDisabled() ? "True" : "False");
+ gpx.attribute("", "archives", cache.isArchived() ? "True" : "False");
+
+ XmlUtils.multipleTexts(gpx, PREFIX_GROUNDSPEAK,
+ "name", cache.getName(),
+ "placed_by", cache.getOwnerDisplayName(),
+ "owner", cache.getOwnerUserId(),
+ "type", cache.getType().pattern,
+ "container", cache.getSize().id,
+ "difficulty", Float.toString(cache.getDifficulty()),
+ "terrain", Float.toString(cache.getTerrain()),
+ "country", cache.getLocation(),
+ "state", "",
+ "encoded_hints", cache.getHint());
+
+ writeAttributes(cache);
+
+ gpx.startTag(PREFIX_GROUNDSPEAK, "short_description");
+ gpx.attribute("", "html", TextUtils.containsHtml(cache.getShortDescription()) ? "True" : "False");
+ gpx.text(cache.getShortDescription());
+ gpx.endTag(PREFIX_GROUNDSPEAK, "short_description");
+
+ gpx.startTag(PREFIX_GROUNDSPEAK, "long_description");
+ gpx.attribute("", "html", TextUtils.containsHtml(cache.getDescription()) ? "True" : "False");
+ gpx.text(cache.getDescription());
+ gpx.endTag(PREFIX_GROUNDSPEAK, "long_description");
+
+ writeLogs(cache);
+
+ gpx.endTag(PREFIX_GROUNDSPEAK, "cache");
+ gpx.endTag(PREFIX_GPX, "wpt");
+
+ writeWaypoints(cache);
+
+ countExported++;
+ if (progressListener != null) {
+ progressListener.publishProgress(countExported);
+ }
+ }
+ }
+
+ private void writeWaypoints(final Geocache cache) throws IOException {
+ final List<Waypoint> waypoints = cache.getWaypoints();
+ final List<Waypoint> ownWaypoints = new ArrayList<Waypoint>(waypoints.size());
+ final List<Waypoint> originWaypoints = new ArrayList<Waypoint>(waypoints.size());
+ for (final Waypoint wp : cache.getWaypoints()) {
+ if (wp.isUserDefined()) {
+ ownWaypoints.add(wp);
+ } else {
+ originWaypoints.add(wp);
+ }
+ }
+ int maxPrefix = 0;
+ for (final Waypoint wp : originWaypoints) {
+ final String prefix = wp.getPrefix();
+ try {
+ final int numericPrefix = Integer.parseInt(prefix);
+ maxPrefix = Math.max(numericPrefix, maxPrefix);
+ } catch (final NumberFormatException ex) {
+ // ignore non numeric prefix, as it should be unique in the list of non-own waypoints already
+ }
+ writeCacheWaypoint(wp, prefix);
+ }
+ // Prefixes must be unique. There use numeric strings as prefixes in OWN waypoints
+ for (final Waypoint wp : ownWaypoints) {
+ maxPrefix++;
+ final String prefix = StringUtils.leftPad(String.valueOf(maxPrefix), 2, '0');
+ writeCacheWaypoint(wp, prefix);
+ }
+ }
+
+ /**
+ * Writes one waypoint entry for cache waypoint.
+ *
+ * @param cache
+ * The
+ * @param wp
+ * @param prefix
+ * @throws IOException
+ */
+ private void writeCacheWaypoint(final Waypoint wp, final String prefix) throws IOException {
+ final Geopoint coords = wp.getCoords();
+ // TODO: create some extension to GPX to include waypoint without coords
+ if (coords != null) {
+ gpx.startTag(PREFIX_GPX, "wpt");
+ gpx.attribute("", "lat", Double.toString(coords.getLatitude()));
+ gpx.attribute("", "lon", Double.toString(coords.getLongitude()));
+ XmlUtils.multipleTexts(gpx, PREFIX_GPX,
+ "name", prefix + wp.getGeocode().substring(2),
+ "cmt", wp.getNote(),
+ "desc", wp.getName(),
+ "sym", wp.getWaypointType().toString(), //TODO: Correct identifier string
+ "type", "Waypoint|" + wp.getWaypointType().toString()); //TODO: Correct identifier string
+ gpx.endTag(PREFIX_GPX, "wpt");
+ }
+ }
+
+ private void writeLogs(final Geocache cache) throws IOException {
+ if (cache.getLogs().isEmpty()) {
+ return;
+ }
+ gpx.startTag(PREFIX_GROUNDSPEAK, "logs");
+
+ for (final LogEntry log : cache.getLogs()) {
+ gpx.startTag(PREFIX_GROUNDSPEAK, "log");
+ gpx.attribute("", "id", Integer.toString(log.id));
+
+ XmlUtils.multipleTexts(gpx, PREFIX_GROUNDSPEAK,
+ "date", dateFormatZ.format(new Date(log.date)),
+ "type", log.type.type);
+
+ gpx.startTag(PREFIX_GROUNDSPEAK, "finder");
+ gpx.attribute("", "id", "");
+ gpx.text(log.author);
+ gpx.endTag(PREFIX_GROUNDSPEAK, "finder");
+
+ gpx.startTag(PREFIX_GROUNDSPEAK, "text");
+ gpx.attribute("", "encoded", "False");
+ gpx.text(log.log);
+ gpx.endTag(PREFIX_GROUNDSPEAK, "text");
+
+ gpx.endTag(PREFIX_GROUNDSPEAK, "log");
+ }
+
+ gpx.endTag(PREFIX_GROUNDSPEAK, "logs");
+ }
+
+ private void writeAttributes(final Geocache cache) throws IOException {
+ if (cache.getAttributes().isEmpty()) {
+ return;
+ }
+ //TODO: Attribute conversion required: English verbose name, gpx-id
+ gpx.startTag(PREFIX_GROUNDSPEAK, "attributes");
+
+ for (final String attribute : cache.getAttributes()) {
+ final CacheAttribute attr = CacheAttribute.getByRawName(CacheAttribute.trimAttributeName(attribute));
+ if (attr == null) {
+ continue;
+ }
+ final boolean enabled = CacheAttribute.isEnabled(attribute);
+
+ gpx.startTag(PREFIX_GROUNDSPEAK, "attribute");
+ gpx.attribute("", "id", Integer.toString(attr.gcid));
+ gpx.attribute("", "inc", enabled ? "1" : "0");
+ gpx.text(attr.getL10n(enabled));
+ gpx.endTag(PREFIX_GROUNDSPEAK, "attribute");
+ }
+
+ gpx.endTag(PREFIX_GROUNDSPEAK, "attributes");
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/files/GPXImporter.java b/main/src/cgeo/geocaching/files/GPXImporter.java
index 10d791b..a1c04d7 100644
--- a/main/src/cgeo/geocaching/files/GPXImporter.java
+++ b/main/src/cgeo/geocaching/files/GPXImporter.java
@@ -3,7 +3,7 @@ package cgeo.geocaching.files;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.R;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.StaticMapsProvider;
import cgeo.geocaching.cgData;
import cgeo.geocaching.activity.IAbstractActivity;
@@ -57,12 +57,12 @@ public class GPXImporter {
private static final List<String> GPX_MIME_TYPES = Arrays.asList("text/xml", "application/xml");
private static final List<String> ZIP_MIME_TYPES = Arrays.asList("application/zip", "application/x-compressed", "application/x-zip-compressed", "application/x-zip", "application/octet-stream");
- private Progress progress = new Progress(true);
+ private final Progress progress = new Progress(true);
- private Resources res;
- private int listId;
- private IAbstractActivity fromActivity;
- private Handler importFinishedHandler;
+ private final Resources res;
+ private final int listId;
+ private final IAbstractActivity fromActivity;
+ private final Handler importFinishedHandler;
public GPXImporter(final IAbstractActivity fromActivity, final int listId, final Handler importFinishedHandler) {
this.listId = listId;
@@ -143,14 +143,12 @@ public class GPXImporter {
final Collection<Geocache> caches = doImport();
Log.i("Imported successfully " + caches.size() + " caches.");
- final SearchResult search = new SearchResult();
- for (Geocache cache : caches) {
- search.addAndPutInCache(cache);
- }
+ final SearchResult search = new SearchResult(caches);
+ // Do not put imported caches into the cachecache. That would consume lots of memory for no benefit.
if (Settings.isStoreOfflineMaps() || Settings.isStoreOfflineWpMaps()) {
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_STORE_STATIC_MAPS, R.string.gpx_import_store_static_maps, search.getCount()));
- boolean finishedWithoutCancel = importStaticMaps(search);
+ final boolean finishedWithoutCancel = importStaticMaps(search);
// Skip last message if static maps where canceled
if (!finishedWithoutCancel) {
return;
@@ -158,16 +156,16 @@ public class GPXImporter {
}
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_FINISHED, search.getCount(), 0, search));
- } catch (IOException e) {
+ } catch (final IOException e) {
Log.i("Importing caches failed - error reading data: ", e);
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_FINISHED_WITH_ERROR, R.string.gpx_import_error_io, 0, e.getLocalizedMessage()));
- } catch (ParserException e) {
+ } catch (final ParserException e) {
Log.i("Importing caches failed - data format error", e);
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_FINISHED_WITH_ERROR, R.string.gpx_import_error_parser, 0, e.getLocalizedMessage()));
- } catch (CancellationException e) {
+ } catch (final CancellationException e) {
Log.i("Importing caches canceled");
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_CANCELED));
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Importing caches failed - unknown error: ", e);
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_FINISHED_WITH_ERROR, R.string.gpx_import_error_unexpected, 0, e.getLocalizedMessage()));
}
@@ -207,14 +205,14 @@ public class GPXImporter {
protected Collection<Geocache> doImport() throws IOException, ParserException {
Log.i("Import LOC file: " + file.getAbsolutePath());
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_READ_FILE, R.string.gpx_import_loading_caches, (int) file.length()));
- LocParser parser = new LocParser(listId);
+ final LocParser parser = new LocParser(listId);
return parser.parse(file, progressHandler);
}
}
static class ImportLocAttachmentThread extends ImportThread {
private final Uri uri;
- private ContentResolver contentResolver;
+ private final ContentResolver contentResolver;
public ImportLocAttachmentThread(Uri uri, ContentResolver contentResolver, int listId, Handler importStepHandler, CancellableHandler progressHandler) {
super(listId, importStepHandler, progressHandler);
@@ -226,8 +224,8 @@ public class GPXImporter {
protected Collection<Geocache> doImport() throws IOException, ParserException {
Log.i("Import LOC from uri: " + uri);
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_READ_FILE, R.string.gpx_import_loading_caches, -1));
- InputStream is = contentResolver.openInputStream(uri);
- LocParser parser = new LocParser(listId);
+ final InputStream is = contentResolver.openInputStream(uri);
+ final LocParser parser = new LocParser(listId);
try {
return parser.parse(is, progressHandler);
} finally {
@@ -247,7 +245,7 @@ public class GPXImporter {
try {
// try to parse cache file as GPX 10
return doImport(new GPX10Parser(listId));
- } catch (ParserException pe) {
+ } catch (final ParserException pe) {
// didn't work -> lets try GPX11
return doImport(new GPX11Parser(listId));
}
@@ -285,7 +283,7 @@ public class GPXImporter {
static class ImportGpxAttachmentThread extends ImportGpxThread {
private final Uri uri;
- private ContentResolver contentResolver;
+ private final ContentResolver contentResolver;
public ImportGpxAttachmentThread(Uri uri, ContentResolver contentResolver, int listId, Handler importStepHandler, CancellableHandler progressHandler) {
super(listId, importStepHandler, progressHandler);
@@ -297,7 +295,7 @@ public class GPXImporter {
protected Collection<Geocache> doImport(GPXParser parser) throws IOException, ParserException {
Log.i("Import GPX from uri: " + uri);
importStepHandler.sendMessage(importStepHandler.obtainMessage(IMPORT_STEP_READ_FILE, R.string.gpx_import_loading_caches, -1));
- InputStream is = contentResolver.openInputStream(uri);
+ final InputStream is = contentResolver.openInputStream(uri);
try {
return parser.parse(is, progressHandler);
} finally {
@@ -371,7 +369,7 @@ public class GPXImporter {
static class ImportGpxZipAttachmentThread extends ImportGpxZipThread {
private final Uri uri;
- private ContentResolver contentResolver;
+ private final ContentResolver contentResolver;
public ImportGpxZipAttachmentThread(Uri uri, ContentResolver contentResolver, int listId, Handler importStepHandler, CancellableHandler progressHandler) {
super(listId, importStepHandler, progressHandler);
@@ -394,13 +392,11 @@ public class GPXImporter {
};
final private Handler importStepHandler = new Handler() {
- private boolean showProgressAfterCancel = false;
-
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case IMPORT_STEP_START:
- Message cancelMessage = importStepHandler.obtainMessage(IMPORT_STEP_CANCEL);
+ final Message cancelMessage = importStepHandler.obtainMessage(IMPORT_STEP_CANCEL);
progress.show((Context) fromActivity, res.getString(R.string.gpx_import_title_reading_file), res.getString(R.string.gpx_import_loading_caches), ProgressDialog.STYLE_HORIZONTAL, cancelMessage);
break;
@@ -412,7 +408,7 @@ public class GPXImporter {
case IMPORT_STEP_STORE_STATIC_MAPS:
progress.dismiss();
- Message skipMessage = importStepHandler.obtainMessage(IMPORT_STEP_STATIC_MAPS_SKIPPED, msg.arg2, 0);
+ final Message skipMessage = importStepHandler.obtainMessage(IMPORT_STEP_STATIC_MAPS_SKIPPED, msg.arg2, 0);
progress.show((Context) fromActivity, res.getString(R.string.gpx_import_title_static_maps), res.getString(R.string.gpx_import_store_static_maps), ProgressDialog.STYLE_HORIZONTAL, skipMessage);
progress.setMaxProgressAndReset(msg.arg2);
break;
@@ -420,7 +416,7 @@ public class GPXImporter {
case IMPORT_STEP_STATIC_MAPS_SKIPPED:
progress.dismiss();
progressHandler.cancel();
- StringBuilder bufferSkipped = new StringBuilder(20);
+ final StringBuilder bufferSkipped = new StringBuilder(20);
bufferSkipped.append(res.getString(R.string.gpx_import_static_maps_skipped)).append(", ").append(msg.arg1).append(' ').append(res.getString(R.string.gpx_import_caches_imported));
fromActivity.helpDialog(res.getString(R.string.gpx_import_title_caches_imported), bufferSkipped.toString());
importFinished();
@@ -444,11 +440,8 @@ public class GPXImporter {
break;
case IMPORT_STEP_CANCELED:
- StringBuilder bufferCanceled = new StringBuilder(20);
+ final StringBuilder bufferCanceled = new StringBuilder(20);
bufferCanceled.append(res.getString(R.string.gpx_import_canceled));
- if (showProgressAfterCancel) {
- bufferCanceled.append(", ").append(progress.getProgress()).append(' ').append(res.getString(R.string.gpx_import_caches_imported));
- }
fromActivity.showShortToast(bufferCanceled.toString());
importFinished();
break;
@@ -469,13 +462,13 @@ public class GPXImporter {
return null;
}
final String gpxFileName = gpxfile.getName();
- File dir = gpxfile.getParentFile();
- String[] filenameList = dir.list();
- for (String filename : filenameList) {
+ final File dir = gpxfile.getParentFile();
+ final String[] filenameList = dir.list();
+ for (final String filename : filenameList) {
if (!StringUtils.containsIgnoreCase(filename, WAYPOINTS_FILE_SUFFIX)) {
continue;
}
- String expectedGpxFileName = StringUtils.substringBeforeLast(filename, WAYPOINTS_FILE_SUFFIX)
+ final String expectedGpxFileName = StringUtils.substringBeforeLast(filename, WAYPOINTS_FILE_SUFFIX)
+ StringUtils.substringAfterLast(filename, WAYPOINTS_FILE_SUFFIX);
if (gpxFileName.equals(expectedGpxFileName)) {
return filename;
diff --git a/main/src/cgeo/geocaching/files/GPXParser.java b/main/src/cgeo/geocaching/files/GPXParser.java
index 8412207..76e3713 100644
--- a/main/src/cgeo/geocaching/files/GPXParser.java
+++ b/main/src/cgeo/geocaching/files/GPXParser.java
@@ -54,13 +54,13 @@ public abstract class GPXParser extends FileParser {
/**
* Attention: case sensitive geocode pattern to avoid matching normal words in the name or description of the cache.
*/
- private static final Pattern patternGeocode = Pattern.compile("([A-Z][0-9A-Z]+)");
- private static final Pattern patternGuid = Pattern.compile(".*" + Pattern.quote("guid=") + "([0-9a-z\\-]+)", Pattern.CASE_INSENSITIVE);
- private static final Pattern patternUrlGeocode = Pattern.compile(".*" + Pattern.quote("wp=") + "([A-Z][0-9A-Z]+)", Pattern.CASE_INSENSITIVE);
+ private static final Pattern PATTERN_GEOCODE = Pattern.compile("([A-Z][0-9A-Z]+)");
+ private static final Pattern PATTERN_GUID = Pattern.compile(".*" + Pattern.quote("guid=") + "([0-9a-z\\-]+)", Pattern.CASE_INSENSITIVE);
+ private static final Pattern PATTERN_URL_GEOCODE = Pattern.compile(".*" + Pattern.quote("wp=") + "([A-Z][0-9A-Z]+)", Pattern.CASE_INSENSITIVE);
/**
* supported groundspeak extensions of the GPX format
*/
- private static final String[] nsGCList = new String[] {
+ private static final String[] GROUNDSPEAK_NAMESPACE = new String[] {
"http://www.groundspeak.com/cache/1/1", // PQ 1.1
"http://www.groundspeak.com/cache/1/0/1", // PQ 1.0.1
"http://www.groundspeak.com/cache/1/0", // PQ 1.0
@@ -206,7 +206,7 @@ public abstract class GPXParser extends FileParser {
String stringName;
try {
stringName = cgeoapplication.getInstance().getResources().getResourceName(stringId);
- } catch (NullPointerException e) {
+ } catch (final NullPointerException e) {
return null;
}
if (stringName == null) {
@@ -272,7 +272,7 @@ public abstract class GPXParser extends FileParser {
Double.valueOf(longitude)));
}
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("Failed to parse waypoint's latitude and/or longitude.");
}
}
@@ -313,6 +313,8 @@ public abstract class GPXParser extends FileParser {
// finally store the cache in the database
result.add(geocode);
cgData.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+
+ // avoid the cachecache using lots of memory for caches which the user did not actually look at
cgData.removeAllFromCache();
showProgressMessage(progressHandler, progressStream.getProgress());
} else if (StringUtils.isNotBlank(cache.getName())
@@ -361,7 +363,7 @@ public abstract class GPXParser extends FileParser {
public void end(String body) {
try {
cache.setHidden(parseDate(body));
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("Failed to parse cache date", e);
}
}
@@ -432,16 +434,16 @@ public abstract class GPXParser extends FileParser {
@Override
public void end(String url) {
- final MatcherWrapper matcher = new MatcherWrapper(patternGuid, url);
+ final MatcherWrapper matcher = new MatcherWrapper(PATTERN_GUID, url);
if (matcher.matches()) {
final String guid = matcher.group(1);
if (StringUtils.isNotBlank(guid)) {
cache.setGuid(guid);
}
}
- final MatcherWrapper matcherCode = new MatcherWrapper(patternUrlGeocode, url);
+ final MatcherWrapper matcherCode = new MatcherWrapper(PATTERN_URL_GEOCODE, url);
if (matcherCode.matches()) {
- String geocode = matcherCode.group(1);
+ final String geocode = matcherCode.group(1);
cache.setGeocode(geocode);
}
}
@@ -463,7 +465,7 @@ public abstract class GPXParser extends FileParser {
final Element cacheParent = getCacheParent(waypoint);
// GSAK extensions
- for (String gsakNamespace : GSAK_NS) {
+ for (final String gsakNamespace : GSAK_NS) {
final Element gsak = cacheParent.getChild(gsakNamespace, "wptExtension");
gsak.getChild(gsakNamespace, "Watch").setEndTextElementListener(new EndTextElementListener() {
@@ -481,7 +483,7 @@ public abstract class GPXParser extends FileParser {
}
// 3 different versions of the GC schema
- for (String nsGC : nsGCList) {
+ for (final String nsGC : GROUNDSPEAK_NAMESPACE) {
// waypoints.cache
final Element gcCache = cacheParent.getChild(nsGC, "cache");
@@ -499,7 +501,7 @@ public abstract class GPXParser extends FileParser {
if (attrs.getIndex("available") > -1) {
cache.setDisabled(!attrs.getValue("available").equalsIgnoreCase("true"));
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("Failed to parse cache attributes.");
}
}
@@ -568,14 +570,14 @@ public abstract class GPXParser extends FileParser {
public void start(Attributes attrs) {
try {
if (attrs.getIndex("id") > -1 && attrs.getIndex("inc") > -1) {
- int attributeId = Integer.parseInt(attrs.getValue("id"));
- boolean attributeActive = Integer.parseInt(attrs.getValue("inc")) != 0;
- String internalId = CacheAttributeTranslator.getInternalId(attributeId, attributeActive);
+ final int attributeId = Integer.parseInt(attrs.getValue("id"));
+ final boolean attributeActive = Integer.parseInt(attrs.getValue("inc")) != 0;
+ final String internalId = CacheAttributeTranslator.getInternalId(attributeId, attributeActive);
if (internalId != null) {
cache.getAttributes().add(internalId);
}
}
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
// nothing
}
}
@@ -588,7 +590,7 @@ public abstract class GPXParser extends FileParser {
public void end(String body) {
try {
cache.setDifficulty(Float.parseFloat(body));
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
Log.w("Failed to parse difficulty", e);
}
}
@@ -601,7 +603,7 @@ public abstract class GPXParser extends FileParser {
public void end(String body) {
try {
cache.setTerrain(Float.parseFloat(body));
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
Log.w("Failed to parse terrain", e);
}
}
@@ -625,7 +627,7 @@ public abstract class GPXParser extends FileParser {
@Override
public void end(String state) {
- String trimmedState = state.trim();
+ final String trimmedState = state.trim();
if (StringUtils.isNotEmpty(trimmedState)) { // state can be completely empty
if (StringUtils.isBlank(cache.getLocation())) {
cache.setLocation(validate(state));
@@ -678,7 +680,7 @@ public abstract class GPXParser extends FileParser {
if (attrs.getIndex("ref") > -1) {
trackable.setGeocode(attrs.getValue("ref"));
}
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing
}
}
@@ -722,7 +724,7 @@ public abstract class GPXParser extends FileParser {
if (attrs.getIndex("id") > -1) {
log.id = Integer.parseInt(attrs.getValue("id"));
}
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing
}
}
@@ -745,7 +747,7 @@ public abstract class GPXParser extends FileParser {
public void end(String body) {
try {
log.date = parseDate(body).getTime();
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("Failed to parse log date", e);
}
}
@@ -784,7 +786,7 @@ public abstract class GPXParser extends FileParser {
progressStream = new ProgressInputStream(stream);
Xml.parse(progressStream, Xml.Encoding.UTF_8, root.getContentHandler());
return cgData.loadCaches(result, EnumSet.of(LoadFlag.LOAD_DB_MINIMAL));
- } catch (SAXException e) {
+ } catch (final SAXException e) {
Log.w("Cannot parse .gpx file as GPX " + version + ": could not parse XML - ", e);
throw new ParserException("Cannot parse .gpx file as GPX " + version + ": could not parse XML", e);
}
@@ -831,7 +833,7 @@ public abstract class GPXParser extends FileParser {
return WaypointType.FINAL;
}
// this is not fully correct, but lets also look for localized waypoint types
- for (WaypointType waypointType : WaypointType.ALL_TYPES_EXCEPT_OWN_AND_ORIGINAL) {
+ for (final WaypointType waypointType : WaypointType.ALL_TYPES_EXCEPT_OWN_AND_ORIGINAL) {
final String localized = waypointType.getL10n();
if (StringUtils.isNotEmpty(localized)) {
if (localized.equalsIgnoreCase(sym)) {
@@ -847,7 +849,7 @@ public abstract class GPXParser extends FileParser {
return;
}
final String trimmed = input.trim();
- final MatcherWrapper matcherGeocode = new MatcherWrapper(patternGeocode, trimmed);
+ final MatcherWrapper matcherGeocode = new MatcherWrapper(PATTERN_GEOCODE, trimmed);
if (matcherGeocode.find()) {
final String geocode = matcherGeocode.group(1);
// a geocode should not be part of a word
diff --git a/main/src/cgeo/geocaching/files/LocalStorage.java b/main/src/cgeo/geocaching/files/LocalStorage.java
index 0f3e0e1..ec09433 100644
--- a/main/src/cgeo/geocaching/files/LocalStorage.java
+++ b/main/src/cgeo/geocaching/files/LocalStorage.java
@@ -31,6 +31,9 @@ import java.io.OutputStream;
*/
public class LocalStorage {
+ public static final String HEADER_LAST_MODIFIED = "last-modified";
+ public static final String HEADER_ETAG = "etag";
+
/** Name of the local private directory used to hold cached information */
public final static String cache = ".cgeo";
@@ -177,8 +180,8 @@ public class LocalStorage {
try {
final boolean saved = saveToFile(response.getEntity().getContent(), targetFile);
- saveHeader("etag", saved ? response : null, targetFile);
- saveHeader("last-modified", saved ? response : null, targetFile);
+ saveHeader(HEADER_ETAG, saved ? response : null, targetFile);
+ saveHeader(HEADER_LAST_MODIFIED, saved ? response : null, targetFile);
return saved;
} catch (IOException e) {
Log.e("LocalStorage.saveEntityToFile", e);
diff --git a/main/src/cgeo/geocaching/filter/AbstractFilter.java b/main/src/cgeo/geocaching/filter/AbstractFilter.java
index bc99959..6bd8587 100644
--- a/main/src/cgeo/geocaching/filter/AbstractFilter.java
+++ b/main/src/cgeo/geocaching/filter/AbstractFilter.java
@@ -8,12 +8,12 @@ import java.util.List;
abstract class AbstractFilter implements IFilter {
private final String name;
- protected AbstractFilter(String name) {
+ protected AbstractFilter(final String name) {
this.name = name;
}
@Override
- public void filter(List<Geocache> list) {
+ public void filter(final List<Geocache> list) {
final List<Geocache> itemsToRemove = new ArrayList<Geocache>();
for (Geocache item : list) {
if (!accepts(item)) {
@@ -30,7 +30,7 @@ abstract class AbstractFilter implements IFilter {
/*
* show name in array adapter
- *
+ *
* @see java.lang.Object#toString()
*/
@Override
diff --git a/main/src/cgeo/geocaching/filter/AbstractRangeFilter.java b/main/src/cgeo/geocaching/filter/AbstractRangeFilter.java
index e84174a..96d256a 100644
--- a/main/src/cgeo/geocaching/filter/AbstractRangeFilter.java
+++ b/main/src/cgeo/geocaching/filter/AbstractRangeFilter.java
@@ -8,7 +8,7 @@ abstract class AbstractRangeFilter extends AbstractFilter {
protected final float rangeMin;
protected final float rangeMax;
- protected AbstractRangeFilter(int ressourceId, int range) {
+ protected AbstractRangeFilter(final int ressourceId, final int range) {
super(cgeoapplication.getInstance().getResources().getString(ressourceId) + ' ' + (range == 5 ? '5' : range + " + " + String.format("%.1f", range + 0.5)));
this.rangeMin = range;
rangeMax = rangeMin + 1f;
diff --git a/main/src/cgeo/geocaching/filter/DifficultyFilter.java b/main/src/cgeo/geocaching/filter/DifficultyFilter.java
index 8099a51..438c25a 100644
--- a/main/src/cgeo/geocaching/filter/DifficultyFilter.java
+++ b/main/src/cgeo/geocaching/filter/DifficultyFilter.java
@@ -8,21 +8,25 @@ import java.util.List;
class DifficultyFilter extends AbstractRangeFilter {
- public DifficultyFilter(int difficulty) {
+ public DifficultyFilter(final int difficulty) {
super(R.string.cache_difficulty, difficulty);
}
@Override
- public boolean accepts(Geocache cache) {
- return rangeMin <= cache.getDifficulty() && cache.getDifficulty() < rangeMax;
+ public boolean accepts(final Geocache cache) {
+ final float difficulty = cache.getDifficulty();
+ return rangeMin <= difficulty && difficulty < rangeMax;
}
public static class Factory implements IFilterFactory {
+ private static final int DIFFICULTY_MIN = 1;
+ private static final int DIFFICULTY_MAX = 5;
+
@Override
public List<IFilter> getFilters() {
- final ArrayList<IFilter> filters = new ArrayList<IFilter>(5);
- for (int difficulty = 1; difficulty <= 5; difficulty++) {
+ final ArrayList<IFilter> filters = new ArrayList<IFilter>(DIFFICULTY_MAX);
+ for (int difficulty = DIFFICULTY_MIN; difficulty <= DIFFICULTY_MAX; difficulty++) {
filters.add(new DifficultyFilter(difficulty));
}
return filters;
diff --git a/main/src/cgeo/geocaching/filter/FilterUserInterface.java b/main/src/cgeo/geocaching/filter/FilterUserInterface.java
index a31415d..2404f44 100644
--- a/main/src/cgeo/geocaching/filter/FilterUserInterface.java
+++ b/main/src/cgeo/geocaching/filter/FilterUserInterface.java
@@ -1,9 +1,9 @@
package cgeo.geocaching.filter;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.enumerations.CacheType;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.RunnableWithArgument;
@@ -61,7 +61,7 @@ public final class FilterUserInterface {
Collections.sort(registry, new Comparator<FactoryEntry>() {
@Override
- public int compare(FactoryEntry lhs, FactoryEntry rhs) {
+ public int compare(final FactoryEntry lhs, final FactoryEntry rhs) {
return lhs.name.compareToIgnoreCase(rhs.name);
}
});
@@ -70,7 +70,7 @@ public final class FilterUserInterface {
register(R.string.caches_filter_clear, null);
}
- private void register(int resourceId, Class<? extends IFilterFactory> factoryClass) {
+ private void register(final int resourceId, final Class<? extends IFilterFactory> factoryClass) {
registry.add(new FactoryEntry(res.getString(resourceId), factoryClass));
}
@@ -82,7 +82,7 @@ public final class FilterUserInterface {
builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int itemIndex) {
+ public void onClick(final DialogInterface dialog, final int itemIndex) {
FactoryEntry entry = adapter.getItem(itemIndex);
// reset?
if (entry.filterFactory == null) {
@@ -115,7 +115,7 @@ public final class FilterUserInterface {
final ArrayAdapter<IFilter> adapter = new ArrayAdapter<IFilter>(activity, android.R.layout.select_dialog_item, filters);
builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int item) {
+ public void onClick(final DialogInterface dialog, final int item) {
runAfterwards.run(filters.get(item));
}
});
diff --git a/main/src/cgeo/geocaching/filter/IFilter.java b/main/src/cgeo/geocaching/filter/IFilter.java
index 4a428f8..4fafe6f 100644
--- a/main/src/cgeo/geocaching/filter/IFilter.java
+++ b/main/src/cgeo/geocaching/filter/IFilter.java
@@ -6,13 +6,13 @@ import java.util.List;
public interface IFilter {
- public abstract String getName();
+ String getName();
/**
* @param cache
* @return true if the filter accepts the cache, false otherwise
*/
- public abstract boolean accepts(final Geocache cache);
+ boolean accepts(final Geocache cache);
- public void filter(final List<Geocache> list);
+ void filter(final List<Geocache> list);
} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/filter/IFilterFactory.java b/main/src/cgeo/geocaching/filter/IFilterFactory.java
index e750639..afc99af 100644
--- a/main/src/cgeo/geocaching/filter/IFilterFactory.java
+++ b/main/src/cgeo/geocaching/filter/IFilterFactory.java
@@ -3,5 +3,5 @@ package cgeo.geocaching.filter;
import java.util.List;
interface IFilterFactory {
- public List<? extends IFilter> getFilters();
+ List<? extends IFilter> getFilters();
}
diff --git a/main/src/cgeo/geocaching/filter/OriginFilter.java b/main/src/cgeo/geocaching/filter/OriginFilter.java
index bd4e41e..8c54a4c 100644
--- a/main/src/cgeo/geocaching/filter/OriginFilter.java
+++ b/main/src/cgeo/geocaching/filter/OriginFilter.java
@@ -13,13 +13,13 @@ public class OriginFilter extends AbstractFilter {
private final IConnector connector;
- public OriginFilter(IConnector connector) {
+ public OriginFilter(final IConnector connector) {
super(connector.getName());
this.connector = connector;
}
@Override
- public boolean accepts(Geocache cache) {
+ public final boolean accepts(final Geocache cache) {
return ConnectorFactory.getConnector(cache) == connector;
}
@@ -36,7 +36,7 @@ public class OriginFilter extends AbstractFilter {
Collections.sort(filters, new Comparator<OriginFilter>() {
@Override
- public int compare(OriginFilter lhs, OriginFilter rhs) {
+ public int compare(final OriginFilter lhs, final OriginFilter rhs) {
return lhs.getName().compareToIgnoreCase(rhs.getName());
}
});
diff --git a/main/src/cgeo/geocaching/filter/SizeFilter.java b/main/src/cgeo/geocaching/filter/SizeFilter.java
index 8ddc475..13c1d87 100644
--- a/main/src/cgeo/geocaching/filter/SizeFilter.java
+++ b/main/src/cgeo/geocaching/filter/SizeFilter.java
@@ -9,13 +9,13 @@ import java.util.List;
class SizeFilter extends AbstractFilter {
private final CacheSize cacheSize;
- public SizeFilter(CacheSize cacheSize) {
+ public SizeFilter(final CacheSize cacheSize) {
super(cacheSize.id);
this.cacheSize = cacheSize;
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return cacheSize == cache.getSize();
}
diff --git a/main/src/cgeo/geocaching/filter/StateFilter.java b/main/src/cgeo/geocaching/filter/StateFilter.java
index e18128d..98589ab 100644
--- a/main/src/cgeo/geocaching/filter/StateFilter.java
+++ b/main/src/cgeo/geocaching/filter/StateFilter.java
@@ -13,9 +13,9 @@ import java.util.List;
abstract class StateFilter extends AbstractFilter {
- final static Resources res = cgeoapplication.getInstance().getResources();
+ static final Resources res = cgeoapplication.getInstance().getResources();
- protected StateFilter(String name) {
+ protected StateFilter(final String name) {
super(name);
}
@@ -26,7 +26,7 @@ abstract class StateFilter extends AbstractFilter {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return cache.isFound();
}
@@ -38,7 +38,7 @@ abstract class StateFilter extends AbstractFilter {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return cache.isArchived();
}
}
@@ -49,7 +49,7 @@ abstract class StateFilter extends AbstractFilter {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return cache.isDisabled();
}
}
@@ -60,7 +60,7 @@ abstract class StateFilter extends AbstractFilter {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return cache.isPremiumMembersOnly();
}
}
@@ -71,7 +71,7 @@ abstract class StateFilter extends AbstractFilter {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return !cache.isPremiumMembersOnly();
}
}
@@ -82,7 +82,7 @@ abstract class StateFilter extends AbstractFilter {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return cache.isLogOffline();
}
}
@@ -93,7 +93,7 @@ abstract class StateFilter extends AbstractFilter {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return cache.isOffline();
}
}
@@ -104,7 +104,7 @@ abstract class StateFilter extends AbstractFilter {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return !cache.isOffline();
}
}
@@ -126,7 +126,7 @@ abstract class StateFilter extends AbstractFilter {
Collections.sort(filters, new Comparator<StateFilter>() {
@Override
- public int compare(StateFilter filter1, StateFilter filter2) {
+ public int compare(final StateFilter filter1, final StateFilter filter2) {
return filter1.getName().compareToIgnoreCase(filter2.getName());
}
});
diff --git a/main/src/cgeo/geocaching/filter/TerrainFilter.java b/main/src/cgeo/geocaching/filter/TerrainFilter.java
index 87372c6..d74f954 100644
--- a/main/src/cgeo/geocaching/filter/TerrainFilter.java
+++ b/main/src/cgeo/geocaching/filter/TerrainFilter.java
@@ -8,20 +8,24 @@ import java.util.List;
class TerrainFilter extends AbstractRangeFilter {
- public TerrainFilter(int terrain) {
+ public TerrainFilter(final int terrain) {
super(R.string.cache_terrain, terrain);
}
@Override
- public boolean accepts(Geocache cache) {
- return rangeMin <= cache.getTerrain() && cache.getTerrain() < rangeMax;
+ public boolean accepts(final Geocache cache) {
+ final float terrain = cache.getTerrain();
+ return rangeMin <= terrain && terrain < rangeMax;
}
public static class Factory implements IFilterFactory {
+ private static final int TERRAIN_MIN = 1;
+ private static final int TERRAIN_MAX = 5;
+
@Override
public List<IFilter> getFilters() {
- final ArrayList<IFilter> filters = new ArrayList<IFilter>(5);
- for (int terrain = 1; terrain <= 5; terrain++) {
+ final ArrayList<IFilter> filters = new ArrayList<IFilter>(TERRAIN_MAX);
+ for (int terrain = TERRAIN_MIN; terrain <= TERRAIN_MAX; terrain++) {
filters.add(new TerrainFilter(terrain));
}
return filters;
diff --git a/main/src/cgeo/geocaching/filter/TrackablesFilter.java b/main/src/cgeo/geocaching/filter/TrackablesFilter.java
index 5eff8a7..74f43be 100644
--- a/main/src/cgeo/geocaching/filter/TrackablesFilter.java
+++ b/main/src/cgeo/geocaching/filter/TrackablesFilter.java
@@ -13,7 +13,7 @@ class TrackablesFilter extends AbstractFilter implements IFilterFactory {
}
@Override
- public boolean accepts(Geocache cache) {
+ public boolean accepts(final Geocache cache) {
return cache.hasTrackables();
}
diff --git a/main/src/cgeo/geocaching/gcvote/GCVote.java b/main/src/cgeo/geocaching/gcvote/GCVote.java
index f6cfb84..bbfddf1 100644
--- a/main/src/cgeo/geocaching/gcvote/GCVote.java
+++ b/main/src/cgeo/geocaching/gcvote/GCVote.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.gcvote;
import cgeo.geocaching.Geocache;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.utils.LeastRecentlyUsedMap;
diff --git a/main/src/cgeo/geocaching/geopoint/DistanceParser.java b/main/src/cgeo/geocaching/geopoint/DistanceParser.java
index 5a840a8..e3a7482 100644
--- a/main/src/cgeo/geocaching/geopoint/DistanceParser.java
+++ b/main/src/cgeo/geocaching/geopoint/DistanceParser.java
@@ -22,7 +22,8 @@ public final class DistanceParser {
* @throws NumberFormatException
* if the given number is invalid
*/
- public static float parseDistance(String distanceText, final boolean metricUnit) throws NumberFormatException {
+ public static float parseDistance(String distanceText, final boolean metricUnit)
+ throws NumberFormatException {
final MatcherWrapper matcher = new MatcherWrapper(pattern, distanceText);
if (!matcher.find()) {
diff --git a/main/src/cgeo/geocaching/geopoint/Geopoint.java b/main/src/cgeo/geocaching/geopoint/Geopoint.java
index 1973b03..e8a6dff 100644
--- a/main/src/cgeo/geocaching/geopoint/Geopoint.java
+++ b/main/src/cgeo/geocaching/geopoint/Geopoint.java
@@ -2,14 +2,8 @@ package cgeo.geocaching.geopoint;
import cgeo.geocaching.ICoordinates;
import cgeo.geocaching.R;
-import cgeo.geocaching.geopoint.GeopointFormatter.Format;
-import cgeo.geocaching.network.Network;
-import cgeo.geocaching.network.Parameters;
-import cgeo.geocaching.utils.Log;
import org.apache.commons.lang3.StringUtils;
-import org.json.JSONArray;
-import org.json.JSONObject;
import android.location.Location;
import android.os.Parcel;
@@ -323,34 +317,6 @@ public final class Geopoint implements ICoordinates, Parcelable {
}
}
- public Double getElevation() {
- try {
- final String uri = "http://maps.googleapis.com/maps/api/elevation/json";
- final Parameters params = new Parameters(
- "sensor", "false",
- "locations", format(Format.LAT_LON_DECDEGREE_COMMA));
- final JSONObject response = Network.requestJSON(uri, params);
-
- if (response == null) {
- return null;
- }
-
- if (!StringUtils.equalsIgnoreCase(response.getString("status"), "OK")) {
- return null;
- }
-
- if (response.has("results")) {
- JSONArray results = response.getJSONArray("results");
- JSONObject result = results.getJSONObject(0);
- return result.getDouble("elevation");
- }
- } catch (Exception e) {
- Log.w("Geopoint.getElevation", e);
- }
-
- return null;
- }
-
@Override
public Geopoint getCoords() {
return this;
diff --git a/main/src/cgeo/geocaching/geopoint/Units.java b/main/src/cgeo/geocaching/geopoint/Units.java
index 3da3ad9..b99e00e 100644
--- a/main/src/cgeo/geocaching/geopoint/Units.java
+++ b/main/src/cgeo/geocaching/geopoint/Units.java
@@ -1,6 +1,6 @@
package cgeo.geocaching.geopoint;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import org.apache.commons.lang3.tuple.ImmutablePair;
@@ -9,15 +9,7 @@ public class Units {
public static ImmutablePair<Double, String> scaleDistance(final double distanceKilometers) {
double distance;
String units;
- if (Settings.isUseMetricUnits()) {
- if (distanceKilometers >= 1) {
- distance = distanceKilometers;
- units = "km";
- } else {
- distance = distanceKilometers * 1000;
- units = "m";
- }
- } else {
+ if (Settings.isUseImperialUnits()) {
distance = distanceKilometers / IConversion.MILES_TO_KILOMETER;
if (distance >= 0.1) {
units = "mi";
@@ -25,6 +17,14 @@ public class Units {
distance *= 5280;
units = "ft";
}
+ } else {
+ if (distanceKilometers >= 1) {
+ distance = distanceKilometers;
+ units = "km";
+ } else {
+ distance = distanceKilometers * 1000;
+ units = "m";
+ }
}
return new ImmutablePair<Double, String>(distance, units);
}
@@ -47,18 +47,6 @@ public class Units {
return String.format(formatString + " %s", scaled.left, scaled.right);
}
- /**
- * Get human readable elevation, depending on settings for metric units.
- * Result is rounded to full meters/feet, as the sensors don't have that precision anyway.
- *
- * @param meters
- * @return
- */
- public static String getElevation(float meters) {
- final ImmutablePair<Double, String> scaled = scaleDistance(meters / 1000f);
- return (meters >= 0 ? "↥ " : "↧ ") + String.format("%d %s", Math.abs(Math.round(scaled.left)), scaled.right);
- }
-
public static String getDistanceFromMeters(float meters) {
return getDistanceFromKilometers(meters / 1000f);
}
@@ -68,6 +56,6 @@ public class Units {
if (speed.endsWith("mi")) {
return speed.substring(0, speed.length() - 2) + "mph";
}
- return speed + (Settings.isUseMetricUnits() ? "/h" : "ph");
+ return speed + (!Settings.isUseImperialUnits() ? "/h" : "ph");
}
}
diff --git a/main/src/cgeo/geocaching/loaders/AddressGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/AddressGeocacheListLoader.java
index efaaabc..dd7c7a6 100644
--- a/main/src/cgeo/geocaching/loaders/AddressGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/AddressGeocacheListLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.connector.gc.GCParser;
import android.content.Context;
diff --git a/main/src/cgeo/geocaching/loaders/CoordsGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/CoordsGeocacheListLoader.java
index 09ea459..34b3a61 100644
--- a/main/src/cgeo/geocaching/loaders/CoordsGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/CoordsGeocacheListLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.capability.ISearchByCenter;
import cgeo.geocaching.connector.gc.GCParser;
@@ -27,10 +27,7 @@ public class CoordsGeocacheListLoader extends AbstractSearchLoader {
for (ISearchByCenter centerConn : ConnectorFactory.getSearchByCenterConnectors()) {
if (centerConn.isActivated()) {
- SearchResult temp = centerConn.searchByCenter(coords);
- if (temp != null) {
- search.addGeocodes(temp.getGeocodes());
- }
+ search.addSearchResult(centerConn.searchByCenter(coords));
}
}
diff --git a/main/src/cgeo/geocaching/loaders/HistoryGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/HistoryGeocacheListLoader.java
index 90e22d1..722f9f5 100644
--- a/main/src/cgeo/geocaching/loaders/HistoryGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/HistoryGeocacheListLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgData;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.geopoint.Geopoint;
diff --git a/main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java
index 36b62d6..adfc423 100644
--- a/main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.connector.gc.GCParser;
import android.content.Context;
diff --git a/main/src/cgeo/geocaching/loaders/NextPageGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/NextPageGeocacheListLoader.java
index faae9de..1104f83 100644
--- a/main/src/cgeo/geocaching/loaders/NextPageGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/NextPageGeocacheListLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.connector.gc.GCParser;
import android.content.Context;
diff --git a/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java
index 0081aa1..ab8ba6a 100644
--- a/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgData;
import cgeo.geocaching.geopoint.Geopoint;
diff --git a/main/src/cgeo/geocaching/loaders/OwnerGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/OwnerGeocacheListLoader.java
index 3bed3f4..ea9b8ad 100644
--- a/main/src/cgeo/geocaching/loaders/OwnerGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/OwnerGeocacheListLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.connector.gc.GCParser;
import android.content.Context;
diff --git a/main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java b/main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java
index 63b4620..2229afe 100644
--- a/main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java
+++ b/main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgData;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.geopoint.Geopoint;
diff --git a/main/src/cgeo/geocaching/loaders/UsernameGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/UsernameGeocacheListLoader.java
index 5af0fe3..f8849d5 100644
--- a/main/src/cgeo/geocaching/loaders/UsernameGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/UsernameGeocacheListLoader.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.connector.gc.GCParser;
import android.content.Context;
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index c876192..f892622 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -5,7 +5,6 @@ import cgeo.geocaching.Geocache;
import cgeo.geocaching.IGeoData;
import cgeo.geocaching.R;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.StoredList;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.cgData;
@@ -14,9 +13,11 @@ import cgeo.geocaching.cgeocaches;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.gc.Login;
+import cgeo.geocaching.connector.gc.Tile;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LiveMapStrategy.Strategy;
import cgeo.geocaching.enumerations.LoadFlags;
+import cgeo.geocaching.enumerations.LoadFlags.RemoveFlag;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.geopoint.Geopoint;
@@ -30,6 +31,7 @@ import cgeo.geocaching.maps.interfaces.MapProvider;
import cgeo.geocaching.maps.interfaces.MapSource;
import cgeo.geocaching.maps.interfaces.MapViewImpl;
import cgeo.geocaching.maps.interfaces.OnMapDragListener;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.dialog.LiveMapInfoDialogBuilder;
import cgeo.geocaching.utils.AngleUtils;
import cgeo.geocaching.utils.CancellableHandler;
@@ -70,6 +72,7 @@ import android.widget.ViewSwitcher.ViewFactory;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -180,7 +183,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
/** Live mode enabled for map. **/
private boolean isLiveEnabled;
// other things
- private boolean liveChanged = false; // previous state for loadTimer
+ private boolean markersInvalidated = false; // previous state for loadTimer
private boolean centered = false; // if map is already centered
private boolean alreadyCentered = false; // -""- for setting my location
private static Set<String> dirtyCaches = null;
@@ -569,6 +572,13 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
item.setTitle(res.getString(R.string.map_live_enable));
}
+ item = menu.findItem(R.id.menu_mycaches_mode); // own & found caches
+ if (Settings.isExcludeMyCaches()) {
+ item.setTitle(res.getString(R.string.map_mycaches_show));
+ } else {
+ item.setTitle(res.getString(R.string.map_mycaches_hide));
+ }
+
final Set<String> geocodesInViewport = getGeocodesForCachesInViewport();
menu.findItem(R.id.menu_store_caches).setEnabled(!isLoading() && CollectionUtils.isNotEmpty(geocodesInViewport) && new SearchResult(geocodesInViewport).hasUnsavedCaches());
@@ -620,7 +630,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (mapMode == MapMode.LIVE) {
Settings.setLiveMap(isLiveEnabled);
}
- liveChanged = true;
+ markersInvalidated = true;
lastSearchResult = null;
searchIntent = null;
ActivityMixin.invalidateOptionsMenu(activity);
@@ -668,6 +678,14 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
mapView.repaintRequired(overlayCaches);
ActivityMixin.invalidateOptionsMenu(activity);
return true;
+ case R.id.menu_mycaches_mode:
+ Settings.setExcludeMine(!Settings.isExcludeMyCaches());
+ markersInvalidated = true;
+ ActivityMixin.invalidateOptionsMenu(activity);
+ if (!Settings.isExcludeMyCaches()) {
+ Tile.Cache.clear();
+ }
+ return true;
case R.id.menu_theme_mode:
selectMapTheme();
return true;
@@ -1016,7 +1034,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
// check if map moved or zoomed
//TODO Portree Use Rectangle inside with bigger search window. That will stop reloading on every move
- final boolean moved = liveChanged || (isLiveEnabled && !downloaded) || (viewport == null) || zoomNow != zoom ||
+ final boolean moved = markersInvalidated || (isLiveEnabled && !downloaded) || (viewport == null) || zoomNow != zoom ||
(mapMoved(viewport, viewportNow) && (cachesCnt <= 0 || CollectionUtils.isEmpty(caches) || !viewport.includes(viewportNow)));
// update title on any change
@@ -1027,7 +1045,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
// save new values
if (moved) {
- liveChanged = false;
+ markersInvalidated = false;
long currentTime = System.currentTimeMillis();
@@ -1082,8 +1100,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
// live mode search result
if (isLiveEnabled) {
- SearchResult liveResult = new SearchResult(cgData.loadCachedInViewport(viewport, Settings.getCacheType()));
- searchResult.addGeocodes(liveResult.getGeocodes());
+ searchResult.addSearchResult(cgData.loadCachedInViewport(viewport, Settings.getCacheType()));
}
downloaded = true;
@@ -1179,7 +1196,12 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
Set<Geocache> result = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB);
CGeoMap.filter(result);
// update the caches
- // new collection type needs to remove first
+ // first remove filtered out
+ final Set<String> filteredCodes = searchResult.getFilteredGeocodes();
+ Log.d("Filtering out " + filteredCodes.size() + " caches: " + filteredCodes.toString());
+ caches.removeAll(cgData.loadCaches(filteredCodes, LoadFlags.LOAD_CACHE_ONLY));
+ cgData.removeCaches(filteredCodes, EnumSet.of(RemoveFlag.REMOVE_CACHE));
+ // new collection type needs to remove first to refresh
caches.removeAll(result);
caches.addAll(result);
lastSearchResult = searchResult;
diff --git a/main/src/cgeo/geocaching/maps/CachesOverlay.java b/main/src/cgeo/geocaching/maps/CachesOverlay.java
index f1dd9b3..8e117eb 100644
--- a/main/src/cgeo/geocaching/maps/CachesOverlay.java
+++ b/main/src/cgeo/geocaching/maps/CachesOverlay.java
@@ -4,7 +4,7 @@ import cgeo.geocaching.CachePopup;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.IWaypoint;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.WaypointPopup;
import cgeo.geocaching.cgData;
import cgeo.geocaching.activity.Progress;
diff --git a/main/src/cgeo/geocaching/maps/MapProviderFactory.java b/main/src/cgeo/geocaching/maps/MapProviderFactory.java
index 5ce8ab6..95ea265 100644
--- a/main/src/cgeo/geocaching/maps/MapProviderFactory.java
+++ b/main/src/cgeo/geocaching/maps/MapProviderFactory.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.maps;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.maps.google.GoogleMapProvider;
import cgeo.geocaching.maps.interfaces.MapProvider;
import cgeo.geocaching.maps.interfaces.MapSource;
diff --git a/main/src/cgeo/geocaching/maps/PositionOverlay.java b/main/src/cgeo/geocaching/maps/PositionOverlay.java
index 08acd2f..c3a0834 100644
--- a/main/src/cgeo/geocaching/maps/PositionOverlay.java
+++ b/main/src/cgeo/geocaching/maps/PositionOverlay.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.maps;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.maps.interfaces.GeneralOverlay;
import cgeo.geocaching.maps.interfaces.GeoPointImpl;
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapView.java b/main/src/cgeo/geocaching/maps/google/GoogleMapView.java
index 154c3f3..6e5406e 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapView.java
+++ b/main/src/cgeo/geocaching/maps/google/GoogleMapView.java
@@ -2,7 +2,7 @@ package cgeo.geocaching.maps.google;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.maps.CachesOverlay;
import cgeo.geocaching.maps.PositionOverlay;
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java
index 7cf18fb..7c6865d 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.maps.mapsforge;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.maps.AbstractMapProvider;
import cgeo.geocaching.maps.MapProviderFactory;
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
index 083e5bb..2b0c1f7 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.maps.mapsforge;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.maps.CachesOverlay;
import cgeo.geocaching.maps.PositionOverlay;
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java
index cc8bc66..8e3a4d8 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.maps.mapsforge.v024;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.maps.CachesOverlay;
import cgeo.geocaching.maps.PositionOverlay;
diff --git a/main/src/cgeo/geocaching/network/Network.java b/main/src/cgeo/geocaching/network/Network.java
index 57196c5..2d2ab0b 100644
--- a/main/src/cgeo/geocaching/network/Network.java
+++ b/main/src/cgeo/geocaching/network/Network.java
@@ -1,9 +1,9 @@
package cgeo.geocaching.network;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.files.LocalStorage;
-import cgeo.geocaching.utils.TextUtils;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.TextUtils;
import ch.boye.httpclientandroidlib.Header;
import ch.boye.httpclientandroidlib.HeaderElement;
@@ -317,12 +317,14 @@ public abstract class Network {
return null;
}
- final String etag = LocalStorage.getSavedHeader(cacheFile, "etag");
+ final String etag = LocalStorage.getSavedHeader(cacheFile, LocalStorage.HEADER_ETAG);
if (etag != null) {
+ // The ETag is a more robust check than a timestamp. If we have an ETag, it is enough
+ // to identify the right version of the resource.
return new Parameters("If-None-Match", etag);
}
- final String lastModified = LocalStorage.getSavedHeader(cacheFile, "last-modified");
+ final String lastModified = LocalStorage.getSavedHeader(cacheFile, LocalStorage.HEADER_LAST_MODIFIED);
if (lastModified != null) {
return new Parameters("If-Modified-Since", lastModified);
}
@@ -476,10 +478,10 @@ public abstract class Network {
/**
* Checks if the device has network connection.
- *
+ *
* @param context
* context of the application, cannot be null
- *
+ *
* @return <code>true</code> if the device is connected to the network.
*/
public static boolean isNetworkConnected(Context context) {
diff --git a/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java b/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java
index 751443e..8dc8b03 100644
--- a/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java
+++ b/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java
@@ -82,6 +82,7 @@ public abstract class OAuthAuthorizationActivity extends AbstractActivity {
pinEntryButton.setVisibility(View.GONE);
+ setResult(RESULT_OK);
finish();
} else {
showToast(getErrAuthProcess());
diff --git a/main/src/cgeo/geocaching/network/StatusUpdater.java b/main/src/cgeo/geocaching/network/StatusUpdater.java
index bfc77ba..ee9bc31 100644
--- a/main/src/cgeo/geocaching/network/StatusUpdater.java
+++ b/main/src/cgeo/geocaching/network/StatusUpdater.java
@@ -9,6 +9,8 @@ import cgeo.geocaching.utils.Version;
import org.json.JSONException;
import org.json.JSONObject;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
import android.os.Looper;
import java.util.Locale;
@@ -27,6 +29,13 @@ public class StatusUpdater extends MemorySubject<StatusUpdater.Status> implement
this.icon = icon;
this.url = url;
}
+
+ final static public Status closeoutStatus =
+ new Status("", "status_closeout_warning", "attribute_abandonedbuilding", "http://faq.cgeo.org/#7_69");
+
+ final static public Status defaultStatus() {
+ return VERSION.SDK_INT < VERSION_CODES.ECLAIR_MR1 ? closeoutStatus : null;
+ }
}
@Override
diff --git a/main/src/cgeo/geocaching/settings/AuthorizeOcDePreference.java b/main/src/cgeo/geocaching/settings/AuthorizeOcDePreference.java
new file mode 100644
index 0000000..28807eb
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/AuthorizeOcDePreference.java
@@ -0,0 +1,45 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.connector.oc.OCAuthorizationActivity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class AuthorizeOcDePreference extends Preference {
+
+ public AuthorizeOcDePreference(Context context) {
+ super(context);
+ }
+
+ public AuthorizeOcDePreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public AuthorizeOcDePreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ @Override
+ protected View onCreateView(ViewGroup parent) {
+ final SettingsActivity activity = (SettingsActivity) getContext();
+
+ setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ Intent authIntent = new Intent(preference.getContext(),
+ OCAuthorizationActivity.class);
+ activity.startActivityForResult(authIntent,
+ SettingsActivity.OAUTH_OCDE_REQUEST);
+
+ return false; // no shared preference has to be changed
+ }
+ });
+
+ activity.setOCDEAuthTitle();
+ return super.onCreateView(parent);
+ }
+}
diff --git a/main/src/cgeo/geocaching/settings/AuthorizeTwitterPreference.java b/main/src/cgeo/geocaching/settings/AuthorizeTwitterPreference.java
new file mode 100644
index 0000000..ed3e159
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/AuthorizeTwitterPreference.java
@@ -0,0 +1,45 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.twitter.TwitterAuthorizationActivity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class AuthorizeTwitterPreference extends Preference {
+
+ public AuthorizeTwitterPreference(Context context) {
+ super(context);
+ }
+
+ public AuthorizeTwitterPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public AuthorizeTwitterPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ @Override
+ protected View onCreateView(ViewGroup parent) {
+ final SettingsActivity activity = (SettingsActivity) getContext();
+
+ setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ Intent authIntent = new Intent(preference.getContext(),
+ TwitterAuthorizationActivity.class);
+ activity.startActivityForResult(authIntent,
+ SettingsActivity.OAUTH_TWITTER_REQUEST);
+
+ return false; // no shared preference has to be changed
+ }
+ });
+
+ activity.setTwitterAuthTitle();
+ return super.onCreateView(parent);
+ }
+}
diff --git a/main/src/cgeo/geocaching/settings/CheckBoxWithPopupPreference.java b/main/src/cgeo/geocaching/settings/CheckBoxWithPopupPreference.java
new file mode 100644
index 0000000..4e64b9a
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/CheckBoxWithPopupPreference.java
@@ -0,0 +1,93 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.R;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.res.TypedArray;
+import android.net.Uri;
+import android.preference.CheckBoxPreference;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class CheckBoxWithPopupPreference extends CheckBoxPreference {
+
+ // strings for the popup dialog
+ private String title;
+ private String text;
+ private String url;
+ private String urlButton;
+
+ public CheckBoxWithPopupPreference(Context context) {
+ super(context);
+ }
+
+ public CheckBoxWithPopupPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ processAttributes(context, attrs, 0);
+ }
+
+ public CheckBoxWithPopupPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ processAttributes(context, attrs, defStyle);
+ }
+
+ private void processAttributes(Context context, AttributeSet attrs, int defStyle) {
+ if (attrs == null) {
+ return; // coward's retreat
+ }
+
+ TypedArray types = context.obtainStyledAttributes(attrs, new int[] {
+ R.attr.title, R.attr.text, R.attr.url, R.attr.urlButton },
+ defStyle, 0);
+
+ title = types.getString(0);
+ text = types.getString(1);
+ url = types.getString(2);
+ urlButton = types.getString(3);
+
+ types.recycle();
+ }
+
+ @Override
+ protected View onCreateView(ViewGroup parent) {
+
+ // show dialog when checkbox enabled
+ setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(final Preference preference, Object newValue) {
+ if (!(Boolean) newValue) {
+ return true;
+ }
+ AlertDialog.Builder builder = new AlertDialog.Builder(
+ preference.getContext());
+ builder.setMessage(text)
+ .setIcon(android.R.drawable.ic_dialog_info)
+ .setTitle(title)
+ .setPositiveButton(R.string.err_none, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int id) {
+ dialog.cancel();
+ }
+ })
+ .setNegativeButton(urlButton, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int id) {
+ Intent i = new Intent(Intent.ACTION_VIEW);
+ i.setData(Uri.parse(url));
+ preference.getContext().startActivity(i);
+ }
+ });
+ builder.create().show();
+ return true;
+ }
+ });
+
+ return super.onCreateView(parent);
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java b/main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java
new file mode 100644
index 0000000..3ecd1b2
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java
@@ -0,0 +1,123 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.R;
+import cgeo.geocaching.activity.ActivityMixin;
+import cgeo.geocaching.connector.gc.Login;
+import cgeo.geocaching.enumerations.StatusCode;
+import cgeo.geocaching.network.Cookies;
+import cgeo.geocaching.utils.Log;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+
+import android.annotation.SuppressLint;
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.os.Handler;
+import android.os.Message;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class CheckGcCredentialsPreference extends Preference {
+
+ public CheckGcCredentialsPreference(Context context) {
+ super(context);
+ }
+
+ public CheckGcCredentialsPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public CheckGcCredentialsPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ @Override
+ protected View onCreateView(ViewGroup parent) {
+ setOnPreferenceClickListener(GC_LOGIN_CHECK);
+ return super.onCreateView(parent);
+ }
+
+ private final GcLoginCheck GC_LOGIN_CHECK = new GcLoginCheck();
+
+ private class GcLoginCheck implements OnPreferenceClickListener {
+ private Resources res;
+ private SettingsActivity activity;
+
+ private ProgressDialog loginDialog;
+ @SuppressLint("HandlerLeak")
+ private Handler logInHandler = new Handler() {
+ @Override
+ public void handleMessage(Message msg) {
+ try {
+ if (loginDialog != null && loginDialog.isShowing()) {
+ loginDialog.dismiss();
+ }
+
+ if (msg.obj == null || (msg.obj instanceof Drawable)) {
+ ActivityMixin.helpDialog(activity,
+ res.getString(R.string.init_login_popup),
+ res.getString(R.string.init_login_popup_ok),
+ (Drawable) msg.obj);
+ } else {
+ ActivityMixin.helpDialog(activity,
+ res.getString(R.string.init_login_popup),
+ res.getString(R.string.init_login_popup_failed_reason)
+ + " "
+ + ((StatusCode) msg.obj).getErrorString(res)
+ + ".");
+ }
+ } catch (Exception e) {
+ ActivityMixin.showToast(activity, R.string.err_login_failed);
+ Log.e("SettingsActivity.logInHandler", e);
+ } finally {
+ if (loginDialog != null && loginDialog.isShowing()) {
+ loginDialog.dismiss();
+ }
+ // enable/disable basic member preferences
+ activity.initBasicMemberPreferences();
+ }
+ }
+ };
+
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ this.activity = (SettingsActivity) CheckGcCredentialsPreference.this.getContext();
+ this.res = activity.getResources();
+
+ ImmutablePair<String, String> credentials = Settings.getGcLogin();
+
+ // check credentials for validity
+ if (credentials == null || StringUtils.isBlank(credentials.getLeft())
+ || StringUtils.isBlank(credentials.getRight())) {
+ ActivityMixin.showToast(activity, R.string.err_missing_auth);
+ return false;
+ }
+
+ loginDialog = ProgressDialog.show(activity,
+ res.getString(R.string.init_login_popup),
+ res.getString(R.string.init_login_popup_working), true);
+ loginDialog.setCancelable(false);
+ Cookies.clearCookies();
+
+ (new Thread() {
+ @Override
+ public void run() {
+ final StatusCode loginResult = Login.login();
+ Object payload = loginResult;
+ if (loginResult == StatusCode.NO_ERROR) {
+ Login.detectGcCustomDate();
+ payload = Login.downloadAvatarAndGetMemberStatus();
+ }
+ logInHandler.obtainMessage(0, payload).sendToTarget();
+ }
+ }).start();
+
+ return false; // no shared preference has to be changed
+ }
+ }
+}
diff --git a/main/src/cgeo/geocaching/settings/EditPasswordPreference.java b/main/src/cgeo/geocaching/settings/EditPasswordPreference.java
new file mode 100644
index 0000000..d89f128
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/EditPasswordPreference.java
@@ -0,0 +1,29 @@
+package cgeo.geocaching.settings;
+
+import android.content.Context;
+import android.preference.EditTextPreference;
+import android.util.AttributeSet;
+
+/**
+ * This is just a dummy preference, to be able check for the type.
+ * <p>
+ * Use it exactly as an EditTextPreference
+ *
+ * @see SettingsActivity - search for EditPasswordPreference
+ * @author koem
+ */
+public class EditPasswordPreference extends EditTextPreference {
+
+ public EditPasswordPreference(Context context) {
+ super(context);
+ }
+
+ public EditPasswordPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public EditPasswordPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/settings/InfoPreference.java b/main/src/cgeo/geocaching/settings/InfoPreference.java
new file mode 100644
index 0000000..ea740b4
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/InfoPreference.java
@@ -0,0 +1,107 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.R;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.res.TypedArray;
+import android.net.Uri;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+
+public class InfoPreference extends Preference {
+
+ // strings for the popup dialog
+ private String text;
+ private String url;
+ private String urlButton;
+
+ private LayoutInflater inflater;
+
+ public InfoPreference(Context context) {
+ super(context);
+ init(context, null, 0);
+ }
+
+ public InfoPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init(context, attrs, 0);
+ }
+
+ public InfoPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init(context, attrs, defStyle);
+ }
+
+ private void init(Context context, AttributeSet attrs, int defStyle) {
+ inflater = ((Activity) context).getLayoutInflater();
+
+ setPersistent(false);
+
+ if (attrs == null) {
+ return; // coward's retreat
+ }
+
+ TypedArray types = context.obtainStyledAttributes(attrs, new int[] {
+ android.R.attr.text, R.attr.url, R.attr.urlButton },
+ defStyle, 0);
+
+ text = types.getString(0);
+ url = types.getString(1);
+ urlButton = types.getString(2);
+
+ types.recycle();
+ }
+
+ @Override
+ protected View onCreateView(ViewGroup parent) {
+
+ // show popup when clicked
+ setOnPreferenceClickListener(new OnPreferenceClickListener() {
+
+ @Override
+ public boolean onPreferenceClick(final Preference preference) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(
+ preference.getContext());
+ builder.setMessage(text)
+ .setIcon(android.R.drawable.ic_dialog_info)
+ .setTitle(preference.getTitle())
+ .setPositiveButton(R.string.err_none, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int id) {
+ dialog.cancel();
+ }
+ })
+ .setNegativeButton(urlButton, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int id) {
+ Intent i = new Intent(Intent.ACTION_VIEW);
+ i.setData(Uri.parse(url));
+ preference.getContext().startActivity(i);
+ }
+ });
+ builder.create().show();
+ return false;
+ }
+ });
+
+ // show an Info Icon
+ View v = super.onCreateView(parent);
+
+ ImageView i = (ImageView) inflater.inflate(R.layout.preference_info_icon, parent, false);
+ LinearLayout l = (LinearLayout) v.findViewById(android.R.id.widget_frame);
+ l.setVisibility(View.VISIBLE);
+ l.addView(i);
+
+ return v;
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/settings/LogSignaturePreference.java b/main/src/cgeo/geocaching/settings/LogSignaturePreference.java
new file mode 100644
index 0000000..d0c9739
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/LogSignaturePreference.java
@@ -0,0 +1,60 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.R;
+
+import android.content.Context;
+import android.preference.DialogPreference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+
+public class LogSignaturePreference extends DialogPreference {
+
+ private SettingsActivity settingsActivity;
+ private EditText editText;
+
+ public LogSignaturePreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ public LogSignaturePreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init();
+ }
+
+ private void init() {
+ setDialogLayoutResource(R.layout.log_signature_preference_dialog);
+ }
+
+ @Override
+ protected void onBindDialogView(View view) {
+ settingsActivity = (SettingsActivity) this.getContext();
+
+ editText = (EditText) view.findViewById(R.id.signature_dialog_text);
+ editText.setText(getPersistedString(""));
+ settingsActivity.setSignatureTextView(editText);
+
+ Button templates = (Button) view.findViewById(R.id.signature_templates);
+ settingsActivity.registerForContextMenu(templates);
+ templates.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View templates) {
+ settingsActivity.openContextMenu(templates);
+ }
+ });
+
+ super.onBindDialogView(view);
+ }
+
+ @Override
+ protected void onDialogClosed(boolean positiveResult) {
+ if (positiveResult) {
+ String text = editText.getText().toString();
+ persistString(text);
+ callChangeListener(text);
+ }
+ super.onDialogClosed(positiveResult);
+ }
+}
diff --git a/main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java b/main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java
new file mode 100644
index 0000000..a019c4a
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java
@@ -0,0 +1,122 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.R;
+import cgeo.geocaching.activity.ActivityMixin;
+import cgeo.geocaching.network.Network;
+import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.utils.Log;
+
+import ch.boye.httpclientandroidlib.HttpResponse;
+
+import org.apache.commons.lang3.StringUtils;
+
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.os.Handler;
+import android.os.Message;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class RegisterSend2CgeoPreference extends Preference {
+
+ ProgressDialog progressDialog;
+ SettingsActivity activity;
+
+ public RegisterSend2CgeoPreference(Context context) {
+ super(context);
+ }
+
+ public RegisterSend2CgeoPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public RegisterSend2CgeoPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ private Handler webAuthHandler = new Handler() {
+ @Override
+ public void handleMessage(Message msg) {
+ try {
+ if (progressDialog != null && progressDialog.isShowing()) {
+ progressDialog.dismiss();
+ }
+
+ if (msg.what > 0) {
+ ActivityMixin.helpDialog(activity,
+ activity.getString(R.string.init_sendToCgeo),
+ activity.getString(R.string.init_sendToCgeo_register_ok)
+ .replace("####", String.valueOf(msg.what)));
+ } else {
+ ActivityMixin.helpDialog(activity,
+ activity.getString(R.string.init_sendToCgeo),
+ activity.getString(R.string.init_sendToCgeo_register_fail));
+ }
+ } catch (Exception e) {
+ ActivityMixin.showToast(activity, R.string.init_sendToCgeo_register_fail);
+ Log.e("SettingsActivity.webHandler", e);
+ }
+
+ if (progressDialog != null && progressDialog.isShowing()) {
+ progressDialog.dismiss();
+ }
+ }
+ };
+
+ @Override
+ protected View onCreateView(ViewGroup parent) {
+ activity = (SettingsActivity) getContext();
+
+ setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ final String deviceName = Settings.getWebDeviceName();
+ final String deviceCode = Settings.getWebDeviceCode();
+
+ if (StringUtils.isBlank(deviceName)) {
+ ActivityMixin.showToast(activity, R.string.err_missing_device_name);
+ return false;
+ }
+
+ progressDialog = ProgressDialog.show(activity,
+ activity.getString(R.string.init_sendToCgeo),
+ activity.getString(R.string.init_sendToCgeo_registering), true);
+ progressDialog.setCancelable(false);
+
+ (new Thread() {
+
+ @Override
+ public void run() {
+ int pin = 0;
+
+ final String nam = StringUtils.defaultString(deviceName);
+ final String cod = StringUtils.defaultString(deviceCode);
+
+ final Parameters params = new Parameters("name", nam, "code", cod);
+ HttpResponse response = Network.getRequest("http://send2.cgeo.org/auth.html", params);
+
+ if (response != null && response.getStatusLine().getStatusCode() == 200) {
+ //response was OK
+ String[] strings = Network.getResponseData(response).split(",");
+ try {
+ pin = Integer.parseInt(strings[1].trim());
+ } catch (Exception e) {
+ Log.e("webDialog", e);
+ }
+ String code = strings[0];
+ Settings.setWebNameCode(nam, code);
+ }
+
+ webAuthHandler.sendEmptyMessage(pin);
+ }
+ }).start();
+
+ return true;
+ }
+ });
+ return super.onCreateView(parent);
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/settings/Settings.java b/main/src/cgeo/geocaching/settings/Settings.java
new file mode 100644
index 0000000..244c924
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/Settings.java
@@ -0,0 +1,995 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.R;
+import cgeo.geocaching.StoredList;
+import cgeo.geocaching.cgeoapplication;
+import cgeo.geocaching.apps.cache.navi.NavigationAppFactory.NavigationAppsEnum;
+import cgeo.geocaching.connector.gc.GCConstants;
+import cgeo.geocaching.connector.gc.Login;
+import cgeo.geocaching.enumerations.CacheType;
+import cgeo.geocaching.enumerations.LiveMapStrategy.Strategy;
+import cgeo.geocaching.enumerations.LogType;
+import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.maps.MapProviderFactory;
+import cgeo.geocaching.maps.google.GoogleMapProvider;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapProvider;
+import cgeo.geocaching.maps.interfaces.MapSource;
+import cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider;
+import cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider.OfflineMapSource;
+import cgeo.geocaching.utils.CryptUtils;
+import cgeo.geocaching.utils.FileUtils;
+import cgeo.geocaching.utils.FileUtils.FileSelector;
+import cgeo.geocaching.utils.Log;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.os.Environment;
+import android.preference.PreferenceManager;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * General c:geo preferences/settings set by the user
+ */
+public final class Settings {
+
+ public static final int SHOW_WP_THRESHOLD_DEFAULT = 5;
+ public static final int SHOW_WP_THRESHOLD_MAX = 50;
+ private static final int MAP_SOURCE_DEFAULT = GoogleMapProvider.GOOGLE_MAP_ID.hashCode();
+
+ private final static int unitsMetric = 1;
+
+ // twitter api keys
+ private final static String keyConsumerPublic = CryptUtils.rot13("ESnsCvAv3kEupF1GCR3jGj");
+ private final static String keyConsumerSecret = CryptUtils.rot13("7vQWceACV9umEjJucmlpFe9FCMZSeqIqfkQ2BnhV9x");
+
+ public enum coordInputFormatEnum {
+ Plain,
+ Deg,
+ Min,
+ Sec;
+
+ public static coordInputFormatEnum fromInt(int id) {
+ final coordInputFormatEnum[] values = coordInputFormatEnum.values();
+ if (id < 0 || id >= values.length) {
+ return Min;
+ }
+ return values[id];
+ }
+ }
+
+ private static final SharedPreferences sharedPrefs = PreferenceManager
+ .getDefaultSharedPreferences(cgeoapplication.getInstance().getBaseContext());
+ static {
+ migrateSettings();
+ Log.setDebug(sharedPrefs.getBoolean(getKey(R.string.pref_debug), false));
+ }
+
+ // maps
+ private static MapProvider mapProvider = null;
+
+ private Settings() {
+ // this class is not to be instantiated;
+ }
+
+ private static void migrateSettings() {
+ // migrate from non standard file location and integer based boolean types
+ int oldVersion = getInt(R.string.pref_settingsversion, 0);
+ if (oldVersion < 1) {
+ final String oldPreferencesName = "cgeo.pref";
+ final SharedPreferences old = cgeoapplication.getInstance().getSharedPreferences(oldPreferencesName, Context.MODE_PRIVATE);
+ final Editor e = sharedPrefs.edit();
+
+ e.putString(getKey(R.string.pref_temp_twitter_token_secret), old.getString(getKey(R.string.pref_temp_twitter_token_secret), null));
+ e.putString(getKey(R.string.pref_temp_twitter_token_public), old.getString(getKey(R.string.pref_temp_twitter_token_public), null));
+ e.putBoolean(getKey(R.string.pref_help_shown), old.getInt(getKey(R.string.pref_help_shown), 0) != 0);
+ e.putFloat(getKey(R.string.pref_anylongitude), old.getFloat(getKey(R.string.pref_anylongitude), 0));
+ e.putFloat(getKey(R.string.pref_anylatitude), old.getFloat(getKey(R.string.pref_anylatitude), 0));
+ e.putBoolean(getKey(R.string.pref_offlinemaps), 0 != old.getInt(getKey(R.string.pref_offlinemaps), 1));
+ e.putBoolean(getKey(R.string.pref_offlinewpmaps), 0 != old.getInt(getKey(R.string.pref_offlinewpmaps), 0));
+ e.putString(getKey(R.string.pref_webDeviceCode), old.getString(getKey(R.string.pref_webDeviceCode), null));
+ e.putString(getKey(R.string.pref_webDeviceName), old.getString(getKey(R.string.pref_webDeviceName), null));
+ e.putBoolean(getKey(R.string.pref_maplive), old.getInt(getKey(R.string.pref_maplive), 1) != 0);
+ e.putInt(getKey(R.string.pref_mapsource), old.getInt(getKey(R.string.pref_mapsource), MAP_SOURCE_DEFAULT));
+ e.putBoolean(getKey(R.string.pref_twitter), 0 != old.getInt(getKey(R.string.pref_twitter), 0));
+ e.putBoolean(getKey(R.string.pref_showaddress), 0 != old.getInt(getKey(R.string.pref_showaddress), 1));
+ e.putBoolean(getKey(R.string.pref_showcaptcha), old.getBoolean(getKey(R.string.pref_showcaptcha), false));
+ e.putBoolean(getKey(R.string.pref_maptrail), old.getInt(getKey(R.string.pref_maptrail), 1) != 0);
+ e.putInt(getKey(R.string.pref_lastmapzoom), old.getInt(getKey(R.string.pref_lastmapzoom), 14));
+ e.putBoolean(getKey(R.string.pref_livelist), 0 != old.getInt(getKey(R.string.pref_livelist), 1));
+ e.putBoolean(getKey(R.string.pref_units), old.getInt(getKey(R.string.pref_units), unitsMetric) == unitsMetric);
+ e.putBoolean(getKey(R.string.pref_skin), old.getInt(getKey(R.string.pref_skin), 0) != 0);
+ e.putInt(getKey(R.string.pref_lastusedlist), old.getInt(getKey(R.string.pref_lastusedlist), StoredList.STANDARD_LIST_ID));
+ e.putString(getKey(R.string.pref_cachetype), old.getString(getKey(R.string.pref_cachetype), CacheType.ALL.id));
+ e.putString(getKey(R.string.pref_twitter_token_secret), old.getString(getKey(R.string.pref_twitter_token_secret), null));
+ e.putString(getKey(R.string.pref_twitter_token_public), old.getString(getKey(R.string.pref_twitter_token_public), null));
+ e.putInt(getKey(R.string.pref_version), old.getInt(getKey(R.string.pref_version), 0));
+ e.putBoolean(getKey(R.string.pref_autoloaddesc), 0 != old.getInt(getKey(R.string.pref_autoloaddesc), 1));
+ e.putBoolean(getKey(R.string.pref_ratingwanted), old.getBoolean(getKey(R.string.pref_ratingwanted), true));
+ e.putBoolean(getKey(R.string.pref_friendlogswanted), old.getBoolean(getKey(R.string.pref_friendlogswanted), true));
+ e.putBoolean(getKey(R.string.pref_useenglish), old.getBoolean(getKey(R.string.pref_useenglish), false));
+ e.putBoolean(getKey(R.string.pref_usecompass), 0 != old.getInt(getKey(R.string.pref_usecompass), 1));
+ e.putBoolean(getKey(R.string.pref_trackautovisit), old.getBoolean(getKey(R.string.pref_trackautovisit), false));
+ e.putBoolean(getKey(R.string.pref_sigautoinsert), old.getBoolean(getKey(R.string.pref_sigautoinsert), false));
+ e.putBoolean(getKey(R.string.pref_logimages), old.getBoolean(getKey(R.string.pref_logimages), false));
+ e.putBoolean(getKey(R.string.pref_excludedisabled), 0 != old.getInt(getKey(R.string.pref_excludedisabled), 0));
+ e.putBoolean(getKey(R.string.pref_excludemine), 0 != old.getInt(getKey(R.string.pref_excludemine), 0));
+ e.putString(getKey(R.string.pref_mapfile), old.getString(getKey(R.string.pref_mapfile), null));
+ e.putString(getKey(R.string.pref_signature), old.getString(getKey(R.string.pref_signature), null));
+ e.putString(getKey(R.string.pref_pass_vote), old.getString(getKey(R.string.pref_pass_vote), null));
+ e.putString(getKey(R.string.pref_password), old.getString(getKey(R.string.pref_password), null));
+ e.putString(getKey(R.string.pref_username), old.getString(getKey(R.string.pref_username), null));
+ e.putString(getKey(R.string.pref_memberstatus), old.getString(getKey(R.string.pref_memberstatus), ""));
+ e.putInt(getKey(R.string.pref_coordinputformat), old.getInt(getKey(R.string.pref_coordinputformat), 0));
+ e.putBoolean(getKey(R.string.pref_log_offline), old.getBoolean(getKey(R.string.pref_log_offline), false));
+ e.putBoolean(getKey(R.string.pref_choose_list), old.getBoolean(getKey(R.string.pref_choose_list), false));
+ e.putBoolean(getKey(R.string.pref_loaddirectionimg), old.getBoolean(getKey(R.string.pref_loaddirectionimg), true));
+ e.putString(getKey(R.string.pref_gccustomdate), old.getString(getKey(R.string.pref_gccustomdate), null));
+ e.putInt(getKey(R.string.pref_gcshowwaypointsthreshold), old.getInt(getKey(R.string.pref_gcshowwaypointsthreshold), 0));
+ e.putString(getKey(R.string.pref_cookiestore), old.getString(getKey(R.string.pref_cookiestore), null));
+ e.putBoolean(getKey(R.string.pref_opendetailslastpage), old.getBoolean(getKey(R.string.pref_opendetailslastpage), false));
+ e.putInt(getKey(R.string.pref_lastdetailspage), old.getInt(getKey(R.string.pref_lastdetailspage), 1));
+ e.putInt(getKey(R.string.pref_defaultNavigationTool), old.getInt(getKey(R.string.pref_defaultNavigationTool), NavigationAppsEnum.COMPASS.id));
+ e.putInt(getKey(R.string.pref_defaultNavigationTool2), old.getInt(getKey(R.string.pref_defaultNavigationTool2), NavigationAppsEnum.INTERNAL_MAP.id));
+ e.putInt(getKey(R.string.pref_livemapstrategy), old.getInt(getKey(R.string.pref_livemapstrategy), Strategy.AUTO.id));
+ e.putBoolean(getKey(R.string.pref_debug), old.getBoolean(getKey(R.string.pref_debug), false));
+ e.putBoolean(getKey(R.string.pref_hidelivemaphint), old.getInt(getKey(R.string.pref_hidelivemaphint), 0) != 0);
+ e.putInt(getKey(R.string.pref_livemaphintshowcount), old.getInt(getKey(R.string.pref_livemaphintshowcount), 0));
+
+ e.putInt(getKey(R.string.pref_settingsversion), 1); // mark migrated
+ e.commit();
+ }
+
+ // changes for new settings dialog
+ if (oldVersion < 2) {
+ final Editor e = sharedPrefs.edit();
+
+ e.putBoolean(getKey(R.string.pref_units), !isUseImperialUnits());
+
+ // show waypoints threshold now as a slider
+ int wpThreshold = getWayPointsThreshold();
+ if (wpThreshold < 0) {
+ wpThreshold = 0;
+ } else if (wpThreshold > SHOW_WP_THRESHOLD_MAX) {
+ wpThreshold = SHOW_WP_THRESHOLD_MAX;
+ }
+ e.putInt(getKey(R.string.pref_gcshowwaypointsthreshold), wpThreshold);
+
+ // KEY_MAP_SOURCE must be string, because it is the key for a ListPreference now
+ int ms = sharedPrefs.getInt(getKey(R.string.pref_mapsource), MAP_SOURCE_DEFAULT);
+ e.remove(getKey(R.string.pref_mapsource));
+ e.putString(getKey(R.string.pref_mapsource), String.valueOf(ms));
+
+ // navigation tool ids must be string, because ListPreference uses strings as keys
+ int dnt1 = sharedPrefs.getInt(getKey(R.string.pref_defaultNavigationTool), NavigationAppsEnum.COMPASS.id);
+ int dnt2 = sharedPrefs.getInt(getKey(R.string.pref_defaultNavigationTool2), NavigationAppsEnum.INTERNAL_MAP.id);
+ e.remove(getKey(R.string.pref_defaultNavigationTool));
+ e.remove(getKey(R.string.pref_defaultNavigationTool2));
+ e.putString(getKey(R.string.pref_defaultNavigationTool), String.valueOf(dnt1));
+ e.putString(getKey(R.string.pref_defaultNavigationTool2), String.valueOf(dnt2));
+
+ // defaults for gpx directories
+ e.putString(getKey(R.string.pref_gpxImportDir), getGpxImportDir());
+ e.putString(getKey(R.string.pref_gpxExportDir), getGpxExportDir());
+
+ e.putInt(getKey(R.string.pref_settingsversion), 2); // mark migrated
+ e.commit();
+ }
+ }
+
+ private static String getKey(final int prefKeyId) {
+ return cgeoapplication.getInstance().getString(prefKeyId);
+ }
+
+ static String getString(final int prefKeyId, final String defaultValue) {
+ return sharedPrefs.getString(getKey(prefKeyId), defaultValue);
+ }
+
+ private static int getInt(final int prefKeyId, final int defaultValue) {
+ return sharedPrefs.getInt(getKey(prefKeyId), defaultValue);
+ }
+
+ private static long getLong(final int prefKeyId, final long defaultValue) {
+ return sharedPrefs.getLong(getKey(prefKeyId), defaultValue);
+ }
+
+ private static boolean getBoolean(final int prefKeyId, final boolean defaultValue) {
+ return sharedPrefs.getBoolean(getKey(prefKeyId), defaultValue);
+ }
+
+ private static float getFloat(final int prefKeyId, final float defaultValue) {
+ return sharedPrefs.getFloat(getKey(prefKeyId), defaultValue);
+ }
+
+ static boolean putString(final int prefKeyId, final String value) {
+ final SharedPreferences.Editor edit = sharedPrefs.edit();
+ edit.putString(getKey(prefKeyId), value);
+ return edit.commit();
+ }
+
+ private static boolean putBoolean(final int prefKeyId, final boolean value) {
+ final SharedPreferences.Editor edit = sharedPrefs.edit();
+ edit.putBoolean(getKey(prefKeyId), value);
+ return edit.commit();
+ }
+
+ private static boolean putInt(final int prefKeyId, final int value) {
+ final SharedPreferences.Editor edit = sharedPrefs.edit();
+ edit.putInt(getKey(prefKeyId), value);
+ return edit.commit();
+ }
+
+ private static boolean putLong(final int prefKeyId, final long value) {
+ final SharedPreferences.Editor edit = sharedPrefs.edit();
+ edit.putLong(getKey(prefKeyId), value);
+ return edit.commit();
+ }
+
+ private static boolean putFloat(final int prefKeyId, final float value) {
+ final SharedPreferences.Editor edit = sharedPrefs.edit();
+ edit.putFloat(getKey(prefKeyId), value);
+ return edit.commit();
+ }
+
+ private static boolean remove(final int prefKeyId) {
+ final SharedPreferences.Editor edit = sharedPrefs.edit();
+ edit.remove(getKey(prefKeyId));
+ return edit.commit();
+ }
+
+ private static boolean contains(final int prefKeyId) {
+ return sharedPrefs.contains(getKey(prefKeyId));
+ }
+
+ public static void setLanguage(boolean useEnglish) {
+ final Configuration config = new Configuration();
+ config.locale = useEnglish ? Locale.ENGLISH : Locale.getDefault();
+ final Resources resources = cgeoapplication.getInstance().getResources();
+ resources.updateConfiguration(config, resources.getDisplayMetrics());
+ }
+
+ public static boolean isLogin() {
+ final String preUsername = getString(R.string.pref_username, null);
+ final String prePassword = getString(R.string.pref_password, null);
+
+ return !StringUtils.isBlank(preUsername) && !StringUtils.isBlank(prePassword);
+ }
+
+ /**
+ * Get login and password information.
+ *
+ * @return a pair (login, password) or null if no valid information is stored
+ */
+ public static ImmutablePair<String, String> getGcLogin() {
+
+ final String username = getString(R.string.pref_username, null);
+ final String password = getString(R.string.pref_password, null);
+
+ if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) {
+ return null;
+ }
+
+ return new ImmutablePair<String, String>(username, password);
+ }
+
+ public static String getUsername() {
+ return getString(R.string.pref_username, null);
+ }
+
+ public static boolean isGCConnectorActive() {
+ return getBoolean(R.string.pref_connectorGCActive, true);
+ }
+
+ public static boolean isPremiumMember() {
+ // Basic Member, Premium Member, ???
+ String memberStatus = Settings.getMemberStatus();
+ if (memberStatus == null) {
+ return false;
+ }
+ return GCConstants.MEMBER_STATUS_PM.equalsIgnoreCase(memberStatus);
+ }
+
+ public static String getMemberStatus() {
+ return getString(R.string.pref_memberstatus, "");
+ }
+
+ public static boolean setMemberStatus(final String memberStatus) {
+ if (StringUtils.isBlank(memberStatus)) {
+ return remove(R.string.pref_memberstatus);
+ }
+ return putString(R.string.pref_memberstatus, memberStatus);
+ }
+
+ public static boolean isOCConnectorActive() {
+ return getBoolean(R.string.pref_connectorOCActive, false);
+ }
+
+ public static boolean setOCConnectorActive(final boolean isActive) {
+ return putBoolean(R.string.pref_connectorOCActive, isActive);
+ }
+
+ public static String getOCDETokenPublic() {
+ return getString(R.string.pref_ocde_tokenpublic, "");
+ }
+
+ public static String getOCDETokenSecret() {
+ return getString(R.string.pref_ocde_tokensecret, "");
+ }
+
+ public static boolean hasOCDEAuthorization() {
+ return StringUtils.isNotBlank(getOCDETokenPublic())
+ && StringUtils.isNotBlank(getOCDETokenSecret());
+ }
+
+ public static void setOCDETokens(final String tokenPublic,
+ final String tokenSecret, boolean enableOcDe) {
+ putString(R.string.pref_ocde_tokenpublic, tokenPublic);
+ putString(R.string.pref_ocde_tokensecret, tokenSecret);
+ if (tokenPublic != null) {
+ remove(R.string.pref_temp_ocde_token_public);
+ remove(R.string.pref_temp_ocde_token_secret);
+ }
+ setOCConnectorActive(enableOcDe);
+ }
+
+ public static void setOCDETempTokens(final String tokenPublic, final String tokenSecret) {
+ putString(R.string.pref_temp_ocde_token_public, tokenPublic);
+ putString(R.string.pref_temp_ocde_token_secret, tokenSecret);
+ }
+
+ public static ImmutablePair<String, String> getTempOCDEToken() {
+ String tokenPublic = getString(R.string.pref_temp_ocde_token_public, null);
+ String tokenSecret = getString(R.string.pref_temp_ocde_token_secret, null);
+ return new ImmutablePair<String, String>(tokenPublic, tokenSecret);
+ }
+
+ public static boolean isGCvoteLogin() {
+ final String preUsername = getString(R.string.pref_username, null);
+ final String prePassword = getString(R.string.pref_pass_vote, null);
+
+ return !StringUtils.isBlank(preUsername) && !StringUtils.isBlank(prePassword);
+ }
+
+ public static ImmutablePair<String, String> getGCvoteLogin() {
+ final String username = getString(R.string.pref_username, null);
+ final String password = getString(R.string.pref_pass_vote, null);
+
+ if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) {
+ return null;
+ }
+
+ return new ImmutablePair<String, String>(username, password);
+ }
+
+ public static String getSignature() {
+ return getString(R.string.pref_signature, null);
+ }
+
+ public static boolean setCookieStore(final String cookies) {
+ if (StringUtils.isBlank(cookies)) {
+ // erase cookies
+ return remove(R.string.pref_cookiestore);
+ }
+ // save cookies
+ return putString(R.string.pref_cookiestore, cookies);
+ }
+
+ public static String getCookieStore() {
+ return getString(R.string.pref_cookiestore, null);
+ }
+
+ /**
+ * @param cacheType
+ * The cache type used for future filtering
+ */
+ public static void setCacheType(final CacheType cacheType) {
+ if (cacheType == null) {
+ remove(R.string.pref_cachetype);
+ } else {
+ putString(R.string.pref_cachetype, cacheType.id);
+ }
+ }
+
+ public static int getLastList() {
+ return getInt(R.string.pref_lastusedlist, StoredList.STANDARD_LIST_ID);
+ }
+
+ public static void saveLastList(final int listId) {
+ putInt(R.string.pref_lastusedlist, listId);
+ }
+
+ public static void setWebNameCode(final String name, final String code) {
+ putString(R.string.pref_webDeviceName, name);
+ putString(R.string.pref_webDeviceCode, code);
+ }
+
+ public static MapProvider getMapProvider() {
+ if (mapProvider == null) {
+ mapProvider = getMapSource().getMapProvider();
+ }
+ return mapProvider;
+ }
+
+ public static String getMapFile() {
+ return getString(R.string.pref_mapfile, null);
+ }
+
+ public static boolean setMapFile(final String mapFile) {
+ boolean result = putString(R.string.pref_mapfile, mapFile);
+ if (mapFile != null) {
+ setMapFileDirectory(new File(mapFile).getParent());
+ }
+ return result;
+ }
+
+ public static String getMapFileDirectory() {
+ final String mapDir = getString(R.string.pref_mapDirectory, null);
+ if (mapDir != null) {
+ return mapDir;
+ }
+ final String mapFile = getMapFile();
+ if (mapFile != null) {
+ return new File(mapFile).getParent();
+ }
+ return null;
+ }
+
+ public static boolean setMapFileDirectory(final String mapFileDirectory) {
+ boolean result = putString(R.string.pref_mapDirectory, mapFileDirectory);
+ MapsforgeMapProvider.getInstance().updateOfflineMaps();
+ return result;
+ }
+
+ public static boolean isValidMapFile() {
+ return isValidMapFile(getMapFile());
+ }
+
+ public static boolean isValidMapFile(final String mapFileIn) {
+ return MapsforgeMapProvider.isValidMapFile(mapFileIn);
+ }
+
+ public static coordInputFormatEnum getCoordInputFormat() {
+ return coordInputFormatEnum.fromInt(getInt(R.string.pref_coordinputformat, 0));
+ }
+
+ public static void setCoordInputFormat(final coordInputFormatEnum format) {
+ putInt(R.string.pref_coordinputformat, format.ordinal());
+ }
+
+ static void setLogOffline(final boolean offline) {
+ putBoolean(R.string.pref_log_offline, offline);
+ }
+
+ public static boolean getLogOffline() {
+ return getBoolean(R.string.pref_log_offline, false);
+ }
+
+ public static boolean getChooseList() {
+ return getBoolean(R.string.pref_choose_list, false);
+ }
+
+ public static boolean getLoadDirImg() {
+ return !isPremiumMember() && getBoolean(R.string.pref_loaddirectionimg, true);
+ }
+
+ public static void setGcCustomDate(final String format) {
+ putString(R.string.pref_gccustomdate, format);
+ }
+
+ /**
+ * @return User selected date format on GC.com
+ * @see Login#gcCustomDateFormats
+ */
+ public static String getGcCustomDate() {
+ return getString(R.string.pref_gccustomdate, null);
+ }
+
+ public static boolean isExcludeMyCaches() {
+ return getBoolean(R.string.pref_excludemine, false);
+ }
+
+ public static void setUseEnglish(final boolean english) {
+ putBoolean(R.string.pref_useenglish, english);
+ setLanguage(english);
+ }
+
+ public static boolean isUseEnglish() {
+ return getBoolean(R.string.pref_useenglish, false);
+ }
+
+ public static boolean isShowAddress() {
+ return getBoolean(R.string.pref_showaddress, true);
+ }
+
+ public static boolean isShowCaptcha() {
+ return !isPremiumMember() && getBoolean(R.string.pref_showcaptcha, false);
+ }
+
+ public static boolean isExcludeDisabledCaches() {
+ return getBoolean(R.string.pref_excludedisabled, false);
+ }
+
+ public static boolean isStoreOfflineMaps() {
+ return getBoolean(R.string.pref_offlinemaps, true);
+ }
+
+ public static boolean isStoreOfflineWpMaps() {
+ return getBoolean(R.string.pref_offlinewpmaps, false);
+ }
+
+ public static boolean isStoreLogImages() {
+ return getBoolean(R.string.pref_logimages, false);
+ }
+
+ public static boolean isAutoLoadDescription() {
+ return getBoolean(R.string.pref_autoloaddesc, true);
+ }
+
+ public static boolean isRatingWanted() {
+ return getBoolean(R.string.pref_ratingwanted, true);
+ }
+
+ public static boolean isFriendLogsWanted() {
+ if (!isLogin()) {
+ // don't show a friends log if the user is anonymous
+ return false;
+ }
+ return getBoolean(R.string.pref_friendlogswanted, true);
+ }
+
+ public static boolean isLiveList() {
+ return getBoolean(R.string.pref_livelist, true);
+ }
+
+ public static boolean isTrackableAutoVisit() {
+ return getBoolean(R.string.pref_trackautovisit, false);
+ }
+
+ public static boolean isAutoInsertSignature() {
+ return getBoolean(R.string.pref_sigautoinsert, false);
+ }
+
+ public static boolean isUseImperialUnits() {
+ return getBoolean(R.string.pref_units, false);
+ }
+
+ public static boolean isLiveMap() {
+ return getBoolean(R.string.pref_maplive, true);
+ }
+
+ public static void setLiveMap(final boolean live) {
+ putBoolean(R.string.pref_maplive, live);
+ }
+
+ public static boolean isMapTrail() {
+ return getBoolean(R.string.pref_maptrail, true);
+ }
+
+ public static void setMapTrail(final boolean showTrail) {
+ putBoolean(R.string.pref_maptrail, showTrail);
+ }
+
+ public static int getMapZoom() {
+ return getInt(R.string.pref_lastmapzoom, 14);
+ }
+
+ public static void setMapZoom(final int mapZoomLevel) {
+ putInt(R.string.pref_lastmapzoom, mapZoomLevel);
+ }
+
+ public static GeoPointImpl getMapCenter() {
+ return getMapProvider().getMapItemFactory()
+ .getGeoPointBase(new Geopoint(getInt(R.string.pref_lastmaplat, 0) / 1e6,
+ getInt(R.string.pref_lastmaplon, 0) / 1e6));
+ }
+
+ public static void setMapCenter(final GeoPointImpl mapViewCenter) {
+ putInt(R.string.pref_lastmaplat, mapViewCenter.getLatitudeE6());
+ putInt(R.string.pref_lastmaplon, mapViewCenter.getLongitudeE6());
+ }
+
+ public static MapSource getMapSource() {
+ final int id = getConvertedMapId();
+ final MapSource map = MapProviderFactory.getMapSource(id);
+ if (map != null) {
+ // don't use offline maps if the map file is not valid
+ if ((!(map instanceof OfflineMapSource)) || (isValidMapFile())) {
+ return map;
+ }
+ }
+ // fallback to first available map
+ return MapProviderFactory.getDefaultSource();
+ }
+
+ private final static int GOOGLEMAP_BASEID = 30;
+ private final static int MAP = 1;
+ private final static int SATELLITE = 2;
+
+ private final static int MFMAP_BASEID = 40;
+ private final static int MAPNIK = 1;
+ private final static int CYCLEMAP = 3;
+ private final static int OFFLINE = 4;
+
+ /**
+ * convert old preference ids for maps (based on constant values) into new hash based ids
+ *
+ * @return
+ */
+ private static int getConvertedMapId() {
+ // what the heck is happening here?? hashCodes of Strings?
+ // why not strings?
+ final int id = Integer.parseInt(getString(R.string.pref_mapsource,
+ String.valueOf(MAP_SOURCE_DEFAULT)));
+ switch (id) {
+ case GOOGLEMAP_BASEID + MAP:
+ return GoogleMapProvider.GOOGLE_MAP_ID.hashCode();
+ case GOOGLEMAP_BASEID + SATELLITE:
+ return GoogleMapProvider.GOOGLE_SATELLITE_ID.hashCode();
+ case MFMAP_BASEID + MAPNIK:
+ return MapsforgeMapProvider.MAPSFORGE_MAPNIK_ID.hashCode();
+ case MFMAP_BASEID + CYCLEMAP:
+ return MapsforgeMapProvider.MAPSFORGE_CYCLEMAP_ID.hashCode();
+ case MFMAP_BASEID + OFFLINE: {
+ final String mapFile = Settings.getMapFile();
+ if (StringUtils.isNotEmpty(mapFile)) {
+ return mapFile.hashCode();
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ return id;
+ }
+
+ public static void setMapSource(final MapSource newMapSource) {
+ if (!MapProviderFactory.isSameActivity(getMapSource(), newMapSource)) {
+ mapProvider = null;
+ }
+ putString(R.string.pref_mapsource, String.valueOf(newMapSource.getNumericalId()));
+ if (newMapSource instanceof OfflineMapSource) {
+ setMapFile(((OfflineMapSource) newMapSource).getFileName());
+ }
+ }
+
+ public static void setAnyCoordinates(final Geopoint coords) {
+ if (null != coords) {
+ putFloat(R.string.pref_anylatitude, (float) coords.getLatitude());
+ putFloat(R.string.pref_anylatitude, (float) coords.getLongitude());
+ } else {
+ remove(R.string.pref_anylatitude);
+ remove(R.string.pref_anylongitude);
+ }
+ }
+
+ public static Geopoint getAnyCoordinates() {
+ if (contains(R.string.pref_anylatitude) && contains(R.string.pref_anylongitude)) {
+ float lat = getFloat(R.string.pref_anylatitude, 0);
+ float lon = getFloat(R.string.pref_anylongitude, 0);
+ return new Geopoint(lat, lon);
+ }
+ return null;
+ }
+
+ public static boolean isUseCompass() {
+ return getBoolean(R.string.pref_usecompass, true);
+ }
+
+ public static void setUseCompass(final boolean useCompass) {
+ putBoolean(R.string.pref_usecompass, useCompass);
+ }
+
+ public static boolean isLightSkin() {
+ return getBoolean(R.string.pref_skin, false);
+ }
+
+ public static String getKeyConsumerPublic() {
+ return keyConsumerPublic;
+ }
+
+ public static String getKeyConsumerSecret() {
+ return keyConsumerSecret;
+ }
+
+ public static String getWebDeviceCode() {
+ return getString(R.string.pref_webDeviceCode, null);
+ }
+
+ public static String getWebDeviceName() {
+ return getString(R.string.pref_webDeviceName, android.os.Build.MODEL);
+ }
+
+ /**
+ * @return The cache type used for filtering or ALL if no filter is active.
+ * Returns never null
+ */
+ public static CacheType getCacheType() {
+ return CacheType.getById(getString(R.string.pref_cachetype, CacheType.ALL.id));
+ }
+
+ /**
+ * The Threshold for the showing of child waypoints
+ */
+ public static int getWayPointsThreshold() {
+ return getInt(R.string.pref_gcshowwaypointsthreshold, SHOW_WP_THRESHOLD_DEFAULT);
+ }
+
+ public static void setShowWaypointsThreshold(final int threshold) {
+ putInt(R.string.pref_gcshowwaypointsthreshold, threshold);
+ }
+
+ public static boolean isUseTwitter() {
+ return getBoolean(R.string.pref_twitter, false);
+ }
+
+ public static void setUseTwitter(final boolean useTwitter) {
+ putBoolean(R.string.pref_twitter, useTwitter);
+ }
+
+ public static boolean isTwitterLoginValid() {
+ return !StringUtils.isBlank(getTokenPublic())
+ && !StringUtils.isBlank(getTokenSecret());
+ }
+
+ public static String getTokenPublic() {
+ return getString(R.string.pref_twitter_token_public, null);
+ }
+
+ public static String getTokenSecret() {
+ return getString(R.string.pref_twitter_token_secret, null);
+
+ }
+
+ public static boolean hasTwitterAuthorization() {
+ return StringUtils.isNotBlank(getTokenPublic())
+ && StringUtils.isNotBlank(getTokenSecret());
+ }
+
+ public static void setTwitterTokens(final String tokenPublic,
+ final String tokenSecret, boolean enableTwitter) {
+ putString(R.string.pref_twitter_token_public, tokenPublic);
+ putString(R.string.pref_twitter_token_secret, tokenSecret);
+ if (tokenPublic != null) {
+ remove(R.string.pref_temp_twitter_token_public);
+ remove(R.string.pref_temp_twitter_token_secret);
+ }
+ setUseTwitter(enableTwitter);
+ }
+
+ public static void setTwitterTempTokens(final String tokenPublic,
+ final String tokenSecret) {
+ putString(R.string.pref_temp_twitter_token_public, tokenPublic);
+ putString(R.string.pref_temp_twitter_token_secret, tokenSecret);
+ }
+
+ public static ImmutablePair<String, String> getTempToken() {
+ String tokenPublic = getString(R.string.pref_temp_twitter_token_public, null);
+ String tokenSecret = getString(R.string.pref_temp_twitter_token_secret, null);
+ return new ImmutablePair<String, String>(tokenPublic, tokenSecret);
+ }
+
+ public static int getVersion() {
+ return getInt(R.string.pref_version, 0);
+ }
+
+ public static void setVersion(final int version) {
+ putInt(R.string.pref_version, version);
+ }
+
+ public static boolean isOpenLastDetailsPage() {
+ return getBoolean(R.string.pref_opendetailslastpage, false);
+ }
+
+ public static int getLastDetailsPage() {
+ return getInt(R.string.pref_lastdetailspage, 1);
+ }
+
+ public static void setLastDetailsPage(final int index) {
+ putInt(R.string.pref_lastdetailspage, index);
+ }
+
+ public static int getDefaultNavigationTool() {
+ return Integer.parseInt(getString(
+ R.string.pref_defaultNavigationTool,
+ String.valueOf(NavigationAppsEnum.COMPASS.id)));
+ }
+
+ public static void setDefaultNavigationTool(final int defaultNavigationTool) {
+ putString(R.string.pref_defaultNavigationTool,
+ String.valueOf(defaultNavigationTool));
+ }
+
+ public static int getDefaultNavigationTool2() {
+ return Integer.parseInt(getString(
+ R.string.pref_defaultNavigationTool2,
+ String.valueOf(NavigationAppsEnum.INTERNAL_MAP.id)));
+ }
+
+ public static void setDefaultNavigationTool2(final int defaultNavigationTool) {
+ putString(R.string.pref_defaultNavigationTool2,
+ String.valueOf(defaultNavigationTool));
+ }
+
+ public static Strategy getLiveMapStrategy() {
+ return Strategy.getById(getInt(R.string.pref_livemapstrategy, Strategy.AUTO.id));
+ }
+
+ public static void setLiveMapStrategy(final Strategy strategy) {
+ putInt(R.string.pref_livemapstrategy, strategy.id);
+ }
+
+ public static boolean isDebug() {
+ return Log.isDebug();
+ }
+
+ public static boolean getHideLiveMapHint() {
+ return getBoolean(R.string.pref_hidelivemaphint, false);
+ }
+
+ public static void setHideLiveHint(final boolean hide) {
+ putBoolean(R.string.pref_hidelivemaphint, hide);
+ }
+
+ public static int getLiveMapHintShowCount() {
+ return getInt(R.string.pref_livemaphintshowcount, 0);
+ }
+
+ public static void setLiveMapHintShowCount(final int showCount) {
+ putInt(R.string.pref_livemaphintshowcount, showCount);
+ }
+
+ public static boolean isDbOnSDCard() {
+ return getBoolean(R.string.pref_dbonsdcard, false);
+ }
+
+ public static void setDbOnSDCard(final boolean dbOnSDCard) {
+ putBoolean(R.string.pref_dbonsdcard, dbOnSDCard);
+ }
+
+ public static String getGpxExportDir() {
+ return getString(R.string.pref_gpxExportDir,
+ Environment.getExternalStorageDirectory().getPath() + "/gpx");
+ }
+
+ public static String getGpxImportDir() {
+ return getString(R.string.pref_gpxImportDir,
+ Environment.getExternalStorageDirectory().getPath() + "/gpx");
+ }
+
+ public static boolean getShareAfterExport() {
+ return getBoolean(R.string.pref_shareafterexport, true);
+ }
+
+ public static void setShareAfterExport(final boolean shareAfterExport) {
+ putBoolean(R.string.pref_shareafterexport, shareAfterExport);
+ }
+
+ public static int getTrackableAction() {
+ return getInt(R.string.pref_trackableaction, LogType.RETRIEVED_IT.id);
+ }
+
+ public static void setTrackableAction(final int trackableAction) {
+ putInt(R.string.pref_trackableaction, trackableAction);
+ }
+
+ public static String getCustomRenderThemeBaseFolder() {
+ return getString(R.string.pref_renderthemepath, "");
+ }
+
+ public static String getCustomRenderThemeFilePath() {
+ return getString(R.string.pref_renderthemefile, "");
+ }
+
+ public static void setCustomRenderThemeFile(final String customRenderThemeFile) {
+ putString(R.string.pref_renderthemefile, customRenderThemeFile);
+ }
+
+ public static File[] getMapThemeFiles() {
+ File directory = new File(Settings.getCustomRenderThemeBaseFolder());
+ List<File> result = new ArrayList<File>();
+ FileUtils.listDir(result, directory, new ExtensionsBasedFileSelector(new String[] { "xml" }), null);
+
+ return result.toArray(new File[result.size()]);
+ }
+
+ private static class ExtensionsBasedFileSelector extends FileSelector {
+ private final String[] extensions;
+ public ExtensionsBasedFileSelector(String[] extensions) {
+ this.extensions = extensions;
+ }
+ @Override
+ public boolean isSelected(File file) {
+ String filename = file.getName();
+ for (String ext : extensions) {
+ if (StringUtils.endsWithIgnoreCase(filename, ext)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ @Override
+ public boolean shouldEnd() {
+ return false;
+ }
+ }
+
+ public static boolean getPlainLogs() {
+ return getBoolean(R.string.pref_plainLogs, false);
+ }
+
+ public static boolean getUseNativeUa() {
+ return getBoolean(R.string.pref_nativeUa, false);
+ }
+
+ public static String getCacheTwitterMessage() {
+ // TODO make customizable from UI
+ return "I found [NAME] ([URL])";
+ }
+
+ public static String getTrackableTwitterMessage() {
+ // TODO make customizable from UI
+ return "I touched [NAME] ([URL])!";
+ }
+
+ public static int getLogImageScale() {
+ return getInt(R.string.pref_logImageScale, -1);
+ }
+
+ public static void setLogImageScale(final int scale) {
+ putInt(R.string.pref_logImageScale, scale);
+ }
+
+ // Only for tests!
+ static void setExcludeDisabledCaches(final boolean exclude) {
+ putBoolean(R.string.pref_excludedisabled, exclude);
+ }
+
+ public static void setExcludeMine(final boolean exclude) {
+ putBoolean(R.string.pref_excludemine, exclude);
+ }
+
+ static boolean setLogin(final String username, final String password) {
+
+ if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) {
+ // erase username and password
+ boolean a = remove(R.string.pref_username);
+ boolean b = remove(R.string.pref_password);
+ return a && b;
+ }
+ // save username and password
+ boolean a = putString(R.string.pref_username, username);
+ boolean b = putString(R.string.pref_password, password);
+ return a && b;
+ }
+
+ static void setStoreOfflineMaps(final boolean offlineMaps) {
+ putBoolean(R.string.pref_offlinemaps, offlineMaps);
+ }
+
+ static void setStoreOfflineWpMaps(final boolean offlineWpMaps) {
+ putBoolean(R.string.pref_offlinewpmaps, offlineWpMaps);
+ }
+
+ static void setUseImperialUnits(final boolean imperial) {
+ putBoolean(R.string.pref_units, imperial);
+ }
+
+ public static long getFieldnoteExportDate() {
+ return getLong(R.string.pref_fieldnoteExportDate, 0);
+ }
+
+ public static void setFieldnoteExportDate(final long date) {
+ putLong(R.string.pref_fieldnoteExportDate, date);
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/settings/SettingsActivity.java b/main/src/cgeo/geocaching/settings/SettingsActivity.java
new file mode 100644
index 0000000..4b1c92b
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/SettingsActivity.java
@@ -0,0 +1,549 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.Intents;
+import cgeo.geocaching.R;
+import cgeo.geocaching.SelectMapfileActivity;
+import cgeo.geocaching.cgData;
+import cgeo.geocaching.cgeoapplication;
+import cgeo.geocaching.activity.ActivityMixin;
+import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
+import cgeo.geocaching.apps.cache.navi.NavigationAppFactory.NavigationAppsEnum;
+import cgeo.geocaching.compatibility.Compatibility;
+import cgeo.geocaching.files.SimpleDirChooser;
+import cgeo.geocaching.maps.MapProviderFactory;
+import cgeo.geocaching.maps.interfaces.MapSource;
+import cgeo.geocaching.ui.Formatter;
+import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.LogTemplateProvider;
+import cgeo.geocaching.utils.LogTemplateProvider.LogTemplate;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openintents.intents.FileManagerIntents;
+
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Environment;
+import android.preference.ListPreference;
+import android.preference.Preference;
+import android.preference.Preference.OnPreferenceChangeListener;
+import android.preference.Preference.OnPreferenceClickListener;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceManager;
+import android.preference.PreferenceScreen;
+import android.view.ContextMenu;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.MenuItem;
+import android.view.MenuItem.OnMenuItemClickListener;
+import android.view.View;
+import android.widget.BaseAdapter;
+import android.widget.EditText;
+import android.widget.ListAdapter;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A {@link PreferenceActivity} that presents a set of application settings. On
+ * handset devices, settings are presented as a single list. On tablets,
+ * settings are split by category, with category headers shown to the left of
+ * the list of settings.
+ * <p>
+ * See <a href="http://developer.android.com/design/patterns/settings.html"> Android Design: Settings</a> for design
+ * guidelines and the <a href="http://developer.android.com/guide/topics/ui/settings.html">Settings API Guide</a> for
+ * more information on developing a Settings UI.
+ *
+ * @author koem (initial author)
+ */
+public class SettingsActivity extends PreferenceActivity {
+
+ private static final String INTENT_GOTO = "GOTO";
+ private static final int INTENT_GOTO_SERVICES = 1;
+
+ private static final int DIR_CHOOSER_MAPS_DIRECTORY_REQUEST = 4;
+ static final int OAUTH_OCDE_REQUEST = 5;
+ static final int OAUTH_TWITTER_REQUEST = 6;
+
+ private EditText signatureText;
+
+ /**
+ * Enumeration for directory choosers. This is how we can retrieve information about the
+ * directory and preference key in onActivityResult() easily just by knowing
+ * the result code.
+ */
+ private enum DirChooserType {
+ GPX_IMPORT_DIR(1, R.string.pref_gpxImportDir,
+ Environment.getExternalStorageDirectory().getPath() + "/gpx"),
+ GPX_EXPORT_DIR(2, R.string.pref_gpxExportDir,
+ Environment.getExternalStorageDirectory().getPath() + "/gpx"),
+ THEMES_DIR(3, R.string.pref_renderthemepath, "");
+ public final int requestCode;
+ public final int keyId;
+ public final String defaultValue;
+
+ DirChooserType(final int requestCode, final int keyId, final String defaultValue) {
+ this.requestCode = requestCode;
+ this.keyId = keyId;
+ this.defaultValue = defaultValue;
+ }
+ }
+
+ @Override
+ protected void onCreate(final Bundle savedInstanceState) {
+ setTheme(Settings.isLightSkin() ? R.style.settings_light : R.style.settings);
+ super.onCreate(savedInstanceState);
+
+ SettingsActivity.addPreferencesFromResource(this, R.xml.preferences);
+ initPreferences();
+
+ Intent intent = getIntent();
+ int gotoPage = intent.getIntExtra(INTENT_GOTO, 0);
+ if (gotoPage == INTENT_GOTO_SERVICES) {
+ // start with services screen
+ PreferenceScreen main = (PreferenceScreen) getPreference(R.string.pref_fakekey_main_screen);
+ int index = getPreference(R.string.pref_fakekey_services_screen).getOrder();
+ main.onItemClick(null, null, index, 0);
+ }
+ }
+
+ @Override
+ protected void onPause() {
+ Compatibility.dataChanged(getPackageName());
+ super.onPause();
+ }
+
+ private void initPreferences() {
+ initMapSourcePreference();
+ initDirChoosers();
+ initDefaultNavigationPreferences();
+ initBackupButtons();
+ initDbLocationPreference();
+ initDebugPreference();
+ initBasicMemberPreferences();
+ initSend2CgeoPreferences();
+
+ for (int k : new int[] { R.string.pref_username, R.string.pref_password,
+ R.string.pref_pass_vote, R.string.pref_signature,
+ R.string.pref_mapsource, R.string.pref_renderthemepath,
+ R.string.pref_gpxExportDir, R.string.pref_gpxImportDir,
+ R.string.pref_mapDirectory, R.string.pref_defaultNavigationTool,
+ R.string.pref_defaultNavigationTool2, R.string.pref_webDeviceName,
+ R.string.pref_fakekey_preference_backup_info, }) {
+ bindSummaryToStringValue(k);
+ }
+ }
+
+ private static String getKey(final int prefKeyId) {
+ return cgeoapplication.getInstance().getString(prefKeyId);
+ }
+
+ private Preference getPreference(final int keyId) {
+ return SettingsActivity.findPreference(this, getKey(keyId));
+ }
+
+ // workaround, because OnContextItemSelected nor onMenuItemSelected is never called
+ OnMenuItemClickListener TEMPLATE_CLICK = new OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(final MenuItem item) {
+ LogTemplate template = LogTemplateProvider.getTemplate(item.getItemId());
+ if (template != null) {
+ insertSignatureTemplate(template);
+ return true;
+ }
+ return false;
+ }
+ };
+
+ // workaround, because OnContextItemSelected and onMenuItemSelected are never called
+ void setSignatureTextView(final EditText view) {
+ this.signatureText = view;
+ }
+
+ @Override
+ public void onCreateContextMenu(final ContextMenu menu, final View v,
+ final ContextMenuInfo menuInfo) {
+ // context menu for signature templates
+ if (v.getId() == R.id.signature_templates) {
+ menu.setHeaderTitle(R.string.init_signature_template_button);
+ ArrayList<LogTemplate> templates = LogTemplateProvider.getTemplates();
+ for (int i = 0; i < templates.size(); ++i) {
+ menu.add(0, templates.get(i).getItemId(), 0, templates.get(i).getResourceId());
+ menu.getItem(i).setOnMenuItemClickListener(TEMPLATE_CLICK);
+ }
+ }
+ super.onCreateContextMenu(menu, v, menuInfo);
+ }
+
+ private void insertSignatureTemplate(final LogTemplate template) {
+ String insertText = "[" + template.getTemplateString() + "]";
+ ActivityMixin.insertAtPosition(signatureText, insertText, true);
+ }
+
+ /**
+ * Fill the choice list for map sources.
+ */
+ private void initMapSourcePreference() {
+ ListPreference pref = (ListPreference) getPreference(R.string.pref_mapsource);
+
+ List<MapSource> mapSources = MapProviderFactory.getMapSources();
+ CharSequence[] entries = new CharSequence[mapSources.size()];
+ CharSequence[] values = new CharSequence[mapSources.size()];
+ for (int i = 0; i < mapSources.size(); ++i) {
+ entries[i] = mapSources.get(i).getName();
+ values[i] = String.valueOf(mapSources.get(i).getNumericalId());
+ }
+ pref.setEntries(entries);
+ pref.setEntryValues(values);
+ }
+
+ /**
+ * Fill the choice list for default navigation tools.
+ */
+ private void initDefaultNavigationPreferences() {
+
+ final List<NavigationAppsEnum> apps = NavigationAppFactory.getInstalledDefaultNavigationApps();
+
+ CharSequence[] entries = new CharSequence[apps.size()];
+ CharSequence[] values = new CharSequence[apps.size()];
+ for (int i = 0; i < apps.size(); ++i) {
+ entries[i] = apps.get(i).toString();
+ values[i] = String.valueOf(apps.get(i).id);
+ }
+
+ ListPreference pref = (ListPreference) getPreference(R.string.pref_defaultNavigationTool);
+ pref.setEntries(entries);
+ pref.setEntryValues(values);
+ pref = (ListPreference) getPreference(R.string.pref_defaultNavigationTool2);
+ pref.setEntries(entries);
+ pref.setEntryValues(values);
+ }
+
+ private void initDirChoosers() {
+ for (final DirChooserType dct : DirChooserType.values()) {
+
+ getPreference(dct.keyId).setOnPreferenceClickListener(
+ new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(final Preference preference) {
+ startDirChooser(dct);
+ return false;
+ }
+ });
+ }
+
+ getPreference(R.string.pref_mapDirectory).setOnPreferenceClickListener(
+ new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(final Preference preference) {
+ Intent i = new Intent(SettingsActivity.this,
+ SelectMapfileActivity.class);
+ startActivityForResult(i, DIR_CHOOSER_MAPS_DIRECTORY_REQUEST);
+ return false;
+ }
+ });
+ }
+
+ /**
+ * Fire up a directory chooser on click on the preference.
+ *
+ * @see #onActivityResult() for processing of the selected directory
+ *
+ * @param dct
+ * type of directory to be selected
+ */
+ private void startDirChooser(final DirChooserType dct) {
+
+ final String startDirectory = Settings.getString(dct.keyId, dct.defaultValue);
+
+ try {
+ final Intent dirChooser = new Intent(FileManagerIntents.ACTION_PICK_DIRECTORY);
+ if (StringUtils.isNotBlank(startDirectory)) {
+ dirChooser.setData(Uri.fromFile(new File(startDirectory)));
+ }
+ dirChooser.putExtra(FileManagerIntents.EXTRA_TITLE,
+ getString(R.string.simple_dir_chooser_title));
+ dirChooser.putExtra(FileManagerIntents.EXTRA_BUTTON_TEXT,
+ getString(android.R.string.ok));
+ startActivityForResult(dirChooser, dct.requestCode);
+ } catch (android.content.ActivityNotFoundException ex) {
+ // OI file manager not available
+ final Intent dirChooser = new Intent(this, SimpleDirChooser.class);
+ dirChooser.putExtra(Intents.EXTRA_START_DIR, startDirectory);
+ startActivityForResult(dirChooser, dct.requestCode);
+ }
+ }
+
+ private void setChosenDirectory(final DirChooserType dct, final Intent data) {
+ final String directory = new File(data.getData().getPath()).getAbsolutePath();
+ if (StringUtils.isNotBlank(directory)) {
+ Preference p = getPreference(dct.keyId);
+ if (p == null) {
+ return;
+ }
+ Settings.putString(dct.keyId, directory);
+ p.setSummary(directory);
+ }
+ }
+
+ public void initBackupButtons() {
+ Preference backup = getPreference(R.string.pref_fakekey_preference_backup);
+ backup.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(final Preference preference) {
+ final Context context = preference.getContext();
+ // avoid overwriting an existing backup with an empty database
+ // (can happen directly after reinstalling the app)
+ if (cgData.getAllCachesCount() == 0) {
+ ActivityMixin.helpDialog(SettingsActivity.this,
+ context.getString(R.string.init_backup),
+ context.getString(R.string.init_backup_unnecessary));
+ return false;
+ }
+
+ final ProgressDialog dialog = ProgressDialog.show(context,
+ context.getString(R.string.init_backup),
+ context.getString(R.string.init_backup_running), true, false);
+ new Thread() {
+ @Override
+ public void run() {
+ final String backupFileName = cgData.backupDatabase();
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ dialog.dismiss();
+ ActivityMixin.helpDialog(SettingsActivity.this,
+ context.getString(R.string.init_backup_backup),
+ backupFileName != null
+ ? context.getString(R.string.init_backup_success)
+ + "\n" + backupFileName
+ : context.getString(R.string.init_backup_failed));
+ VALUE_CHANGE_LISTENER.onPreferenceChange(SettingsActivity.this.getPreference(R.string.pref_fakekey_preference_backup_info), "");
+ }
+ });
+ }
+ }.start();
+ return true;
+ }
+ });
+
+ Preference restore = getPreference(R.string.pref_fakekey_preference_restore);
+ restore.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(final Preference preference) {
+ ((cgeoapplication) SettingsActivity.this.getApplication())
+ .restoreDatabase(SettingsActivity.this);
+ return true;
+ }
+ });
+ }
+
+ private void initDbLocationPreference() {
+ Preference p = getPreference(R.string.pref_dbonsdcard);
+ p.setPersistent(false);
+ p.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(final Preference preference) {
+ boolean oldValue = Settings.isDbOnSDCard();
+ ((cgeoapplication) SettingsActivity.this.getApplication())
+ .moveDatabase(SettingsActivity.this);
+ return oldValue != Settings.isDbOnSDCard();
+ }
+ });
+ }
+
+ private void initDebugPreference() {
+ Preference p = getPreference(R.string.pref_debug);
+ p.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(final Preference preference, final Object newValue) {
+ Log.setDebug((Boolean) newValue);
+ return true;
+ }
+ });
+ }
+
+ void initBasicMemberPreferences() {
+ getPreference(R.string.pref_fakekey_basicmembers_screen)
+ .setEnabled(!Settings.isPremiumMember());
+ getPreference(R.string.pref_loaddirectionimg)
+ .setEnabled(!Settings.isPremiumMember());
+ getPreference(R.string.pref_showcaptcha)
+ .setEnabled(!Settings.isPremiumMember());
+
+ redrawScreen(R.string.pref_fakekey_services_screen);
+ }
+
+ void redrawScreen(int key) {
+ PreferenceScreen screen = (PreferenceScreen) getPreference(key);
+ if (screen == null) {
+ return;
+ }
+ ListAdapter adapter = screen.getRootAdapter();
+ if (adapter instanceof BaseAdapter) {
+ ((BaseAdapter) adapter).notifyDataSetChanged();
+ }
+ }
+
+ private static void initSend2CgeoPreferences() {
+ Settings.putString(R.string.pref_webDeviceName, Settings.getWebDeviceName());
+ }
+
+ void setOCDEAuthTitle() {
+ getPreference(R.string.pref_fakekey_ocde_authorization)
+ .setTitle(getString(Settings.hasOCDEAuthorization()
+ ? R.string.init_reregister_oc_de
+ : R.string.init_register_oc_de));
+ }
+
+ void setTwitterAuthTitle() {
+ getPreference(R.string.pref_fakekey_twitter_authorization)
+ .setTitle(getString(Settings.hasTwitterAuthorization()
+ ? R.string.init_twitter_reauthorize
+ : R.string.init_twitter_authorize));
+ }
+
+ public static void jumpToServicesPage(final Context fromActivity) {
+ final Intent intent = new Intent(fromActivity, SettingsActivity.class);
+ intent.putExtra(INTENT_GOTO, INTENT_GOTO_SERVICES);
+ fromActivity.startActivity(intent);
+ }
+
+ @Override
+ protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if (resultCode != RESULT_OK) {
+ return;
+ }
+
+ for (DirChooserType dct : DirChooserType.values()) {
+ if (requestCode == dct.requestCode) {
+ setChosenDirectory(dct, data);
+ return;
+ }
+ }
+
+ switch (requestCode) {
+ case DIR_CHOOSER_MAPS_DIRECTORY_REQUEST:
+ if (data.hasExtra(Intents.EXTRA_MAP_FILE)) {
+ final String mapFile = data.getStringExtra(Intents.EXTRA_MAP_FILE);
+ Settings.setMapFile(mapFile);
+ if (!Settings.isValidMapFile(Settings.getMapFile())) {
+ ActivityMixin.showToast(this, R.string.warn_invalid_mapfile);
+ }
+ }
+ initMapSourcePreference();
+ getPreference(R.string.pref_mapDirectory).setSummary(
+ Settings.getMapFileDirectory());
+ break;
+ case OAUTH_OCDE_REQUEST:
+ setOCDEAuthTitle();
+ redrawScreen(R.string.pref_fakekey_services_screen);
+ break;
+ case OAUTH_TWITTER_REQUEST:
+ setTwitterAuthTitle();
+ redrawScreen(R.string.pref_fakekey_services_screen);
+ break;
+ default:
+ throw new IllegalArgumentException();
+ }
+ }
+
+ /**
+ * A preference value change listener that updates the preference's summary
+ * to reflect its new value.
+ */
+ private static final Preference.OnPreferenceChangeListener VALUE_CHANGE_LISTENER = new Preference.OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(final Preference preference, final Object value) {
+ String stringValue = value.toString();
+
+ if (preference instanceof EditPasswordPreference) {
+ if (StringUtils.isBlank((String) value)) {
+ preference.setSummary("");
+ } else {
+ preference.setSummary("\u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022");
+ }
+ } else if (preference instanceof ListPreference) {
+ // For list preferences, look up the correct display value in
+ // the preference's 'entries' list.
+ ListPreference listPreference = (ListPreference) preference;
+ int index = listPreference.findIndexOfValue(stringValue);
+
+ // Set the summary to reflect the new value.
+ preference.setSummary(
+ index >= 0
+ ? listPreference.getEntries()[index]
+ : null);
+ } else if (getKey(R.string.pref_fakekey_preference_backup_info).equals(preference.getKey())) {
+ File lastBackupFile = cgData.getRestoreFile();
+ String text;
+ if (lastBackupFile != null) {
+ text = preference.getContext().getString(R.string.init_backup_last) + " "
+ + Formatter.formatTime(lastBackupFile.lastModified())
+ + ", " + Formatter.formatDate(lastBackupFile.lastModified());
+ } else {
+ text = preference.getContext().getString(R.string.init_backup_last_no);
+ }
+ preference.setSummary(text);
+ } else {
+ // For all other preferences, set the summary to the value's
+ // simple string representation.
+ preference.setSummary(stringValue);
+ }
+ return true;
+ }
+ };
+
+ /**
+ * Binds a preference's summary to its value. More specifically, when the
+ * preference's value is changed, its summary (line of text below the
+ * preference title) is updated to reflect the value. The summary is also
+ * immediately updated upon calling this method. The exact display format is
+ * dependent on the type of preference.
+ *
+ * @see #VALUE_CHANGE_LISTENER
+ */
+ private static void bindSummaryToValue(final Preference preference, final Object value) {
+ // Set the listener to watch for value changes.
+ if (preference == null) {
+ return;
+ }
+ preference.setOnPreferenceChangeListener(VALUE_CHANGE_LISTENER);
+
+ // Trigger the listener immediately with the preference's
+ // current value.
+ VALUE_CHANGE_LISTENER.onPreferenceChange(preference, value);
+ }
+
+ /**
+ * auto-care for the summary of the preference of string type with this key
+ *
+ * @param key
+ */
+ private void bindSummaryToStringValue(final int key) {
+
+ Preference pref = getPreference(key);
+ if (pref == null) {
+ return;
+ }
+
+ String value = PreferenceManager
+ .getDefaultSharedPreferences(pref.getContext())
+ .getString(pref.getKey(), "");
+
+ bindSummaryToValue(pref, value);
+ }
+
+ @SuppressWarnings("deprecation")
+ public static Preference findPreference(final PreferenceActivity preferenceActivity, final CharSequence key) {
+ return preferenceActivity.findPreference(key);
+ }
+
+ @SuppressWarnings("deprecation")
+ public static void addPreferencesFromResource(final PreferenceActivity preferenceActivity, final int preferencesResId) {
+ preferenceActivity.addPreferencesFromResource(preferencesResId);
+ }
+}
diff --git a/main/src/cgeo/geocaching/settings/TextPreference.java b/main/src/cgeo/geocaching/settings/TextPreference.java
new file mode 100644
index 0000000..bcd03ff
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/TextPreference.java
@@ -0,0 +1,86 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.R;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+/**
+ * Preference to simply show a text message.
+ * <p>
+ * Links are not shown - I tried everything (koem)
+ * <p>
+ * example: <cgeo.geocaching.settings.TextPreference android:text="@string/legal_note"
+ * android:layout="@string/text_preference_default_layout" />
+ */
+public class TextPreference extends Preference {
+
+ private String text;
+ private TextView summaryView;
+ private CharSequence summaryText;
+
+ public TextPreference(Context context) {
+ super(context);
+ }
+
+ public TextPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ processAttributes(context, attrs, 0);
+ }
+
+ public TextPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ processAttributes(context, attrs, defStyle);
+ }
+
+ private void processAttributes(Context context, AttributeSet attrs, int defStyle) {
+ if (attrs == null) {
+ return;
+ }
+
+ TypedArray types = context.obtainStyledAttributes(attrs, new int[] {
+ android.R.attr.text }, defStyle, 0);
+ this.text = types.getString(0);
+ types.recycle();
+ }
+
+ @Override
+ protected View onCreateView(ViewGroup parent) {
+ this.setSelectable(false);
+
+ View v = super.onCreateView(parent);
+
+ TextView text = (TextView) v.findViewById(R.id.textPreferenceText);
+ text.setText(this.text);
+
+ summaryView = (TextView) v.findViewById(R.id.textPreferenceSummary);
+ setSummary(null); // show saved summary text
+
+ return v;
+ }
+
+ @Override
+ public void setSummary(CharSequence summaryText) {
+ // the layout hasn't been inflated yet, save the summaryText for later use
+ if (this.summaryView == null) {
+ this.summaryText = summaryText;
+ return;
+ }
+
+ // if summaryText is null, take it from the previous saved summary
+ if (summaryText == null) {
+ if (this.summaryText == null) {
+ return;
+ }
+ this.summaryView.setText(this.summaryText);
+ } else {
+ this.summaryView.setText(summaryText);
+ }
+ this.summaryView.setVisibility(View.VISIBLE);
+ }
+}
diff --git a/main/src/cgeo/geocaching/settings/WpThresholdPreference.java b/main/src/cgeo/geocaching/settings/WpThresholdPreference.java
new file mode 100644
index 0000000..867714f
--- /dev/null
+++ b/main/src/cgeo/geocaching/settings/WpThresholdPreference.java
@@ -0,0 +1,73 @@
+package cgeo.geocaching.settings;
+
+import cgeo.geocaching.R;
+import cgeo.geocaching.settings.Settings;
+
+import android.content.Context;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
+
+public class WpThresholdPreference extends Preference {
+
+ TextView valueView;
+
+ public WpThresholdPreference(Context context) {
+ super(context);
+ init();
+ }
+
+ public WpThresholdPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ public WpThresholdPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init();
+ }
+
+ private void init() {
+ setPersistent(false);
+ }
+
+ @Override
+ protected View onCreateView(ViewGroup parent) {
+ View v = super.onCreateView(parent);
+
+ // get views
+ SeekBar seekBar = (SeekBar) v.findViewById(R.id.wp_threshold_seekbar);
+ valueView = (TextView) v.findViewById(R.id.wp_threshold_value_view);
+
+ // init seekbar
+ seekBar.setMax(Settings.SHOW_WP_THRESHOLD_MAX);
+
+ // set initial value
+ int threshold = Settings.getWayPointsThreshold();
+ valueView.setText(String.valueOf(threshold));
+ seekBar.setProgress(threshold);
+
+ seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
+ @Override
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ if (fromUser) {
+ valueView.setText(String.valueOf(progress));
+ }
+ }
+ @Override
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ }
+ @Override
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ Settings.setShowWaypointsThreshold(seekBar.getProgress());
+ }
+ });
+
+ return v;
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/speech/SpeechService.java b/main/src/cgeo/geocaching/speech/SpeechService.java
index 7226014..634f1c4 100644
--- a/main/src/cgeo/geocaching/speech/SpeechService.java
+++ b/main/src/cgeo/geocaching/speech/SpeechService.java
@@ -1,6 +1,7 @@
package cgeo.geocaching.speech;
import cgeo.geocaching.DirectionProvider;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.utils.GeoDirHandler;
import cgeo.geocaching.utils.Log;
@@ -37,8 +38,8 @@ public class SpeechService extends Service implements OnInitListener {
private boolean initialized = false;
protected float direction;
protected Geopoint position;
- protected boolean directionInitialized;
- protected boolean positionInitialized;
+ protected boolean directionInitialized = !Settings.isUseCompass(); // don't wait for magnetometer, if it shall not be used
+ protected boolean positionInitialized = false;
GeoDirHandler geoHandler = new GeoDirHandler() {
@Override
@@ -109,10 +110,10 @@ public class SpeechService extends Service implements OnInitListener {
private static float getDeltaForDistance(final float distance) {
if (distance > 1.0) {
return 0.2f;
- } else if (distance > 0.05) {
+ }
+ if (distance > 0.05) {
return distance / 5.0f;
}
-
return 0f;
}
diff --git a/main/src/cgeo/geocaching/speech/TextFactory.java b/main/src/cgeo/geocaching/speech/TextFactory.java
index 0e13564..81a74fb 100644
--- a/main/src/cgeo/geocaching/speech/TextFactory.java
+++ b/main/src/cgeo/geocaching/speech/TextFactory.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.speech;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.IConversion;
@@ -22,50 +22,80 @@ public class TextFactory {
}
private static String getDistance(Geopoint position, Geopoint target) {
- float kilometers = position.distanceTo(target);
+ final float kilometers = position.distanceTo(target);
- if (Settings.isUseMetricUnits()) {
- if (kilometers >= 5.0) {
- return getString(R.string.tts_kilometers, String.valueOf(Math.round(kilometers)));
- }
- if (kilometers >= 1.0) {
- String digits = String.format(Locale.getDefault(), "%.1f", kilometers);
- return getString(R.string.tts_kilometers, digits);
- }
- int meters = (int) (kilometers * 1000.0);
- if (meters > 50) {
- return getString(R.string.tts_meters, String.valueOf(Math.round(meters / 10.0) * 10));
- }
- return getString(R.string.tts_meters, String.valueOf(meters));
+ if (Settings.isUseImperialUnits()) {
+ return getDistance(kilometers / IConversion.MILES_TO_KILOMETER,
+ (int) (kilometers * 1000.0 * IConversion.METERS_TO_FEET),
+ 3.0f, 0.2f, 300,
+ R.plurals.tts_miles, R.string.tts_one_mile,
+ R.plurals.tts_feet, R.string.tts_one_foot);
}
+ return getDistance(kilometers, (int) (kilometers * 1000.0),
+ 5.0f, 1.0f, 50,
+ R.plurals.tts_kilometers, R.string.tts_one_kilometer,
+ R.plurals.tts_meters, R.string.tts_one_meter);
+ }
- float miles = kilometers / IConversion.MILES_TO_KILOMETER;
- if (miles >= 3.0) {
- return getString(R.string.tts_miles, String.valueOf(Math.round(miles)));
+ private static String getDistance(float farDistance, int nearDistance,
+ float farFarAway, float farNearAway, int nearFarAway,
+ int farId, int farOneId, int nearId, int nearOneId) {
+ if (farDistance >= farFarAway) {
+ // example: "5 kilometers" - always without decimal digits
+ final int quantity = Math.round(farDistance);
+ if (quantity == 1) {
+ return getString(farOneId, quantity, String.valueOf(quantity));
+ }
+ return getQuantityString(farId, quantity, String.valueOf(quantity));
}
- if (miles >= 0.2) { // approx 1000 ft
- String digits = String.format(Locale.getDefault(), "%.1f", miles);
- return getString(R.string.tts_miles, digits);
+ if (farDistance >= farNearAway) {
+ // example: "2.2 kilometers" - decimals if necessary
+ final float precision1 = Math.round(farDistance * 10.0f) / 10.0f;
+ final float precision0 = Math.round(farDistance);
+ if (Math.abs(precision1 - precision0) < 0.0001) {
+ // this is an int - e.g. 2 kilometers
+ final int quantity = (int) precision0;
+ if (quantity == 1) {
+ return getString(farOneId, quantity, String.valueOf(quantity));
+ }
+ return getQuantityString(farId, quantity, String.valueOf(quantity));
+ }
+ // this is no int - e.g. 1.7 kilometers
+ final String digits = String.format(Locale.getDefault(), "%.1f", farDistance);
+ // always use the plural (9 leads to plural)
+ return getQuantityString(farId, 9, digits);
+ }
+ // example: "34 meters"
+ int quantity = nearDistance;
+ if (quantity > nearFarAway) {
+ // example: "120 meters" - rounded to 10 meters
+ quantity = (int) Math.round(quantity / 10.0) * 10;
}
- int feet = (int) (kilometers * 1000.0 * IConversion.METERS_TO_FEET);
- if (feet > 300) {
- return getString(R.string.tts_feet, String.valueOf(Math.round(feet / 10.0) * 10));
+ if (quantity == 1) {
+ return getString(nearOneId, quantity, String.valueOf(quantity));
}
- return getString(R.string.tts_feet, String.valueOf(feet));
+ return getQuantityString(nearId, quantity, String.valueOf(quantity));
}
private static String getString(int resourceId, Object... formatArgs) {
return cgeoapplication.getInstance().getString(resourceId, formatArgs);
}
+ private static String getQuantityString(int resourceId, int quantity, Object... formatArgs) {
+ return cgeoapplication.getInstance().getResources().getQuantityString(resourceId, quantity, formatArgs);
+ }
+
private static String getDirection(Geopoint position, Geopoint target, float direction) {
final int bearing = (int) position.bearingTo(target);
- int degrees = (int) AngleUtils.normalize(bearing - direction);
+ final int degrees = (int) AngleUtils.normalize(bearing - direction);
int hours = (degrees + 15) / 30;
if (hours == 0) {
hours = 12;
}
+ if (hours == 1) {
+ return getString(R.string.tts_one_oclock, String.valueOf(hours));
+ }
return getString(R.string.tts_oclock, String.valueOf(hours));
}
}
diff --git a/main/src/cgeo/geocaching/twitter/Twitter.java b/main/src/cgeo/geocaching/twitter/Twitter.java
index 3f1f749..7233764 100644
--- a/main/src/cgeo/geocaching/twitter/Twitter.java
+++ b/main/src/cgeo/geocaching/twitter/Twitter.java
@@ -1,7 +1,6 @@
package cgeo.geocaching.twitter;
import cgeo.geocaching.Geocache;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.Trackable;
import cgeo.geocaching.cgData;
import cgeo.geocaching.cgeoapplication;
@@ -11,6 +10,7 @@ import cgeo.geocaching.geopoint.GeopointFormatter.Format;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.OAuth;
import cgeo.geocaching.network.Parameters;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.Log;
import ch.boye.httpclientandroidlib.HttpResponse;
@@ -19,13 +19,20 @@ import org.apache.commons.lang3.StringUtils;
public final class Twitter {
private static final String HASH_PREFIX_WITH_BLANK = " #";
- public static final int MAX_TWEET_SIZE = 140;
+ private static final int MAX_TWEET_SIZE = 140;
- public static void postTweet(final cgeoapplication app, final String status, final Geopoint coords) {
- if (app == null) {
- return;
- }
- if (!Settings.isTwitterLoginValid()) {
+ public static void postTweetCache(String geocode) {
+ final Geocache cache = cgData.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
+ postTweet(cgeoapplication.getInstance(), getStatusMessage(cache), null);
+ }
+
+ public static void postTweetTrackable(String geocode) {
+ final Trackable trackable = cgData.loadTrackable(geocode);
+ postTweet(cgeoapplication.getInstance(), getStatusMessage(trackable), null);
+ }
+
+ private static void postTweet(final cgeoapplication app, final String status, final Geopoint coords) {
+ if (app == null || !Settings.isUseTwitter() || !Settings.isTwitterLoginValid()) {
return;
}
@@ -38,19 +45,23 @@ public final class Twitter {
"display_coordinates", "true");
}
- OAuth.signOAuth("api.twitter.com", "/1/statuses/update.json", "POST", false, parameters, Settings.getTokenPublic(), Settings.getTokenSecret(), Settings.getKeyConsumerPublic(), Settings.getKeyConsumerSecret());
- final HttpResponse httpResponse = Network.postRequest("http://api.twitter.com/1/statuses/update.json", parameters);
- if (httpResponse != null && httpResponse.getStatusLine().getStatusCode() == 200) {
- Log.i("Tweet posted");
+ OAuth.signOAuth("api.twitter.com", "/1.1/statuses/update.json", "POST", false, parameters, Settings.getTokenPublic(), Settings.getTokenSecret(), Settings.getKeyConsumerPublic(), Settings.getKeyConsumerSecret());
+ final HttpResponse httpResponse = Network.postRequest("http://api.twitter.com/1.1/statuses/update.json", parameters);
+ if (httpResponse != null) {
+ if (httpResponse.getStatusLine().getStatusCode() == 200) {
+ Log.i("Tweet posted");
+ } else {
+ Log.e("Tweet could not be posted. Reason: " + httpResponse.toString());
+ }
} else {
- Log.e("Tweet could not be posted");
+ Log.e("Tweet could not be posted. Reason: httpResponse Object is null");
}
} catch (Exception e) {
Log.e("Twitter.postTweet", e);
}
}
- public static void appendHashTag(final StringBuilder status, final String tag) {
+ private static void appendHashTag(final StringBuilder status, final String tag) {
if (status.length() + HASH_PREFIX_WITH_BLANK.length() + tag.length() <= MAX_TWEET_SIZE) {
final String tagWithPrefix = HASH_PREFIX_WITH_BLANK + tag;
if (status.indexOf(tagWithPrefix, 0) == -1) {
@@ -59,17 +70,6 @@ public final class Twitter {
}
}
- public static void postTweetCache(String geocode) {
- if (!Settings.isUseTwitter()) {
- return;
- }
- if (!Settings.isTwitterLoginValid()) {
- return;
- }
- final Geocache cache = cgData.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
- postTweet(cgeoapplication.getInstance(), getStatusMessage(cache), null);
- }
-
static String getStatusMessage(Geocache cache) {
String name = cache.getName();
if (name.length() > 100) {
@@ -79,20 +79,6 @@ public final class Twitter {
return fillTemplate(Settings.getCacheTwitterMessage(), name, url);
}
- private static String fillTemplate(String template, String name, final String url) {
- String result = StringUtils.replace(template, "[NAME]", name);
- result = StringUtils.replace(result, "[URL]", url);
- StringBuilder builder = new StringBuilder(result);
- appendHashTag(builder, "cgeo");
- appendHashTag(builder, "geocaching");
- return builder.toString();
- }
-
- public static void postTweetTrackable(String geocode) {
- final Trackable trackable = cgData.loadTrackable(geocode);
- postTweet(cgeoapplication.getInstance(), getStatusMessage(trackable), null);
- }
-
static String getStatusMessage(Trackable trackable) {
String name = trackable.getName();
if (name.length() > 82) {
@@ -102,4 +88,13 @@ public final class Twitter {
String status = Settings.getTrackableTwitterMessage();
return fillTemplate(status, name, url);
}
+
+ private static String fillTemplate(String template, String name, final String url) {
+ String result = StringUtils.replace(template, "[NAME]", name);
+ result = StringUtils.replace(result, "[URL]", url);
+ StringBuilder builder = new StringBuilder(result);
+ appendHashTag(builder, "cgeo");
+ appendHashTag(builder, "geocaching");
+ return builder.toString();
+ }
}
diff --git a/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java b/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java
index 7146a62..6b185267 100644
--- a/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java
+++ b/main/src/cgeo/geocaching/twitter/TwitterAuthorizationActivity.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.twitter;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.network.OAuthAuthorizationActivity;
import org.apache.commons.lang3.tuple.ImmutablePair;
diff --git a/main/src/cgeo/geocaching/ui/AbstractUserClickListener.java b/main/src/cgeo/geocaching/ui/AbstractUserClickListener.java
new file mode 100644
index 0000000..b717568
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/AbstractUserClickListener.java
@@ -0,0 +1,76 @@
+package cgeo.geocaching.ui;
+
+import cgeo.geocaching.R;
+import cgeo.geocaching.cgeocaches;
+import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.network.Network;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.res.Resources;
+import android.net.Uri;
+import android.view.View;
+
+abstract class AbstractUserClickListener implements View.OnClickListener {
+
+ private final boolean enabled;
+
+ public AbstractUserClickListener(final boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ @Override
+ public void onClick(View view) {
+ if (view == null) {
+ return;
+ }
+ if (!enabled) {
+ return;
+ }
+
+ showUserActionsDialog(getUserName(view), view);
+ }
+
+ protected abstract CharSequence getUserName(View view);
+
+ /**
+ * Opens a dialog to do actions on an user name
+ */
+ protected static void showUserActionsDialog(final CharSequence name, final View view) {
+ final AbstractActivity context = (AbstractActivity) view.getContext();
+ final Resources res = context.getResources();
+ final CharSequence[] items = { res.getString(R.string.user_menu_view_hidden),
+ res.getString(R.string.user_menu_view_found),
+ res.getString(R.string.user_menu_open_browser),
+ res.getString(R.string.user_menu_send_message)
+ };
+
+ final AlertDialog.Builder builder = new AlertDialog.Builder(context);
+ builder.setTitle(res.getString(R.string.user_menu_title) + " " + name);
+ builder.setItems(items, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int item) {
+ switch (item) {
+ case 0:
+ cgeocaches.startActivityOwner(context, name.toString());
+ return;
+ case 1:
+ cgeocaches.startActivityUserName(context, name.toString());
+ return;
+ case 2:
+ context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/profile/?u=" + Network.encode(name.toString()))));
+ return;
+ case 3:
+ context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/email/?u=" + Network.encode(name.toString()))));
+ return;
+ default:
+ break;
+ }
+ }
+ });
+ final AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/ui/CacheListAdapter.java b/main/src/cgeo/geocaching/ui/CacheListAdapter.java
index d95363e..3179857 100644
--- a/main/src/cgeo/geocaching/ui/CacheListAdapter.java
+++ b/main/src/cgeo/geocaching/ui/CacheListAdapter.java
@@ -6,7 +6,7 @@ import cgeo.geocaching.CacheDetailActivity;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.IGeoData;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.enumerations.CacheListType;
import cgeo.geocaching.enumerations.CacheType;
@@ -14,6 +14,7 @@ import cgeo.geocaching.filter.IFilter;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.sorting.CacheComparator;
import cgeo.geocaching.sorting.DistanceComparator;
+import cgeo.geocaching.sorting.EventDateComparator;
import cgeo.geocaching.sorting.InverseComparator;
import cgeo.geocaching.sorting.VisitComparator;
import cgeo.geocaching.utils.AngleUtils;
@@ -642,4 +643,25 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
}
return list.size();
}
+
+ public void setInitialComparator() {
+ CacheComparator comparator = null; // a null comparator will automatically sort by distance
+ if (cacheListType == CacheListType.HISTORY) {
+ comparator = new VisitComparator();
+ } else {
+ if (CollectionUtils.isNotEmpty(list)) {
+ boolean eventsOnly = true;
+ for (final Geocache cache : list) {
+ if (!cache.isEventCache()) {
+ eventsOnly = false;
+ break;
+ }
+ }
+ if (eventsOnly) {
+ comparator = new EventDateComparator();
+ }
+ }
+ }
+ setComparator(comparator);
+ }
}
diff --git a/main/src/cgeo/geocaching/ui/CompassMiniView.java b/main/src/cgeo/geocaching/ui/CompassMiniView.java
index da8f69e..92280dc 100644
--- a/main/src/cgeo/geocaching/ui/CompassMiniView.java
+++ b/main/src/cgeo/geocaching/ui/CompassMiniView.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.ui;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.utils.AngleUtils;
diff --git a/main/src/cgeo/geocaching/ui/CompassView.java b/main/src/cgeo/geocaching/ui/CompassView.java
index c926057..b73a2a9 100644
--- a/main/src/cgeo/geocaching/ui/CompassView.java
+++ b/main/src/cgeo/geocaching/ui/CompassView.java
@@ -171,12 +171,12 @@ public class CompassView extends View implements PeriodicHandlerListener {
headingDrawn = cacheHeadingShown;
}
- float azimuthTemp = azimuthDrawn;
+ final float azimuthTemp = azimuthDrawn;
final float azimuthRelative = AngleUtils.normalize(azimuthTemp - headingDrawn);
// compass margins
- int canvasCenterX = (compassRoseWidth / 2) + ((getWidth() - compassRoseWidth) / 2);
- int canvasCenterY = (compassRoseHeight / 2) + ((getHeight() - compassRoseHeight) / 2);
+ final int canvasCenterX = (compassRoseWidth / 2) + ((getWidth() - compassRoseWidth) / 2);
+ final int canvasCenterY = (compassRoseHeight / 2) + ((getHeight() - compassRoseHeight) / 2);
super.onDraw(canvas);
@@ -217,38 +217,36 @@ public class CompassView extends View implements PeriodicHandlerListener {
}
private int measureWidth(int measureSpec) {
- int result;
- int specMode = MeasureSpec.getMode(measureSpec);
- int specSize = MeasureSpec.getSize(measureSpec);
+ final int specMode = MeasureSpec.getMode(measureSpec);
+ final int specSize = MeasureSpec.getSize(measureSpec);
if (specMode == MeasureSpec.EXACTLY) {
- result = specSize;
- } else {
- result = compassArrow.getWidth() + getPaddingLeft() + getPaddingRight();
+ return specSize;
+ }
- if (specMode == MeasureSpec.AT_MOST) {
- result = Math.min(result, specSize);
- }
+ final int desired = compassArrow.getWidth() + getPaddingLeft() + getPaddingRight();
+ if (specMode == MeasureSpec.AT_MOST) {
+ return Math.min(desired, specSize);
}
- return result;
+ return desired;
}
private int measureHeight(int measureSpec) {
- int result;
- int specMode = MeasureSpec.getMode(measureSpec);
- int specSize = MeasureSpec.getSize(measureSpec);
+ // The duplicated code in measureHeight and measureWidth cannot be avoided.
+ // Those methods must be efficient, therefore we cannot extract the code differences and unify the remainder.
+ final int specMode = MeasureSpec.getMode(measureSpec);
+ final int specSize = MeasureSpec.getSize(measureSpec);
if (specMode == MeasureSpec.EXACTLY) {
- result = specSize;
- } else {
- result = compassArrow.getHeight() + getPaddingTop() + getPaddingBottom();
+ return specSize;
+ }
- if (specMode == MeasureSpec.AT_MOST) {
- result = Math.min(result, specSize);
- }
+ final int desired = compassArrow.getHeight() + getPaddingTop() + getPaddingBottom();
+ if (specMode == MeasureSpec.AT_MOST) {
+ return Math.min(desired, specSize);
}
- return result;
+ return desired;
}
}
diff --git a/main/src/cgeo/geocaching/ui/DistanceView.java b/main/src/cgeo/geocaching/ui/DistanceView.java
index 9611511..b36166d 100644
--- a/main/src/cgeo/geocaching/ui/DistanceView.java
+++ b/main/src/cgeo/geocaching/ui/DistanceView.java
@@ -36,8 +36,4 @@ public class DistanceView extends TextView {
public void setDistance(Float distance) {
setText("~" + Units.getDistanceFromKilometers(distance));
}
-
- public void clear() {
- setText(null);
- }
} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/ui/EditNoteDialog.java b/main/src/cgeo/geocaching/ui/EditNoteDialog.java
index bbf0618..9a122e2 100644
--- a/main/src/cgeo/geocaching/ui/EditNoteDialog.java
+++ b/main/src/cgeo/geocaching/ui/EditNoteDialog.java
@@ -1,21 +1,17 @@
package cgeo.geocaching.ui;
import cgeo.geocaching.R;
-import cgeo.geocaching.R.string;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
-import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowManager.LayoutParams;
-import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
-import android.widget.TextView;
-import android.widget.TextView.OnEditorActionListener;
-public class EditNoteDialog extends DialogFragment implements OnEditorActionListener {
+public class EditNoteDialog extends DialogFragment {
public interface EditNoteDialogListener {
void onFinishEditNoteDialog(final String inputText);
@@ -24,7 +20,6 @@ public class EditNoteDialog extends DialogFragment implements OnEditorActionList
public static final String ARGUMENT_INITIAL_NOTE = "initialNote";
private EditText mEditText;
- private String initialNote;
public static EditNoteDialog newInstance(final String initialNote) {
EditNoteDialog dialog = new EditNoteDialog();
@@ -37,34 +32,35 @@ public class EditNoteDialog extends DialogFragment implements OnEditorActionList
}
@Override
- public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
- final Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.fragment_edit_note, container);
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ LayoutInflater inflater = getActivity().getLayoutInflater();
+ View view = inflater.inflate(R.layout.fragment_edit_note, null);
mEditText = (EditText) view.findViewById(R.id.note);
- initialNote = getArguments().getString(ARGUMENT_INITIAL_NOTE);
+ String initialNote = getArguments().getString(ARGUMENT_INITIAL_NOTE);
if (initialNote != null) {
mEditText.setText(initialNote);
initialNote = null;
}
- getDialog().setTitle(string.cache_personal_note);
- mEditText.requestFocus();
- getDialog().getWindow().setSoftInputMode(
- LayoutParams.SOFT_INPUT_STATE_VISIBLE);
- mEditText.setOnEditorActionListener(this);
- return view;
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ builder.setTitle(R.string.cache_personal_note);
+ builder.setView(view);
+ builder.setPositiveButton(android.R.string.ok,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int whichButton) {
+ final EditNoteDialogListener activity = (EditNoteDialogListener) getActivity();
+ activity.onFinishEditNoteDialog(mEditText.getText().toString());
+ dialog.dismiss();
+ }
+ });
+ builder.setNegativeButton(android.R.string.cancel,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int whichButton) {
+ dialog.dismiss();
+ }
+ });
+ return builder.create();
}
-
- @Override
- public boolean onEditorAction(final TextView v, final int actionId, final KeyEvent event) {
- if (EditorInfo.IME_ACTION_DONE == actionId) {
- final EditNoteDialogListener activity = (EditNoteDialogListener) getActivity();
- activity.onFinishEditNoteDialog(mEditText.getText().toString());
- dismiss();
- return true;
- }
- return false;
- }
-
-
}
diff --git a/main/src/cgeo/geocaching/ui/HtmlImageCounter.java b/main/src/cgeo/geocaching/ui/HtmlImageCounter.java
new file mode 100644
index 0000000..24b70ea
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/HtmlImageCounter.java
@@ -0,0 +1,19 @@
+package cgeo.geocaching.ui;
+
+import android.graphics.drawable.Drawable;
+import android.text.Html;
+
+public class HtmlImageCounter implements Html.ImageGetter {
+
+ private int imageCount = 0;
+
+ @Override
+ public Drawable getDrawable(String url) {
+ imageCount++;
+ return null;
+ }
+
+ public int getImageCount() {
+ return imageCount;
+ }
+} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/ui/IndexOutOfBoundsAvoidingTextView.java b/main/src/cgeo/geocaching/ui/IndexOutOfBoundsAvoidingTextView.java
new file mode 100644
index 0000000..a0c8b52
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/IndexOutOfBoundsAvoidingTextView.java
@@ -0,0 +1,55 @@
+package cgeo.geocaching.ui;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+/**
+ * Jelly beans can crash when calculating the layout of a textview.
+ *
+ * https://code.google.com/p/android/issues/detail?id=35466
+ *
+ */
+public class IndexOutOfBoundsAvoidingTextView extends TextView {
+
+ public IndexOutOfBoundsAvoidingTextView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ public IndexOutOfBoundsAvoidingTextView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public IndexOutOfBoundsAvoidingTextView(Context context) {
+ super(context);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ try{
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ } catch (IndexOutOfBoundsException e) {
+ setText(getText().toString());
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+ }
+
+ @Override
+ public void setGravity(int gravity){
+ try{
+ super.setGravity(gravity);
+ } catch (IndexOutOfBoundsException e) {
+ setText(getText().toString());
+ super.setGravity(gravity);
+ }
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ try{
+ super.setText(text, type);
+ } catch (IndexOutOfBoundsException e) {
+ setText(text.toString());
+ }
+ }
+} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/ui/LoggingUI.java b/main/src/cgeo/geocaching/ui/LoggingUI.java
index ac74dd3..0ee724a 100644
--- a/main/src/cgeo/geocaching/ui/LoggingUI.java
+++ b/main/src/cgeo/geocaching/ui/LoggingUI.java
@@ -3,7 +3,7 @@ package cgeo.geocaching.ui;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.LogEntry;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgData;
import cgeo.geocaching.activity.IAbstractActivity;
import cgeo.geocaching.enumerations.LogType;
diff --git a/main/src/cgeo/geocaching/ui/OwnerActionsClickListener.java b/main/src/cgeo/geocaching/ui/OwnerActionsClickListener.java
new file mode 100644
index 0000000..45ce237
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/OwnerActionsClickListener.java
@@ -0,0 +1,31 @@
+package cgeo.geocaching.ui;
+
+import cgeo.geocaching.Geocache;
+
+import org.apache.commons.lang3.StringUtils;
+
+import android.view.View;
+import android.widget.TextView;
+
+/**
+ * Listener for clicks on owner name
+ */
+public class OwnerActionsClickListener extends AbstractUserClickListener {
+
+ private final Geocache cache;
+
+ public OwnerActionsClickListener(Geocache cache) {
+ super(cache.supportsUserActions());
+ this.cache = cache;
+ }
+
+ @Override
+ protected String getUserName(View view) {
+ // Use real owner name vice the one owner chose to display
+ if (StringUtils.isNotBlank(cache.getOwnerUserId())) {
+ return cache.getOwnerUserId();
+ }
+ return ((TextView) view).getText().toString();
+ }
+}
+
diff --git a/main/src/cgeo/geocaching/ui/UserActionsClickListener.java b/main/src/cgeo/geocaching/ui/UserActionsClickListener.java
new file mode 100644
index 0000000..292074e
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/UserActionsClickListener.java
@@ -0,0 +1,26 @@
+package cgeo.geocaching.ui;
+
+import cgeo.geocaching.Geocache;
+
+import android.view.View;
+import android.widget.TextView;
+
+/**
+ * Listener for clicks on user name
+ */
+public class UserActionsClickListener extends AbstractUserClickListener {
+
+ public UserActionsClickListener(Geocache cache) {
+ super(cache.supportsUserActions());
+ }
+
+ public UserActionsClickListener() {
+ super(true);
+ }
+
+ @Override
+ protected CharSequence getUserName(View view) {
+ return ((TextView) view).getText().toString();
+ }
+}
+
diff --git a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java
index 4ab9af0..959cb14 100644
--- a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java
+++ b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java
@@ -3,8 +3,8 @@ package cgeo.geocaching.ui.dialog;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.IGeoData;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
-import cgeo.geocaching.Settings.coordInputFormatEnum;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.Settings.coordInputFormatEnum;
import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.compatibility.Compatibility;
@@ -13,13 +13,10 @@ import cgeo.geocaching.geopoint.GeopointFormatter;
import org.apache.commons.lang3.StringUtils;
-import android.app.Dialog;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
-import android.view.ViewGroup.LayoutParams;
-import android.view.Window;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
@@ -28,7 +25,7 @@ import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
-public class CoordinatesInputDialog extends Dialog {
+public class CoordinatesInputDialog extends NoTitleDialog {
final private AbstractActivity context;
final private IGeoData geo;
@@ -65,13 +62,6 @@ public class CoordinatesInputDialog extends Dialog {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- try {
- requestWindowFeature(Window.FEATURE_NO_TITLE);
- getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
- } catch (Exception e) {
- // nothing
- }
-
setContentView(R.layout.coordinatesinput_dialog);
final Spinner spinner = (Spinner) findViewById(R.id.spinnerCoordinateFormats);
@@ -338,7 +328,7 @@ public class CoordinatesInputDialog extends Dialog {
if (currentFormat == coordInputFormatEnum.Plain) {
try {
gp = new Geopoint(eLat.getText().toString(), eLon.getText().toString());
- } catch (Geopoint.ParseException e) {
+ } catch (final Geopoint.ParseException e) {
if (signalError) {
context.showToast(context.getResources().getString(R.string.err_parse_lat_lon));
}
@@ -347,20 +337,20 @@ public class CoordinatesInputDialog extends Dialog {
return true;
}
- String latDir = bLat.getText().toString();
- String lonDir = bLon.getText().toString();
- String latDeg = eLatDeg.getText().toString();
- String lonDeg = eLonDeg.getText().toString();
- String latDegFrac = eLatMin.getText().toString();
- String lonDegFrac = eLonMin.getText().toString();
- String latMin = eLatMin.getText().toString();
- String lonMin = eLonMin.getText().toString();
- String latMinFrac = eLatSec.getText().toString();
- String lonMinFrac = eLonSec.getText().toString();
- String latSec = eLatSec.getText().toString();
- String lonSec = eLonSec.getText().toString();
- String latSecFrac = eLatSub.getText().toString();
- String lonSecFrac = eLonSub.getText().toString();
+ final String latDir = bLat.getText().toString();
+ final String lonDir = bLon.getText().toString();
+ final String latDeg = eLatDeg.getText().toString();
+ final String lonDeg = eLonDeg.getText().toString();
+ final String latDegFrac = eLatMin.getText().toString();
+ final String lonDegFrac = eLonMin.getText().toString();
+ final String latMin = eLatMin.getText().toString();
+ final String lonMin = eLonMin.getText().toString();
+ final String latMinFrac = eLatSec.getText().toString();
+ final String lonMinFrac = eLonSec.getText().toString();
+ final String latSec = eLatSec.getText().toString();
+ final String lonSec = eLonSec.getText().toString();
+ final String latSecFrac = eLatSub.getText().toString();
+ final String lonSecFrac = eLonSub.getText().toString();
switch (currentFormat) {
case Deg:
diff --git a/main/src/cgeo/geocaching/ui/dialog/DateDialog.java b/main/src/cgeo/geocaching/ui/dialog/DateDialog.java
index a9c579c..18f8e2e 100644
--- a/main/src/cgeo/geocaching/ui/dialog/DateDialog.java
+++ b/main/src/cgeo/geocaching/ui/dialog/DateDialog.java
@@ -3,15 +3,12 @@ package cgeo.geocaching.ui.dialog;
import cgeo.geocaching.R;
import android.app.Activity;
-import android.app.Dialog;
import android.os.Bundle;
-import android.view.ViewGroup.LayoutParams;
-import android.view.Window;
import android.widget.DatePicker;
import java.util.Calendar;
-public class DateDialog extends Dialog {
+public class DateDialog extends NoTitleDialog {
public interface DateDialogParent {
abstract public void setDate(final Calendar date);
@@ -32,13 +29,6 @@ public class DateDialog extends Dialog {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- try {
- requestWindowFeature(Window.FEATURE_NO_TITLE);
- getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
- } catch (Exception e) {
- // nothing
- }
-
setContentView(R.layout.date);
final DatePicker picker = (DatePicker) findViewById(R.id.picker);
diff --git a/main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java b/main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java
index 862b1a0..2c4f38d 100644
--- a/main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java
+++ b/main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java
@@ -1,7 +1,7 @@
package cgeo.geocaching.ui.dialog;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.cgeoapplication;
import android.app.Activity;
diff --git a/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java b/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java
new file mode 100644
index 0000000..fc5ebe6
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java
@@ -0,0 +1,30 @@
+package cgeo.geocaching.ui.dialog;
+
+import android.app.Dialog;
+import android.content.Context;
+import android.os.Bundle;
+import android.view.ViewGroup.LayoutParams;
+import android.view.Window;
+
+public abstract class NoTitleDialog extends Dialog {
+
+ public NoTitleDialog(Context context) {
+ super(context);
+ }
+
+ public NoTitleDialog(Context context, int theme) {
+ super(context, theme);
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ try {
+ requestWindowFeature(Window.FEATURE_NO_TITLE);
+ getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
+ } catch (final Exception e) {
+ // nothing
+ }
+ }
+}
diff --git a/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java b/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java
new file mode 100644
index 0000000..8da711e
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java
@@ -0,0 +1,112 @@
+package cgeo.geocaching.ui.logs;
+
+import cgeo.geocaching.CacheDetailActivity;
+import cgeo.geocaching.Geocache;
+import cgeo.geocaching.LogEntry;
+import cgeo.geocaching.R;
+import cgeo.geocaching.cgeoapplication;
+import cgeo.geocaching.enumerations.LogType;
+import cgeo.geocaching.ui.UserActionsClickListener;
+
+import org.apache.commons.lang3.StringUtils;
+
+import android.content.res.Resources;
+import android.view.View;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+public class CacheLogsViewCreator extends LogsViewCreator {
+ private final boolean allLogs;
+ private final Resources res = cgeoapplication.getInstance().getResources();
+
+ public CacheLogsViewCreator(CacheDetailActivity cacheDetailActivity, boolean allLogs) {
+ super(cacheDetailActivity);
+ this.allLogs = allLogs;
+ }
+
+ /**
+ * May return null!
+ *
+ * @return
+ */
+ private Geocache getCache() {
+ if (this.activity instanceof CacheDetailActivity) {
+ CacheDetailActivity details = (CacheDetailActivity) this.activity;
+ return details.getCache();
+ }
+ return null;
+ }
+
+ @Override
+ protected List<LogEntry> getLogs() {
+ return allLogs ? getCache().getLogs() : getCache().getFriendsLogs();
+ }
+
+ @Override
+ protected void addHeaderView() {
+ // adds the log counts
+ final Map<LogType, Integer> logCounts = getCache().getLogCounts();
+ if (logCounts != null) {
+ final List<Entry<LogType, Integer>> sortedLogCounts = new ArrayList<Entry<LogType, Integer>>(logCounts.size());
+ for (final Entry<LogType, Integer> entry : logCounts.entrySet()) {
+ // it may happen that the label is unknown -> then avoid any output for this type
+ if (entry.getKey() != LogType.PUBLISH_LISTING && entry.getKey().getL10n() != null) {
+ sortedLogCounts.add(entry);
+ }
+ }
+
+ if (!sortedLogCounts.isEmpty()) {
+ // sort the log counts by type id ascending. that way the FOUND, DNF log types are the first and most visible ones
+ Collections.sort(sortedLogCounts, new Comparator<Entry<LogType, Integer>>() {
+
+ @Override
+ public int compare(Entry<LogType, Integer> logCountItem1, Entry<LogType, Integer> logCountItem2) {
+ return logCountItem1.getKey().compareTo(logCountItem2.getKey());
+ }
+ });
+
+ final ArrayList<String> labels = new ArrayList<String>(sortedLogCounts.size());
+ for (final Entry<LogType, Integer> pair : sortedLogCounts) {
+ labels.add(pair.getValue() + "× " + pair.getKey().getL10n());
+ }
+
+ final TextView countView = new TextView(activity);
+ countView.setText(res.getString(R.string.cache_log_types) + ": " + StringUtils.join(labels, ", "));
+ view.addHeaderView(countView, null, false);
+ }
+ }
+ }
+
+ @Override
+ protected void fillCountOrLocation(LogViewHolder holder, final LogEntry log) {
+ // finds count
+ if (log.found == -1) {
+ holder.countOrLocation.setVisibility(View.GONE);
+ } else {
+ holder.countOrLocation.setVisibility(View.VISIBLE);
+ holder.countOrLocation.setText(res.getQuantityString(R.plurals.cache_counts, log.found, log.found));
+ }
+ }
+
+ @Override
+ protected boolean isValid() {
+ return getCache() != null;
+ }
+
+ @Override
+ protected String getGeocode() {
+ return getCache().getGeocode();
+ }
+
+ @Override
+ protected UserActionsClickListener createUserActionsListener() {
+ return new UserActionsClickListener(getCache());
+ }
+
+} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/LogViewHolder.java b/main/src/cgeo/geocaching/ui/logs/LogViewHolder.java
index 14148d0..16f5537 100644
--- a/main/src/cgeo/geocaching/LogViewHolder.java
+++ b/main/src/cgeo/geocaching/ui/logs/LogViewHolder.java
@@ -1,7 +1,8 @@
-package cgeo.geocaching;
+package cgeo.geocaching.ui.logs;
import butterknife.InjectView;
+import cgeo.geocaching.R;
import cgeo.geocaching.ui.AbstractViewHolder;
import android.view.View;
diff --git a/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java b/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java
new file mode 100644
index 0000000..ee2713a
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java
@@ -0,0 +1,175 @@
+package cgeo.geocaching.ui.logs;
+
+import cgeo.geocaching.Image;
+import cgeo.geocaching.ImagesActivity;
+import cgeo.geocaching.LogEntry;
+import cgeo.geocaching.R;
+import cgeo.geocaching.StoredList;
+import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.Progress;
+import cgeo.geocaching.network.HtmlImage;
+import cgeo.geocaching.ui.AbstractCachingPageViewCreator;
+import cgeo.geocaching.ui.AnchorAwareLinkMovementMethod;
+import cgeo.geocaching.ui.DecryptTextClickListener;
+import cgeo.geocaching.ui.Formatter;
+import cgeo.geocaching.ui.HtmlImageCounter;
+import cgeo.geocaching.ui.UserActionsClickListener;
+import cgeo.geocaching.utils.TextUtils;
+import cgeo.geocaching.utils.UnknownTagsHandler;
+
+import org.apache.commons.lang3.StringEscapeUtils;
+
+import android.os.AsyncTask;
+import android.text.Html;
+import android.text.Spanned;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class LogsViewCreator extends AbstractCachingPageViewCreator<ListView> {
+
+ protected final AbstractActivity activity;
+
+ public LogsViewCreator(AbstractActivity activity) {
+ this.activity = activity;
+ }
+
+ @Override
+ public ListView getDispatchedView() {
+ if (!isValid()) {
+ return null;
+ }
+
+ final List<LogEntry> logs = getLogs();
+
+ view = (ListView) activity.getLayoutInflater().inflate(R.layout.logs_page, null);
+ addHeaderView();
+ view.setAdapter(new ArrayAdapter<LogEntry>(activity, R.layout.logs_item, logs) {
+
+ @Override
+ public View getView(final int position, final View convertView, final android.view.ViewGroup parent) {
+ View rowView = convertView;
+ if (null == rowView) {
+ rowView = activity.getLayoutInflater().inflate(R.layout.logs_item, null);
+ }
+ LogViewHolder holder = (LogViewHolder) rowView.getTag();
+ if (null == holder) {
+ holder = new LogViewHolder(rowView);
+ }
+ holder.setPosition(position);
+
+ final LogEntry log = getItem(position);
+ fillViewHolder(convertView, holder, log);
+ return rowView;
+ }
+ });
+
+ return view;
+ }
+
+ protected void fillViewHolder(final View convertView, LogViewHolder holder, final LogEntry log) {
+ if (log.date > 0) {
+ holder.date.setText(Formatter.formatShortDateVerbally(log.date));
+ holder.date.setVisibility(View.VISIBLE);
+ } else {
+ holder.date.setVisibility(View.GONE);
+ }
+
+ holder.type.setText(log.type.getL10n());
+ holder.author.setText(StringEscapeUtils.unescapeHtml4(log.author));
+
+ fillCountOrLocation(holder, log);
+
+ // logtext, avoid parsing HTML if not necessary
+ String logText = log.log;
+ if (TextUtils.containsHtml(logText)) {
+ logText = log.getDisplayText();
+ // Fast preview: parse only HTML without loading any images
+ final HtmlImageCounter imageCounter = new HtmlImageCounter();
+ final UnknownTagsHandler unknownTagsHandler = new UnknownTagsHandler();
+ holder.text.setText(Html.fromHtml(logText, imageCounter, unknownTagsHandler), TextView.BufferType.SPANNABLE);
+ if (imageCounter.getImageCount() > 0) {
+ // Complete view: parse again with loading images - if necessary ! If there are any images causing problems the user can see at least the preview
+ final LogImageLoader loader = new LogImageLoader(holder);
+ loader.execute(logText);
+ }
+ }
+ else {
+ holder.text.setText(logText, TextView.BufferType.SPANNABLE);
+ }
+
+ // images
+ if (log.hasLogImages()) {
+ holder.images.setText(log.getImageTitles());
+ holder.images.setVisibility(View.VISIBLE);
+ holder.images.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ ImagesActivity.startActivityLogImages(activity, getGeocode(), new ArrayList<Image>(log.getLogImages()));
+ }
+ });
+ } else {
+ holder.images.setVisibility(View.GONE);
+ }
+
+ // colored marker
+ final int marker = log.type.markerId;
+ if (marker != 0) {
+ holder.marker.setVisibility(View.VISIBLE);
+ holder.marker.setImageResource(marker);
+ }
+ else {
+ holder.marker.setVisibility(View.GONE);
+ }
+
+ if (null == convertView) {
+ holder.author.setOnClickListener(createUserActionsListener());
+ holder.text.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ holder.text.setOnClickListener(new DecryptTextClickListener());
+ activity.registerForContextMenu(holder.text);
+ }
+ }
+
+ abstract protected UserActionsClickListener createUserActionsListener();
+
+ abstract protected String getGeocode();
+
+ abstract protected List<LogEntry> getLogs();
+
+ abstract protected void addHeaderView();
+
+ abstract protected void fillCountOrLocation(LogViewHolder holder, final LogEntry log);
+
+ abstract protected boolean isValid();
+
+ /** Loads the Log Images outside the ui thread. */
+
+ private class LogImageLoader extends AsyncTask<String, Progress, Spanned> {
+ final private LogViewHolder holder;
+ final private int position;
+
+ public LogImageLoader(LogViewHolder holder) {
+ this.holder = holder;
+ this.position = holder.getPosition();
+ }
+
+ @Override
+ protected Spanned doInBackground(String... logtext) {
+ return Html.fromHtml(logtext[0], new HtmlImage(getGeocode(), false, StoredList.STANDARD_LIST_ID, false), null); //, TextView.BufferType.SPANNABLE)
+ }
+
+ @Override
+ protected void onPostExecute(Spanned result) {
+ // Ensure that this holder and its view still references the right item before updating the text.
+ if (position == holder.getPosition()) {
+ holder.text.setText(result);
+ }
+ }
+
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/ui/logs/TrackableLogsViewCreator.java b/main/src/cgeo/geocaching/ui/logs/TrackableLogsViewCreator.java
new file mode 100644
index 0000000..4c57406
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/logs/TrackableLogsViewCreator.java
@@ -0,0 +1,70 @@
+package cgeo.geocaching.ui.logs;
+
+import cgeo.geocaching.CacheDetailActivity;
+import cgeo.geocaching.LogEntry;
+import cgeo.geocaching.Trackable;
+import cgeo.geocaching.TrackableActivity;
+import cgeo.geocaching.ui.UserActionsClickListener;
+
+import org.apache.commons.lang3.StringUtils;
+
+import android.text.Html;
+import android.view.View;
+
+import java.util.List;
+
+public class TrackableLogsViewCreator extends LogsViewCreator {
+
+ private final Trackable trackable;
+
+ /**
+ * @param trackableActivity
+ */
+ public TrackableLogsViewCreator(TrackableActivity trackableActivity, final Trackable trackable) {
+ super(trackableActivity);
+ this.trackable = trackable;
+ }
+
+ @Override
+ protected boolean isValid() {
+ return trackable != null;
+ }
+
+ @Override
+ protected List<LogEntry> getLogs() {
+ return trackable.getLogs();
+ }
+
+ @Override
+ protected void addHeaderView() {
+ // empty
+ }
+
+ @Override
+ protected void fillCountOrLocation(LogViewHolder holder, final LogEntry log) {
+ if (StringUtils.isBlank(log.cacheName)) {
+ holder.countOrLocation.setVisibility(View.GONE);
+ } else {
+ holder.countOrLocation.setText(Html.fromHtml(log.cacheName));
+ final String cacheGuid = log.cacheGuid;
+ final String cacheName = log.cacheName;
+ holder.countOrLocation.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View arg0) {
+ CacheDetailActivity.startActivityGuid(activity, cacheGuid, Html.fromHtml(cacheName).toString());
+ }
+ });
+ }
+ }
+
+ @Override
+ protected String getGeocode() {
+ return trackable.getGeocode();
+ }
+
+ @Override
+ protected UserActionsClickListener createUserActionsListener() {
+ return new UserActionsClickListener();
+ }
+
+} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/utils/GeoDirHandler.java b/main/src/cgeo/geocaching/utils/GeoDirHandler.java
index 78455c4..14e6426 100644
--- a/main/src/cgeo/geocaching/utils/GeoDirHandler.java
+++ b/main/src/cgeo/geocaching/utils/GeoDirHandler.java
@@ -1,8 +1,8 @@
package cgeo.geocaching.utils;
import cgeo.geocaching.IGeoData;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.cgeoapplication;
+import cgeo.geocaching.settings.Settings;
import android.os.Handler;
import android.os.Message;
@@ -63,6 +63,11 @@ public abstract class GeoDirHandler extends Handler implements IObserver<Object>
obtainMessage(OBSERVABLE, o).sendToTarget();
}
+ public void updateAll() {
+ update(app.currentGeo());
+ update(app.currentDirection());
+ }
+
/**
* Update method called when new IGeoData is available.
*
diff --git a/main/src/cgeo/geocaching/utils/Log.java b/main/src/cgeo/geocaching/utils/Log.java
index f912ddd..f7f33d9 100644
--- a/main/src/cgeo/geocaching/utils/Log.java
+++ b/main/src/cgeo/geocaching/utils/Log.java
@@ -23,11 +23,11 @@ final public class Log {
}
/**
- * make a non persisted copy of the debug flag from the settings for performance reasons
- *
+ * save a copy of the debug flag from the settings for performance reasons
+ *
* @param isDebug
*/
- public static void setDebugUnsaved(boolean isDebug) {
+ public static void setDebug(boolean isDebug) {
Log.isDebug = isDebug;
}
diff --git a/main/src/cgeo/geocaching/utils/LogTemplateProvider.java b/main/src/cgeo/geocaching/utils/LogTemplateProvider.java
index 2576e64..98201b5 100644
--- a/main/src/cgeo/geocaching/utils/LogTemplateProvider.java
+++ b/main/src/cgeo/geocaching/utils/LogTemplateProvider.java
@@ -1,12 +1,12 @@
package cgeo.geocaching.utils;
+import cgeo.geocaching.Geocache;
import cgeo.geocaching.R;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.Trackable;
-import cgeo.geocaching.Geocache;
-import cgeo.geocaching.connector.gc.GCConstants;
-import cgeo.geocaching.connector.gc.Login;
-import cgeo.geocaching.network.Network;
+import cgeo.geocaching.connector.ConnectorFactory;
+import cgeo.geocaching.connector.IConnector;
+import cgeo.geocaching.connector.capability.ILogin;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.Formatter;
import org.apache.commons.lang3.StringUtils;
@@ -14,10 +14,14 @@ import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
/**
- * provides all the available templates for logging
+ * Provides all the available templates for logging.
*
*/
-public class LogTemplateProvider {
+public final class LogTemplateProvider {
+
+ private LogTemplateProvider() {
+ // utility class
+ }
/**
* Context aware data container for log templates.
@@ -40,54 +44,57 @@ public class LogTemplateProvider {
this.trackable = trackable;
}
- public LogContext(boolean offline) {
+ public LogContext(final boolean offline) {
this(null, offline);
}
- public LogContext(final Geocache cache, boolean offline) {
+ public LogContext(final Geocache cache, final boolean offline) {
this.cache = cache;
this.offline = offline;
}
- public Geocache getCache() {
+ public final Geocache getCache() {
return cache;
}
- public Trackable getTrackable() {
+ public final Trackable getTrackable() {
return trackable;
}
- public boolean isOffline() {
+ public final boolean isOffline() {
return offline;
}
}
- public static abstract class LogTemplate {
+ public abstract static class LogTemplate {
private final String template;
private final int resourceId;
- protected LogTemplate(String template, int resourceId) {
+ protected LogTemplate(final String template, final int resourceId) {
this.template = template;
this.resourceId = resourceId;
}
- abstract public String getValue(LogContext context);
+ public abstract String getValue(LogContext context);
- public int getResourceId() {
+ public final int getResourceId() {
return resourceId;
}
- public int getItemId() {
+ public final int getItemId() {
return template.hashCode();
}
- public String getTemplateString() {
+ public final String getTemplateString() {
return template;
}
- protected String apply(String input, LogContext context) {
- if (input.contains("[" + template + "]")) {
- return StringUtils.replace(input, "[" + template + "]", getValue(context));
+ protected final String apply(final String input, final LogContext context) {
+ final String bracketedTemplate = "[" + template + "]";
+
+ // check containment first to not unconditionally call the getValue(...) method
+ if (input.contains(bracketedTemplate)) {
+ return StringUtils.replace(input, bracketedTemplate, getValue(context));
}
return input;
}
@@ -128,20 +135,32 @@ public class LogTemplateProvider {
@Override
public String getValue(final LogContext context) {
- int current = Login.getActualCachesFound();
+ final Geocache cache = context.getCache();
+ if (cache == null) {
+ return StringUtils.EMPTY;
+ }
+
+ int current = 0;
+ final IConnector connector = ConnectorFactory.getConnector(cache);
+ if (connector instanceof ILogin) {
+ current = ((ILogin) connector).getCachesFound();
+ }
+
+ // try updating the login information, if the counter is zero
if (current == 0) {
if (context.isOffline()) {
- return "";
+ return StringUtils.EMPTY;
+ }
+ if (connector instanceof ILogin) {
+ ((ILogin) connector).login(null, null);
+ current = ((ILogin) connector).getCachesFound();
}
- final String page = Network.getResponseData(Network.getRequest("http://www.geocaching.com/email/"));
- current = parseFindCount(page);
}
- String findCount = "";
if (current >= 0) {
- findCount = String.valueOf(current + 1);
+ return String.valueOf(current + 1);
}
- return findCount;
+ return StringUtils.EMPTY;
}
});
templates.add(new LogTemplate("OWNER", R.string.init_signature_template_owner) {
@@ -156,13 +175,13 @@ public class LogTemplateProvider {
if (cache != null) {
return cache.getOwnerDisplayName();
}
- return "";
+ return StringUtils.EMPTY;
}
});
return templates;
}
- public static LogTemplate getTemplate(int itemId) {
+ public static LogTemplate getTemplate(final int itemId) {
for (LogTemplate template : getTemplates()) {
if (template.getItemId() == itemId) {
return template;
@@ -171,9 +190,9 @@ public class LogTemplateProvider {
return null;
}
- public static String applyTemplates(String signature, LogContext context) {
+ public static String applyTemplates(final String signature, final LogContext context) {
if (signature == null) {
- return "";
+ return StringUtils.EMPTY;
}
String result = signature;
for (LogTemplate template : getTemplates()) {
@@ -181,17 +200,4 @@ public class LogTemplateProvider {
}
return result;
}
-
- private static int parseFindCount(String page) {
- if (StringUtils.isBlank(page)) {
- return -1;
- }
-
- try {
- return Integer.parseInt(TextUtils.getMatch(page, GCConstants.PATTERN_CACHES_FOUND, true, "-1").replaceAll("[,.]", ""));
- } catch (NumberFormatException e) {
- Log.e("parseFindCount", e);
- return -1;
- }
- }
}
diff --git a/main/src/cgeo/geocaching/utils/ProcessUtils.java b/main/src/cgeo/geocaching/utils/ProcessUtils.java
index b566b79..3345ff1 100644
--- a/main/src/cgeo/geocaching/utils/ProcessUtils.java
+++ b/main/src/cgeo/geocaching/utils/ProcessUtils.java
@@ -2,8 +2,14 @@ package cgeo.geocaching.utils;
import cgeo.geocaching.cgeoapplication;
+import org.apache.commons.collections.CollectionUtils;
+
import android.content.Intent;
+import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+
+import java.util.List;
public final class ProcessUtils {
@@ -11,10 +17,44 @@ public final class ProcessUtils {
// utility class
}
- public static boolean isInstalled(final String packageName) {
+ /**
+ * Preferred method to detect the availability of an external app
+ *
+ * @param packageName
+ * @return
+ */
+ public static boolean isLaunchable(final String packageName) {
return getLaunchIntent(packageName) != null;
}
+ /**
+ * Checks whether a launch intent is available or if the package is just installed
+ * This function is relatively costly, so if you know that the package in question has
+ * a launch intent, use isLaunchable() instead.
+ *
+ * @param packageName
+ * @return
+ */
+ public static boolean isInstalled(final String packageName) {
+ return isLaunchable(packageName) || hasPackageInstalled(packageName);
+ }
+
+ /**
+ * This will find installed applications even without launch intent (e.g. the streetview plugin).
+ */
+ private static boolean hasPackageInstalled(final String packageName) {
+ final List<PackageInfo> packs = cgeoapplication.getInstance().getPackageManager().getInstalledPackages(0);
+ for (final PackageInfo packageInfo : packs) {
+ if (packageName.equals(packageInfo.packageName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * This will find applications, which can be launched.
+ */
public static Intent getLaunchIntent(final String packageName) {
if (packageName == null) {
return null;
@@ -24,8 +64,16 @@ public final class ProcessUtils {
// This can throw an exception where the exception type is only defined on API Level > 3
// therefore surround with try-catch
return packageManager.getLaunchIntentForPackage(packageName);
- } catch (Exception e) {
+ } catch (final Exception e) {
return null;
}
}
+
+ public static boolean isIntentAvailable(final String intent) {
+ final PackageManager packageManager = cgeoapplication.getInstance().getPackageManager();
+ final List<ResolveInfo> list = packageManager.queryIntentActivities(
+ new Intent(intent), PackageManager.MATCH_DEFAULT_ONLY);
+
+ return CollectionUtils.isNotEmpty(list);
+ }
}
diff --git a/main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java b/main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java
new file mode 100644
index 0000000..94246e0
--- /dev/null
+++ b/main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java
@@ -0,0 +1,86 @@
+package cgeo.geocaching.utils;
+
+import cgeo.geocaching.CacheDetailActivity;
+import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.Progress;
+
+import android.content.res.Resources;
+import android.os.Message;
+
+import java.lang.ref.WeakReference;
+
+public class SimpleCancellableHandler extends CancellableHandler {
+ public static final String SUCCESS_TEXT = "success_message";
+ protected final WeakReference<AbstractActivity> activityRef;
+ protected final WeakReference<Progress> progressDialogRef;
+
+ public SimpleCancellableHandler(final AbstractActivity activity, final Progress progress) {
+ this.activityRef = new WeakReference<AbstractActivity>(activity);
+ this.progressDialogRef = new WeakReference<Progress>(progress);
+ }
+
+ @Override
+ public void handleRegularMessage(final Message msg) {
+ AbstractActivity activity = activityRef.get();
+ if (activity != null && msg.getData() != null && msg.getData().getString(SUCCESS_TEXT) != null) {
+ activity.showToast(msg.getData().getString(SUCCESS_TEXT));
+ }
+ Progress progressDialog = progressDialogRef.get();
+ if (progressDialog != null) {
+ progressDialog.dismiss();
+ }
+ return;
+ }
+
+ @Override
+ public void handleCancel(final Object extra) {
+ AbstractActivity activity = activityRef.get();
+ if (activity != null) {
+ activity.showToast((String) extra);
+ }
+ Progress progressDialog = progressDialogRef.get();
+ if (progressDialog != null) {
+ progressDialog.dismiss();
+ }
+ }
+
+ public final void showToast(int resId) {
+ AbstractActivity activity = activityRef.get();
+ if (activity != null) {
+ Resources res = activity.getResources();
+ activity.showToast(res.getText(resId).toString());
+ }
+ }
+
+ public final void dismissProgress() {
+ Progress progressDialog = progressDialogRef.get();
+ if (progressDialog != null) {
+ progressDialog.dismiss();
+ }
+ }
+
+ protected final void setProgressMessage(final String txt) {
+ Progress progressDialog = progressDialogRef.get();
+ if (progressDialog != null) {
+ progressDialog.setMessage(txt);
+ }
+ }
+
+ protected final void finishActivity() {
+ AbstractActivity activity = activityRef.get();
+ if (activity != null) {
+ activity.finish();
+ }
+
+ }
+
+ protected void updateStatusMsg(final int resId, final String msg) {
+ CacheDetailActivity activity = ((CacheDetailActivity) activityRef.get());
+ if (activity != null) {
+ setProgressMessage(activity.getResources().getString(resId)
+ + "\n\n"
+ + msg);
+ }
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/utils/SimpleHandler.java b/main/src/cgeo/geocaching/utils/SimpleHandler.java
new file mode 100644
index 0000000..554ded6
--- /dev/null
+++ b/main/src/cgeo/geocaching/utils/SimpleHandler.java
@@ -0,0 +1,65 @@
+package cgeo.geocaching.utils;
+
+import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.Progress;
+
+import android.content.res.Resources;
+import android.os.Handler;
+import android.os.Message;
+
+import java.lang.ref.WeakReference;
+
+public abstract class SimpleHandler extends Handler {
+ public static final String SUCCESS_TEXT = "success_message";
+ protected final WeakReference<AbstractActivity> activityRef;
+ protected final WeakReference<Progress> progressDialogRef;
+
+ public SimpleHandler(final AbstractActivity activity, final Progress progress) {
+ this.activityRef = new WeakReference<AbstractActivity>(activity);
+ this.progressDialogRef = new WeakReference<Progress>(progress);
+ }
+
+ @Override
+ public void handleMessage(final Message msg) {
+ AbstractActivity activity = activityRef.get();
+ if (activity != null && msg.getData() != null && msg.getData().getString(SUCCESS_TEXT) != null) {
+ activity.showToast(msg.getData().getString(SUCCESS_TEXT));
+ }
+ Progress progressDialog = progressDialogRef.get();
+ if (progressDialog != null) {
+ progressDialog.dismiss();
+ }
+ return;
+ }
+
+ protected final void showToast(final int resId) {
+ AbstractActivity activity = activityRef.get();
+ if (activity != null) {
+ Resources res = activity.getResources();
+ activity.showToast(res.getText(resId).toString());
+ }
+ }
+
+ protected final void dismissProgress() {
+ Progress progressDialog = progressDialogRef.get();
+ if (progressDialog != null) {
+ progressDialog.dismiss();
+ }
+ }
+
+ protected final void setProgressMessage(final String txt) {
+ Progress progressDialog = progressDialogRef.get();
+ if (progressDialog != null) {
+ progressDialog.setMessage(txt);
+ }
+ }
+
+ protected final void finishActivity() {
+ AbstractActivity activity = activityRef.get();
+ if (activity != null) {
+ activity.finish();
+ }
+
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/utils/TextUtils.java b/main/src/cgeo/geocaching/utils/TextUtils.java
index 68ac595..c9d4958 100644
--- a/main/src/cgeo/geocaching/utils/TextUtils.java
+++ b/main/src/cgeo/geocaching/utils/TextUtils.java
@@ -108,13 +108,13 @@ public final class TextUtils {
}
/**
- * Replaces every \n, \r and \t with a single space. Afterwards multiples spaces
+ * Replaces every \n, \r and \t with a single space. Afterwards multiple spaces
* are merged into a single space. Finally leading spaces are deleted.
*
* This method must be fast, but may not lead to the shortest replacement String.
*
* You are only allowed to change this code if you can prove it became faster on a device.
- * see cgeo.geocaching.test.WhiteSpaceTest#replaceWhitespaceManually in the test project
+ * see cgeo.geocaching.test.WhiteSpaceTest#replaceWhitespaceManually in the test project.
*
* @param data
* complete HTML page
diff --git a/main/src/cgeo/geocaching/utils/TranslationUtils.java b/main/src/cgeo/geocaching/utils/TranslationUtils.java
index 05045ee..1224f7e 100644
--- a/main/src/cgeo/geocaching/utils/TranslationUtils.java
+++ b/main/src/cgeo/geocaching/utils/TranslationUtils.java
@@ -35,7 +35,7 @@ public final class TranslationUtils {
private static String buildTranslationURI(final String toLang, final String text) {
String content = Network.encode(text);
// the app works better without the "+", the website works better with "+", therefore assume using the app if installed
- if (ProcessUtils.isInstalled(TRANSLATION_APP)) {
+ if (ProcessUtils.isLaunchable(TRANSLATION_APP)) {
content = content.replace("+", "%20");
}
return translationWebsite + translationForceClassicMode + translationAutoSelect + translationFieldSeparator + toLang + translationFieldSeparator + content;
diff --git a/main/templates/ocpl_okapi.xml b/main/templates/ocpl_okapi.xml
new file mode 100644
index 0000000..6903ce7
--- /dev/null
+++ b/main/templates/ocpl_okapi.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources>
+ <string name="oc_pl_okapi_consumer_key" translatable="false">@ocpl.okapi.consumer.key@</string>
+ <string name="oc_pl_okapi_consumer_secret" translatable="false">@ocpl.okapi.consumer.secret@</string>
+</resources>
diff --git a/main/templates/private.properties b/main/templates/private.properties
index 731ff50..0c40fda 100644
--- a/main/templates/private.properties
+++ b/main/templates/private.properties
@@ -23,3 +23,10 @@ maps.api.key.market=
ocde.okapi.consumer.key=
ocde.okapi.consumer.secret=
+
+# These keys allow c:geo to be registered at openaching.pl and
+# to search and log caches in your name
+# You can request your own at http://www.opencaching.pl/okapi/signup.html
+
+ocpl.okapi.consumer.key=
+ocpl.okapi.consumer.secret=
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 1c1968b..19029aa 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -8,6 +8,10 @@
android:minSdkVersion="4"
android:targetSdkVersion="13" />
+ <uses-feature
+ android:name="android.hardware.screen.portrait"
+ android:required="false" />
+
<instrumentation
android:name="com.zutubi.android.junitreport.JUnitReportTestRunner"
android:targetPackage="cgeo.geocaching" />
diff --git a/tests/src/cgeo/geocaching/GeocacheTest.java b/tests/src/cgeo/geocaching/GeocacheTest.java
index affc793..5431835 100644
--- a/tests/src/cgeo/geocaching/GeocacheTest.java
+++ b/tests/src/cgeo/geocaching/GeocacheTest.java
@@ -3,6 +3,7 @@ package cgeo.geocaching;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.geopoint.Geopoint;
+import android.os.Handler;
import android.test.AndroidTestCase;
import java.util.ArrayList;
@@ -61,7 +62,7 @@ public class GeocacheTest extends AndroidTestCase {
private static void assertWaypointsParsed(String note, int expectedWaypoints) {
Geocache cache = new Geocache();
- cache.setGeocode("Test");
+ cache.setGeocode("Test" + System.nanoTime());
cache.setWaypoints(new ArrayList<Waypoint>(), false);
for (int i = 0; i < 2; i++) {
cache.setPersonalNote(note);
@@ -75,5 +76,6 @@ public class GeocacheTest extends AndroidTestCase {
assertEquals(cgeoapplication.getInstance().getString(R.string.cache_personal_note) + " 1", waypoint.getName());
cache.store(StoredList.TEMPORARY_LIST_ID, null);
}
+ cache.drop(new Handler());
}
}
diff --git a/tests/src/cgeo/geocaching/PersonalNoteTest.java b/tests/src/cgeo/geocaching/PersonalNoteTest.java
new file mode 100644
index 0000000..c8aa8ba
--- /dev/null
+++ b/tests/src/cgeo/geocaching/PersonalNoteTest.java
@@ -0,0 +1,68 @@
+package cgeo.geocaching;
+
+import junit.framework.TestCase;
+
+public class PersonalNoteTest extends TestCase {
+
+ public static void testParse() {
+ final String testString = "Simple cgeo note\n--\nSimple provider note";
+ Geocache cache = new Geocache();
+ cache.setPersonalNote(testString);
+ PersonalNote parsedNote = new PersonalNote(cache);
+ assertEquals(testString, parsedNote.toString());
+ assertPersonalNote(parsedNote, "Simple cgeo note", "Simple provider note");
+
+ }
+
+ public static void testParseProviderOnly() {
+ final String testString = "Simple provider note";
+ Geocache cache = new Geocache();
+ cache.setPersonalNote(testString);
+ PersonalNote parsedNote = new PersonalNote(cache);
+ assertEquals(testString, parsedNote.toString());
+ assertPersonalNote(parsedNote, null, "Simple provider note");
+ }
+
+ public static void testParseCgeoOnly() {
+ final String testString = "Simple cgeo note";
+ Geocache cache = new Geocache();
+ cache.setPersonalNote(testString);
+ PersonalNote parsedNote = new PersonalNote(cache);
+ assertEquals("Simple cgeo note", parsedNote.toString());
+ assertPersonalNote(parsedNote, null, "Simple cgeo note");
+ }
+
+ public static void testSimpleMerge() {
+ Geocache cache1 = new Geocache(); // not stored
+ cache1.setPersonalNote("Simple cgeo note\n--\nSimple provider note");
+ PersonalNote myNote = new PersonalNote(cache1);
+ Geocache cache2 = new Geocache();
+ cache2.setListId(StoredList.STANDARD_LIST_ID); // stored
+ cache2.setPersonalNote("cgeo note\n--\nProvider note");
+ PersonalNote otherNote = new PersonalNote(cache2);
+ PersonalNote result = myNote.mergeWith(otherNote);
+ assertEquals("cgeo note\n--\nSimple provider note", result.toString());
+ assertPersonalNote(result, "cgeo note", "Simple provider note");
+ }
+
+ public static void testMixedMerge() {
+ Geocache cache1 = new Geocache(); // not stored
+ cache1.setPersonalNote("Simple cgeo note\n--\nSimple provider note");
+ PersonalNote myNote = new PersonalNote(cache1);
+ Geocache cache2 = new Geocache();
+ cache2.setListId(StoredList.STANDARD_LIST_ID); // stored
+ cache2.setPersonalNote("Provider note");
+ PersonalNote otherNote = new PersonalNote(cache2);
+ PersonalNote result = myNote.mergeWith(otherNote);
+ assertEquals("Simple cgeo note\n--\nSimple provider note", result.toString());
+ assertPersonalNote(result, "Simple cgeo note", "Simple provider note");
+ result = otherNote.mergeWith(myNote);
+ assertEquals("Simple cgeo note\n--\nProvider note", result.toString());
+ assertPersonalNote(result, "Simple cgeo note", "Provider note");
+ }
+
+ private static void assertPersonalNote(final PersonalNote note, final String cgeoNote, final String providerNote) {
+ assertEquals(cgeoNote, note.getCgeoNote());
+ assertEquals(providerNote, note.getProviderNote());
+ }
+}
diff --git a/tests/src/cgeo/geocaching/SearchResultTest.java b/tests/src/cgeo/geocaching/SearchResultTest.java
index 8fcd188..9bce5a5 100644
--- a/tests/src/cgeo/geocaching/SearchResultTest.java
+++ b/tests/src/cgeo/geocaching/SearchResultTest.java
@@ -1,8 +1,10 @@
package cgeo.geocaching;
+import android.os.Parcel;
import android.test.AndroidTestCase;
import java.util.HashSet;
+import java.util.Set;
public class SearchResultTest extends AndroidTestCase {
public static void testCreateFromGeocodes() {
@@ -14,4 +16,60 @@ public class SearchResultTest extends AndroidTestCase {
assertEquals(2, searchResult.getTotal());
assertTrue(searchResult.getGeocodes().contains("GC12345"));
}
+
+ public static void testParcel() {
+ final Set<String> geocodes = new HashSet<String>();
+ geocodes.add("GC12345");
+ geocodes.add("GC23456");
+ geocodes.add("GC34567");
+ final SearchResult search = new SearchResult(geocodes);
+ geocodes.clear();
+ geocodes.add("GC45678");
+ geocodes.add("GC56789");
+ search.addFilteredGeocodes(geocodes);
+
+ Parcel parcel = Parcel.obtain();
+ search.writeToParcel(parcel, 0);
+ // reset to ready for reading
+ parcel.setDataPosition(0);
+
+ final SearchResult receive = new SearchResult(parcel);
+
+ parcel.recycle();
+
+ assertEquals(3, receive.getCount());
+ assertEquals(2, receive.getFilteredGeocodes().size());
+
+ assertTrue(receive.getGeocodes().contains("GC12345"));
+ assertFalse(receive.getGeocodes().contains("GC45678"));
+
+ assertFalse(receive.getFilteredGeocodes().contains("GC12345"));
+ assertTrue(receive.getFilteredGeocodes().contains("GC45678"));
+ }
+
+ public static void testAddSearchResult() {
+ final Set<String> geocodes = new HashSet<String>();
+ geocodes.add("GC12345");
+ geocodes.add("GC23456");
+ geocodes.add("GC34567");
+ final SearchResult search = new SearchResult(geocodes);
+ geocodes.clear();
+ geocodes.add("GC45678");
+ geocodes.add("GC56789");
+ search.addFilteredGeocodes(geocodes);
+
+ final SearchResult newSearch = new SearchResult();
+ newSearch.addGeocode("GC01234");
+ newSearch.addSearchResult(search);
+
+ assertEquals(4, newSearch.getCount());
+ assertEquals(2, newSearch.getFilteredGeocodes().size());
+
+ assertTrue(newSearch.getGeocodes().contains("GC12345"));
+ assertTrue(newSearch.getGeocodes().contains("GC01234"));
+ assertFalse(newSearch.getGeocodes().contains("GC45678"));
+
+ assertFalse(newSearch.getFilteredGeocodes().contains("GC12345"));
+ assertTrue(newSearch.getFilteredGeocodes().contains("GC45678"));
+ }
}
diff --git a/tests/src/cgeo/geocaching/SettingsTest.java b/tests/src/cgeo/geocaching/SettingsTest.java
index 6a1eefa..c58db08 100644
--- a/tests/src/cgeo/geocaching/SettingsTest.java
+++ b/tests/src/cgeo/geocaching/SettingsTest.java
@@ -2,6 +2,7 @@ package cgeo.geocaching;
import cgeo.geocaching.connector.gc.GCConstants;
import cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider;
+import cgeo.geocaching.settings.Settings;
import android.annotation.TargetApi;
import android.test.ActivityInstrumentationTestCase2;
diff --git a/tests/src/cgeo/geocaching/StaticMapsProviderTest.java b/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
index abc15ae..2b11976 100644
--- a/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
+++ b/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
@@ -3,13 +3,15 @@ package cgeo.geocaching;
import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.geopoint.Geopoint;
-
-import junit.framework.TestCase;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
import android.test.suitebuilder.annotation.Suppress;
import java.io.File;
+import junit.framework.TestCase;
+
@Suppress
public class StaticMapsProviderTest extends TestCase {
@@ -20,8 +22,8 @@ public class StaticMapsProviderTest extends TestCase {
boolean backupStore = Settings.isStoreOfflineMaps();
boolean backupStoreWP = Settings.isStoreOfflineWpMaps();
- Settings.setStoreOfflineMaps(true);
- Settings.setStoreOfflineWpMaps(true);
+ TestSettings.setStoreOfflineMaps(true);
+ TestSettings.setStoreOfflineWpMaps(true);
try {
Geopoint gp = new Geopoint(lat + 0.25d, lon + 0.25d);
Geocache cache = new Geocache();
@@ -65,8 +67,8 @@ public class StaticMapsProviderTest extends TestCase {
trailhead.setCoords(new Geopoint(lat + 0.24d + 2, lon + 0.25d + 2));
assertFalse(StaticMapsProvider.hasStaticMapForWaypoint(geocode, trailhead));
} finally {
- Settings.setStoreOfflineWpMaps(backupStoreWP);
- Settings.setStoreOfflineMaps(backupStore);
+ TestSettings.setStoreOfflineWpMaps(backupStoreWP);
+ TestSettings.setStoreOfflineMaps(backupStore);
deleteCacheDirectory(geocode);
}
}
diff --git a/tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java b/tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java
new file mode 100644
index 0000000..2d510ab
--- /dev/null
+++ b/tests/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactoryTest.java
@@ -0,0 +1,19 @@
+package cgeo.geocaching.apps.cache.navi;
+
+import cgeo.geocaching.apps.cache.navi.NavigationAppFactory.NavigationAppsEnum;
+
+import java.util.HashSet;
+
+import junit.framework.TestCase;
+
+public class NavigationAppFactoryTest extends TestCase {
+
+ public static void testUniqueNavigationAppIds() throws Exception {
+ final HashSet<Integer> idSet = new HashSet<Integer>();
+ for (NavigationAppsEnum navigationApp : NavigationAppsEnum.values()) {
+ idSet.add(navigationApp.id);
+ }
+ assertEquals("Duplicate id in " + NavigationAppsEnum.class.getSimpleName(), NavigationAppsEnum.values().length, idSet.size());
+ }
+
+}
diff --git a/tests/src/cgeo/geocaching/cgDataTest.java b/tests/src/cgeo/geocaching/cgDataTest.java
index a6fb846..e175603 100644
--- a/tests/src/cgeo/geocaching/cgDataTest.java
+++ b/tests/src/cgeo/geocaching/cgDataTest.java
@@ -1,6 +1,8 @@
package cgeo.geocaching;
import cgeo.CGeoTestCase;
+import cgeo.geocaching.connector.gc.GCConnector;
+import cgeo.geocaching.connector.gc.Tile;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.enumerations.LoadFlags.SaveFlag;
@@ -131,4 +133,67 @@ public class cgDataTest extends CGeoTestCase {
assertNotNull("Logs must not be null", logs);
assertEquals("Logs from empty geocode must be empty", 0, logs.size());
}
+
+ public static void testLoadCacheHistory() {
+ int sumCaches = 0;
+ int allCaches = 0;
+ for (CacheType cacheType : CacheType.values()) {
+ SearchResult historyOfType = cgData.getHistoryOfCaches(false, cacheType);
+ assertNotNull(historyOfType);
+ if (cacheType != CacheType.ALL) {
+ sumCaches += historyOfType.getCount();
+ } else {
+ allCaches = historyOfType.getCount();
+ }
+ }
+ // check that sum of types equals 'all'
+ assertEquals(sumCaches, allCaches);
+ // check that two different routines behave the same
+ assertEquals(cgData.getAllHistoryCachesCount(), sumCaches);
+ }
+
+ public static void testCachedMissing() {
+
+ // Tile to test
+ final Tile tile = new Tile(new Geopoint("N49 44.0 E8 37.0"), 14);
+ final Set<Tile> tiles = new HashSet<Tile>();
+ tiles.add(tile);
+
+ // set up geocaches to fill into cacheCache
+ final Geocache main = new Geocache();
+ main.setGeocode("GC12345");
+ main.setCoords(new Geopoint("N49 44.0 E8 37.0"));
+ final Geocache inTileLowZoom = new Geocache();
+ inTileLowZoom.setGeocode("GC12346");
+ inTileLowZoom.setCoords(new Geopoint("N49 44.001 E8 37.001"));
+ inTileLowZoom.setZoomlevel(Tile.ZOOMLEVEL_MIN_PERSONALIZED - 5);
+ final Geocache outTile = new Geocache();
+ outTile.setGeocode("GC12347");
+ outTile.setCoords(new Geopoint(tile.getViewport().getLatitudeMin() - 0.1, tile.getViewport().getLongitudeMin() - 0.1));
+ final Geocache otherConnector = new Geocache();
+ otherConnector.setGeocode("OC0001");
+ otherConnector.setCoords(new Geopoint("N49 44.0 E8 37.0"));
+ final Geocache inTileHighZoom = new Geocache();
+ inTileHighZoom.setGeocode("GC12348");
+ inTileHighZoom.setCoords(new Geopoint("N49 44.001 E8 37.001"));
+ inTileHighZoom.setZoomlevel(Tile.ZOOMLEVEL_MIN_PERSONALIZED + 1);
+
+ // put in cache
+ cgData.saveCache(main, EnumSet.of(SaveFlag.SAVE_CACHE));
+ cgData.saveCache(inTileLowZoom, EnumSet.of(SaveFlag.SAVE_CACHE));
+ cgData.saveCache(inTileHighZoom, EnumSet.of(SaveFlag.SAVE_CACHE));
+ cgData.saveCache(outTile, EnumSet.of(SaveFlag.SAVE_CACHE));
+ cgData.saveCache(otherConnector, EnumSet.of(SaveFlag.SAVE_CACHE));
+
+ final SearchResult search = new SearchResult(main);
+
+ Set<String> filteredGeoCodes = cgData.getCachedMissingFromSearch(search, tiles, GCConnector.getInstance(), Tile.ZOOMLEVEL_MIN_PERSONALIZED - 1);
+
+ assertTrue(filteredGeoCodes.contains(inTileLowZoom.getGeocode()));
+ assertFalse(filteredGeoCodes.contains(inTileHighZoom.getGeocode()));
+ assertFalse(filteredGeoCodes.contains(otherConnector.getGeocode()));
+ assertFalse(filteredGeoCodes.contains(outTile.getGeocode()));
+ assertFalse(filteredGeoCodes.contains(main.getGeocode()));
+
+ }
}
diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java
index b808616..83bf28d 100644
--- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java
+++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java
@@ -13,6 +13,8 @@ import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.loaders.RecaptchaReceiver;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
import cgeo.geocaching.test.RegExPerformanceTest;
import cgeo.geocaching.test.mock.GC1ZXX2;
import cgeo.geocaching.test.mock.GC2CJPF;
@@ -130,7 +132,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
*/
@MediumTest
public static void testSearchByGeocodeNotLoggedIn() {
- final ImmutablePair<String, String> login = Settings.getLogin();
+ final ImmutablePair<String, String> login = Settings.getGcLogin();
final String memberStatus = Settings.getMemberStatus();
try {
@@ -158,7 +160,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
} finally {
// restore user and password
- Settings.setLogin(login.left, login.right);
+ TestSettings.setLogin(login.left, login.right);
Settings.setMemberStatus(memberStatus);
Login.login();
}
@@ -169,7 +171,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
*/
@MediumTest
public static void testSearchErrorOccured() {
- final ImmutablePair<String, String> login = Settings.getLogin();
+ final ImmutablePair<String, String> login = Settings.getGcLogin();
final String memberStatus = Settings.getMemberStatus();
try {
@@ -184,7 +186,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
} finally {
// restore user and password
- Settings.setLogin(login.left, login.right);
+ TestSettings.setLogin(login.left, login.right);
Settings.setMemberStatus(memberStatus);
Login.login();
}
@@ -201,15 +203,15 @@ public class cgeoApplicationTest extends CGeoTestCase {
final boolean excludeDisabled = Settings.isExcludeDisabledCaches();
try {
// set up settings required for test
- Settings.setExcludeMine(false);
- Settings.setExcludeDisabledCaches(false);
+ TestSettings.setExcludeMine(false);
+ TestSettings.setExcludeDisabledCaches(false);
runnable.run();
} finally {
// restore user settings
- Settings.setExcludeMine(excludeMine);
- Settings.setExcludeDisabledCaches(excludeDisabled);
+ TestSettings.setExcludeMine(excludeMine);
+ TestSettings.setExcludeDisabledCaches(excludeDisabled);
}
}
@@ -279,7 +281,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
try {
// set up settings required for test
- Settings.setExcludeMine(false);
+ TestSettings.setExcludeMine(false);
Settings.setCacheType(CacheType.ALL);
final GC2CJPF mockedCache = new GC2CJPF();
@@ -325,7 +327,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
@MediumTest
public static void testSearchByViewportNotLoggedIn() {
- final ImmutablePair<String, String> login = Settings.getLogin();
+ final ImmutablePair<String, String> login = Settings.getGcLogin();
final String memberStatus = Settings.getMemberStatus();
final Strategy strategy = Settings.getLiveMapStrategy();
final Strategy testStrategy = Strategy.FAST; // FASTEST, FAST or DETAILED for tests
@@ -368,7 +370,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
} finally {
// restore user and password
- Settings.setLogin(login.left, login.right);
+ TestSettings.setLogin(login.left, login.right);
Settings.setMemberStatus(memberStatus);
Login.login();
Settings.setLiveMapStrategy(strategy);
@@ -411,7 +413,7 @@ public class cgeoApplicationTest extends CGeoTestCase {
Login.logout();
// Modify login data to avoid an automatic login again
- Settings.setLogin("c:geo", "c:geo");
+ TestSettings.setLogin("c:geo", "c:geo");
Settings.setMemberStatus("Basic member");
}
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java
index 8d3d840..8ac2177 100644
--- a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java
@@ -1,12 +1,13 @@
package cgeo.geocaching.connector.gc;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.trackable.TravelBugConnector;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Viewport;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase;
public class GCConnectorTest extends AbstractResourceInstrumentationTestCase {
@@ -17,7 +18,7 @@ public class GCConnectorTest extends AbstractResourceInstrumentationTestCase {
final CacheType cacheType = Settings.getCacheType();
try {
// set up settings required for test
- Settings.setExcludeMine(false);
+ TestSettings.setExcludeMine(false);
Settings.setCacheType(CacheType.ALL);
Login.login();
@@ -40,7 +41,7 @@ public class GCConnectorTest extends AbstractResourceInstrumentationTestCase {
}
} finally {
// restore user settings
- Settings.setExcludeMine(excludeMine);
+ TestSettings.setExcludeMine(excludeMine);
Settings.setCacheType(cacheType);
}
}
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
index 45eee3b..57eb9d0 100644
--- a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
@@ -3,7 +3,6 @@ package cgeo.geocaching.connector.gc;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.Image;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.Trackable;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.cgeoapplication;
@@ -11,6 +10,7 @@ import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase;
import cgeo.geocaching.test.R;
import cgeo.geocaching.test.RegExPerformanceTest;
diff --git a/tests/src/cgeo/geocaching/connector/trackable/TravelBugConnectorTest.java b/tests/src/cgeo/geocaching/connector/trackable/TravelBugConnectorTest.java
index 7772e29..ef2821d 100644
--- a/tests/src/cgeo/geocaching/connector/trackable/TravelBugConnectorTest.java
+++ b/tests/src/cgeo/geocaching/connector/trackable/TravelBugConnectorTest.java
@@ -7,18 +7,35 @@ import junit.framework.TestCase;
public class TravelBugConnectorTest extends TestCase {
public static void testCanHandleTrackable() {
- assertTrue(new TravelBugConnector().canHandleTrackable("TB1234"));
- assertTrue(new TravelBugConnector().canHandleTrackable("TB1"));
- assertTrue(new TravelBugConnector().canHandleTrackable("TB123F"));
- assertTrue(new TravelBugConnector().canHandleTrackable("TB123Z"));
- assertFalse(new TravelBugConnector().canHandleTrackable("GK1234"));
- assertFalse(new TravelBugConnector().canHandleTrackable("UNKNOWN"));
+ assertTrue(getConnector().canHandleTrackable("TB1234"));
+ assertTrue(getConnector().canHandleTrackable("TB1"));
+ assertTrue(getConnector().canHandleTrackable("TB123F"));
+ assertTrue(getConnector().canHandleTrackable("TB123Z"));
+ assertTrue(getConnector().canHandleTrackable("TB4JD36")); // existing TB, 5 specific characters
+ assertTrue(getConnector().canHandleTrackable("GK1234")); // valid secret code, even though this might be a geokrety
+ assertTrue(getConnector().canHandleTrackable("GST9HV")); // existing secret code
+ assertFalse(getConnector().canHandleTrackable("UNKNOWN"));
}
public static void testGetUrl() {
final Trackable trackable = new Trackable();
trackable.setGeocode("TB2345");
- assertEquals("http://www.geocaching.com//track/details.aspx?tracker=TB2345", new TravelBugConnector().getUrl(trackable));
+ assertEquals("http://www.geocaching.com//track/details.aspx?tracker=TB2345", getConnector().getUrl(trackable));
}
+ public static void testOnlineSearchBySecretCode() {
+ Trackable trackable = getConnector().searchTrackable("GST9HV", null, null);
+ assertNotNull(trackable);
+ assertEquals("Deutschland", trackable.getName());
+ }
+
+ public static void testOnlineSearchByPublicCode() {
+ Trackable trackable = getConnector().searchTrackable("TB4JD36", null, null);
+ assertNotNull(trackable);
+ assertEquals("Mein Kilometerzähler", trackable.getName());
+ }
+
+ private static TravelBugConnector getConnector() {
+ return TravelBugConnector.getInstance();
+ }
}
diff --git a/tests/src/cgeo/geocaching/export/GpxSerializerTest.java b/tests/src/cgeo/geocaching/export/GpxSerializerTest.java
new file mode 100644
index 0000000..0080b76
--- /dev/null
+++ b/tests/src/cgeo/geocaching/export/GpxSerializerTest.java
@@ -0,0 +1,37 @@
+package cgeo.geocaching.export;
+
+import cgeo.geocaching.Geocache;
+import cgeo.geocaching.files.ParserException;
+import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase;
+import cgeo.geocaching.test.R;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.Collections;
+import java.util.concurrent.atomic.AtomicReference;
+
+public class GpxSerializerTest extends AbstractResourceInstrumentationTestCase {
+
+ public static void testWriteEmptyGPX() throws Exception {
+ final StringWriter writer = new StringWriter();
+ new GpxSerializer().writeGPX(Collections.<String> emptyList(), writer, null);
+ assertEquals("<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><gpx version=\"1.0\" creator=\"c:geo - http://www.cgeo.org/\" xsi:schemaLocation=\"http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.groundspeak.com/cache/1/0 http://www.groundspeak.com/cache/1/0/1/cache.xsd\" xmlns=\"http://www.topografix.com/GPX/1/0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:groundspeak=\"http://www.groundspeak.com/cache/1/0\" />", writer.getBuffer().toString());
+ }
+
+ public void testProgressReporting() throws IOException, ParserException {
+ final AtomicReference<Integer> importedCount = new AtomicReference<Integer>(0);
+ final StringWriter writer = new StringWriter();
+
+ Geocache cache = loadCacheFromResource(R.raw.gc1bkp3_gpx101);
+ assertNotNull(cache);
+
+ new GpxSerializer().writeGPX(Collections.singletonList("GC1BKP3"), writer, new GpxSerializer.ProgressListener() {
+
+ @Override
+ public void publishProgress(int countExported) {
+ importedCount.set(countExported);
+ }
+ });
+ assertEquals("Progress listener not called", 1, importedCount.get().intValue());
+ }
+}
diff --git a/tests/src/cgeo/geocaching/files/GPXImporterTest.java b/tests/src/cgeo/geocaching/files/GPXImporterTest.java
index c064935..03f917c 100644
--- a/tests/src/cgeo/geocaching/files/GPXImporterTest.java
+++ b/tests/src/cgeo/geocaching/files/GPXImporterTest.java
@@ -2,10 +2,11 @@ package cgeo.geocaching.files;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.cgData;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LoadFlags;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase;
import cgeo.geocaching.test.R;
import cgeo.geocaching.utils.CancellableHandler;
@@ -270,9 +271,9 @@ public class GPXImporterTest extends AbstractResourceInstrumentationTestCase {
listId = cgData.createList("cgeogpxesTest");
importCacheStaticMaps = Settings.isStoreOfflineMaps();
- Settings.setStoreOfflineMaps(true);
+ TestSettings.setStoreOfflineMaps(true);
importWpStaticMaps = Settings.isStoreOfflineWpMaps();
- Settings.setStoreOfflineWpMaps(true);
+ TestSettings.setStoreOfflineWpMaps(true);
}
@Override
@@ -283,8 +284,8 @@ public class GPXImporterTest extends AbstractResourceInstrumentationTestCase {
cgData.markDropped(cachesInList);
cgData.removeList(listId);
deleteDirectory(tempDir);
- Settings.setStoreOfflineMaps(importCacheStaticMaps);
- Settings.setStoreOfflineWpMaps(importWpStaticMaps);
+ TestSettings.setStoreOfflineMaps(importCacheStaticMaps);
+ TestSettings.setStoreOfflineWpMaps(importWpStaticMaps);
super.tearDown();
}
diff --git a/tests/src/cgeo/geocaching/geopoint/GeopointTest.java b/tests/src/cgeo/geocaching/geopoint/GeopointTest.java
index 8aaeef8..e64028f 100644
--- a/tests/src/cgeo/geocaching/geopoint/GeopointTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/GeopointTest.java
@@ -1,10 +1,10 @@
package cgeo.geocaching.geopoint;
+import junit.framework.Assert;
+
import android.os.Bundle;
import android.test.AndroidTestCase;
-import junit.framework.Assert;
-
public class GeopointTest extends AndroidTestCase {
public static void testCreation() {
@@ -230,10 +230,6 @@ public class GeopointTest extends AndroidTestCase {
Assert.assertEquals(lonSecFrac, gp.getLonSecFrac());
}
- public static void testElevation() {
- assertEquals(125.663703918457, (new Geopoint(48.0, 2.0)).getElevation(), 0.1);
- }
-
private static void assertParseException(Runnable runnable) {
try {
runnable.run();
diff --git a/tests/src/cgeo/geocaching/geopoint/UnitsTest.java b/tests/src/cgeo/geocaching/geopoint/UnitsTest.java
index 10f1785..52c5adf 100644
--- a/tests/src/cgeo/geocaching/geopoint/UnitsTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/UnitsTest.java
@@ -1,7 +1,8 @@
package cgeo.geocaching.geopoint;
import cgeo.CGeoTestCase;
-import cgeo.geocaching.Settings;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
import org.apache.commons.lang3.StringUtils;
@@ -11,7 +12,7 @@ public class UnitsTest extends CGeoTestCase {
final String actual = Units.getDistanceFromKilometers(distance);
if (!StringUtils.equals(expected, actual.replace(',', '.'))) { // make 1.2 the same as 1,2
fail("getHumanDistance(" + distance +
- ") [metric: " + (Settings.isUseMetricUnits() ? "yes" : "no") +
+ ") [metric: " + (!Settings.isUseImperialUnits() ? "yes" : "no") +
"] fails to match " + expected + ": " + actual);
}
}
@@ -20,55 +21,22 @@ public class UnitsTest extends CGeoTestCase {
@SuppressWarnings("static-method")
public void testDistance() {
assertEquals("?", Units.getDistanceFromKilometers(null));
- final boolean savedMetrics = Settings.isUseMetricUnits();
+ final boolean savedImperial = Settings.isUseImperialUnits();
try {
- Settings.setUseMetricUnits(true);
+ TestSettings.setUseImperialUnits(false);
assertDistance("123 km", 122.782f);
assertDistance("123 km", 123.456f);
assertDistance("12.3 km", 12.3456f);
assertDistance("1.23 km", 1.23456f);
assertDistance("123 m", 0.123456f);
- Settings.setUseMetricUnits(false);
+ TestSettings.setUseImperialUnits(true);
assertDistance("76.7 mi", 123.456f);
assertDistance("7.67 mi", 12.3456f);
assertDistance("0.77 mi", 1.23456f);
assertDistance("405 ft", 0.123456f);
assertDistance("40.5 ft", 0.0123456f);
} finally {
- Settings.setUseMetricUnits(savedMetrics);
- }
- }
-
- // Make method non-static so that Settings is initialized
- @SuppressWarnings("static-method")
- public void testElevation() {
- final boolean savedMetrics = Settings.isUseMetricUnits();
- try {
- Settings.setUseMetricUnits(true);
- assertElevation("↥ 123 m", 122.782f);
- assertElevation("↥ 123 m", 123.456f);
- assertElevation("↥ 12 m", 12.3456f);
- assertElevation("↥ 1 m", 1.23456f);
- assertElevation("↥ 2 m", 1.6f);
- assertElevation("↥ 0 m", 0.123456f);
- assertElevation("↧ 123 m", -122.782f);
- assertElevation("↧ 123 m", -123.456f);
- assertElevation("↧ 12 m", -12.3456f);
- assertElevation("↧ 1 m", -1.23456f);
- assertElevation("↧ 2 m", -1.6f);
- assertElevation("↧ 0 m", -0.123456f);
- Settings.setUseMetricUnits(false);
- assertElevation("↥ 405 ft", 123.456f);
- assertElevation("↥ 41 ft", 12.3456f);
- } finally {
- Settings.setUseMetricUnits(savedMetrics);
- }
- }
-
- private static void assertElevation(final String expected, final float meters) {
- final String actual = Units.getElevation(meters);
- if (!StringUtils.equals(expected, actual.replace(',', '.'))) {
- fail("elevation " + actual + " does not match expected " + expected);
+ TestSettings.setUseImperialUnits(savedImperial);
}
}
@@ -76,20 +44,20 @@ public class UnitsTest extends CGeoTestCase {
@SuppressWarnings("static-method")
public void testSpeed() {
assertEquals("?", Units.getDistanceFromKilometers(null));
- final boolean savedMetrics = Settings.isUseMetricUnits();
+ final boolean savedImperial = Settings.isUseImperialUnits();
try {
- Settings.setUseMetricUnits(true);
+ TestSettings.setUseImperialUnits(false);
assertSpeed("123 km/h", 122.782f);
assertSpeed("123 km/h", 123.456f);
assertSpeed("12.3 km/h", 12.3456f);
assertSpeed("1.23 km/h", 1.23456f);
assertSpeed("123 m/h", 0.123456f);
- Settings.setUseMetricUnits(false);
+ TestSettings.setUseImperialUnits(true);
assertSpeed("76.7 mph", 123.456f);
assertSpeed("7.67 mph", 12.3456f);
assertSpeed("0.77 mph", 1.23456f);
} finally {
- Settings.setUseMetricUnits(savedMetrics);
+ TestSettings.setUseImperialUnits(savedImperial);
}
}
diff --git a/tests/src/cgeo/geocaching/settings/TestSettings.java b/tests/src/cgeo/geocaching/settings/TestSettings.java
new file mode 100644
index 0000000..6585ee4
--- /dev/null
+++ b/tests/src/cgeo/geocaching/settings/TestSettings.java
@@ -0,0 +1,42 @@
+package cgeo.geocaching.settings;
+
+
+/**
+ * provide write-access proxy to settings for testing purposes
+ *
+ * @author rschuman
+ *
+ */
+public class TestSettings {
+
+ /**
+ * Purely static!
+ */
+ private TestSettings() {
+ }
+
+ public static void setExcludeDisabledCaches(final boolean exclude) {
+ Settings.setExcludeDisabledCaches(exclude);
+ }
+
+ public static void setExcludeMine(final boolean exclude) {
+ Settings.setExcludeMine(exclude);
+ }
+
+ public static boolean setLogin(final String username, final String password) {
+ return Settings.setLogin(username, password);
+ }
+
+ public static void setStoreOfflineMaps(final boolean offlineMaps) {
+ Settings.setStoreOfflineMaps(offlineMaps);
+ }
+
+ public static void setStoreOfflineWpMaps(final boolean offlineWpMaps) {
+ Settings.setStoreOfflineWpMaps(offlineWpMaps);
+ }
+
+ public static void setUseImperialUnits(final boolean imperial) {
+ Settings.setUseImperialUnits(imperial);
+ }
+
+}
diff --git a/tests/src/cgeo/geocaching/speech/TextFactoryTest.java b/tests/src/cgeo/geocaching/speech/TextFactoryTest.java
new file mode 100644
index 0000000..864757b
--- /dev/null
+++ b/tests/src/cgeo/geocaching/speech/TextFactoryTest.java
@@ -0,0 +1,158 @@
+package cgeo.geocaching.speech;
+
+import cgeo.geocaching.cgeoapplication;
+import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
+
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.test.AndroidTestCase;
+
+import java.util.Locale;
+
+public class TextFactoryTest extends AndroidTestCase {
+
+ private static final Geopoint MY_POSITION = new Geopoint(15, -86);
+ private static final Geopoint NORTH_6100M = new Geopoint(15.054859, -86);
+ private static final Geopoint WEST_1MILE = new Geopoint(15, -86.014984);
+ private static final Geopoint SOUTH_1020M = new Geopoint(14.990827, -86);
+ private static final Geopoint EAST_123M = new Geopoint(15, -85.998855);
+ private static final Geopoint WEST_34M = new Geopoint(15, -86.000317);
+ private static final Geopoint EAST_1M = new Geopoint(15, -85.999990);
+ private static final Geopoint EAST_1FT = new Geopoint(15, -85.999996);
+
+ private Locale defaultLocale1;
+ private Locale defaultLocale2;
+ private boolean defaultMetric;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ final Resources resources = cgeoapplication.getInstance().getResources();
+ final Configuration config = resources.getConfiguration();
+ defaultLocale1 = config.locale;
+ defaultLocale2 = Locale.getDefault();
+ defaultMetric = !Settings.isUseImperialUnits();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ setLocale(defaultLocale1, defaultLocale2, defaultMetric);
+ }
+
+ public static void testGetTextEn() {
+ setLocale(Locale.UK, true);
+ assertEquals("one o'clock. 6 kilometers", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("9 o'clock. 1.6 kilometers", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("6 o'clock. one kilometer", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("3 o'clock. 120 meters", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("11 o'clock. 34 meters", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("9 o'clock. one meter", TextFactory.getText(MY_POSITION, EAST_1M, 180));
+ assertEquals("12 o'clock. 0 meters", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+
+ setLocale(Locale.UK, false);
+ assertEquals("one o'clock. 4 miles", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("9 o'clock. one mile", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("6 o'clock. 0.6 miles", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("3 o'clock. 400 feet", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("11 o'clock. 111 feet", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("9 o'clock. one foot", TextFactory.getText(MY_POSITION, EAST_1FT, 180));
+ assertEquals("12 o'clock. 0 feet", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+ }
+
+ public static void testGetTextDe() {
+ setLocale(Locale.GERMANY, true);
+ assertEquals("ein Uhr. 6 Kilometer", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("9 Uhr. 1,6 Kilometer", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("6 Uhr. ein Kilometer", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("3 Uhr. 120 Meter", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("11 Uhr. 34 Meter", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("9 Uhr. ein Meter", TextFactory.getText(MY_POSITION, EAST_1M, 180));
+ assertEquals("12 Uhr. 0 Meter", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+
+ setLocale(Locale.GERMANY, false);
+ assertEquals("ein Uhr. 4 Meilen", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("9 Uhr. eine Meile", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("6 Uhr. 0,6 Meilen", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("3 Uhr. 400 Fuß", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("11 Uhr. 111 Fuß", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("9 Uhr. ein Fuß", TextFactory.getText(MY_POSITION, EAST_1FT, 180));
+ assertEquals("12 Uhr. 0 Fuß", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+ }
+
+ public static void testGetTextFr() {
+ setLocale(Locale.FRANCE, true);
+ assertEquals("une heure. 6 kilomètres", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("9 heures. 1,6 kilomètres", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("6 heures. un kilomètre", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("3 heures. 120 mètres", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("11 heures. 34 mètres", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("9 heures. un mètre", TextFactory.getText(MY_POSITION, EAST_1M, 180));
+ assertEquals("12 heures. 0 mètre", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+
+ setLocale(Locale.FRANCE, false);
+ assertEquals("une heure. 4 milles", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("9 heures. un mille", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("6 heures. 0,6 milles", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("3 heures. 400 pieds", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("11 heures. 111 pieds", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("9 heures. un pied", TextFactory.getText(MY_POSITION, EAST_1FT, 180));
+ assertEquals("12 heures. 0 pied", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+ }
+
+ public static void testGetTextIt() {
+ setLocale(Locale.ITALY, true);
+ assertEquals("a ore una. 6 chilometri", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("a ore 9. 1,6 chilometri", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("a ore 6. un chilometro", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("a ore 3. 120 metri", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("a ore 11. 34 metri", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("a ore 9. un metro", TextFactory.getText(MY_POSITION, EAST_1M, 180));
+ assertEquals("a ore 12. 0 metri", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+
+ setLocale(Locale.ITALY, false);
+ assertEquals("a ore una. 4 miglia", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("a ore 9. un miglio", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("a ore 6. 0,6 miglia", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("a ore 3. 400 piedi", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("a ore 11. 111 piedi", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("a ore 9. un piede", TextFactory.getText(MY_POSITION, EAST_1FT, 180));
+ assertEquals("a ore 12. 0 piedi", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+ }
+
+ public static void testGetTextSv() {
+ setLocale(new Locale("sv", "SE"), true);
+ assertEquals("Klockan ett. 6 kilometer", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("Klockan 9. 1,6 kilometer", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("Klockan 6. en kilometer", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("Klockan 3. 120 meter", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("Klockan 11. 34 meter", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("Klockan 9. en meter", TextFactory.getText(MY_POSITION, EAST_1M, 180));
+ assertEquals("Klockan 12. 0 meter", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+
+ setLocale(new Locale("sv", "SE"), false);
+ assertEquals("Klockan ett. 4 engelsk mil", TextFactory.getText(MY_POSITION, NORTH_6100M, 330));
+ assertEquals("Klockan 9. en engelsk mil", TextFactory.getText(MY_POSITION, WEST_1MILE, 0));
+ assertEquals("Klockan 6. 0,6 engelsk mil", TextFactory.getText(MY_POSITION, SOUTH_1020M, 0));
+ assertEquals("Klockan 3. 400 fot", TextFactory.getText(MY_POSITION, EAST_123M, 0));
+ assertEquals("Klockan 11. 111 fot", TextFactory.getText(MY_POSITION, WEST_34M, 290));
+ assertEquals("Klockan 9. en fot", TextFactory.getText(MY_POSITION, EAST_1FT, 180));
+ assertEquals("Klockan 12. 0 fot", TextFactory.getText(MY_POSITION, MY_POSITION, 0));
+ }
+
+ private static void setLocale(Locale locale, boolean metric) {
+ setLocale(locale, locale, metric);
+ }
+
+ private static void setLocale(Locale locale1, Locale locale2, boolean metric) {
+ final Configuration config = new Configuration();
+ config.locale = locale1;
+ final Resources resources = cgeoapplication.getInstance().getResources();
+ resources.updateConfiguration(config, resources.getDisplayMetrics());
+
+ Locale.setDefault(locale2);
+ TestSettings.setUseImperialUnits(!metric);
+ }
+}
diff --git a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
index 304f98d..cb8238f 100644
--- a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
+++ b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
@@ -1,11 +1,14 @@
package cgeo.geocaching.test;
+import cgeo.geocaching.Geocache;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.StoredList;
import cgeo.geocaching.cgData;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.enumerations.LoadFlags.RemoveFlag;
+import cgeo.geocaching.files.GPX10Parser;
+import cgeo.geocaching.files.ParserException;
import android.content.res.Resources;
import android.test.InstrumentationTestCase;
@@ -14,6 +17,7 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.util.Collection;
import java.util.EnumSet;
import java.util.Scanner;
@@ -78,4 +82,17 @@ public abstract class AbstractResourceInstrumentationTestCase extends Instrument
protected final int getTemporaryListId() {
return temporaryListId;
}
+
+ final protected Geocache loadCacheFromResource(int resourceId) throws IOException, ParserException {
+ final InputStream instream = getResourceStream(resourceId);
+ try {
+ GPX10Parser parser = new GPX10Parser(StoredList.TEMPORARY_LIST_ID);
+ Collection<Geocache> caches = parser.parse(instream, null);
+ assertNotNull(caches);
+ assertFalse(caches.isEmpty());
+ return caches.iterator().next();
+ } finally {
+ instream.close();
+ }
+ }
}
diff --git a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
index 8b65d43..9ca8552 100644
--- a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
+++ b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
@@ -1,11 +1,11 @@
package cgeo.geocaching.test.mock;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.connector.gc.Login;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.settings.Settings;
import java.text.ParseException;
import java.util.Date;
@@ -99,7 +99,7 @@ public class GC2CJPF extends MockedCache {
/*
* (non-Javadoc)
- *
+ *
* @see cgeo.geocaching.test.mock.MockedCache#isOwn()
*/
@Override
diff --git a/tests/src/cgeo/geocaching/test/mock/MockedCache.java b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
index 0085a18..d1252ce 100644
--- a/tests/src/cgeo/geocaching/test/mock/MockedCache.java
+++ b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
@@ -129,7 +129,7 @@ public abstract class MockedCache implements ICache {
}
@Override
- public boolean isWatchlist() {
+ public boolean isOnWatchlist() {
return false;
}
diff --git a/tests/src/cgeo/geocaching/twitter/TwitterTest.java b/tests/src/cgeo/geocaching/twitter/TwitterTest.java
index a27e57a..89ac456 100644
--- a/tests/src/cgeo/geocaching/twitter/TwitterTest.java
+++ b/tests/src/cgeo/geocaching/twitter/TwitterTest.java
@@ -1,7 +1,6 @@
package cgeo.geocaching.twitter;
import cgeo.geocaching.Geocache;
-import cgeo.geocaching.Settings;
import cgeo.geocaching.Trackable;
import junit.framework.TestCase;
@@ -22,16 +21,17 @@ public class TwitterTest extends TestCase {
assertEquals("I found TwitterTest (http://coord.info/GC1234) #cgeo #geocaching", Twitter.getStatusMessage(cache));
}
- public static void testAvoidDuplicateTags() {
- String oldMessage = Settings.getCacheTwitterMessage();
- try {
- Geocache cache = new Geocache();
- cache.setGeocode("GC1234");
- cache.setName("TwitterTest");
- Settings.setCacheTwitterMessage("[NAME] #cgeo");
- assertEquals("TwitterTest #cgeo #geocaching", Twitter.getStatusMessage(cache));
- } finally {
- Settings.setCacheTwitterMessage(oldMessage);
- }
- }
+ // TODO: re-enable when settings are ready
+ // public static void testAvoidDuplicateTags() {
+ // String oldMessage = Settings.getCacheTwitterMessage();
+ // try {
+ // Geocache cache = new Geocache();
+ // cache.setGeocode("GC1234");
+ // cache.setName("TwitterTest");
+ // Settings.setCacheTwitterMessage("[NAME] #cgeo");
+ // assertEquals("TwitterTest #cgeo #geocaching", Twitter.getStatusMessage(cache));
+ // } finally {
+ // Settings.setCacheTwitterMessage(oldMessage);
+ // }
+ // }
}
diff --git a/tests/src/cgeo/geocaching/utils/ProcessUtilsTest.java b/tests/src/cgeo/geocaching/utils/ProcessUtilsTest.java
new file mode 100644
index 0000000..f34faa6
--- /dev/null
+++ b/tests/src/cgeo/geocaching/utils/ProcessUtilsTest.java
@@ -0,0 +1,21 @@
+package cgeo.geocaching.utils;
+
+import junit.framework.TestCase;
+
+public class ProcessUtilsTest extends TestCase {
+
+ public static void testIsInstalled() {
+ assertTrue(ProcessUtils.isInstalled("com.android.launcher"));
+ }
+
+ public static void testIsInstalledNotLaunchable() {
+ final String packageName = "com.android.systemui";
+ assertTrue(ProcessUtils.isInstalled(packageName));
+ assertFalse(ProcessUtils.isLaunchable(packageName));
+ }
+
+ public static void testIsLaunchable() {
+ assertTrue(ProcessUtils.isInstalled("com.android.settings"));
+ }
+
+}
diff --git a/tests/src/cgeo/test/Compare.java b/tests/src/cgeo/test/Compare.java
index 3b3ff5a..e4e7aac 100644
--- a/tests/src/cgeo/test/Compare.java
+++ b/tests/src/cgeo/test/Compare.java
@@ -38,7 +38,7 @@ public abstract class Compare {
assertEquals(expected.getLocation(), actual.getLocation());
assertEquals(expected.isFound(), actual.isFound());
assertEquals(expected.isFavorite(), actual.isFavorite());
- assertEquals(expected.isWatchlist(), actual.isWatchlist());
+ assertEquals(expected.isOnWatchlist(), actual.isOnWatchlist());
for (String attribute : expected.getAttributes()) {
assertTrue("Expected attribute '" + attribute + "' not found in " + actual.getGeocode(), actual.getAttributes().contains(attribute));