Diff of /trunk/src/cache.c

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

revision 13 by harbaum, Sat Jun 27 11:09:19 2009 UTC revision 55 by harbaum, Thu Aug 13 12:01:52 2009 UTC
# Line 53  void bearing_fill_hbox(GtkWidget *hbox, Line 53  void bearing_fill_hbox(GtkWidget *hbox,
53      gtk_box_pack_start(GTK_BOX(hbox), gtk_image_new_from_pixbuf(      gtk_box_pack_start(GTK_BOX(hbox), gtk_image_new_from_pixbuf(
54                                          icon_bearing(refpos, pos)),1,0,0);                                          icon_bearing(refpos, pos)),1,0,0);
55    
56      if(refpos.lat && refpos.lon) {      if(!isnan(refpos.lat) && !isnan(refpos.lon)) {
57        gtk_box_pack_start_defaults(GTK_BOX(hbox),        gtk_box_pack_start_defaults(GTK_BOX(hbox),
58                     GTK_LABEL_SMALL((char*)pos_get_bearing_str(refpos, pos)));                     GTK_LABEL_SMALL((char*)pos_get_bearing_str(refpos, pos)));
59        snprintf(str, sizeof(str), _("%.1f°"),        snprintf(str, sizeof(str), _("%.1f°"),
# Line 239  static GtkWidget *cache_overview(cache_c Line 239  static GtkWidget *cache_overview(cache_c
239    
240  /* slow but short, we don't need performance here ... */  /* slow but short, we don't need performance here ... */
241  static void rot13(char *t) {  static void rot13(char *t) {
242      int braces = 0;
243    
244    while(*t) {    while(*t) {
245      if(((*t >= 'a') && (*t < 'n')) ||      if(!braces) {
246         ((*t >= 'A') && (*t < 'N'))) *t += 13;        if(*t == '[')
247      else if(((*t >= 'n') && (*t <= 'z')) ||          braces++;
248              ((*t >= 'N') && (*t <= 'Z'))) *t -= 13;        else if(((*t >= 'a') && (*t < 'n')) ||
249                  ((*t >= 'A') && (*t < 'N'))) *t += 13;
250          else if(((*t >= 'n') && (*t <= 'z')) ||
251                  ((*t >= 'N') && (*t <= 'Z'))) *t -= 13;
252        } else {
253          if(braces > 0 && *t == ']')
254            braces--;
255        }
256    
257      t++;      t++;
258    }    }
# Line 684  void cache_dialog(appdata_t *appdata, ca Line 693  void cache_dialog(appdata_t *appdata, ca
693    g_object_set_data(G_OBJECT(window), "cur_view", appdata->cur_view);    g_object_set_data(G_OBJECT(window), "cur_view", appdata->cur_view);
694    
695    appdata->cur_cache = cache;    appdata->cur_cache = cache;
696    char *title = g_strdup_printf("GPXView - %s", cache->name);    char *title = g_strdup_printf("%s - GPXView", cache->name);
697    gtk_window_set_title(GTK_WINDOW(window), title);    gtk_window_set_title(GTK_WINDOW(window), title);
698    g_free(title);    g_free(title);
699    

Legend:
Removed from v.13  
changed lines
  Added in v.55