mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix compilation for systems without osm-gps-map
The location map picker introduced in commit 801a61e7e0f2 ("Pick GPS coordinates of dive location via map widget") failed to add the necessary Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
24f1403831
commit
e142a0f94c
1 changed files with 4 additions and 1 deletions
5
info.c
5
info.c
|
@ -646,12 +646,14 @@ void update_gps_entry(float lat, float lon)
|
||||||
gtk_entry_set_text(location_update.entry, gps_text);
|
gtk_entry_set_text(location_update.entry, gps_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_OSM_GPS_MAP
|
||||||
static gboolean gps_map_callback(GtkWidget *w, gpointer data)
|
static gboolean gps_map_callback(GtkWidget *w, gpointer data)
|
||||||
{
|
{
|
||||||
struct dive *dive = location_update.dive;
|
struct dive *dive = location_update.dive;
|
||||||
show_gps_location(dive, update_gps_entry);
|
show_gps_location(dive, update_gps_entry);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void dive_info_widget(GtkWidget *box, struct dive *dive, struct dive_info *info, gboolean multi)
|
static void dive_info_widget(GtkWidget *box, struct dive *dive, struct dive_info *info, gboolean multi)
|
||||||
{
|
{
|
||||||
|
@ -678,6 +680,7 @@ static void dive_info_widget(GtkWidget *box, struct dive *dive, struct dive_info
|
||||||
gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, TRUE, 0);
|
||||||
info->gps = single_text_entry(hbox, _("GPS (WGS84 or GPS format)"), gps_text);
|
info->gps = single_text_entry(hbox, _("GPS (WGS84 or GPS format)"), gps_text);
|
||||||
gtk_entry_set_width_chars(info->gps, 30);
|
gtk_entry_set_width_chars(info->gps, 30);
|
||||||
|
#if HAVE_OSM_GPS_MAP
|
||||||
info->gps_icon = gtk_button_new_with_label(_("Pick on map"));
|
info->gps_icon = gtk_button_new_with_label(_("Pick on map"));
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), info->gps_icon, FALSE, FALSE, 6);
|
gtk_box_pack_start(GTK_BOX(hbox), info->gps_icon, FALSE, FALSE, 6);
|
||||||
image = gtk_image_new_from_pixbuf(get_gps_icon());
|
image = gtk_image_new_from_pixbuf(get_gps_icon());
|
||||||
|
@ -687,7 +690,7 @@ static void dive_info_widget(GtkWidget *box, struct dive *dive, struct dive_info
|
||||||
location_update.entry = info->gps;
|
location_update.entry = info->gps;
|
||||||
location_update.dive = dive;
|
location_update.dive = dive;
|
||||||
g_signal_connect(G_OBJECT(info->gps_icon), "clicked", G_CALLBACK(gps_map_callback), NULL);
|
g_signal_connect(G_OBJECT(info->gps_icon), "clicked", G_CALLBACK(gps_map_callback), NULL);
|
||||||
|
#endif
|
||||||
hbox = gtk_hbox_new(FALSE, 3);
|
hbox = gtk_hbox_new(FALSE, 3);
|
||||||
gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, TRUE, 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue