From 1ef9e637033d8407b916e982abbcb9035b820939 Mon Sep 17 00:00:00 2001 From: Quy Tonthat Date: Tue, 24 Jul 2007 08:12:48 +0000 Subject: [PATCH] Disable Geocaches Acquire. Acquiring GeoCaches nolonger works. While waiting for being fixed, it is now disabled to avoid confusing for users. The codes can be re-enabled using configure --enable-geocaches. Signed-off-by: Quy Tonthat --- ChangeLog | 5 +++++ configure.ac | 13 +++++++++++++ src/datasource_gc.c | 2 ++ src/datasources.h | 2 ++ src/menu.xml.h | 2 ++ src/vikwindow.c | 4 ++++ 6 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index 63ba27cc..2d0ed63b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-24 +Quy Tonthat : + * Disable GeoCache Acquire since it nolonger works. Can be enabled + again using configure --enable-geocaches. + 2007-07-18 Quy Tonthat : * Remove (my) debug messages which are no longer needed. diff --git a/configure.ac b/configure.ac index f98f90df..e968ba79 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,19 @@ case $ac_cv_enable_openstreetmap in esac AM_CONDITIONAL([OPENSTREETMAP], [test x$ac_cv_enable_openstreetmap = xyes]) +AC_ARG_ENABLE(geocaches, AC_HELP_STRING([--enable-geocaches], + [enable Geocaches Acquire (default is disable). WARNING: Broken, do not enable]), + [ac_cv_enable_geocaches=$enableval], + [ac_cv_enable_geocaches=no]) +AC_CACHE_CHECK([whether to enable Geocaches Acquire], + [ac_cv_enable_geocaches], [ac_cv_enable_geocaches=yes]) +case $ac_cv_enable_geocaches in + yes) + AC_DEFINE(VIK_CONFIG_GEOCACHES, [], [GEOCACHES STUFF]) + ;; +esac +AM_CONDITIONAL([GEOCACHES], [test x$ac_cv_enable_geocaches = xyes]) + AC_ARG_WITH(mapcache, [AC_HELP_STRING([--with-mapcache], [specify the size of the map cache (default is 50331648)])], diff --git a/src/datasource_gc.c b/src/datasource_gc.c index 8aafe35f..10efe41a 100644 --- a/src/datasource_gc.c +++ b/src/datasource_gc.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#ifdef VIK_CONFIG_GEOCACHES #include #include "viking.h" @@ -104,3 +105,4 @@ static void datasource_gc_cleanup ( gpointer data ) { g_free ( data ); } +#endif /* VIK_CONFIG_GEOCACHES */ diff --git a/src/datasources.h b/src/datasources.h index 1de8f86f..dc2c4539 100644 --- a/src/datasources.h +++ b/src/datasources.h @@ -5,5 +5,7 @@ extern VikDataSourceInterface vik_datasource_gps_interface; extern VikDataSourceInterface vik_datasource_google_interface; +#ifdef VIK_CONFIG_GEOCACHES extern VikDataSourceInterface vik_datasource_gc_interface; #endif +#endif diff --git a/src/menu.xml.h b/src/menu.xml.h index a2e355e4..a0ce77ba 100644 --- a/src/menu.xml.h +++ b/src/menu.xml.h @@ -14,7 +14,9 @@ static const char *menu_xml = " " " " " " +#ifdef VIK_CONFIG_GEOCACHES " " +#endif " " " " " " diff --git a/src/vikwindow.c b/src/vikwindow.c index 0071190e..f64db0e0 100644 --- a/src/vikwindow.c +++ b/src/vikwindow.c @@ -1181,10 +1181,12 @@ static void acquire_from_google ( GtkAction *a, VikWindow *vw ) a_acquire(vw, vw->viking_vlp, vw->viking_vvp, &vik_datasource_google_interface ); } +#ifdef VIK_CONFIG_GEOCACHES static void acquire_from_gc ( GtkAction *a, VikWindow *vw ) { a_acquire(vw, vw->viking_vlp, vw->viking_vvp, &vik_datasource_gc_interface ); } +#endif static void goto_address( GtkAction *a, VikWindow *vw) { @@ -1621,7 +1623,9 @@ static GtkActionEntry entries[] = { { "Acquire", NULL, "A_cquire", 0, 0, 0 }, { "AcquireGPS", NULL, "From _GPS", NULL, "Transfer data from a GPS device", (GCallback)acquire_from_gps }, { "AcquireGoogle", NULL, "Google _Directions", NULL, "Get driving directions from Google", (GCallback)acquire_from_google }, +#ifdef VIK_CONFIG_GEOCACHES { "AcquireGC", NULL, "Geo_caches", NULL, "Get Geocaches from geocaching.com", (GCallback)acquire_from_gc }, +#endif { "Save", GTK_STOCK_SAVE, "_Save", "S", "Save the file", (GCallback)save_file }, { "SaveAs", GTK_STOCK_SAVE_AS, "Save _As", NULL, "Save the file under different name", (GCallback)save_file_as }, { "GenImg", GTK_STOCK_CLEAR, "_Generate Image File", NULL, "Save a snapshot of the workspace into a file", (GCallback)draw_to_image_file_cb }, -- 2.39.5