summaryrefslogtreecommitdiffstats
path: root/gps.c
diff options
context:
space:
mode:
Diffstat (limited to 'gps.c')
-rw-r--r--gps.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gps.c b/gps.c
index d6eeaf98e..bb6826898 100644
--- a/gps.c
+++ b/gps.c
@@ -2,7 +2,6 @@
/* Creates the UI displaying the dives locations on a map.
*/
#include <glib/gi18n.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
#include "osm-gps-map.h"
@@ -11,6 +10,10 @@
#include "display-gtk.h"
#include "divelist.h"
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk-pixbuf/gdk-pixdata.h>
+#include "flag.h"
+
/* Several map providers are available, such as OSM_GPS_MAP_SOURCE_OPENSTREETMAP
and OSM_GPS_MAP_SOURCE_VIRTUAL_EARTH_SATELLITE. We should make more of
them available from e.g. a pull-down menu */
@@ -219,7 +222,7 @@ void show_gps_location(struct dive *dive, void (*callback)(float, float))
if (lat != 0 || lng != 0) {
add_gps_point(map, lat, lng);
osm_gps_map_set_center_and_zoom(map, lat, lng, 9);
- picture = gdk_pixbuf_new_from_file("./flag.png", &gerror);
+ picture = gdk_pixbuf_from_pixdata(&flag_pixbuf, TRUE, NULL);
if (picture) {
osm_gps_map_image_add_with_alignment(map, lat, lng, picture, 0, 1);
} else {