Diff of /trunk/src/cache.c

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

revision 228 by harbaum, Thu Dec 3 20:07:13 2009 UTC revision 229 by harbaum, Fri Dec 4 19:58:26 2009 UTC
# Line 51  void bearing_fill_hbox(GtkWidget *hbox, Line 51  void bearing_fill_hbox(GtkWidget *hbox,
51    
52    if(!isnan(pos.lat) && !isnan(pos.lon)) {    if(!isnan(pos.lat) && !isnan(pos.lon)) {
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)),TRUE,FALSE,0);                          icon_bearing(refpos, pos)),TRUE,FALSE,0);
55    
56      if(!isnan(refpos.lat) && !isnan(refpos.lon)) {      if(!isnan(refpos.lat) && !isnan(refpos.lon)) {
       gtk_box_pack_start_defaults(GTK_BOX(hbox),  
                    GTK_LABEL_SMALL((char*)pos_get_bearing_str(refpos, pos)));  
       gtk_box_pack_start_defaults(GTK_BOX(hbox), GTK_LABEL_SMALL("  "));  
57        snprintf(str, sizeof(str), _("%.1f°"),        snprintf(str, sizeof(str), _("%.1f°"),
58                 gpx_pos_get_bearing(refpos, pos));                 gpx_pos_get_bearing(refpos, pos));
59        gtk_box_pack_start_defaults(GTK_BOX(hbox), GTK_LABEL_SMALL(str));        gtk_box_pack_start_defaults(GTK_BOX(hbox), GTK_LABEL_SMALL(str));
# Line 64  void bearing_fill_hbox(GtkWidget *hbox, Line 61  void bearing_fill_hbox(GtkWidget *hbox,
61                               refpos, pos, appdata->imperial);                               refpos, pos, appdata->imperial);
62        gtk_box_pack_start_defaults(GTK_BOX(hbox), GTK_LABEL_SMALL("  "));        gtk_box_pack_start_defaults(GTK_BOX(hbox), GTK_LABEL_SMALL("  "));
63        gtk_box_pack_start(GTK_BOX(hbox),        gtk_box_pack_start(GTK_BOX(hbox),
64               gtk_label_attrib(str, SIZE_SMALL, STRIKETHROUGH_NONE),TRUE,FALSE,0);            gtk_label_attrib(str, SIZE_SMALL, STRIKETHROUGH_NONE),TRUE,FALSE,0);
65      } else      } else
66        gtk_box_pack_start(GTK_BOX(hbox),        gtk_box_pack_start(GTK_BOX(hbox),
67                           gtk_label_attrib(_("(no position)"),                   gtk_label_attrib(_("(no position)"),
68                                            SIZE_SMALL, STRIKETHROUGH_NONE),TRUE,FALSE,0);                   SIZE_SMALL, STRIKETHROUGH_NONE),TRUE,FALSE,0);
69    } else    } else
70      gtk_box_pack_start(GTK_BOX(hbox),      gtk_box_pack_start(GTK_BOX(hbox),
71                         gtk_label_attrib(_("(invalid position in notes)"),                         gtk_label_attrib(_("(invalid position in notes)"),
72                                          SIZE_SMALL, STRIKETHROUGH_NONE),TRUE,FALSE,0);                  SIZE_SMALL, STRIKETHROUGH_NONE),TRUE,FALSE,0);
73  }  }
74    
75  /* this function sets everything related to the coordinate. used to */  /* this function sets everything related to the coordinate. used to */
# Line 972  void cache_dialog(appdata_t *appdata, ca Line 969  void cache_dialog(appdata_t *appdata, ca
969    g_object_set_data(G_OBJECT(window), "cur_view", appdata->cur_view);    g_object_set_data(G_OBJECT(window), "cur_view", appdata->cur_view);
970    
971    appdata->cur_cache = cache;    appdata->cur_cache = cache;
972    char *title = g_strdup_printf("%s - GPXView", cache->name);    gtk_window_set_title(GTK_WINDOW(window), cache->name);
   gtk_window_set_title(GTK_WINDOW(window), title);  
   g_free(title);  
973    
974    /* create cache visualization widget */    /* create cache visualization widget */
975    appdata->cur_view = cache_view(appdata, cache);    appdata->cur_view = cache_view(appdata, cache);

Legend:
Removed from v.228  
changed lines
  Added in v.229