]> git.street.me.uk Git - andy/viking.git/blobdiff - src/garminsymbols.c
Remove dependencies to gob2
[andy/viking.git] / src / garminsymbols.c
index 73a0fd4e62811de03a10e471084737a209681665..164c925a8579a7815836b865d78586e399db257b 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "viking.h"
 #include "garminsymbols.h"
-#include "icons.h"
+#include "icons/icons.h"
 
 #include <string.h>
 #include <stdlib.h>
@@ -36,73 +36,73 @@ struct {
   /*---------------------------------------------------------------
     Marine symbols
     ---------------------------------------------------------------*/
-  { "anchor",         0,     "white anchor symbol",               NULL,                NULL },
-  { "bell",           1,     "white bell symbol",                 NULL,                NULL },
-  { "diamond_grn",    2,     "green diamond symbol",              NULL,                NULL },
-  { "diamond_red",    3,     "red diamond symbol",                NULL,                NULL },
-  { "dive1",          4,     "diver down flag 1",                 NULL,                NULL },
-  { "dive2",          5,     "diver down flag 2",                 NULL,                NULL },
-  { "dollar",         6,     "white dollar symbol",               NULL,                NULL },
-  { "fish",           7,     "white fish symbol",                 NULL,                NULL },
-  { "fuel",           8,     "white fuel symbol",                 NULL,                NULL },
-  { "horn",           9,     "white horn symbol",                 NULL,                NULL },
-  { "house",          10,    "white house symbol",                &wp_house,           NULL },
-  { "knife",          11,    "white knife & fork symbol",         NULL,                NULL },
-  { "light",          12,    "white light symbol",                NULL,                NULL },
-  { "mug",            13,    "white mug symbol",                  NULL,                NULL },
-  { "skull",          14,    "white skull and crossbones symbol", NULL,                NULL },
-  { "square_grn",     15,    "green square symbol",               NULL,                NULL },
-  { "square_red",     16,    "red square symbol",                 NULL,                NULL },
-  { "wbuoy",          17,    "white buoy waypoint symbol",        NULL,                NULL },
-  { "wpt_dot",        18,    "waypoint dot",                      &wp_wpt_dot,         NULL },
-  { "wreck",          19,    "white wreck symbol",                NULL,                NULL },
-  { "null",           20,    "null symbol (transparent)",         NULL,                NULL },
-  { "mob",            21,    "man overboard symbol",              NULL,                NULL },
-  { "buoy_ambr",      22,    "amber map buoy symbol",             NULL,                NULL },
-  { "buoy_blck",      23,    "black map buoy symbol",             NULL,                NULL },
-  { "buoy_blue",      24,    "blue map buoy symbol",              NULL,                NULL },
-  { "buoy_grn",       25,    "green map buoy symbol",             NULL,                NULL },
-  { "buoy_grn_red",   26,    "green/red map buoy symbol",         NULL,                NULL },
-  { "buoy_grn_wht",   27,    "green/white map buoy symbol",       NULL,                NULL },
-  { "buoy_orng",      28,    "orange map buoy symbol",            NULL,                NULL },
-  { "buoy_red",       29,    "red map buoy symbol",               NULL,                NULL },
-  { "buoy_red_grn",   30,    "red/green map buoy symbol",         NULL,                NULL },
-  { "buoy_red_wht",   31,    "red/white map buoy symbol",         NULL,                NULL },
-  { "buoy_violet",    32,    "violet map buoy symbol",            NULL,                NULL },
-  { "buoy_wht",       33,    "white map buoy symbol",             NULL,                NULL },
-  { "buoy_wht_grn",   34,    "white/green map buoy symbol",       NULL,                NULL },
-  { "buoy_wht_red",   35,    "white/red map buoy symbol",         NULL,                NULL },
-  { "dot",            36,    "white dot symbol",                  NULL,                NULL },
-  { "rbcn",           37,    "radio beacon symbol",               NULL,                NULL },
-  { "boat_ramp",      150,   "boat ramp symbol",                  NULL,                NULL },
-  { "camp",           151,   "campground symbol",                 &wp_camp,            NULL },
-  { "restrooms",      152,   "restrooms symbol",                  NULL,                NULL },
-  { "showers",        153,   "shower symbol",                     NULL,                NULL },
-  { "drinking_wtr",   154,   "drinking water symbol",             NULL,                NULL },
-  { "phone",          155,   "telephone symbol",                  NULL,                NULL },
-  { "1st_aid",        156,   "first aid symbol",                  NULL,                NULL },
-  { "info",           157,   "information symbol",                NULL,                NULL },
-  { "parking",        158,   "parking symbol",                    NULL,                NULL },
-  { "park",           159,   "park symbol",                       NULL,                NULL },
-  { "picnic",         160,   "picnic symbol",                     NULL,                NULL },
-  { "scenic",         161,   "scenic area symbol",                NULL,                NULL },
-  { "skiing",         162,   "skiing symbol",                     NULL,                NULL },
-  { "swimming",       163,   "swimming symbol",                   NULL,                NULL },
-  { "dam",            164,   "dam symbol",                        NULL,                NULL },
-  { "controlled",     165,   "controlled area symbol",            NULL,                NULL },
-  { "danger",         166,   "danger symbol",                     NULL,                NULL },
-  { "restricted",     167,   "restricted area symbol",            NULL,                NULL },
+  { "anchor",         0,     "white anchor symbol",               &wp_anchor_pixbuf,          NULL },
+  { "bell",           1,     "white bell symbol",                 &wp_bell_pixbuf,            NULL },
+  { "diamond_grn",    2,     "green diamond symbol",              &wp_diamond_grn_pixbuf,     NULL },
+  { "diamond_red",    3,     "red diamond symbol",                &wp_diamond_red_pixbuf,     NULL },
+  { "dive1",          4,     "diver down flag 1",                 &wp_dive1_pixbuf,           NULL },
+  { "dive2",          5,     "diver down flag 2",                 &wp_dive2_pixbuf,           NULL },
+  { "dollar",         6,     "white dollar symbol",               &wp_dollar_pixbuf,          NULL },
+  { "fish",           7,     "white fish symbol",                 &wp_fish_pixbuf,            NULL },
+  { "fuel",           8,     "white fuel symbol",                 &wp_fuel_pixbuf,            NULL },
+  { "horn",           9,     "white horn symbol",                 &wp_horn_pixbuf,            NULL },
+  { "house",          10,    "white house symbol",                &wp_house_pixbuf,           NULL },
+  { "knife",          11,    "white knife & fork symbol",         &wp_knife_pixbuf,           NULL },
+  { "light",          12,    "white light symbol",                &wp_light_pixbuf,           NULL },
+  { "mug",            13,    "white mug symbol",                  &wp_mug_pixbuf,             NULL },
+  { "skull",          14,    "white skull and crossbones symbol", &wp_skull_pixbuf,           NULL },
+  { "square_grn",     15,    "green square symbol",               &wp_square_grn_pixbuf,      NULL },
+  { "square_red",     16,    "red square symbol",                 &wp_square_red_pixbuf,      NULL },
+  { "wbuoy",          17,    "white buoy waypoint symbol",        &wp_wbuoy_pixbuf,           NULL },
+  { "wpt_dot",        18,    "waypoint dot",                      &wp_wpt_dot_pixbuf,         NULL },
+  { "wreck",          19,    "white wreck symbol",                &wp_wreck_pixbuf,           NULL },
+  { "null",           20,    "null symbol (transparent)",         &wp_null_pixbuf,            NULL },
+  { "mob",            21,    "man overboard symbol",              &wp_mob_pixbuf,             NULL },
+  { "buoy_ambr",      22,    "amber map buoy symbol",             &wp_buoy_ambr_pixbuf,       NULL },
+  { "buoy_blck",      23,    "black map buoy symbol",             &wp_buoy_blck_pixbuf,       NULL },
+  { "buoy_blue",      24,    "blue map buoy symbol",              &wp_buoy_blue_pixbuf,       NULL },
+  { "buoy_grn",       25,    "green map buoy symbol",             &wp_buoy_grn_pixbuf,        NULL },
+  { "buoy_grn_red",   26,    "green/red map buoy symbol",         &wp_buoy_grn_red_pixbuf,    NULL },
+  { "buoy_grn_wht",   27,    "green/white map buoy symbol",       &wp_buoy_grn_wht_pixbuf,    NULL },
+  { "buoy_orng",      28,    "orange map buoy symbol",            &wp_buoy_orng_pixbuf,       NULL },
+  { "buoy_red",       29,    "red map buoy symbol",               &wp_buoy_red_pixbuf,        NULL },
+  { "buoy_red_grn",   30,    "red/green map buoy symbol",         &wp_buoy_red_grn_pixbuf,    NULL },
+  { "buoy_red_wht",   31,    "red/white map buoy symbol",         &wp_buoy_red_wht_pixbuf,    NULL },
+  { "buoy_violet",    32,    "violet map buoy symbol",            &wp_buoy_violet_pixbuf,     NULL },
+  { "buoy_wht",       33,    "white map buoy symbol",             &wp_buoy_wht_pixbuf,        NULL },
+  { "buoy_wht_grn",   34,    "white/green map buoy symbol",       &wp_buoy_wht_grn_pixbuf,    NULL },
+  { "buoy_wht_red",   35,    "white/red map buoy symbol",         &wp_buoy_wht_red_pixbuf,    NULL },
+  { "dot",            36,    "white dot symbol",                  &wp_dot_pixbuf,             NULL },
+  { "rbcn",           37,    "radio beacon symbol",               &wp_rbcn_pixbuf,            NULL },
+  { "boat_ramp",      150,   "boat ramp symbol",                  &wp_boat_ramp_pixbuf,       NULL },
+  { "camp",           151,   "campground symbol",                 &wp_camp_pixbuf,            NULL },
+  { "restrooms",      152,   "restrooms symbol",                  &wp_restroom_pixbuf,        NULL },
+  { "showers",        153,   "shower symbol",                     &wp_shower_pixbuf,          NULL },
+  { "drinking_wtr",   154,   "drinking water symbol",             &wp_drinking_wtr_pixbuf,    NULL },
+  { "phone",          155,   "telephone symbol",                  &wp_phone_pixbuf,           NULL },
+  { "1st_aid",        156,   "first aid symbol",                  &wp_1st_aid_pixbuf,         NULL },
+  { "info",           157,   "information symbol",                &wp_info_pixbuf,            NULL },
+  { "parking",        158,   "parking symbol",                    &wp_parking_pixbuf,         NULL },
+  { "park",           159,   "park symbol",                       &wp_park_pixbuf,            NULL },
+  { "picnic",         160,   "picnic symbol",                     &wp_picnic_pixbuf,          NULL },
+  { "scenic",         161,   "scenic area symbol",                &wp_scenic_pixbuf,          NULL },
+  { "skiing",         162,   "skiing symbol",                     &wp_skiing_pixbuf,          NULL },
+  { "swimming",       163,   "swimming symbol",                   &wp_swimming_pixbuf,        NULL },
+  { "dam",            164,   "dam symbol",                        &wp_dam_pixbuf,             NULL },
+  { "controlled",     165,   "controlled area symbol",            &wp_controlled_pixbuf,      NULL },
+  { "danger",         166,   "danger symbol",                     &wp_danger_pixbuf,          NULL },
+  { "restricted",     167,   "restricted area symbol",            &wp_restricted_pixbuf,      NULL },
   { "null_2",         168,   "null symbol",                       NULL,                NULL },
-  { "ball",           169,   "ball symbol",                       NULL,                NULL },
-  { "car",            170,   "car symbol",                        &wp_car,             NULL },
-  { "deer",           171,   "deer symbol",                       &wp_deer,            NULL },
+  { "ball",           169,   "ball symbol",                       &wp_ball_pixbuf,            NULL },
+  { "car",            170,   "car symbol",                        &wp_car_pixbuf,             NULL },
+  { "deer",           171,   "deer symbol",                       &wp_deer_pixbuf,            NULL },
   { "shpng_cart",     172,   "shopping cart symbol",              NULL,                NULL },
   { "lodging",        173,   "lodging symbol",                    NULL,                NULL },
-  { "mine",           174,   "mine symbol",                       NULL,                NULL },
+  { "mine",           174,   "mine symbol",                       &wp_mine_pixbuf,            NULL },
   { "trail_head",     175,   "trail head symbol",                 NULL,                NULL },
   { "truck_stop",     176,   "truck stop symbol",                 NULL,                NULL },
   { "user_exit",      177,   "user exit symbol",                  NULL,                NULL },
-  { "flag",           178,   "flag symbol",                       &wp_flag,            NULL },
+  { "flag",           178,   "flag symbol",                       &wp_flag_pixbuf,            NULL },
   { "circle_x",       179,   "circle with x in the center",       NULL,                NULL },
   { "open_24hr",      180,   "open 24 hours symbol",              NULL,                NULL },
   { "fhs_facility",   181,   "U Fishing Hot SpotsTM Facility",    NULL,                NULL },
@@ -133,13 +133,13 @@ struct {
   { "st_hwy",         8194,  "state hwy symbol",                  NULL,                NULL },
   { "mi_mrkr",        8195,  "mile marker symbol",                NULL,                NULL },
   { "trcbck",         8196,  "TracBack (feet) symbol",            NULL,                NULL },
-  { "golf",           8197,  "golf symbol",                       NULL,                NULL },
-  { "sml_cty",        8198,  "small city symbol",                 NULL,                NULL },
-  { "med_cty",        8199,  "medium city symbol",                NULL,                NULL },
-  { "lrg_cty",        8200,  "large city symbol",                 NULL,                NULL },
+  { "golf",           8197,  "golf symbol",                       &wp_golf_pixbuf,            NULL },
+  { "sml_cty",        8198,  "small city symbol",                 &wp_sml_cty_pixbuf,         NULL },
+  { "med_cty",        8199,  "medium city symbol",                &wp_med_cty_pixbuf,         NULL },
+  { "lrg_cty",        8200,  "large city symbol",                 &wp_lrg_cty_pixbuf,         NULL },
   { "freeway",        8201,  "intl freeway hwy symbol",           NULL,                NULL },
   { "ntl_hwy",        8202,  "intl national hwy symbol",          NULL,                NULL },
-  { "cap_cty",        8203,  "capitol city symbol (star)",        NULL,                NULL },
+  { "cap_cty",        8203,  "capitol city symbol (star)",        &wp_cap_cty_pixbuf,         NULL },
   { "amuse_pk",       8204,  "amusement park symbol",             NULL,                NULL },
   { "bowling",        8205,  "bowling symbol",                    NULL,                NULL },
   { "car_rental",     8206,  "car rental symbol",                 NULL,                NULL },
@@ -151,8 +151,8 @@ struct {
   { "pharmacy",       8212,  "pharmacy symbol",                   NULL,                NULL },
   { "pizza",          8213,  "pizza symbol",                      NULL,                NULL },
   { "post_ofc",       8214,  "post office symbol",                NULL,                NULL },
-  { "rv_park",        8215,  "RV park symbol",                    NULL,                NULL },
-  { "school",         8216,  "school symbol",                     NULL,                NULL },
+  { "rv_park",        8215,  "RV park symbol",                    &wp_rv_park_pixbuf,         NULL },
+  { "school",         8216,  "school symbol",                     &wp_school_pixbuf,          NULL },
   { "stadium",        8217,  "stadium symbol",                    NULL,                NULL },
   { "store",          8218,  "dept. store symbol",                NULL,                NULL },
   { "zoo",            8219,  "zoo symbol",                        NULL,                NULL },
@@ -167,20 +167,20 @@ struct {
   { "geo_place_mm",   8230,  "Geographic place name, man-made",   NULL,                NULL },
   { "geo_place_wtr",  8231,  "Geographic place name, water",      NULL,                NULL },
   { "geo_place_lnd",  8232,  "Geographic place name, land",       NULL,                NULL },
-  { "bridge",         8233,  "bridge symbol",                     NULL,                NULL },
-  { "building",       8234,  "building symbol",                   NULL,                NULL },
-  { "cemetery",       8235,  "cemetery symbol",                   NULL,                NULL },
-  { "church",         8236,  "church symbol",                     NULL,                NULL },
+  { "bridge",         8233,  "bridge symbol",                     &wp_bridge_pixbuf,          NULL },
+  { "building",       8234,  "building symbol",                   &wp_building_pixbuf,        NULL },
+  { "cemetery",       8235,  "cemetery symbol",                   &wp_cemetery_pixbuf,        NULL },
+  { "church",         8236,  "church symbol",                     &wp_church_pixbuf,          NULL },
   { "civil",          8237,  "civil location symbol",             NULL,                NULL },
   { "crossing",       8238,  "crossing symbol",                   NULL,                NULL },
   { "hist_town",      8239,  "historical town symbol",            NULL,                NULL },
   { "levee",          8240,  "levee symbol",                      NULL,                NULL },
-  { "military",       8241,  "military location symbol",          NULL,                NULL },
+  { "military",       8241,  "military location symbol",          &wp_military_pixbuf,        NULL },
   { "oil_field",      8242,  "oil field symbol",                  NULL,                NULL },
-  { "tunnel",         8243,  "tunnel symbol",                     NULL,                NULL },
-  { "beach",          8244,  "beach symbol",                      NULL,                NULL },
-  { "forest",         8245,  "forest symbol",                     NULL,                NULL },
-  { "summit",         8246,  "summit symbol",                     NULL,                NULL },
+  { "tunnel",         8243,  "tunnel symbol",                     &wp_tunnel_pixbuf,          NULL },
+  { "beach",          8244,  "beach symbol",                      &wp_beach_pixbuf,           NULL },
+  { "forest",         8245,  "forest symbol",                     &wp_forest_pixbuf,          NULL },
+  { "summit",         8246,  "summit symbol",                     &wp_summit_pixbuf,          NULL },
   { "lrg_ramp_int",   8247,  "large ramp intersection symbol",    NULL,                NULL },
   { "lrg_ex_no_srvc", 8248,  "large exit without services smbl",  NULL,                NULL },
   { "badge",          8249,  "police/official badge symbol",      NULL,                NULL },
@@ -189,8 +189,8 @@ struct {
   { "iceskate",       8252,  "ice skating symbol",                NULL,                NULL },
   { "wrecker",        8253,  "tow truck (wrecker) symbol",        NULL,                NULL },
   { "border",         8254,  "border crossing (port of entry)",   NULL,                NULL },
-  { "geocache",       8255,  "geocache location",                 &wp_geocache,        NULL },
-  { "geocache_fnd",   8256,  "found geocache",                    &wp_geocache_fnd,    NULL },
+  { "geocache",       8255,  "geocache location",                 &wp_geocache_pixbuf,        NULL },
+  { "geocache_fnd",   8256,  "found geocache",                    &wp_geocache_fnd_pixbuf,    NULL },
   { "cntct_smiley",   8257,  "Rino contact symbol, ""smiley""",   NULL,                NULL },
   { "cntct_ball_cap", 8258,  "Rino contact symbol, ""ball cap""", NULL,                NULL },
   { "cntct_big_ears", 8259,  "Rino contact symbol, ""big ear""",  NULL,                NULL },
@@ -281,7 +281,7 @@ struct {
   /*---------------------------------------------------------------
     Aviation symbols
     ---------------------------------------------------------------*/
-  { "airport",        16384, "airport symbol",                    NULL,                NULL },
+  { "airport",        16384, "airport symbol",                    &wp_airplane_pixbuf,        NULL },
   { "int",            16385, "intersection symbol",               NULL,                NULL },
   { "ndb",            16386, "non-directional beacon symbol",     NULL,                NULL },
   { "vor",            16387, "VHF omni-range symbol",             NULL,                NULL },
@@ -308,7 +308,7 @@ static void init_icons() {
   icons = g_hash_table_new_full ( g_str_hash, g_str_equal, NULL, NULL);
   gint i;
   for (i=0; i<G_N_ELEMENTS(garmin_syms); i++) {
-    g_hash_table_insert(icons, garmin_syms[i].sym, (gpointer)i);
+    g_hash_table_insert(icons, garmin_syms[i].sym, GINT_TO_POINTER (i));
   }
 }
 
@@ -326,7 +326,7 @@ GdkPixbuf *a_get_wp_sym ( const gchar *sym ) {
   if (!icons) {
     init_icons();
   }
-  return get_wp_sym_from_index((gint)g_hash_table_lookup(icons, sym));
+  return get_wp_sym_from_index( GPOINTER_TO_INT ( g_hash_table_lookup (icons, sym) ) );
 }
 
 void a_populate_sym_list ( GtkListStore *list ) {