[gnome-internet-radio-locator: 1/2] Add debugging of mouse position in geographical latitude/longitude




commit 54c791f4d605abdada52066a7199f58beda1dc46
Author: Ole Aamot <ole gnome org>
Date:   Wed Feb 17 01:54:04 2021 +0100

    Add debugging of mouse position in geographical latitude/longitude

 data/screenshot.png                | Bin 215290 -> 214250 bytes
 src/gnome-internet-radio-locator.c |   6 ++++--
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/data/screenshot.png b/data/screenshot.png
index cdec3b8..5c9e1e2 100644
Binary files a/data/screenshot.png and b/data/screenshot.png differ
diff --git a/src/gnome-internet-radio-locator.c b/src/gnome-internet-radio-locator.c
index b285b87..04138f3 100644
--- a/src/gnome-internet-radio-locator.c
+++ b/src/gnome-internet-radio-locator.c
@@ -195,7 +195,7 @@ mouse_click_cb (ClutterActor *actor, ClutterButtonEvent *event, ChamplainView *v
        GeocodeReverse *reverse_city, *reverse_country;
        ClutterColor city_color = { 0x9a, 0x9b, 0x9c, 0x9d };
        ClutterColor text_color = { 0xff, 0xff, 0xff, 0xff };
-
+       gdouble lat_s, lon_s;
        const char *name, *name_city, *name_country;
        /* GeocodeForward *fwd; */
        /* GList *list; */
@@ -225,7 +225,9 @@ mouse_click_cb (ClutterActor *actor, ClutterButtonEvent *event, ChamplainView *v
                gtk_entry_set_text(GTK_ENTRY(input),(gchar *)name);
                g_signal_connect(CHAMPLAIN_LOCATION(marker), "button-press", G_CALLBACK(marker_function), 
NULL);
        }
-       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("Mouse click at: %f %f (%s)\n", lat, lon, name);
+       lat_s = champlain_location_get_latitude (CHAMPLAIN_LOCATION (marker));
+       lon_s = champlain_location_get_longitude (CHAMPLAIN_LOCATION (marker));
+       GNOME_INTERNET_RADIO_LOCATOR_DEBUG_MSG("Mouse click at: %f %f (%s)\n", lat_s, lon_s, name);
        return TRUE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]