From 8686681429b437042e73d70a960208a1965c6dba Mon Sep 17 00:00:00 2001 From: Jonas Danielsson Date: Tue, 15 Apr 2014 12:42:01 +0200 Subject: Add light rail station place type This type will also include tram stops. https://bugzilla.gnome.org/show_bug.cgi?id=728241 --- geocode-glib/geocode-forward.c | 2 + geocode-glib/geocode-place.c | 4 + geocode-glib/geocode-place.h | 4 +- icons/Makefile.am | 3 +- .../scalable_places_poi-light-rail-station.svg | 148 +++++++++++++++++++++ 5 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 icons/maki/scalable_places_poi-light-rail-station.svg diff --git a/geocode-glib/geocode-forward.c b/geocode-glib/geocode-forward.c index d5c80f7..99b7d24 100644 --- a/geocode-glib/geocode-forward.c +++ b/geocode-glib/geocode-forward.c @@ -738,6 +738,8 @@ get_place_type_from_attributes (GHashTable *ht) if (g_strcmp0 (type, "station") == 0 || g_strcmp0 (type, "halt") == 0) place_type = GEOCODE_PLACE_TYPE_RAILWAY_STATION; + else if (g_strcmp0 (type, "tram_stop") == 0) + place_type = GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION; } else if (g_strcmp0 (category, "waterway") == 0) { place_type = GEOCODE_PLACE_TYPE_DRAINAGE; } else if (g_strcmp0 (category, "boundary") == 0) { diff --git a/geocode-glib/geocode-place.c b/geocode-glib/geocode-place.c index 7166e81..70a40df 100644 --- a/geocode-glib/geocode-place.c +++ b/geocode-glib/geocode-place.c @@ -1169,6 +1169,10 @@ get_icon_name (GeocodePlace *place) icon_name = "poi-bar"; break; + case GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION: + icon_name = "poi-light-rail-station"; + break; + default: icon_name = "poi-marker"; /* generic marker */ break; diff --git a/geocode-glib/geocode-place.h b/geocode-glib/geocode-place.h index f25c03d..b71a82c 100644 --- a/geocode-glib/geocode-place.h +++ b/geocode-glib/geocode-place.h @@ -101,6 +101,7 @@ struct _GeocodePlaceClass { * @GEOCODE_PLACE_TYPE_PLACE_OF_WORSHIP: All places of worship independently of the religion or denomination. * @GEOCODE_PLACE_TYPE_RESTAURANT: Generally formal place with sit-down facilities selling full meals served by waiters. * @GEOCODE_PLACE_TYPE_BAR: A bar or pub. + * @GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION: A light rail station or tram stop. * * Type of the place. */ @@ -138,7 +139,8 @@ typedef enum { GEOCODE_PLACE_TYPE_SCHOOL, GEOCODE_PLACE_TYPE_PLACE_OF_WORSHIP, GEOCODE_PLACE_TYPE_RESTAURANT, - GEOCODE_PLACE_TYPE_BAR + GEOCODE_PLACE_TYPE_BAR, + GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION } GeocodePlaceType; diff --git a/icons/Makefile.am b/icons/Makefile.am index 6d78068..408c28b 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -10,7 +10,8 @@ public_icons = \ scalable_places_poi-place-of-worship.svg \ scalable_places_poi-restaurant.svg \ scalable_places_poi-bar.svg \ - scalable_places_poi-airport.svg + scalable_places_poi-airport.svg \ + scalable_places_poi-light-rail-station.svg gtk_update_icon_cache = gtk-update-icon-cache -f -t diff --git a/icons/maki/scalable_places_poi-light-rail-station.svg b/icons/maki/scalable_places_poi-light-rail-station.svg new file mode 100644 index 0000000..b9f899f --- /dev/null +++ b/icons/maki/scalable_places_poi-light-rail-station.svg @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + -- cgit v1.2.1