Diff of /trunk/src/icons.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 51 by harbaum, Wed Aug 12 12:16:05 2009 UTC revision 184 by harbaum, Sat Nov 14 12:28:54 2009 UTC
# Line 18  Line 18 
18   */   */
19    
20  #include "gpxview.h"  #include "gpxview.h"
21    #include <math.h>     // for isnan()
22    
23  struct icon_data {  struct icon_data {
24    GdkPixbuf **data;    GdkPixbuf **data;
25    int count;    int count;
26  } icons[] = {  } icons[] = {
27    { NULL, CACHE_TYPE_MAX+1 },  /* ICON_CACHE_TYPE */    { NULL, CACHE_TYPE_MAX+1 },  /* ICON_CACHE_TYPE      */
28    { NULL, CACHE_CONT_MAX+1 },  /* ICON_CACHE_SIZE */    { NULL, CACHE_TYPE_MAX+1 },  /* ICON_CACHE_TYPE_SEMI */
29    { NULL, 9 },                 /* ICON_STARS      */    { NULL, CACHE_TYPE_MAX+1 },  /* ICON_CACHE_TYPE_1_5X */
30    { NULL, LOG_TYPE_MAX+1 },    /* ICON_LOG        */    { NULL, CACHE_TYPE_MAX+1 },  /* ICON_CACHE_TYPE_2X   */
31    { NULL, 9 },                 /* ICON_HEADING    */    { NULL, CACHE_CONT_MAX+1 },  /* ICON_CACHE_SIZE      */
32    { NULL, WPT_SYM_MAX+1 },     /* ICON_WPT        */    { NULL, 9 },                 /* ICON_STARS           */
33    { NULL, 1 },                 /* ICON_TB         */    { NULL, LOG_TYPE_MAX+1 },    /* ICON_LOG             */
34    { NULL, 12 },                /* ICON_MISC       */    { NULL, 9 },                 /* ICON_HEADING         */
35    { NULL, 3 },                 /* ICON_FILE       */    { NULL, WPT_SYM_MAX+1 },     /* ICON_WPT             */
36      { NULL, 2 },                 /* ICON_TB              */
37      { NULL, 9 },                 /* ICON_MISC            */
38      { NULL, 3 },                 /* ICON_FILE            */
39    { NULL, -1 }    { NULL, -1 }
40  };  };
41    
42  /* ICON_CACHE_TYPE */  /* ICON_CACHE_TYPE / ICON_CACHE_TYPE_SEMI / ICON_CACHE_TYPE_2X */
43  const char *cache_type_icon_name[] = {  const char *cache_type_icon_name[] = {
44    "traditional", "multi",      "mystery", "virtual", "webcam", "event",    "traditional", "multi",      "mystery", "virtual", "webcam", "event",
45    "letterbox",   "earthcache", "wherigo", "megaevent", "cito"    "letterbox",   "earthcache", "wherigo", "megaevent", "cito"
# Line 75  const char *wpt_sym_icon_name[] = { Line 79  const char *wpt_sym_icon_name[] = {
79    
80  /* ICON_TB         */  /* ICON_TB         */
81  const char *tb_icon_name[] = {  const char *tb_icon_name[] = {
82    "tb_coin"    "tb", "coin"
83  };  };
84    
85  /* ICON_MISC         */  /* ICON_MISC         */
86  const char *misc_icon_name[] = {  const char *misc_icon_name[] = {
87    "maemo-mapper-out", "override", "locked", "unlocked", "found",    "maemo-mapper-out", "override", "locked", "unlocked", "found",
88    "maemo-mapper-in", "note", "delete", "paypal",    "maemo-mapper-in", "note", "delete", "paypal"
   "user", "zoomin", "zoomout"  
89  };  };
90    
91  /* ICON_FILE         */  /* ICON_FILE         */
# Line 152  static void icons_load(int type, char *f Line 155  static void icons_load(int type, char *f
155  void icons_init(void) {  void icons_init(void) {
156    
157    /* load cache type icons */    /* load cache type icons */
158    icons_load(ICON_CACHE_TYPE, "cache_type_%s.%s", cache_type_icon_name);    icons_load(ICON_CACHE_TYPE, "32x32/cache_type_%s.%s", cache_type_icon_name);
159    
160      /* load semitransparent cache type icons */
161      icons_load(ICON_CACHE_TYPE_SEMI, "32x32/cache_type_%s_semi.%s", cache_type_icon_name);
162    
163      /* load 150% sized cache type icons */
164      icons_load(ICON_CACHE_TYPE_1_5X, "48x48/cache_type_%s.%s", cache_type_icon_name);
165    
166      /* load double sized cache type icons */
167      icons_load(ICON_CACHE_TYPE_2X, "64x64/cache_type_%s.%s", cache_type_icon_name);
168    
169    /* load cache container/size icons */    /* load cache container/size icons */
170    icons_load(ICON_CACHE_SIZE, "cache_size_%s.%s", cache_size_icon_name);    icons_load(ICON_CACHE_SIZE, "cache_size_%s.%s", cache_size_icon_name);
171    
172    /* load cache difficulty/terrain icons */    /* load cache difficulty/terrain/quality icons */
173    icons_load(ICON_STARS, "stars%s.%s", stars_icon_name);    icons_load(ICON_STARS, "stars%s.%s", stars_icon_name);
174    
175    /* load cache difficulty/terrain icons */    /* load cache log icons */
176    icons_load(ICON_LOG, "log_icon_%s.%s", log_icon_name);    icons_load(ICON_LOG, "32x32/log_icon_%s.%s", log_icon_name);
177    
178    /* load icons to visualize heading */    /* load icons to visualize heading */
179    icons_load(ICON_HEADING, "heading_%s.%s", heading_icon_name);    icons_load(ICON_HEADING, "heading_%s.%s", heading_icon_name);
180    
181    /* load icons to visualize heading */    /* load icons to visualize heading */
182    icons_load(ICON_WPT, "wpt_%s.%s", wpt_sym_icon_name);    icons_load(ICON_WPT, "32x32/wpt_%s.%s", wpt_sym_icon_name);
183    
184    /* load travelbug icon */    /* load travelbug icon */
185    icons_load(ICON_TB, "%s.%s", tb_icon_name);    icons_load(ICON_TB, "32x32/%s.%s", tb_icon_name);
186    
187    /* load misc icons */    /* load misc icons */
188    icons_load(ICON_MISC, "%s.%s", misc_icon_name);    icons_load(ICON_MISC, "%s.%s", misc_icon_name);

Legend:
Removed from v.51  
changed lines
  Added in v.184