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°"), |
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 |
} |
} |
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 |
|
|