You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(59) |
Sep
(43) |
Oct
(95) |
Nov
(135) |
Dec
(108) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(229) |
Feb
(141) |
Mar
(59) |
Apr
(70) |
May
(64) |
Jun
(87) |
Jul
(57) |
Aug
(108) |
Sep
(74) |
Oct
(203) |
Nov
(141) |
Dec
(108) |
2009 |
Jan
(114) |
Feb
(91) |
Mar
(101) |
Apr
(69) |
May
(54) |
Jun
(82) |
Jul
(49) |
Aug
(109) |
Sep
(81) |
Oct
(93) |
Nov
(100) |
Dec
(79) |
2010 |
Jan
(46) |
Feb
(36) |
Mar
(135) |
Apr
(103) |
May
(116) |
Jun
(130) |
Jul
(52) |
Aug
(31) |
Sep
(46) |
Oct
(48) |
Nov
(98) |
Dec
(110) |
2011 |
Jan
(234) |
Feb
(184) |
Mar
(150) |
Apr
(43) |
May
(53) |
Jun
(52) |
Jul
(112) |
Aug
(72) |
Sep
(79) |
Oct
(23) |
Nov
(6) |
Dec
(30) |
2012 |
Jan
(39) |
Feb
(37) |
Mar
(49) |
Apr
(60) |
May
(63) |
Jun
(38) |
Jul
(33) |
Aug
(24) |
Sep
(20) |
Oct
(14) |
Nov
(23) |
Dec
(50) |
2013 |
Jan
(30) |
Feb
(32) |
Mar
(27) |
Apr
(41) |
May
(59) |
Jun
(21) |
Jul
(10) |
Aug
(73) |
Sep
(23) |
Oct
(60) |
Nov
(14) |
Dec
(15) |
2014 |
Jan
(4) |
Feb
(8) |
Mar
(11) |
Apr
(6) |
May
(27) |
Jun
(4) |
Jul
(29) |
Aug
(62) |
Sep
(11) |
Oct
(17) |
Nov
(58) |
Dec
(9) |
2015 |
Jan
(23) |
Feb
(3) |
Mar
(26) |
Apr
(47) |
May
(8) |
Jun
(28) |
Jul
(10) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Martin S. <mar...@us...> - 2007-12-18 20:17:53
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16539 Modified Files: navit.xml Log Message: Set active flag in navit.xml Index: navit.xml =================================================================== RCS file: /cvsroot/navit/navit/src/navit.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** navit.xml 28 Nov 2007 11:08:54 -0000 1.19 --- navit.xml 18 Dec 2007 20:17:54 -0000 1.20 *************** *** 21,25 **** --> ! <vehicle name="Meins" enabled="yes" source="gpsd://localhost" color="#0000ff"/> <!-- For SDL, you should add follow="1" refresh="1" to have the view centered on your position <vehicle name="Meins" enabled="yes" source="gpsd://localhost" color="#0000ff" follow="1" refresh="1"/> --- 21,25 ---- --> ! <vehicle name="Meins" enabled="yes" active="1" source="gpsd://localhost" color="#0000ff"/> <!-- For SDL, you should add follow="1" refresh="1" to have the view centered on your position <vehicle name="Meins" enabled="yes" source="gpsd://localhost" color="#0000ff" follow="1" refresh="1"/> |
From: Martin S. <mar...@us...> - 2007-12-18 19:40:37
|
Update of /cvsroot/navit/navit/src/vehicle/demo In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv481/demo Added Files: Makefile.am vehicle_demo.c Log Message: Modularized vehicle --- NEW FILE: Makefile.am --- include $(top_srcdir)/Makefile.inc AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir)/src -DMODULE=\"vehicle_demo\" modulevehicle_LTLIBRARIES = libvehicle_demo.la libvehicle_demo_la_SOURCES = vehicle_demo.c --- NEW FILE: vehicle_demo.c --- #include "debug.h" void plugin_init(void) { dbg(0,"enter\n"); } |
From: Martin S. <mar...@us...> - 2007-12-18 19:39:48
|
Update of /cvsroot/navit/navit/src/vehicle/demo In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32479/demo Log Message: Directory /cvsroot/navit/navit/src/vehicle/demo added to the repository |
From: Martin S. <mar...@us...> - 2007-12-18 19:36:59
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31177/src Modified Files: Makefile.am attr.c attr.h attr_def.h cursor.c cursor.h graphics.c graphics.h navit.c navit.h plugin_def.h vehicle.c vehicle.h xmlconfig.c Log Message: Modularized vehicle Index: graphics.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** graphics.c 9 Dec 2007 10:53:25 -0000 1.22 --- graphics.c 18 Dec 2007 19:36:56 -0000 1.23 *************** *** 116,119 **** --- 116,125 ---- void + graphics_gc_destroy(struct graphics_gc *gc) + { + gc->meth.gc_destroy(gc->priv); + } + + void graphics_gc_set_foreground(struct graphics_gc *gc, struct color *c) { Index: attr.c =================================================================== RCS file: /cvsroot/navit/navit/src/attr.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** attr.c 5 Nov 2007 18:00:25 -0000 1.10 --- attr.c 18 Dec 2007 19:36:56 -0000 1.11 *************** *** 1,7 **** --- 1,9 ---- #include <stdlib.h> #include <string.h> + #include <stdio.h> #include <glib.h> #include "debug.h" #include "item.h" + #include "color.h" #include "attr.h" *************** *** 60,64 **** default: if (attr >= attr_type_string_begin && attr <= attr_type_string_end) { ! ret->u.str=value; break; } --- 62,66 ---- default: if (attr >= attr_type_string_begin && attr <= attr_type_string_end) { ! ret->u.str=(char *)value; break; } *************** *** 67,70 **** --- 69,93 ---- break; } + if (attr >= attr_type_color_begin && attr <= attr_type_color_end) { + struct color *color=g_new0(struct color, 1); + int r,g,b,a; + ret->u.color=color; + if(strlen(value)==7){ + sscanf(value,"#%02x%02x%02x", &r, &g, &b); + color->r = (r << 8) | r; + color->g = (g << 8) | g; + color->b = (b << 8) | b; + color->a = (65535); + } else if(strlen(value)==9){ + sscanf(value,"#%02x%02x%02x%02x", &r, &g, &b, &a); + color->r = (r << 8) | r; + color->g = (g << 8) | g; + color->b = (b << 8) | b; + color->a = (a << 8) | a; + } else { + dbg(0,"color %s has unknown format\n",value); + } + break; + } dbg(1,"default\n"); g_free(ret); *************** *** 126,129 **** --- 149,154 ---- attr_free(struct attr *attr) { + if (attr->type >= attr_type_color_begin && attr->type <= attr_type_color_end) + g_free(attr->u.color); g_free(attr); } Index: graphics.h =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** graphics.h 16 Nov 2007 09:27:40 -0000 1.10 --- graphics.h 18 Dec 2007 19:36:56 -0000 1.11 *************** *** 97,102 **** struct item; struct point; - struct route; - struct transformation; struct graphics *graphics_new(const char *type, struct attr **attrs); struct graphics *graphics_overlay_new(struct graphics *parent, struct point *p, int w, int h); --- 97,100 ---- *************** *** 108,111 **** --- 106,110 ---- struct graphics_font *graphics_font_new(struct graphics *gra, int size); struct graphics_gc *graphics_gc_new(struct graphics *gra); + void graphics_gc_destroy(struct graphics_gc *gc); void graphics_gc_set_foreground(struct graphics_gc *gc, struct color *c); void graphics_gc_set_background(struct graphics_gc *gc, struct color *c); *************** *** 119,125 **** void display_add(struct displaylist *displaylist, struct item *item, int count, struct point *pnt, char *label); int graphics_ready(struct graphics *this_); - void graphics_displaylist_draw(struct graphics *gra, struct displaylist *displaylist, struct transformation *trans, GList *layouts, struct route *route); void graphics_displaylist_move(struct displaylist *displaylist, int dx, int dy); - void graphics_draw(struct graphics *gra, struct displaylist *displaylist, GList *mapsets, struct transformation *trans, GList *layouts, struct route *route); struct displaylist_handle *graphics_displaylist_open(struct displaylist *displaylist); struct displayitem *graphics_displaylist_next(struct displaylist_handle *dlh); --- 118,122 ---- Index: cursor.h =================================================================== RCS file: /cvsroot/navit/navit/src/cursor.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** cursor.h 9 Oct 2007 16:44:06 -0000 1.10 --- cursor.h 18 Dec 2007 19:36:56 -0000 1.11 *************** *** 3,20 **** /* prototypes */ - struct callback; struct color; - struct coord; struct cursor; struct graphics; ! struct transformation; ! struct vehicle; ! struct coord *cursor_pos_get(struct cursor *this); ! void cursor_pos_set(struct cursor *this, struct coord *pos); ! void cursor_redraw(struct cursor *this); ! int cursor_get_dir(struct cursor *this); ! int cursor_get_speed(struct cursor *this); ! struct cursor *cursor_new(struct graphics *gra, struct vehicle *v, struct color *c, struct transformation *t); ! void cursor_add_callback(struct cursor *this, struct callback *cb); /* end of prototypes */ --- 3,13 ---- /* prototypes */ struct color; struct cursor; struct graphics; ! struct point; ! void cursor_draw(struct cursor *this_, struct point *pnt, int dir, int draw_dir, int force); ! struct cursor *cursor_new(struct graphics *gra, struct color *c); ! void cursor_destroy(struct cursor *this_); /* end of prototypes */ Index: attr.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** attr.h 20 Nov 2007 18:55:41 -0000 1.11 --- attr.h 18 Dec 2007 19:36:56 -0000 1.12 *************** *** 32,35 **** --- 32,41 ---- struct item *item; enum item_type item_type; + double * numd; + struct color *color; + struct coord_geo *coord_geo; + struct navit *navit; + struct callback *callback; + struct log *log; } u; }; Index: plugin_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/plugin_def.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** plugin_def.h 29 Aug 2007 18:32:13 -0000 1.7 --- plugin_def.h 18 Dec 2007 19:36:57 -0000 1.8 *************** *** 1,7 **** enum projection; struct attr; PLUGIN_FUNC1(draw, struct container *, co) PLUGIN_FUNC3(popup, struct container *, map, struct popup *, p, struct popup_item **, list) - struct navit; PLUGIN_TYPE(graphics, (struct graphics_methods *meth, struct attr **attrs)) PLUGIN_TYPE(gui, (struct navit *nav, struct gui_methods *meth, struct attr **attrs)) --- 1,8 ---- enum projection; struct attr; + struct navit; + struct callback_list; PLUGIN_FUNC1(draw, struct container *, co) PLUGIN_FUNC3(popup, struct container *, map, struct popup *, p, struct popup_item **, list) PLUGIN_TYPE(graphics, (struct graphics_methods *meth, struct attr **attrs)) PLUGIN_TYPE(gui, (struct navit *nav, struct gui_methods *meth, struct attr **attrs)) *************** *** 9,11 **** PLUGIN_TYPE(osd, (struct navit *nav, struct osd_methods *meth, struct attr **attrs)) PLUGIN_TYPE(speech, (char *data, struct speech_methods *meth)) ! PLUGIN_TYPE(vehicle, (struct vehicle_methods *meth)) --- 10,12 ---- PLUGIN_TYPE(osd, (struct navit *nav, struct osd_methods *meth, struct attr **attrs)) PLUGIN_TYPE(speech, (char *data, struct speech_methods *meth)) ! PLUGIN_TYPE(vehicle, (struct vehicle_methods *meth, struct callback_list *cbl, struct attr **attrs)) Index: attr_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr_def.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** attr_def.h 11 Dec 2007 14:52:54 -0000 1.16 --- attr_def.h 18 Dec 2007 19:36:56 -0000 1.17 *************** *** 25,30 **** --- 25,36 ---- ATTR(zipfile_ref) ATTR(country_id) + ATTR(position_sats) + ATTR(position_sats_used) + ATTR(update) + ATTR(follow) + ATTR2(0x00028000,type_boolean_begin) /* boolean */ ATTR(overwrite) + ATTR(active) ATTR2(0x0002ffff,type_int_end) ATTR2(0x00030000,type_string_begin) *************** *** 64,67 **** --- 70,91 ---- ATTR(navigation_long_exact) ATTR(navigation_speech) + ATTR(name) + ATTR(source) ATTR2(0x0003ffff,type_string_end) ATTR(order_limit) + ATTR2(0x00050000,type_double_start) + ATTR(position_height) + ATTR(position_speed) + ATTR(position_direction) + ATTR2(0x0005ffff,type_double_end) + ATTR2(0x00060000,type_coord_geo_start) + ATTR(position_coord_geo) + ATTR2(0x0006ffff,type_coord_geo_end) + ATTR2(0x00070000,type_color_begin) + ATTR(color) + ATTR2(0x0007ffff,type_color_end) + ATTR2(0x00080000,type_object_begin) + ATTR(navit) + ATTR(log) + ATTR(callback) + ATTR2(0x0008ffff,type_object_end) Index: cursor.c =================================================================== RCS file: /cvsroot/navit/navit/src/cursor.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** cursor.c 11 Aug 2007 13:23:45 -0000 1.14 --- cursor.c 18 Dec 2007 19:36:56 -0000 1.15 *************** *** 27,77 **** struct graphics *gra; struct graphics_gc *cursor_gc; - struct transformation *trans; struct point cursor_pnt; - struct callback_list *update_cbl; - struct vehicle *v; - struct callback *vehicle_cb; - int dir; - int speed; - struct coord pos; - enum projection pro; }; - struct coord * - cursor_pos_get(struct cursor *this) - { - return &this->pos; - #if 0 - return vehicle_pos_get(this->v); - #endif - } - void ! cursor_pos_set(struct cursor *this, struct coord *pos) ! { ! this->pos=*pos; ! #if 0 ! return vehicle_pos_get(this->v); ! #endif ! } ! ! ! static void ! cursor_draw(struct cursor *this, struct point *pnt, int dir, int draw_dir) { ! int x=this->cursor_pnt.x; ! int y=this->cursor_pnt.y; int r=12,lw=2; double dx,dy; double fac1,fac2; struct point cpnt[3]; ! struct graphics *gra=this->gra; ! if (pnt && x == pnt->x && y == pnt->y) return; if (!graphics_ready(gra)) return; ! cpnt[0]=this->cursor_pnt; cpnt[0].x-=r+lw; cpnt[0].y-=r+lw; --- 27,50 ---- struct graphics *gra; struct graphics_gc *cursor_gc; struct point cursor_pnt; }; void ! cursor_draw(struct cursor *this_, struct point *pnt, int dir, int draw_dir, int force) { ! int x=this_->cursor_pnt.x; ! int y=this_->cursor_pnt.y; int r=12,lw=2; double dx,dy; double fac1,fac2; struct point cpnt[3]; ! struct graphics *gra=this_->gra; ! if (pnt && x == pnt->x && y == pnt->y && !force) return; if (!graphics_ready(gra)) return; ! cpnt[0]=this_->cursor_pnt; cpnt[0].x-=r+lw; cpnt[0].y-=r+lw; *************** *** 79,88 **** if (pnt) { graphics_draw_mode(gra, draw_mode_cursor); ! this->cursor_pnt=*pnt; x=pnt->x; y=pnt->y; cpnt[0].x=x; cpnt[0].y=y; ! graphics_draw_circle(gra, this->cursor_gc, &cpnt[0], r*2); if (draw_dir) { dx=sin(M_PI*dir/180.0); --- 52,61 ---- if (pnt) { graphics_draw_mode(gra, draw_mode_cursor); ! this_->cursor_pnt=*pnt; x=pnt->x; y=pnt->y; cpnt[0].x=x; cpnt[0].y=y; ! graphics_draw_circle(gra, this_->cursor_gc, &cpnt[0], r*2); if (draw_dir) { dx=sin(M_PI*dir/180.0); *************** *** 97,104 **** cpnt[2].x=x-dx*fac1-dy*fac2; cpnt[2].y=y-dy*fac1+dx*fac2; ! graphics_draw_lines(gra, this->cursor_gc, cpnt, 3); } else { cpnt[1]=cpnt[0]; ! graphics_draw_lines(gra, this->cursor_gc, cpnt, 2); } graphics_draw_mode(gra, draw_mode_end); --- 70,77 ---- cpnt[2].x=x-dx*fac1-dy*fac2; cpnt[2].y=y-dy*fac1+dx*fac2; ! graphics_draw_lines(gra, this_->cursor_gc, cpnt, 3); } else { cpnt[1]=cpnt[0]; ! graphics_draw_lines(gra, this_->cursor_gc, cpnt, 2); } graphics_draw_mode(gra, draw_mode_end); *************** *** 106,250 **** } - void - cursor_redraw(struct cursor *this) - { - struct point pnt; - transform(this->trans, this->pro, &this->pos, &pnt); - cursor_draw(this, &pnt, this->dir-transform_get_angle(this->trans, 0), this->speed > 2.5); - } - - #if 0 - static void - cursor_map_reposition_screen(struct cursor *this, struct coord *c, double *dir, int x_new, int y_new) - { - struct coord c_new; - struct transformation tr; - struct point pnt; - unsigned long scale; - long x,y; - int dir_i; - struct container *co=this->co; - - if (dir) - dir_i=*dir; - else - dir_i=0; - - pnt.x=co->trans->width-x_new; - pnt.y=co->trans->height-y_new; - graphics_get_view(co, &x, &y, &scale); - tr=*this->co->trans; - transform_setup(&tr, c->x, c->y, scale, dir_i); - transform_reverse(&tr, &pnt, &c_new); - printf("%lx %lx vs %lx %lx\n", c->x, c->y, c_new.x, c_new.y); - x=c_new.x; - y=c_new.y; - transform_set_angle(co->trans,dir_i); - graphics_set_view(co, &x, &y, &scale); - } - - static void - cursor_map_reposition(struct cursor *this, struct coord *c, double *dir) - { - if (this->co->flags->orient_north) { - graphics_set_view(this->co, &c->x, &c->y, NULL); - } else { - cursor_map_reposition_screen(this, c, dir, this->co->trans->width/2, this->co->trans->height*0.8); - } - } - - static int - cursor_map_reposition_boundary(struct cursor *this, struct coord *c, double *dir, struct point *pnt) - { - struct point pnt_new; - struct transformation *t=this->co->trans; - - pnt_new.x=-1; - pnt_new.y=-1; - if (pnt->x < 0.1*t->width) { - pnt_new.x=0.8*t->width; - pnt_new.y=t->height/2; - } - if (pnt->x > 0.9*t->width) { - pnt_new.x=0.2*t->width; - pnt_new.y=t->height/2; - } - if (pnt->y < (this->co->flags->orient_north ? 0.1 : 0.5)*t->height) { - pnt_new.x=t->width/2; - pnt_new.y=0.8*t->height; - } - if (pnt->y > 0.9*t->height) { - pnt_new.x=t->width/2; - pnt_new.y=0.2*t->height; - } - if (pnt_new.x != -1) { - if (this->co->flags->orient_north) { - cursor_map_reposition_screen(this, c, NULL, pnt_new.x, pnt_new.y); - } else { - cursor_map_reposition(this, c, dir); - } - return 1; - } - return 0; - } - - #endif - - int - cursor_get_dir(struct cursor *this) - { - return this->dir; - } - - int - cursor_get_speed(struct cursor *this) - { - return this->speed; - } - - static void - cursor_update(struct cursor *this, struct vehicle *v) - { - struct point pnt; - struct coord *pos; - double *dir; - double *speed; - enum projection pro; - - if (v) { - pos=vehicle_pos_get(v); - dir=vehicle_dir_get(v); - speed=vehicle_speed_get(v); - pro=vehicle_projection(v); - this->dir=*dir; - this->speed=*speed; - this->pos=*pos; - this->pro=pro; - callback_list_call_1(this->update_cbl, this); - transform(this->trans, pro, &this->pos, &pnt); - cursor_draw(this, &pnt, *dir-transform_get_angle(this->trans, 0), *speed > 2.5); - } - #if 0 - compass_draw(this->co->compass, this->co); - #endif - } - struct cursor * ! cursor_new(struct graphics *gra, struct vehicle *v, struct color *c, struct transformation *t) { ! dbg(2,"enter gra=%p v=%p c=%p t=%p\n", gra, v, c, t); struct cursor *this=g_new(struct cursor,1); - #if 0 - this->offscreen_cbl=callback_list_new(); - #endif - this->update_cbl=callback_list_new(); this->gra=gra; - this->trans=t; this->cursor_gc=graphics_gc_new(gra); - this->v=v; graphics_gc_set_foreground(this->cursor_gc, c); graphics_gc_set_linewidth(this->cursor_gc, 2); - this->vehicle_cb=callback_new_1(callback_cast(cursor_update), this); - vehicle_callback_add(v, this->vehicle_cb); dbg(2,"ret=%p\n", this); return this; --- 79,91 ---- } struct cursor * ! cursor_new(struct graphics *gra, struct color *c) { ! dbg(2,"enter gra=%p c=%p\n", gra, c); struct cursor *this=g_new(struct cursor,1); this->gra=gra; this->cursor_gc=graphics_gc_new(gra); graphics_gc_set_foreground(this->cursor_gc, c); graphics_gc_set_linewidth(this->cursor_gc, 2); dbg(2,"ret=%p\n", this); return this; *************** *** 252,257 **** void ! cursor_add_callback(struct cursor *this, struct callback *cb) { ! callback_list_add(this->update_cbl, cb); } --- 93,99 ---- void ! cursor_destroy(struct cursor *this_) { ! graphics_gc_destroy(this_->cursor_gc); ! g_free(this_); } Index: vehicle.c =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** vehicle.c 2 Dec 2007 17:43:31 -0000 1.27 --- vehicle.c 18 Dec 2007 19:36:57 -0000 1.28 *************** *** 1,769 **** - #include "config.h" - #include <stdio.h> - #include <stdlib.h> - #include <string.h> - #include <termios.h> - #include <unistd.h> - #include <fcntl.h> - #include <math.h> - #include <sys/stat.h> - #include <sys/types.h> - #include <sys/socket.h> - #include <netinet/in.h> - #include <arpa/inet.h> #include <glib.h> ! #ifdef HAVE_LIBGPS ! #include <gps.h> ! #endif #include "debug.h" #include "coord.h" - #include "callback.h" - #include "transform.h" - #include "projection.h" - #include "statusbar.h" - #include "navit.h" #include "item.h" #include "log.h" #include "vehicle.h" - #include "item.h" - #include "route.h" - - static void disable_watch(struct vehicle *this_); - static void enable_watch(struct vehicle *this_); - - /* #define INTERPOLATION_TIME 50 */ - - struct callback { - void (*func)(struct vehicle *, void *data); - void *data; - }; struct vehicle { ! char *url; ! GIOChannel *iochan; ! guint watch; ! int is_file; ! int is_pipe; ! int timer_count; ! int status; // Do we have a fix? 0=no 1=yes, without DGPS 2=yes, with DGPS ! int sats,sats_used; ! struct coord_geo geo; ! double height; ! double dir,speed; ! double time; ! double pdop; ! struct coord current_pos; ! struct coord_d curr; ! struct coord_d delta; ! ! double speed_last; ! int fd; ! FILE *file; ! #ifdef HAVE_LIBGPS ! struct gps_data_t *gps; ! #endif ! #define BUFFER_SIZE 256 ! char buffer[BUFFER_SIZE]; ! int buffer_pos; ! struct callback_list *cbl; - struct vehicle *child; - struct callback *child_cb; - - int magic; - int is_udp; - int interval; - struct sockaddr_in rem; struct log *nmea_log, *gpx_log, *textfile_log; - - struct navit *navit; }; - // FIXME : this_ is an ugly hack (dixit cp15 ;) ) - struct vehicle *vehicle_last; - - #if INTERPOLATION_TIME static int ! vehicle_timer(gpointer t) ! { ! struct vehicle *this_=t; ! /* if (this_->timer_count++ < 1000/INTERPOLATION_TIME) { */ ! if (this_->delta.x || this_->delta.y) { ! this_->curr.x+=this_->delta.x; ! this_->curr.y+=this_->delta.y; ! this_->current_pos.x=this_->curr.x; ! this_->current_pos.y=this_->curr.y; ! if (this_->callback_func) ! (*this_->callback_func)(this_, this_->callback_data); ! } ! /* } */ ! return TRUE; ! } ! #endif ! ! enum projection ! vehicle_projection(struct vehicle *this_) ! { ! return projection_mg; ! } ! ! struct coord * ! vehicle_pos_get(struct vehicle *this_) ! { ! return &this_->current_pos; ! } ! ! double * ! vehicle_speed_get(struct vehicle *this_) ! { ! return &this_->speed; ! } ! ! double * ! vehicle_height_get(struct vehicle *this_) ! { ! return &this_->height; ! } ! double * ! vehicle_dir_get(struct vehicle *this_) ! { ! return &this_->dir; ! } ! ! int * ! vehicle_status_get(struct vehicle *this_) ! { ! return &this_->status; ! } ! ! int * ! vehicle_sats_get(struct vehicle *this_) ! { ! return &this_->sats; ! } ! ! int * ! vehicle_sats_used_get(struct vehicle *this_) ! { ! return &this_->sats_used; ! } ! ! double * ! vehicle_pdop_get(struct vehicle *this_) ! { ! return &this_->pdop; ! } ! ! void ! vehicle_set_position(struct vehicle *this_, struct coord *pos) ! { ! this_->current_pos=*pos; ! this_->curr.x=this_->current_pos.x; ! this_->curr.y=this_->current_pos.y; ! this_->delta.x=0; ! this_->delta.y=0; ! callback_list_call_1(this_->cbl, this_); ! } ! ! static int ! enable_watch_timer(gpointer t) { ! struct vehicle *this_=t; ! enable_watch(this_); ! ! return FALSE; ! } ! ! // FIXME Should this_ function be static ? ! void ! vehicle_set_navit(struct vehicle *this_,struct navit *nav) { ! dbg(0,"vehicle_set_navit called\n"); ! this_->navit=nav; } ! static void ! vehicle_parse_gps(struct vehicle *this_, char *buffer) { ! char *p,*item[16]; ! double lat,lng,scale,speed; ! int i,bcsum; ! int len=strlen(buffer); ! unsigned char csum=0; ! ! dbg(1, "buffer='%s' ", buffer); ! if (this_->nmea_log) { ! log_write(this_->nmea_log, buffer, len); ! log_write(this_->nmea_log, "\n", 1); ! } ! for (;;) { ! if (len < 4) { ! dbg(0, "too short\n"); ! return; ! } ! if (buffer[len-1] == '\r' || buffer[len-1] == '\n') ! buffer[--len]='\0'; ! else ! break; ! } ! if (buffer[0] != '$') { ! dbg(0, "no leading $\n"); ! return; ! } ! if (buffer[len-3] != '*') { ! dbg(0, "no *XX\n"); ! return; ! } ! for (i = 1 ; i < len-3 ; i++) { ! csum ^= (unsigned char)(buffer[i]); ! } ! if (!sscanf(buffer+len-2, "%x", &bcsum)) { ! dbg(0, "no checksum\n"); ! return; ! } ! if (bcsum != csum) { ! dbg(0, "wrong checksum\n"); ! return; ! } ! ! if (!strncmp(buffer,"$GPGGA",6)) { ! /* $GPGGA,184424.505,4924.2811,N,01107.8846,E,1,05,2.5,408.6,M,,,,0000*0C ! UTC of Fix,Latitude,N/S,Longitude,E/W,Quality,Satelites,HDOP,Altitude,"M" ! */ ! i=0; ! p=buffer; ! while (i < 16) { ! item[i++]=p; ! while (*p && *p != ',') ! p++; ! if (! *p) break; ! *p++='\0'; ! } ! ! sscanf(item[2],"%lf",&lat); ! this_->geo.lat=floor(lat/100); ! lat-=this_->geo.lat*100; ! this_->geo.lat+=lat/60; ! ! sscanf(item[4],"%lf",&lng); ! this_->geo.lng=floor(lng/100); ! lng-=this_->geo.lng*100; ! this_->geo.lng+=lng/60; ! ! sscanf(item[6],"%d",&this_->status); ! sscanf(item[7],"%d",&this_->sats); ! sscanf(item[9],"%lf",&this_->height); ! ! if (this_->gpx_log) { ! char buffer[256]; ! sprintf(buffer,"<trkpt lat=\"%f\" lon=\"%f\" />\n",this_->geo.lat,this_->geo.lng); ! log_write(this_->gpx_log, buffer, strlen(buffer)); ! ! } ! if (this_->textfile_log) { ! char buffer[256]; ! sprintf(buffer,"%f %f type=trackpoint\n",this_->geo.lng,this_->geo.lat); ! log_write(this_->textfile_log, buffer, strlen(buffer)); ! } ! transform_from_geo(projection_mg, &this_->geo, &this_->current_pos); ! ! this_->curr.x=this_->current_pos.x; ! this_->curr.y=this_->current_pos.y; ! this_->timer_count=0; ! callback_list_call_1(this_->cbl, this_); ! if (this_->is_file) { ! disable_watch(this_); ! g_timeout_add(1000, enable_watch_timer, this_); ! } ! } ! if (!strncmp(buffer,"$GPVTG",6)) { ! /* $GPVTG,143.58,T,,M,0.26,N,0.5,K*6A ! Course Over Ground Degrees True,"T",Course Over Ground Degrees Magnetic,"M", ! Speed in Knots,"N","Speed in KM/H","K",*CHECKSUM */ ! ! i=0; ! p=buffer; ! while (i < 16) { ! item[i++]=p; ! while (*p && *p != ',') ! p++; ! if (! *p) break; ! *p++='\0'; ! } ! sscanf(item[1],"%lf",&this_->dir); ! sscanf(item[7],"%lf",&this_->speed); ! scale=transform_scale(this_->current_pos.y); ! speed=this_->speed+(this_->speed-this_->speed_last)/2; ! #ifdef INTERPOLATION_TIME ! this_->delta.x=sin(M_PI*this_->dir/180)*speed*scale/3600*INTERPOLATION_TIME; ! this_->delta.y=cos(M_PI*this_->dir/180)*speed*scale/3600*INTERPOLATION_TIME; ! #endif ! this_->speed_last=this_->speed; ! } ! if (!strncmp(buffer,"$GPRMC",6)) { ! /* $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A */ ! /* Time,Active/Void,lat,N/S,long,W/E,speed in knots,track angle,date,magnetic variation */ ! i=0; ! p=buffer; ! while (i < 16) { ! item[i++]=p; ! while (*p && *p != ',') ! p++; ! if (! *p) break; ! *p++='\0'; ! } ! sscanf(item[8],"%lf",&this_->dir); ! sscanf(item[7],"%lf",&this_->speed); ! this_->speed *= 1.852; ! scale=transform_scale(this_->current_pos.y); ! speed=this_->speed+(this_->speed-this_->speed_last)/2; ! #ifdef INTERPOLATION_TIME ! this_->delta.x=sin(M_PI*this_->dir/180)*speed*scale/3600*INTERPOLATION_TIME; ! this_->delta.y=cos(M_PI*this_->dir/180)*speed*scale/3600*INTERPOLATION_TIME; ! #endif ! this_->speed_last=this_->speed; } - } ! #ifdef HAVE_LIBGPS ! static void ! vehicle_gps_callback(struct gps_data_t *data, char *buf, size_t len, int level) ! { ! // If data->fix.speed is NAN, then the drawing gets jumpy. ! if(isnan(data->fix.speed)){ ! return; ! } ! struct vehicle *this_=vehicle_last; ! double scale,speed; ! #if INTERPOLATION_TIME ! if (! (data->set & TIME_SET)) { ! return; ! } ! data->set &= ~TIME_SET; ! if (this_->time == data->fix.time) ! return; ! this_->time=data->fix.time; ! #endif ! if (data->set & SPEED_SET) { ! this_->speed_last=this_->speed; ! this_->speed=data->fix.speed*3.6; ! data->set &= ~SPEED_SET; ! } ! if (data->set & TRACK_SET) { ! speed=this_->speed+(this_->speed-this_->speed_last)/2; ! this_->dir=data->fix.track; ! scale=transform_scale(this_->current_pos.y); ! #ifdef INTERPOLATION_TIME ! this_->delta.x=sin(M_PI*this_->dir/180)*speed*scale/3600*INTERPOLATION_TIME; ! this_->delta.y=cos(M_PI*this_->dir/180)*speed*scale/3600*INTERPOLATION_TIME; ! #endif ! data->set &= ~TRACK_SET; ! } ! if (data->set & LATLON_SET) { ! this_->geo.lat=data->fix.latitude; ! this_->geo.lng=data->fix.longitude; ! transform_from_geo(projection_mg, &this_->geo, &this_->current_pos); ! this_->curr.x=this_->current_pos.x; ! this_->curr.y=this_->current_pos.y; ! this_->timer_count=0; ! callback_list_call_1(this_->cbl, this_); ! data->set &= ~LATLON_SET; ! } ! if (data->set & ALTITUDE_SET) { ! this_->height=data->fix.altitude; ! data->set &= ~ALTITUDE_SET; ! } ! if (data->set & SATELLITE_SET) { ! this_->sats=data->satellites; ! data->set &= ~SATELLITE_SET; ! /* FIXME : the USED_SET check does not work yet. */ ! this_->sats_used=data->satellites_used; ! } ! if (data->set & STATUS_SET) { ! this_->status=data->status; ! data->set &= ~STATUS_SET; ! } ! if(data->set & PDOP_SET){ ! printf("pdop : %g\n",data->pdop); } ! } ! #endif ! ! ! static void ! vehicle_close(struct vehicle *this_) ! { ! GError *error=NULL; ! ! ! g_io_channel_shutdown(this_->iochan,0,&error); ! #ifdef HAVE_LIBGPS ! if (this_->gps) ! gps_close(this_->gps); ! #endif ! if (this_->file) ! pclose(this_->file); ! if (this_->fd != -1) ! close(this_->fd); ! } ! ! struct packet { ! int magic __attribute__ ((packed)); ! unsigned char type; ! union { ! struct { ! int x __attribute__ ((packed)); ! int y __attribute__ ((packed)); ! unsigned char speed; ! unsigned char dir; ! } pos; ! } u; ! } __attribute__ ((packed)) ; ! ! static void ! vehicle_udp_recv(struct vehicle *this_) ! { ! struct packet pkt; ! int size; ! ! dbg(2,"enter this_=%p\n",this_); ! size=recv(this_->fd, &pkt, 15, 0); ! if (pkt.magic == this_->magic) { ! dbg(3,"magic 0x%x size=%d\n", pkt.magic, size); ! this_->current_pos.x=pkt.u.pos.x; ! this_->current_pos.y=pkt.u.pos.y; ! this_->speed=pkt.u.pos.speed; ! this_->dir=pkt.u.pos.dir*2; ! callback_list_call_1(this_->cbl, this_); } ! } ! static void ! vehicle_udp_update(struct vehicle *this_, struct vehicle *child) ! { ! struct coord *pos=&child->current_pos; ! struct packet pkt; ! int speed=child->speed; ! int dir=child->dir/2; ! if (speed > 255) ! speed=255; ! pkt.magic=this_->magic; ! pkt.type=1; ! pkt.u.pos.x=pos->x; ! pkt.u.pos.y=pos->y; ! pkt.u.pos.speed=speed; ! pkt.u.pos.dir=dir; ! sendto(this_->fd, &pkt, 15, 0, (struct sockaddr *)&this_->rem, sizeof(this_->rem)); ! this_->current_pos=child->current_pos; ! this_->speed=child->speed; ! this_->dir=child->dir; ! callback_list_call_1(this_->cbl, this_); } ! static int ! vehicle_udp_query(void *data) { ! struct vehicle *this_=(struct vehicle *)data; ! struct packet pkt; ! dbg(2,"enter this_=%p\n", this_); ! pkt.magic=this_->magic; ! pkt.type=2; ! sendto(this_->fd, &pkt, 5, 0, (struct sockaddr *)&this_->rem, sizeof(this_->rem)); ! dbg(2,"ret=TRUE\n"); ! return TRUE; } ! static int ! vehicle_udp_open(struct vehicle *this_) { - char *host,*child,*url,*colon; - int port; - url=g_strdup(this_->url); - colon=index(url+6,':'); - struct sockaddr_in lcl; - - if (! colon || sscanf(colon+1,"%d/%i/%d", &port, &this_->magic, &this_->interval) != 3) { - g_warning("Wrong syntax in %s\n", this_->url); - return 0; - } - host=url+6; - *colon='\0'; - this_->fd=socket(PF_INET, SOCK_DGRAM, 0); - this_->is_udp=1; - memset(&lcl, 0, sizeof(lcl)); - lcl.sin_family = AF_INET; - - this_->rem.sin_family = AF_INET; - inet_aton(host, &this_->rem.sin_addr); - this_->rem.sin_port=htons(port); - - bind(this_->fd, (struct sockaddr *)&lcl, sizeof(lcl)); - child=index(colon+1,' '); - if (child) { - child++; - if (!this_->child) { - dbg(3,"child=%s\n", child); - this_->child=vehicle_new(child); - this_->child_cb=callback_new_1(callback_cast(vehicle_udp_update), this_); - vehicle_callback_add(this_->child, this_->child_cb); - } - } else { - vehicle_udp_query(this_); - g_timeout_add(this_->interval*1000, vehicle_udp_query, this_); - } - g_free(url); return 0; } ! static int ! vehicle_demo_timer (struct vehicle *this) { ! struct route_path_coord_handle *h; ! struct coord *c; ! dbg(1,"###### Entering simulation loop\n"); ! if(!this->navit){ ! dbg(1,"vehicle->navit is not set. Can't simulate\n"); ! return 1; ! } ! ! // <cp15> Then check whether the route is set, if not return TRUE ! struct route * vehicle_route=navit_get_route(this->navit); ! if(!vehicle_route){ ! dbg(1,"navit_get_route NOK\n"); ! return 1; ! } ! ! h=route_path_coord_open(vehicle_route); ! if (!h) { ! dbg(1,"navit_path_coord_open NOK\n"); ! return 1; ! } ! c=route_path_coord_get(h); ! dbg(1,"current pos=%p\n", c); ! if (c) ! dbg(1,"current pos=0x%x,0x%x\n", c->x, c->y); ! c=route_path_coord_get(h); ! dbg(1,"next pos=%p\n", c); ! if (c) { ! dbg(1,"next pos=0x%x,0x%x\n", c->x, c->y); ! vehicle_set_position(this,c); } return 1; } ! static int ! vehicle_open(struct vehicle *this_) { ! struct termios tio; ! struct stat st; ! int fd=0; ! ! #ifdef HAVE_LIBGPS ! struct gps_data_t *gps=NULL; ! char *url_,*colon; ! #endif ! if (! strncmp(this_->url,"file:",5)) { ! fd=open(this_->url+5,O_RDONLY|O_NDELAY); ! if (fd < 0) { ! g_warning("Failed to open %s", this_->url); ! return 0; ! } ! stat(this_->url+5, &st); ! if (S_ISREG (st.st_mode)) { ! this_->is_file=1; ! } else { ! tcgetattr(fd, &tio); ! cfmakeraw(&tio); ! cfsetispeed(&tio, B4800); ! cfsetospeed(&tio, B4800); ! tio.c_cc[VMIN]=16; ! tio.c_cc[VTIME]=1; ! tcsetattr(fd, TCSANOW, &tio); ! } ! this_->fd=fd; ! } else if (! strncmp(this_->url,"pipe:",5)) { ! this_->file=popen(this_->url+5, "r"); ! this_->is_pipe=1; ! if (! this_->file) { ! g_warning("Failed to open %s", this_->url); ! return 0; ! } ! fd=fileno(this_->file); ! } else if (! strncmp(this_->url,"gpsd://",7)) { ! #ifdef HAVE_LIBGPS ! url_=g_strdup(this_->url); ! colon=index(url_+7,':'); ! if (colon) { ! *colon=0; ! gps=gps_open(url_+7,colon+1); ! } else ! gps=gps_open(this_->url+7,NULL); ! g_free(url_); ! if (! gps) { ! g_warning("Failed to connect to %s", this_->url); ! return 0; ! } ! gps_query(gps, "w+x\n"); ! gps_set_raw_hook(gps, vehicle_gps_callback); ! fd=gps->gps_fd; ! this_->gps=gps; ! #else ! g_warning("No support for gpsd compiled in\n"); return 0; - #endif - } else if (! strncmp(this_->url,"udp://",6)) { - vehicle_udp_open(this_); - fd=this_->fd; - } else if (! strncmp(this_->url,"demo://",7)) { - dbg(0,"Creating a demo vehicle\n"); - g_timeout_add(1000, (GSourceFunc) vehicle_demo_timer, this_); } - this_->iochan=g_io_channel_unix_new(fd); - enable_watch(this_); return 1; } - - static gboolean - vehicle_track(GIOChannel *iochan, GIOCondition condition, gpointer t) - { - struct vehicle *this_=t; - char *str,*tok; - gsize size; - - dbg(1,"enter condition=%d\n", condition); - if (condition == G_IO_IN) { - #ifdef HAVE_LIBGPS - if (this_->gps) { - vehicle_last=this_; - gps_poll(this_->gps); - } else { - #else - { - #endif - if (this_->is_udp) { - vehicle_udp_recv(this_); - return TRUE; - } - size=read(g_io_channel_unix_get_fd(iochan), this_->buffer+this_->buffer_pos, BUFFER_SIZE-this_->buffer_pos-1); - if (size <= 0) { - vehicle_close(this_); - vehicle_open(this_); - return TRUE; - } - this_->buffer_pos+=size; - this_->buffer[this_->buffer_pos]='\0'; - dbg(1,"size=%d pos=%d buffer='%s'\n", size, this_->buffer_pos, this_->buffer); - str=this_->buffer; - while ((tok=index(str, '\n'))) { - *tok++='\0'; - dbg(1,"line='%s'\n", str); - vehicle_parse_gps(this_, str); - str=tok; - } - if (str != this_->buffer) { - size=this_->buffer+this_->buffer_pos-str; - memmove(this_->buffer, str, size+1); - this_->buffer_pos=size; - dbg(1,"now pos=%d buffer='%s'\n", this_->buffer_pos, this_->buffer); - } else if (this_->buffer_pos == BUFFER_SIZE-1) { - dbg(0,"overflow\n"); - this_->buffer_pos=0; - } - - } - - return TRUE; - } - return FALSE; - } - - static void - enable_watch(struct vehicle *this_) - { - this_->watch=g_io_add_watch(this_->iochan, G_IO_IN|G_IO_ERR|G_IO_HUP, vehicle_track, this_); - } - - static void - disable_watch(struct vehicle *this_) - { - g_source_remove(this_->watch); - } - - struct vehicle * - vehicle_new(const char *url) - { - struct vehicle *this_; - this_=g_new0(struct vehicle,1); - - this_->cbl=callback_list_new(); - this_->url=g_strdup(url); - this_->fd=-1; - - vehicle_open(this_); - this_->current_pos.x=0x130000; - this_->current_pos.y=0x600000; - this_->curr.x=this_->current_pos.x; - this_->curr.y=this_->current_pos.y; - this_->delta.x=0; - this_->delta.y=0; - #if INTERPOLATION_TIME - g_timeout_add(INTERPOLATION_TIME, vehicle_timer, this_); - #endif - - return this_; - } - - void - vehicle_callback_add(struct vehicle *this_, struct callback *cb) - { - callback_list_add(this_->cbl, cb); - } - - void - vehicle_callback_remove(struct vehicle *this_, struct callback *cb) - { - callback_list_remove(this_->cbl, cb); - } - - - int - vehicle_add_log(struct vehicle *this_, struct log *log, struct attr **attrs) - { - struct attr *type; - type=attr_search(attrs, NULL, attr_type); - if (! type) - return 1; - if (!strcmp(type->u.str,"nmea")) { - this_->nmea_log=log; - if (this_->child) - this_->child->nmea_log=log; - - } else if (!strcmp(type->u.str,"gpx")) { - char *header="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<gpx version=\"1.0\" creator=\"Navit http://navit.sourceforge.net\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.topografix.com/GPX/1/0\" xsi:schemaLocation=\"http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd\">\n<trk>\n<trkseg>\n"; - char *trailer="</trkseg>\n</trk>\n</gpx>\n"; - this_->gpx_log=log; - if (this_->child) - this_->child->gpx_log=log; - log_set_header(log,header,strlen(header)); - log_set_trailer(log,trailer,strlen(trailer)); - } else if (!strcmp(type->u.str,"textfile")) { - char *header="type=track\n"; - this_->textfile_log=log; - if (this_->child) - this_->child->textfile_log=log; - log_set_header(log,header,strlen(header)); - } else - return 1; - return 0; - } - void vehicle_destroy(struct vehicle *this_) { - vehicle_close(this_); callback_list_destroy(this_->cbl); - g_free(this_->url); g_free(this_); } --- 1,140 ---- #include <glib.h> ! #include <string.h> ! #include "config.h" #include "debug.h" #include "coord.h" #include "item.h" #include "log.h" + #include "callback.h" + #include "plugin.h" #include "vehicle.h" struct vehicle { ! struct vehicle_priv *priv; ! struct vehicle_methods meth; struct callback_list *cbl; struct log *nmea_log, *gpx_log, *textfile_log; }; static int ! vehicle_add_log(struct vehicle *this_, struct log *log, ! struct attr **attrs) { ! struct attr *type; ! type = attr_search(attrs, NULL, attr_type); ! if (!type) ! return 1; ! if (!strcmp(type->u.str, "nmea")) { ! this_->nmea_log = log; ! } else if (!strcmp(type->u.str, "gpx")) { ! char *header = ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<gpx version=\"1.0\" creator=\"Navit http://navit.sourceforge.net\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.topografix.com/GPX/1/0\" xsi:schemaLocation=\"http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd\">\n<trk>\n<trkseg>\n"; ! char *trailer = "</trkseg>\n</trk>\n</gpx>\n"; ! this_->gpx_log = log; ! log_set_header(log, header, strlen(header)); ! log_set_trailer(log, trailer, strlen(trailer)); ! } else if (!strcmp(type->u.str, "textfile")) { ! char *header = "type=track\n"; ! this_->textfile_log = log; ! log_set_header(log, header, strlen(header)); ! } else ! return 1; ! return 0; } ! struct vehicle * ! vehicle_new(struct attr **attrs) { ! struct vehicle *this_; ! struct attr *source; ! struct vehicle_priv *(*vehicletype_new) (struct vehicle_methods * ! meth, ! struct callback_list * ! cbl, ! struct attr ** attrs); ! char *type, *colon; ! dbg(0, "enter\n"); ! source = attr_search(attrs, NULL, attr_source); ! if (!source) { ! dbg(0, "no source\n"); ! return NULL; } ! type = g_strdup(source->u.str); ! colon = index(type, ':'); ! if (colon) ! *colon = '\0'; ! dbg(0, "source='%s' type='%s'\n", source->u.str, type); ! vehicletype_new = plugin_get_vehicle_type(type); ! if (!vehicletype_new) { ! dbg(0, "invalid type\n"); ! return NULL; } ! this_ = g_new0(struct vehicle, 1); ! this_->cbl = callback_list_new(); ! this_->priv = vehicletype_new(&this_->meth, this_->cbl, attrs); ! if (!this_->priv) { ! dbg(0, "vehicletype_new failed\n"); ! callback_list_destroy(this_->cbl); ! g_free(this_); ! return NULL; } ! dbg(0, "leave\n"); ! return this_; } ! int ! vehicle_position_attr_get(struct vehicle *this_, enum attr_type type, ! struct attr *attr) { ! if (this_->meth.position_attr_get) ! return this_->meth.position_attr_get(this_->priv, type, ! attr); ! return 0; } ! int ! vehicle_set_attr(struct vehicle *this_, struct attr *attr, ! struct attr **attrs) { return 0; } ! int ! vehicle_add_attr(struct vehicle *this_, struct attr *attr, ! struct attr **attrs) { ! switch (attr->type) { ! case attr_callback: ! callback_list_add(this_->cbl, attr->u.callback); ! break; ! case attr_log: ! return vehicle_add_log(this_, attr->u.log, attrs); ! default: ! return 0; } return 1; } ! int ! vehicle_remove_attr(struct vehicle *this_, struct attr *attr) { ! switch (attr->type) { ! case attr_callback: ! callback_list_remove(this_->cbl, attr->u.callback); ! break; ! default: return 0; } return 1; } void vehicle_destroy(struct vehicle *this_) { callback_list_destroy(this_->cbl); g_free(this_); } Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/Makefile.am,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Makefile.am 27 Nov 2007 14:13:12 -0000 1.28 --- Makefile.am 18 Dec 2007 19:36:56 -0000 1.29 *************** *** 27,31 **** osm2navit_SOURCES = osm2navit.c item.c debug.c zipfile.h ! navit_LDADD = @NAVIT_LIBS@ @GPSD_LIBS@ @ZLIB_LIBS@ -Lfib-1.1 -lfib osm2navit_LDADD = @NAVIT_LIBS@ @ZLIB_LIBS@ --- 27,31 ---- osm2navit_SOURCES = osm2navit.c item.c debug.c zipfile.h ! navit_LDADD = @NAVIT_LIBS@ @ZLIB_LIBS@ -Lfib-1.1 -lfib osm2navit_LDADD = @NAVIT_LIBS@ @ZLIB_LIBS@ Index: navit.h =================================================================== RCS file: /cvsroot/navit/navit/src/navit.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** navit.h 10 Dec 2007 12:26:39 -0000 1.21 --- navit.h 18 Dec 2007 19:36:57 -0000 1.22 *************** *** 8,16 **** /* prototypes */ enum item_type; ! enum projection; struct callback; - struct color; struct coord; - struct pcoord; struct displaylist; struct graphics; --- 8,14 ---- /* prototypes */ enum item_type; ! struct attr; struct callback; struct coord; struct displaylist; struct graphics; *************** *** 23,26 **** --- 21,25 ---- struct navit_vehicle; struct navit_window_items; + struct pcoord; struct point; struct route; *************** *** 66,70 **** void navit_toggle_orient_north(struct navit *this_); void navit_set_position(struct navit *this_, struct pcoord *c); ! struct navit_vehicle *navit_add_vehicle(struct navit *this_, struct vehicle *v, const char *name, struct color *c, int update, int follow); void navit_add_vehicle_cb(struct navit *this_, struct callback *cb); void navit_remove_vehicle_cb(struct navit *this_, struct callback *cb); --- 65,69 ---- void navit_toggle_orient_north(struct navit *this_); void navit_set_position(struct navit *this_, struct pcoord *c); ! struct navit_vehicle *navit_add_vehicle(struct navit *this_, struct vehicle *v, struct attr **attrs); void navit_add_vehicle_cb(struct navit *this_, struct callback *cb); void navit_remove_vehicle_cb(struct navit *this_, struct callback *cb); *************** *** 83,87 **** void navit_destroy(struct navit *this_); void navit_toggle_routegraph_display(struct navit *nav); - /* end of prototypes */ #ifdef __cplusplus --- 82,85 ---- Index: xmlconfig.c =================================================================== RCS file: /cvsroot/navit/navit/src/xmlconfig.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** xmlconfig.c 30 Nov 2007 22:21:56 -0000 1.20 --- xmlconfig.c 18 Dec 2007 19:36:57 -0000 1.21 *************** *** 260,285 **** xmlconfig_vehicle(struct xmlstate *state) { ! const char *s=find_attribute(state, "source", 1); ! const char *value,*name; ! struct color color; ! int update=1, follow=0, active; ! struct navit_vehicle *nv; ! if (! s) ! return 0; ! if (! find_color(state, 1, &color)) ! return 0; ! state->element_object = vehicle_new(s); if (! state->element_object) return 0; ! if ((value=find_attribute(state, "update", 0))) ! update=convert_number(value); ! if ((value=find_attribute(state, "follow", 0))) ! follow=convert_number(value); ! active=find_boolean(state, "active", 1, 0); ! name=find_attribute(state, "name", 0); ! nv=navit_add_vehicle(state->parent->element_object, state->element_object, name, &color, update, follow); ! if (active) ! navit_set_vehicle(state->parent->element_object, nv); return 1; } --- 260,270 ---- xmlconfig_vehicle(struct xmlstate *state) { ! struct attr **attrs; ! attrs=convert_to_attrs(state); ! state->element_object = vehicle_new(attrs); if (! state->element_object) return 0; ! navit_add_vehicle(state->parent->element_object, state->element_object, attrs); return 1; } *************** *** 288,291 **** --- 273,277 ---- xmlconfig_log(struct xmlstate *state) { + struct attr attr; struct attr **attrs; attrs=convert_to_attrs(state); *************** *** 293,297 **** if (! state->element_object) return 0; ! if (vehicle_add_log(state->parent->element_object, state->element_object, attrs)) return 0; return 1; --- 279,285 ---- if (! state->element_object) return 0; ! attr.type=attr_log; ! attr.u.log=state->element_object; ! if (vehicle_add_attr(state->parent->element_object, &attr, attrs)) return 0; return 1; *************** *** 659,662 **** --- 647,651 ---- struct element_func *e=elements,*func=NULL; const char *parent_name=NULL; + dbg(2,"name='%s'\n", element_name); while (e->name) { if (!g_ascii_strcasecmp(element_name, e->name)) { *************** *** 726,729 **** --- 715,719 ---- struct xmlstate *curr, **state = user_data; + dbg(2,"name='%s'\n", element_name); curr=*state; if(!g_ascii_strcasecmp("plugins", element_name) && curr->element_object) Index: vehicle.h =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** vehicle.h 9 Oct 2007 18:14:27 -0000 1.16 --- vehicle.h 18 Dec 2007 19:36:57 -0000 1.17 *************** *** 5,31 **** extern "C" { #endif /* prototypes */ ! enum projection; struct attr; - struct callback; - struct coord; - struct log; - struct navit; struct vehicle; ! enum projection vehicle_projection(struct vehicle *this_); ! struct coord *vehicle_pos_get(struct vehicle *this_); ! double *vehicle_speed_get(struct vehicle *this_); ! double *vehicle_height_get(struct vehicle *this_); ! double *vehicle_dir_get(struct vehicle *this_); ! int *vehicle_status_get(struct vehicle *this_); ! int *vehicle_sats_get(struct vehicle *this_); ! int *vehicle_sats_used_get(struct vehicle *this_); ! double *vehicle_pdop_get(struct vehicle *this_); ! void vehicle_set_position(struct vehicle *this_, struct coord *pos); ! void vehicle_set_navit(struct vehicle *this_, struct navit *nav); ! struct vehicle *vehicle_new(const char *url); ! void vehicle_callback_add(struct vehicle *this_, struct callback *cb); ! void vehicle_callback_remove(struct vehicle *this_, struct callback *cb); ! int vehicle_add_log(struct vehicle *this_, struct log *log, struct attr **attrs); void vehicle_destroy(struct vehicle *this_); /* end of prototypes */ --- 5,24 ---- extern "C" { #endif + struct vehicle_priv; + + struct vehicle_methods { + void (*destroy)(struct vehicle_priv *priv); + int (*position_attr_get)(struct vehicle_priv *priv, enum attr_type type, struct attr *attr); + }; + /* prototypes */ ! enum attr_type; struct attr; struct vehicle; ! struct vehicle *vehicle_new(struct attr **attrs); ! int vehicle_position_attr_get(struct vehicle *this_, enum attr_type type, struct attr *attr); ! int vehicle_set_attr(struct vehicle *this_, struct attr *attr, struct attr **attrs); ! int vehicle_add_attr(struct vehicle *this_, struct attr *attr, struct attr **attrs); ! int vehicle_remove_attr(struct vehicle *this_, struct attr *attr); void vehicle_destroy(struct vehicle *this_); /* end of prototypes */ Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** navit.c 18 Dec 2007 12:07:41 -0000 1.50 --- navit.c 18 Dec 2007 19:36:57 -0000 1.51 *************** *** 45,56 **** int follow; int follow_curr; struct color c; struct menu *menu; struct cursor *cursor; struct vehicle *vehicle; ! struct callback *update_cb; }; struct navit { GList *mapsets; GList *layouts; --- 45,60 ---- int follow; int follow_curr; + struct coord coord; + int dir; + int speed; struct color c; struct menu *menu; struct cursor *cursor; struct vehicle *vehicle; ! struct attr callback; }; struct navit { + struct attr self; GList *mapsets; GList *layouts; *************** *** 96,100 **** struct gui *main_loop_gui; ! static void navit_cursor_update(struct navit *this_, struct cursor *cursor); void --- 100,105 ---- struct gui *main_loop_gui; ! static void navit_vehicle_update(struct navit *this_, struct navit_vehicle *nv); ! static void navit_vehicle_draw(struct navit *this_, struct navit_vehicle *nv, struct point *pnt); void *************** *** 133,137 **** while (l) { nv=l->data; ! cursor_redraw(nv->cursor); l=g_list_next(l); } --- 138,142 ---- while (l) { nv=l->data; ! navit_vehicle_draw(this_, nv, NULL); l=g_list_next(l); } *************** *** 308,311 **** --- 313,318 ---- main_add_navit(this_); + this_->self.type=attr_navit; + this_->self.u.navit=this_; this_->vehicle_cbl=callback_list_new(); this_->init_cbl=callback_list_new(); *************** *** 978,987 **** l=this_->vehicles; while (l) { ! dbg(0,"parsed one vehicle\n"); nv=l->data; ! nv->cursor=cursor_new(this_->gra, nv->vehicle, &nv->c, this_->trans); ! nv->update_cb=callback_new_1(callback_cast(navit_cursor_update), this_); ! cursor_add_callback(nv->cursor, nv->update_cb); ! vehicle_set_navit(nv->vehicle, this_); l=g_list_next(l); } --- 985,995 ---- l=this_->vehicles; while (l) { ! dbg(1,"parsed one vehicle\n"); nv=l->data; ! nv->cursor=cursor_new(this_->gra, &nv->c); ! nv->callback.type=attr_callback; ! nv->callback.u.callback=callback_new_2(callback_cast(navit_vehicle_update), this_, nv); ! vehicle_add_attr(nv->vehicle, &nv->callback, NULL); ! vehicle_set_attr(nv->vehicle, &this_->self, NULL); l=g_list_next(l); } *************** *** 1107,1172 **** static void ! navit_cursor_update(struct navit *this_, struct cursor *cursor) { ! struct point pnt; ! struct coord *cursor_c=cursor_pos_get(cursor); ! struct pcoord pc; ! int dir=cursor_get_dir(cursor); ! int speed=cursor_get_speed(cursor); enum projection pro; ! int border=30; ! ! if (!this_->vehicle || this_->vehicle->cursor != cursor) ! return; ! cursor_c=cursor_pos_get(cursor); ! dir=cursor_get_dir(cursor); ! speed=cursor_get_speed(cursor); ! pro=vehicle_projection(this_->vehicle->vehicle); ! /* This transform is useless cursor and vehicle are in the same projection */ ! if (!transform(this_->trans, pro, cursor_c, &pnt) || !transform_within_border(this_->trans, &pnt, border)) { ! if (!this_->cursor_flag) ! return; ! if (this_->orient_north_flag) ! navit_set_center_cursor(this_, cursor_c, 0, 50 - 30.*sin(M_PI*dir/180.), 50 + 30.*cos(M_PI*dir/180.)); ! else ! navit_set_center_cursor(this_, cursor_c, dir, 50, 80); ! transform(this_->trans, pro, cursor_c, &pnt); } - if (this_->pid && speed > 2) - kill(this_->pid, SIGWINCH); if (this_->tracking && this_->tracking_flag) { ! struct coord c=*cursor_c; ! if (tracking_update(this_->tracking, &c, dir)) { ! cursor_c=&c; ! cursor_pos_set(cursor, cursor_c); ! if (this_->route && this_->vehicle->update_curr == 1) route_set_position_from_tracking(this_->route, this_->tracking); } } else { ! if (this_->route && this_->vehicle->update_curr == 1) { ! pc.pro = pro; ! pc.x = cursor_c->x; ! pc.y = cursor_c->y; ! route_set_position(this_->route, &pc); } } ! if (this_->route && this_->vehicle->update_curr == 1) navigation_update(this_->navigation, this_->route); ! if (this_->cursor_flag) { ! if (this_->vehicle->follow_curr == 1) ! navit_set_center_cursor(this_, cursor_c, dir, 50, 80); } ! if (this_->vehicle->follow_curr > 1) ! this_->vehicle->follow_curr--; else ! this_->vehicle->follow_curr=this_->vehicle->follow; ! if (this_->vehicle->update_curr > 1) ! this_->vehicle->update_curr--; else ! this_->vehicle->update_curr=this_->vehicle->update; ! callback_list_call_2(this_->vehicle_cbl, this_, this_->vehicle->vehicle); } --- 1115,1202 ---- static void ! navit_vehicle_draw(struct navit *this_, struct navit_vehicle *nv, struct point *pnt) { ! struct point pnt2; enum projection pro; ! if (pnt) ! pnt2=*pnt; ! else { ! pro=transform_get_projection(this_->trans); ! transform(this_->trans, pro, &nv->coord, &pnt2); ! } ! #if 1 ! cursor_draw(nv->cursor, &pnt2, nv->dir-transform_get_angle(this_->trans, 0), nv->speed > 2, pnt == NULL); ! #else ! cursor_draw(nv->cursor, &pnt2, nv->dir-transform_get_angle(this_->trans, 0), nv->speed > 2, 1); ! #endif ! } ! static void ! navit_vehicle_update(struct navit *this_, struct navit_vehicle *nv) ! { ! struct attr attr_dir, attr_speed, attr_pos; ! struct pcoord cursor_pc; ! struct point cursor_pnt, *pnt=&cursor_pnt; ! enum projection pro; ! int border=16; ! if (! vehicle_position_attr_get(nv->vehicle, attr_position_direction, &attr_dir) || ! ! vehicle_position_attr_get(nv->vehicle, attr_position_speed, &attr_speed) || ! ! vehicle_position_attr_get(nv->vehicle, attr_position_coord_geo, &attr_pos)) ! return; ! nv->dir=*attr_dir.u.numd; ! nv->speed=*attr_speed.u.numd; ! pro=transform_get_projection(this_->trans); ! transform_from_geo(pro, attr_pos.u.coord_geo, &nv->coord); ! if (nv != this_->vehicle) { ! navit_vehicle_draw(this_, nv, NULL); ! return; } if (this_->tracking && this_->tracking_flag) { ! if (tracking_update(this_->tracking, &nv->coord, nv->dir)) { ! if (this_->route && nv->update_curr == 1) route_set_position_from_tracking(this_->route, this_->tracking); } } else { ! if (this_->route && nv->update_curr == 1) { ! cursor_pc.pro = pro; ! cursor_pc.x = nv->coord.x; ! cursor_pc.y = nv->coord.y; ! route_set_position(this_->route, &cursor_pc); } } ! ! if ((!transform(this_->trans, pro, &nv->coord, &cursor_pnt) || !transform_within_border(this_->trans, &cursor_pnt, border))) { ! if (!this_->cursor_flag) ! return; ! if (nv->follow_curr != 1) { ! if (this_->orient_north_flag) ! navit_set_center_cursor(this_, &nv->coord, 0, 50 - 30.*sin(M_PI*nv->dir/180.), 50 + 30.*cos(M_PI*nv->dir/180.)); ! else ! navit_set_center_cursor(this_, &nv->coord, nv->dir, 50, 80); ! pnt=NULL; ! } ! } ! ! if (this_->pid && nv->speed > 2) ! kill(this_->pid, SIGWINCH); ! if (this_->route && nv->update_curr == 1) navigation_update(this_->navigation, this_->route); ! if (this_->cursor_flag && nv->follow_curr == 1) { ! navit_set_center_cursor(this_, &nv->coord, nv->dir, 50, 80); ! pnt=NULL; } ! if (nv->follow_curr > 1) ! nv->follow_curr--; else ! nv->follow_curr=nv->follow; ! if (nv->update_curr > 1) ! nv->update_curr--; else ! nv->update_curr=nv->update; ! callback_list_call_2(this_->vehicle_cbl, this_, nv->vehicle); ! if (pnt) ! navit_vehicle_draw(this_, nv, pnt); } *************** *** 1203,1216 **** */ struct navit_vehicle * ! navit_add_vehicle(struct navit *this_, struct vehicle *v, const char *name, struct color *c, int update, int follow) { struct navit_vehicle *nv=g_new0(struct navit_vehicle, 1); nv->vehicle=v; ! nv->name=g_strdup(name); ! nv->update_curr=nv->update=update; ! nv->follow_curr=nv->follow=follow; ! nv->c=*c; ! this_->vehicles=g_list_append(this_->vehicles, nv); return nv; } --- 1233,1254 ---- */ struct navit_vehicle * ! navit_add_vehicle(struct navit *this_, struct vehicle *v, struct attr **attrs) { struct navit_vehicle *nv=g_new0(struct navit_vehicle, 1); + struct attr *name,*update,*follow,*color,*active; nv->vehicle=v; ! if ((name=attr_search(attrs, NULL, attr_name))) ! nv->name=g_strdup(name->u.str); ! if ((update=attr_search(attrs, NULL, attr_update))) ! nv->update_curr=nv->update=update->u.num; ! if ((follow=attr_search(attrs, NULL, attr_follow))) ! nv->follow_curr=nv->follow=follow->u.num; ! if ((color=attr_search(attrs, NULL, attr_color))) { ! nv->c=*(color->u.color); ! } this_->vehicles=g_list_append(this_->vehicles, nv); + if ((active=attr_search(attrs, NULL, attr_active)) && active->u.num) + navit_set_vehicle(this_, nv); + return nv; } |
From: Martin S. <mar...@us...> - 2007-12-18 19:36:56
|
Update of /cvsroot/navit/navit/src/vehicle/gpsd In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31177/src/vehicle/gpsd Modified Files: Makefile.am vehicle_gpsd.c Log Message: Modularized vehicle Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle/gpsd/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 5 Jul 2007 21:11:12 -0000 1.1 --- Makefile.am 18 Dec 2007 19:36:58 -0000 1.2 *************** *** 3,4 **** --- 3,5 ---- modulevehicle_LTLIBRARIES = libvehicle_gpsd.la libvehicle_gpsd_la_SOURCES = vehicle_gpsd.c + libvehicle_gpsd_la_LIBADD = @GPSD_LIBS@ Index: vehicle_gpsd.c =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle/gpsd/vehicle_gpsd.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vehicle_gpsd.c 5 Jul 2007 21:21:03 -0000 1.1 --- vehicle_gpsd.c 18 Dec 2007 19:36:58 -0000 1.2 *************** *** 1,6 **** --- 1,202 ---- + #include <gps.h> + #include <string.h> + #include <glib.h> + #include <math.h> + #include "debug.h" + #include "callback.h" #include "plugin.h" + #include "coord.h" + #include "item.h" + #include "vehicle.h" + + static struct vehicle_priv { + char *source; + struct callback_list *cbl; + GIOChannel *iochan; + guint watch; + struct gps_data_t *gps; + struct coord_geo geo; + double speed; + double direction; + double height; + int status; + int sats; + int sats_used; + } *vehicle_last; + + static gboolean vehicle_gpsd_io(GIOChannel * iochan, + GIOCondition condition, gpointer t); + + + + static void + vehicle_gpsd_callback(struct gps_data_t *data, char *buf, size_t len, + int level) + { + struct vehicle_priv *priv = vehicle_last; + // If data->fix.speed is NAN, then the drawing gets jumpy. + if (isnan(data->fix.speed)) { + return; + } + + if (data->set & SPEED_SET) { + priv->speed = data->fix.speed * 3.6; + data->set &= ~SPEED_SET; + } + if (data->set & TRACK_SET) { + priv->direction = data->fix.track; + data->set &= ~TRACK_SET; + } + if (data->set & ALTITUDE_SET) { + priv->height = data->fix.altitude; + data->set &= ~ALTITUDE_SET; + } + if (data->set & SATELLITE_SET) { + priv->sats_used = data->satellites_used; + priv->sats = data->satellites; + data->set &= ~SATELLITE_SET; + } + if (data->set & STATUS_SET) { + priv->status = data->status; + data->set &= ~STATUS_SET; + } + if (data->set & PDOP_SET) { + dbg(0, "pdop : %g\n", data->pdop); + data->set &= ~PDOP_SET; + } + if (data->set & LATLON_SET) { + priv->geo.lat = data->fix.latitude; + priv->geo.lng = data->fix.longitude; + callback_list_call_0(priv->cbl); + data->set &= ~LATLON_SET; + } + } + + static int + vehicle_gpsd_open(struct vehicle_priv *priv) + { + char *source = g_strdup(priv->source); + char *colon = index(source + 7, ':'); + if (colon) { + *colon = '\0'; + priv->gps = gps_open(source + 7, colon + 1); + } else + priv->gps = gps_open(source + 7, NULL); + g_free(source); + if (!priv->gps) + return 0; + gps_query(priv->gps, "w+x\n"); + gps_set_raw_hook(priv->gps, vehicle_gpsd_callback); + priv->iochan = g_io_channel_unix_new(priv->gps->gps_fd); + priv->watch = + g_io_add_watch(priv->iochan, G_IO_IN | G_IO_ERR | G_IO_HUP, + vehicle_gpsd_io, priv); + return 1; + } + + static void + vehicle_gpsd_close(struct vehicle_priv *priv) + { + GError *error = NULL; + + if (priv->watch) { + g_source_remove(priv->watch); + priv->watch = 0; + } + if (priv->iochan) { + g_io_channel_shutdown(priv->iochan, 0, &error); + priv->iochan = NULL; + } + if (priv->gps) { + gps_close(priv->gps); + priv->gps = NULL; + } + } + + static gboolean + vehicle_gpsd_io(GIOChannel * iochan, GIOCondition condition, gpointer t) + { + struct vehicle_priv *priv = t; + + dbg(1, "enter condition=%d\n", condition); + if (condition == G_IO_IN) { + if (priv->gps) { + vehicle_last = priv; + gps_poll(priv->gps); + } + return TRUE; + } + return FALSE; + } + + static void + vehicle_gpsd_destroy(struct vehicle_priv *priv) + { + vehicle_gpsd_close(priv); + if (priv->source) + g_free(priv->source); + g_free(priv); + } + + static int + vehicle_gpsd_position_attr_get(struct vehicle_priv *priv, + enum attr_type type, struct attr *attr) + { + switch (type) { + case attr_position_height: + attr->u.numd = &priv->height; + break; + case attr_position_speed: + attr->u.numd = &priv->speed; + break; + case attr_position_direction: + attr->u.numd = &priv->direction; + break; + case attr_position_sats: + attr->u.num = priv->sats; + break; + case attr_position_sats_used: + attr->u.num = priv->sats_used; + break; + case attr_position_coord_geo: + attr->u.coord_geo = &priv->geo; + break; + default: + return 0; + } + attr->type = type; + return 1; + } + + struct vehicle_methods vehicle_gpsd_methods = { + vehicle_gpsd_destroy, + vehicle_gpsd_position_attr_get, + }; + + static struct vehicle_priv * + vehicle_gpsd_new_gpsd(struct vehicle_methods + *meth, struct callback_list + *cbl, struct attr **attrs) + { + struct vehicle_priv *ret; + struct attr *source; + + dbg(1, "enter\n"); + source = attr_search(attrs, NULL, attr_source); + ret = g_new0(struct vehicle_priv, 1); + ret->source = g_strdup(source->u.str); + ret->cbl = cbl; + *meth = vehicle_gpsd_methods; + if (vehicle_gpsd_open(ret)) + return ret; + dbg(0, "Failed to open '%s'\n", ret->source); + vehicle_gpsd_destroy(ret); + return NULL; + } void plugin_init(void) { + dbg(1, "enter\n"); + plugin_register_vehicle_type("gpsd", vehicle_gpsd_new_gpsd); } |
From: Martin S. <mar...@us...> - 2007-12-18 19:36:56
|
Update of /cvsroot/navit/navit/src/vehicle/file In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31177/src/vehicle/file Modified Files: vehicle_file.c Log Message: Modularized vehicle Index: vehicle_file.c =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle/file/vehicle_file.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vehicle_file.c 5 Jul 2007 21:19:57 -0000 1.1 --- vehicle_file.c 18 Dec 2007 19:36:57 -0000 1.2 *************** *** 1,6 **** --- 1,345 ---- + #include <stdio.h> + #include <unistd.h> + #include <fcntl.h> + #include <string.h> + #include <glib.h> + #include <sys/stat.h> + #include <termios.h> + #include <math.h> + #include "debug.h" + #include "callback.h" #include "plugin.h" + #include "coord.h" + #include "item.h" + #include "vehicle.h" + + static void vehicle_file_disable_watch(struct vehicle_priv *priv); + static void vehicle_file_enable_watch(struct vehicle_priv *priv); + + enum file_type { + file_type_pipe = 1, file_type_device, file_type_file + }; + + static int buffer_size = 256; + + struct vehicle_priv { + char *source; + enum file_type file_type; + struct callback_list *cbl; + int fd; + FILE *file; + guint watch; + GIOChannel *iochan; + char *buffer; + int buffer_pos; + + struct coord_geo geo; + double speed; + double direction; + double height; + int status; + int sats_used; + }; + + static int + vehicle_file_open(struct vehicle_priv *priv) + { + char *name; + struct stat st; + struct termios tio; + + name = priv->source + 5; + if (!strncmp(priv->source, "file:", 5)) { + priv->fd = open(name, O_RDONLY | O_NDELAY); + if (priv->fd < 0) + return 0; + stat(name, &st); + if (S_ISREG(st.st_mode)) { + priv->file_type = file_type_file; + } else { + tcgetattr(priv->fd, &tio); + cfmakeraw(&tio); + cfsetispeed(&tio, B4800); + cfsetospeed(&tio, B4800); + tio.c_cc[VMIN] = 16; + tio.c_cc[VTIME] = 1; + tcsetattr(priv->fd, TCSANOW, &tio); + priv->file_type = file_type_device; + } + } else { + priv->file = popen(name, "r"); + if (!priv->file) + return 0; + priv->fd = fileno(priv->file); + priv->file_type = file_type_pipe; + } + priv->iochan = g_io_channel_unix_new(priv->fd); + return 1; + } + + static void + vehicle_file_close(struct vehicle_priv *priv) + { + GError *error = NULL; + if (priv->iochan) { + g_io_channel_shutdown(priv->iochan, 0, &error); + priv->iochan = NULL; + } + if (priv->file) + pclose(priv->file); + else if (priv->fd >= 0) + close(priv->fd); + priv->file = NULL; + priv->fd = -1; + } + + static int + vehicle_file_enable_watch_timer(gpointer t) + { + struct vehicle_priv *priv = t; + vehicle_file_enable_watch(priv); + dbg(1, "enter\n"); + + return FALSE; + } + + + static void + vehicle_file_parse(struct vehicle_priv *priv, char *buffer) + { + char *p, *item[16]; + double lat, lng; + int i, bcsum; + int len = strlen(buffer); + unsigned char csum = 0; + + dbg(1, "buffer='%s'\n", buffer); + for (;;) { + if (len < 4) { + dbg(0, "too short\n"); + return; + } + if (buffer[len - 1] == '\r' || buffer[len - 1] == '\n') + buffer[--len] = '\0'; + else + break; + } + if (buffer[0] != '$') { + dbg(0, "no leading $\n"); + return; + } + if (buffer[len - 3] != '*') { + dbg(0, "no *XX\n"); + return; + } + for (i = 1; i < len - 3; i++) { + csum ^= (unsigned char) (buffer[i]); + } + if (!sscanf(buffer + len - 2, "%x", &bcsum)) { + dbg(0, "no checksum\n"); + return; + } + if (bcsum != csum) { + dbg(0, "wrong checksum\n"); + return; + } + + i = 0; + p = buffer; + while (i < 16) { + item[i++] = p; + while (*p && *p != ',') + p++; + if (!*p) + break; + *p++ = '\0'; + } + + if (!strncmp(buffer, "$GPGGA", 6)) { + /* 1 1111 + 0 1 2 3 4 5 6 7 8 9 0 1234 + $GPGGA,184424.505,4924.2811,N,01107.8846,E,1,05,2.5,408.6,M,,,,0000*0C + UTC of Fix[1],Latitude[2],N/S[3],Longitude[4],E/W[5],Quality(0=inv,1=gps,2=dgps)[6],Satelites used[7], + HDOP[8],Altitude[9],"M"[10],height of geoid[11], "M"[12], time since dgps update[13], dgps ref station [14] + */ + sscanf(item[2], "%lf", &lat); + priv->geo.lat = floor(lat / 100); + lat -= priv->geo.lat * 100; + priv->geo.lat += lat / 60; + + sscanf(item[4], "%lf", &lng); + priv->geo.lng = floor(lng / 100); + lng -= priv->geo.lng * 100; + priv->geo.lng += lng / 60; + + sscanf(item[6], "%d", &priv->status); + sscanf(item[7], "%d", &priv->sats_used); + sscanf(item[9], "%lf", &priv->height); + + callback_list_call_0(priv->cbl); + if (priv->file_type == file_type_file) { + vehicle_file_disable_watch(priv); + g_timeout_add(1000, + vehicle_file_enable_watch_timer, + priv); + } + } + if (!strncmp(buffer, "$GPVTG", 6)) { + /* 0 1 2 34 5 6 7 8 + $GPVTG,143.58,T,,M,0.26,N,0.5,K*6A + Course Over Ground Degrees True[1],"T"[2],Course Over Ground Degrees Magnetic[3],"M"[4], + Speed in Knots[5],"N"[6],"Speed in KM/H"[7],"K"[8] + */ + sscanf(item[1], "%lf", &priv->direction); + sscanf(item[7], "%lf", &priv->speed); + } + if (!strncmp(buffer, "$GPRMC", 6)) { + /* 1 1 + 0 1 2 3 4 5 6 7 8 9 0 1 + $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A + Time[1],Active/Void[2],lat[3],N/S[4],long[5],W/E[6],speed in knots[7],track angle[8],date[9], + magnetic variation[10],magnetic variation direction[11] + */ + sscanf(item[8], "%lf", &priv->direction); + sscanf(item[7], "%lf", &priv->speed); + priv->speed *= 1.852; + } + } + + static gboolean + vehicle_file_io(GIOChannel * iochan, GIOCondition condition, gpointer t) + { + struct vehicle_priv *priv = t; + int size; + char *str, *tok; + + dbg(1, "enter condition=%d\n", condition); + if (condition == G_IO_IN) { + size = + read(g_io_channel_unix_get_fd(iochan), + priv->buffer + priv->buffer_pos, + buffer_size - priv->buffer_pos - 1); + if (size <= 0) { + vehicle_file_close(priv); + vehicle_file_open(priv); + return TRUE; + } + priv->buffer_pos += size; + priv->buffer[priv->buffer_pos] = '\0'; + dbg(1, "size=%d pos=%d buffer='%s'\n", size, + priv->buffer_pos, priv->buffer); + str = priv->buffer; + while ((tok = index(str, '\n'))) { + *tok++ = '\0'; + dbg(1, "line='%s'\n", str); + vehicle_file_parse(priv, str); + str = tok; + } + if (str != priv->buffer) { + size = priv->buffer + priv->buffer_pos - str; + memmove(priv->buffer, str, size + 1); + priv->buffer_pos = size; + dbg(1, "now pos=%d buffer='%s'\n", + priv->buffer_pos, priv->buffer); + } else if (priv->buffer_pos == buffer_size - 1) { + dbg(0, + "Overflow. Most likely wrong baud rate or no nmea protocol\n"); + priv->buffer_pos = 0; + } + return TRUE; + } + return FALSE; + } + + static void + vehicle_file_enable_watch(struct vehicle_priv *priv) + { + priv->watch = + g_io_add_watch(priv->iochan, G_IO_IN | G_IO_ERR | G_IO_HUP, + vehicle_file_io, priv); + } + + static void + vehicle_file_disable_watch(struct vehicle_priv *priv) + { + if (priv->watch) + g_source_remove(priv->watch); + priv->watch = 0; + } + + + static void + vehicle_file_destroy(struct vehicle_priv *priv) + { + vehicle_file_close(priv); + if (priv->source) + g_free(priv->source); + if (priv->buffer) + g_free(priv->buffer); + g_free(priv); + } + + static int + vehicle_file_position_attr_get(struct vehicle_priv *priv, + enum attr_type type, struct attr *attr) + { + switch (type) { + case attr_position_height: + attr->u.numd = &priv->height; + break; + case attr_position_speed: + attr->u.numd = &priv->speed; + break; + case attr_position_direction: + attr->u.numd = &priv->direction; + break; + case attr_position_sats_used: + attr->u.num = priv->sats_used; + break; + case attr_position_coord_geo: + attr->u.coord_geo = &priv->geo; + break; + default: + return 0; + } + attr->type = type; + return 1; + } + + struct vehicle_methods vehicle_file_methods = { + vehicle_file_destroy, + vehicle_file_position_attr_get, + }; + + static struct vehicle_priv * + vehicle_file_new_file(struct vehicle_methods + *meth, struct callback_list + *cbl, struct attr **attrs) + { + struct vehicle_priv *ret; + struct attr *source; + + dbg(1, "enter\n"); + source = attr_search(attrs, NULL, attr_source); + ret = g_new0(struct vehicle_priv, 1); + ret->fd = -1; + ret->cbl = cbl; + ret->source = g_strdup(source->u.str); + ret->buffer = g_malloc(buffer_size); + *meth = vehicle_file_methods; + if (vehicle_file_open(ret)) { + vehicle_file_enable_watch(ret); + return ret; + } + dbg(0, "Failed to open '%s'\n", ret->source); + vehicle_file_destroy(ret); + return NULL; + } void plugin_init(void) { + dbg(1, "enter\n"); + plugin_register_vehicle_type("file", vehicle_file_new_file); + plugin_register_vehicle_type("pipe", vehicle_file_new_file); } |
From: Martin S. <mar...@us...> - 2007-12-18 19:36:55
|
Update of /cvsroot/navit/navit/src/vehicle In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31177/src/vehicle Modified Files: Makefile.am Log Message: Modularized vehicle Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 5 Jul 2007 21:11:11 -0000 1.1 --- Makefile.am 18 Dec 2007 19:36:57 -0000 1.2 *************** *** 1,3 **** ! SUBDIRS=file if VEHICLE_GPSD SUBDIRS += gpsd --- 1,3 ---- ! SUBDIRS=demo file if VEHICLE_GPSD SUBDIRS += gpsd |
From: Martin S. <mar...@us...> - 2007-12-18 19:36:55
|
Update of /cvsroot/navit/navit/src/gui/sdl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31177/src/gui/sdl Modified Files: gui_sdl_window.cpp Log Message: Modularized vehicle Index: gui_sdl_window.cpp =================================================================== RCS file: /cvsroot/navit/navit/src/gui/sdl/gui_sdl_window.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** gui_sdl_window.cpp 17 Dec 2007 11:15:17 -0000 1.38 --- gui_sdl_window.cpp 18 Dec 2007 19:36:57 -0000 1.39 *************** *** 713,726 **** static void vehicle_callback_handler( struct navit *nav, struct vehicle *v){ char buffer [50]; ! double speed=*vehicle_speed_get(v); ! sprintf (buffer, "%02.02f km/h", speed); CEGUI::WindowManager::getSingleton().getWindow("OSD/SpeedoMeter")->setText(buffer); ! double height=*vehicle_height_get(v); ! sprintf (buffer, "%.0f m", height); CEGUI::WindowManager::getSingleton().getWindow("OSD/Altimeter")->setText(buffer); ! int sats=*vehicle_sats_get(v); ! int sats_used=*vehicle_sats_used_get(v); // printf(" sats : %i, used %i: \n",sats,sats_used); // Sat image hardcoded for now. may break the TaharezSkin --- 713,735 ---- static void vehicle_callback_handler( struct navit *nav, struct vehicle *v){ char buffer [50]; ! struct attr attr; ! int sats=0, sats_used=0; ! ! if (vehicle_position_attr_get(v, attr_position_speed, &attr)) ! sprintf (buffer, "%02.02f km/h", *attr.u.numd); ! else ! strcpy (buffer, "N/A"); CEGUI::WindowManager::getSingleton().getWindow("OSD/SpeedoMeter")->setText(buffer); ! if (vehicle_position_attr_get(v, attr_position_speed, &attr)) ! sprintf (buffer, ".0f m", *attr.u.numd); ! else ! strcpy (buffer, "N/A"); CEGUI::WindowManager::getSingleton().getWindow("OSD/Altimeter")->setText(buffer); ! if (vehicle_position_attr_get(v, attr_position_sats, &attr)) ! sats=attr.u.num; ! if (vehicle_position_attr_get(v, attr_position_sats_used, &attr)) ! sats_used=attr.u.num; // printf(" sats : %i, used %i: \n",sats,sats_used); // Sat image hardcoded for now. may break the TaharezSkin |
From: Martin S. <mar...@us...> - 2007-12-18 19:36:54
|
Update of /cvsroot/navit/navit/src/gui/gtk In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31177/src/gui/gtk Modified Files: gui_gtk_action.c Log Message: Modularized vehicle Index: gui_gtk_action.c =================================================================== RCS file: /cvsroot/navit/navit/src/gui/gtk/gui_gtk_action.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** gui_gtk_action.c 10 Dec 2007 12:26:39 -0000 1.23 --- gui_gtk_action.c 18 Dec 2007 19:36:57 -0000 1.24 *************** *** 223,227 **** { "VisibleStreetsAction", NULL, _n("VisibleStreets"), NULL, NULL, G_CALLBACK(visible_streets_action) }, { "VisiblePointsAction", NULL, _n("VisiblePoints"), NULL, NULL, G_CALLBACK(visible_points_action) }, ! { "VisiblePointsAction", NULL, _n("RouteGraph"), NULL, NULL, G_CALLBACK(visible_routegraph_action) } }; --- 223,227 ---- { "VisibleStreetsAction", NULL, _n("VisibleStreets"), NULL, NULL, G_CALLBACK(visible_streets_action) }, { "VisiblePointsAction", NULL, _n("VisiblePoints"), NULL, NULL, G_CALLBACK(visible_points_action) }, ! { "VisibleRouteGraphAction", NULL, _n("RouteGraph"), NULL, NULL, G_CALLBACK(visible_routegraph_action) } }; *************** *** 372,375 **** --- 372,376 ---- <menuitem name=\"Visible Streets\" action=\"VisibleStreetsAction\" />\ <menuitem name=\"Visible Points\" action=\"VisiblePointsAction\" />\ + <menuitem name=\"Visible Routegraph\" action=\"VisibleRouteGraphAction\" />\ <placeholder name=\"DataMenuAdditions\" />\ </menu>\ |
From: Martin S. <mar...@us...> - 2007-12-18 19:36:53
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31177 Modified Files: configure.in Log Message: Modularized vehicle Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** configure.in 5 Dec 2007 10:23:08 -0000 1.60 --- configure.in 18 Dec 2007 19:36:56 -0000 1.61 *************** *** 398,401 **** --- 398,402 ---- src/vehicle/file/Makefile src/vehicle/gpsd/Makefile + src/vehicle/demo/Makefile src/xpm/Makefile src/maps/Makefile |
From: KaZeR <ka...@us...> - 2007-12-18 16:16:24
|
Update of /cvsroot/navit/navit/po In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5325 Modified Files: fr.po Log Message: Some minors updates Index: fr.po =================================================================== RCS file: /cvsroot/navit/navit/po/fr.po,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** fr.po 18 Dec 2007 13:19:58 -0000 1.31 --- fr.po 18 Dec 2007 16:16:22 -0000 1.32 *************** *** 15,18 **** --- 15,19 ---- "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" + "Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../src/main.c:94 *************** *** 81,85 **** msgid_plural "%d kilometers" msgstr[0] "un kilomètre" ! msgstr[1] "un kilomètre" #: ../src/navigation.c:195 --- 82,86 ---- msgid_plural "%d kilometers" msgstr[0] "un kilomètre" ! msgstr[1] "%d kilomètres" #: ../src/navigation.c:195 *************** *** 88,92 **** msgid_plural "in %d kilometers" msgstr[0] "dans un kilomètre" ! msgstr[1] "dans un kilomètre" #: ../src/navigation.c:398 --- 89,93 ---- msgid_plural "in %d kilometers" msgstr[0] "dans un kilomètre" ! msgstr[1] "dans %d kilomètres" #: ../src/navigation.c:398 *************** *** 133,139 **** #. TRANSLATORS: The first argument is strength, the second direction and the third distance #: ../src/navigation.c:446 ! #, fuzzy, c-format msgid "Turn %1$s%2$s %3$s" ! msgstr "%s tournez %s%s" #: ../src/navigation.c:449 --- 134,140 ---- #. TRANSLATORS: The first argument is strength, the second direction and the third distance #: ../src/navigation.c:446 ! #, c-format msgid "Turn %1$s%2$s %3$s" ! msgstr "%3$s tournez %1$s%2$s" #: ../src/navigation.c:449 *************** *** 151,157 **** #: ../src/navit.c:674 - #, fuzzy msgid "Former Destinations" ! msgstr "Destination" #: ../src/navit.c:684 --- 152,157 ---- #: ../src/navit.c:674 msgid "Former Destinations" ! msgstr "Destinations précédentes" #: ../src/navit.c:684 *************** *** 426,432 **** #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:100 #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 - #, fuzzy msgid "Car" ! msgstr "Effacer" #: ../src/gui/gtk/destination.c:99 --- 426,431 ---- #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:100 #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 msgid "Car" ! msgstr "Voiture" #: ../src/gui/gtk/destination.c:99 *************** *** 444,450 **** #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 - #, fuzzy msgid "Postal" ! msgstr "Portugal" #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 --- 443,448 ---- #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 msgid "Postal" ! msgstr "Code Postal" #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 *************** *** 455,459 **** #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 - #, fuzzy msgid "District" msgstr "District" --- 453,456 ---- *************** *** 469,473 **** #: ../src/gui/gtk/destination.c:326 - #, fuzzy msgid "Enter Destination" msgstr "Destination" --- 466,469 ---- |
From: KaZeR <ka...@us...> - 2007-12-18 15:06:22
|
Update of /cvsroot/navit/navit/po In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv835 Added Files: fi.po Log Message: Added finish translation (Thanks FSO) --- NEW FILE: fi.po --- # Finnish translations for navit # Copyright (C) 2007 # This file is distributed under the same license as the navit package. # Ossi Berg <o....@ma...>, 2007. # msgid "" msgstr "" "Project-Id-Version: Navit 0.0.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-12-17 15:58+0300\n" "PO-Revision-Date: 2007-07-10 21:53+0200\n" "Last-Translator: Ossi Berg <o....@ma...>\n" "Language-Team: Ossi Berg <o....@ma...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../src/country.c:24 msgid "Czech Republic" msgstr "Tsekin tasavalta" #: ../src/country.c:25 msgid "Slovakia" msgstr "Slovakia" #: ../src/country.c:26 msgid "San Marino" msgstr "San Marino" #: ../src/country.c:27 msgid "Estonia" msgstr "Viro" #: ../src/country.c:28 msgid "Georgia" msgstr "Georgia" #: ../src/country.c:29 msgid "Latvia" msgstr "Latvia" #: ../src/country.c:30 msgid "Lithuania" msgstr "Liettua" #: ../src/country.c:31 msgid "Moldova" msgstr "Moldova" #: ../src/country.c:32 msgid "Russian Federation" msgstr "Venäjä" #: ../src/country.c:33 msgid "Ukraine" msgstr "Ukraina" #: ../src/country.c:34 msgid "Belarus" msgstr "Valko-Venäjä" #: ../src/country.c:35 msgid "Egypt" msgstr "Egypti" #: ../src/country.c:36 msgid "Greece" msgstr "Kreikka" #: ../src/country.c:37 msgid "Netherlands" msgstr "Alankomaat" #: ../src/country.c:38 msgid "Belgium" msgstr "Belgia" #: ../src/country.c:39 msgid "France" msgstr "Ranska" #: ../src/country.c:40 msgid "Spain" msgstr "Espanja" #: ../src/country.c:41 msgid "Hungary" msgstr "Unkari" #: ../src/country.c:42 msgid "Italy" msgstr "Italia" #: ../src/country.c:43 msgid "Romania" msgstr "Romania" #: ../src/country.c:44 msgid "Switzerland" msgstr "Sveitsi" #: ../src/country.c:45 msgid "Austria" msgstr "Itävalta" #: ../src/country.c:46 msgid "United Kingdom" msgstr "Iso-Britannia" #: ../src/country.c:47 msgid "Denmark" msgstr "Tanska" #: ../src/country.c:48 msgid "Sweden" msgstr "Ruotsi" #: ../src/country.c:49 msgid "Norway" msgstr "Norja" #: ../src/country.c:50 msgid "Poland" msgstr "Puola" #: ../src/country.c:51 msgid "Germany" msgstr "Saksa" #: ../src/country.c:52 msgid "Gibraltar" msgstr "Gibraltar" #: ../src/country.c:53 msgid "Portugal" msgstr "Portugali" #: ../src/country.c:54 msgid "Luxembourg" msgstr "Luxemburg" #: ../src/country.c:55 msgid "Ireland" msgstr "Irlanti" #: ../src/country.c:56 msgid "Iceland" msgstr "Islanti" #: ../src/country.c:57 msgid "Albania" msgstr "Albania" #: ../src/country.c:58 msgid "Malta" msgstr "Malta" #: ../src/country.c:59 msgid "Cyprus" msgstr "Kypros" #: ../src/country.c:60 msgid "Finland" msgstr "Suomi" #: ../src/country.c:61 msgid "Bulgaria" msgstr "Bulgaria" #: ../src/country.c:62 msgid "Lebanon" msgstr "Libanon" #: ../src/country.c:63 msgid "Andorra" msgstr "Andorra" #: ../src/country.c:64 msgid "Syria" msgstr "Syyria" # #: ../src/country.c:65 msgid "Saudi Arabia" msgstr "Saudi-Arabia" #: ../src/country.c:66 msgid "Libia" msgstr "Libya" #: ../src/country.c:67 msgid "Israel" msgstr "Israel" #: ../src/country.c:68 msgid "Palestinia" msgstr "Palestiina" #: ../src/country.c:69 msgid "Liechtenstein" msgstr "Lichtenstein" #: ../src/country.c:70 msgid "Morocco" msgstr "Marokko" #: ../src/country.c:71 msgid "Algeria" msgstr "Algeria" #: ../src/country.c:72 msgid "Tunisia" msgstr "Tunisia" #: ../src/country.c:73 msgid "Serbia" msgstr "Serbia" #: ../src/country.c:74 msgid "Jordan" msgstr "Jordania" #: ../src/country.c:75 msgid "Croatia" msgstr "Kroatia" #: ../src/country.c:76 msgid "Slovenia" msgstr "Slovenia" #: ../src/country.c:77 msgid "Bosnia and Herzegovina" msgstr "Bosnia ja Hertsegovina" #: ../src/country.c:78 msgid "Macedonia" msgstr "Makedonia" #: ../src/country.c:79 msgid "Turkey" msgstr "Turkki" #: ../src/country.c:80 msgid "Monaco" msgstr "Monaco" #: ../src/country.c:81 msgid "Azerbaijan" msgstr "Azerbaizan" #: ../src/country.c:82 msgid "Armenia" msgstr "Armenia" #: ../src/country.c:83 msgid "Faroe Islands" msgstr "Färsaaret" #: ../src/country.c:84 msgid "Western Sahara" msgstr "Länsi-Sahara" #: ../src/country.c:85 msgid "Svalbard and Jan Mayen" msgstr "Svalbard ja Jan Mayen" #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:100 #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 msgid "Car" msgstr "Auto" #: ../src/gui/gtk/destination.c:99 msgid "Iso2" msgstr "Iso2" #: ../src/gui/gtk/destination.c:99 msgid "Iso3" msgstr "Iso3" #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:331 msgid "Country" msgstr "Maa" # #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 msgid "Postal" msgstr "Postinumero" #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 msgid "Town" msgstr "Paikkakunta" # #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 msgid "District" msgstr "Alue" #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 #: ../src/gui/gtk/destination.c:340 msgid "Street" msgstr "Katu" #: ../src/gui/gtk/destination.c:102 ../src/gui/gtk/destination.c:342 msgid "Number" msgstr "Numero" # #: ../src/gui/gtk/destination.c:326 msgid "Enter Destination" msgstr "Anna kohde" #: ../src/gui/gtk/destination.c:333 msgid "Zip Code" msgstr "Postinumero" #: ../src/gui/gtk/destination.c:335 msgid "City" msgstr "Kaupunki" #: ../src/gui/gtk/destination.c:337 msgid "District/Township" msgstr "Maakunta" #: ../src/gui/gtk/destination.c:365 ../src/gui/gtk/gui_gtk_action.c:184 #: ../src/navit.c:997 msgid "Map" msgstr "Kartta" #: ../src/gui/gtk/destination.c:366 msgid "Bookmark" msgstr "Kirjanmerkki" #: ../src/gui/gtk/destination.c:367 ../src/gui/gtk/gui_gtk_action.c:195 msgid "Destination" msgstr "Kohde" #: ../src/gui/gtk/gui_gtk_action.c:182 msgid "Display" msgstr "Näyttö" #: ../src/gui/gtk/gui_gtk_action.c:183 ../src/navit.c:1004 msgid "Route" msgstr "Reitti" #: ../src/gui/gtk/gui_gtk_action.c:185 ../src/navit.c:603 msgid "Layout" msgstr "Pohja" #: ../src/gui/gtk/gui_gtk_action.c:186 msgid "ZoomOut" msgstr "Loitonna" #: ../src/gui/gtk/gui_gtk_action.c:187 msgid "ZoomIn" msgstr "Lähennä" #: ../src/gui/gtk/gui_gtk_action.c:188 msgid "Refresh" msgstr "Päivitä" #: ../src/gui/gtk/gui_gtk_action.c:189 ../src/navit.c:778 msgid "Roadbook" msgstr "Ohjeistaja" #: ../src/gui/gtk/gui_gtk_action.c:191 ../src/gui/gtk/gui_gtk_action.c:193 msgid "Info" msgstr "Info" #: ../src/gui/gtk/gui_gtk_action.c:196 msgid "Clear" msgstr "Tyhjennä" #: ../src/gui/gtk/gui_gtk_action.c:197 msgid "Test" msgstr "Testi" #: ../src/gui/gtk/gui_gtk_action.c:198 msgid "_Quit" msgstr "Sulje" #: ../src/gui/gtk/gui_gtk_action.c:205 msgid "Cursor" msgstr "Osoitin" #: ../src/gui/gtk/gui_gtk_action.c:206 msgid "Tracking" msgstr "Reititys" #: ../src/gui/gtk/gui_gtk_action.c:207 msgid "Orientation" msgstr "Asento" #: ../src/gui/gtk/gui_gtk_action.c:209 ../src/gui/gtk/gui_gtk_action.c:211 msgid "Fullscreen" msgstr "Koko ruutu" #: ../src/gui/gtk/gui_gtk_action.c:219 msgid "Data" msgstr "Tieto" #: ../src/gui/gtk/gui_gtk_action.c:220 msgid "VisibleBlocks" msgstr "Näkyvät korttelit" #: ../src/gui/gtk/gui_gtk_action.c:221 msgid "VisibleTowns" msgstr "Näkyvät paikkakunnat" #: ../src/gui/gtk/gui_gtk_action.c:222 msgid "VisiblePolys" msgstr "Näkyvät monikulmio" #: ../src/gui/gtk/gui_gtk_action.c:223 msgid "VisibleStreets" msgstr "Näkyvät kadut" #: ../src/gui/gtk/gui_gtk_action.c:224 msgid "VisiblePoints" msgstr "Näkyvät pisteet" #: ../src/gui/gtk/gui_gtk_action.c:225 msgid "RouteGraph" msgstr "Tiepiirros" #: ../src/main.c:94 #, c-format msgid "Running from source directory\n" msgstr "Ajetaan lähdehakemistosta\n" #: ../src/main.c:110 #, c-format msgid "setting '%s' to '%s'\n" msgstr "asetetaan '%s' arvoon '%s'\n" #: ../src/main.c:170 #, c-format msgid "No config file navit.xml, navit.xml.local found\n" msgstr "Ei asetustiedostoita navit.xml tai navit.xml.local\n" #: ../src/main.c:174 #, c-format msgid "Error parsing '%s': %s\n" msgstr "Virhe tulkitessa '%s': %s\n" #: ../src/main.c:177 #, c-format msgid "Using '%s'\n" msgstr "Käytetään '%s'\n" #: ../src/main.c:180 #, c-format msgid "No instance has been created, exiting\n" msgstr "Esimerkkiä ei tehty, lopetetaan\n" #: ../src/navigation.c:173 #, c-format msgid "%d m" msgstr "%d m" #: ../src/navigation.c:175 #, c-format msgid "in %d m" msgstr "%d m päästä" #: ../src/navigation.c:179 #, c-format msgid "%d meters" msgstr "%d metriä" #: ../src/navigation.c:181 #, c-format msgid "in %d meters" msgstr "%d metrin päästä" #: ../src/navigation.c:187 #, c-format msgid "%d.%d kilometer" msgstr "%d,%d kilometri" #: ../src/navigation.c:189 #, c-format msgid "in %d.%d kilometers" msgstr "%d,%d kilometrin päästä" #: ../src/navigation.c:193 #, c-format msgid "one kilometer" msgid_plural "%d kilometers" msgstr[0] "yksi kilometri" msgstr[1] "%d kilometriä" #: ../src/navigation.c:195 #, c-format msgid "in one kilometer" msgid_plural "in %d kilometers" msgstr[0] "Kilometrin päästä" msgstr[1] "%d kilometrin päästä" #: ../src/navigation.c:398 msgid "right" msgstr "vasemmalle" #: ../src/navigation.c:405 msgid "left" msgstr "oikealle" #: ../src/navigation.c:409 msgid "easily " msgstr "loivasti " #: ../src/navigation.c:413 msgid "strongly " msgstr "jyrkästi " #: ../src/navigation.c:416 msgid "unknown " msgstr "tuntematon " # #: ../src/navigation.c:422 msgid "When possible, please turn around" msgstr "Käänny ympäri" #: ../src/navigation.c:429 #, c-format msgid "Follow the road for the next %s" msgstr "Seuraa tätä tietä %s" #: ../src/navigation.c:433 msgid "soon" msgstr "pian" #: ../src/navigation.c:439 msgid "now" msgstr "nyt" #: ../src/navigation.c:442 msgid "error" msgstr "virhe" #. TRANSLATORS: The first argument is strength, the second direction and the third distance #: ../src/navigation.c:446 #, c-format msgid "Turn %1$s%2$s %3$s" msgstr "Käänny %3$s %1$s%2$s" #: ../src/navigation.c:449 #, c-format msgid "You have reached your destination %s" msgstr "Olet saavuttanut kohteesi %s" #: ../src/navit.c:619 msgid "Projection" msgstr "Projektio" #: ../src/navit.c:674 msgid "Former Destinations" msgstr "Aiemmat kohteet" #: ../src/navit.c:684 msgid "Bookmarks" msgstr "Kirjanmerkit" #: ../src/navit.c:722 msgid "Vehicle" msgstr "Kulkuneuvo" #: ../src/popup.c:229 #, c-format msgid "Point 0x%x 0x%x" msgstr "Piste 0x%x 0x%x" #: ../src/popup.c:230 #, c-format msgid "Screen %d %d" msgstr "Ruutu %d %d" #: ../src/popup.c:239 msgid "Set as position" msgstr "Aseta sijainniksi" #: ../src/popup.c:240 msgid "Set as destination" msgstr "Aseta kohteeksi" #: ../src/popup.c:241 msgid "Add as bookmark" msgstr "Lisää kirjanmerkiksi" #~ msgid "two kilometers" #~ msgstr "kaksi kilometriä" #~ msgid "in two kilometers" #~ msgstr "kahden kilometrin päästä" #~ msgid "three kilometers" #~ msgstr "kolme kilometriä" #~ msgid "in three kilometers" #~ msgstr "kolmen kilometrin päästä" #~ msgid "four kilometers" #~ msgstr "neljä kilometriä" #~ msgid "in four kilometers" #~ msgstr "neljän kilometrin päästä" #~ msgid "%d kilometers" #~ msgstr "%d kilometriä" #~ msgid "in %d kilometers" #~ msgstr "%d kilometrin päästä" |
From: KaZeR <ka...@us...> - 2007-12-18 15:02:20
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4833 Modified Files: README Log Message: Minors updates on README Index: README =================================================================== RCS file: /cvsroot/navit/navit/README,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** README 8 Nov 2007 16:39:59 -0000 1.9 --- README 18 Dec 2007 15:02:21 -0000 1.10 *************** *** 18,22 **** destination, but also generates directions and even speaks to you. ! Navit currently speaks 8 languages : - English - German --- 18,22 ---- destination, but also generates directions and even speaks to you. ! Navit currently speaks 9 languages : - English - German *************** *** 27,33 **** - Norwegian - Czech For help or more information, please refer to the wiki : ! http://navit.sourceforge.net/wiki/ --- 27,34 ---- - Norwegian - Czech + - Finish For help or more information, please refer to the wiki : ! http://wiki.navit-project.org *************** *** 39,49 **** - OpenStreetMaps : display, routing, but street name search isn't complete ! (see http://navit.sourceforge.net/wiki/index.php/OpenStreetMaps ) - Grosser Reiseplaner and compliant maps : full support ! (see http://navit.sourceforge.net/wiki/index.php/European_maps ) - Garmin maps : display, routing is being worked on ! (see http://navit.sourceforge.net/wiki/index.php/Garmin_maps ) --- 40,50 ---- - OpenStreetMaps : display, routing, but street name search isn't complete ! (see http://wiki.navit-project.org/index.php/OpenStreetMaps ) - Grosser Reiseplaner and compliant maps : full support ! (see http://wiki.navit-project.org/index.php/European_maps ) - Garmin maps : display, routing is being worked on ! (see http://wiki.navit-project.org/index.php/Garmin_maps ) |
From: KaZeR <ka...@us...> - 2007-12-18 13:20:03
|
Update of /cvsroot/navit/navit/po In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27111 Modified Files: fr.po Log Message: Updated fr.po to new plural form Index: fr.po =================================================================== RCS file: /cvsroot/navit/navit/po/fr.po,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** fr.po 17 Dec 2007 12:10:33 -0000 1.30 --- fr.po 18 Dec 2007 13:19:58 -0000 1.31 *************** *** 8,12 **** "Project-Id-Version: Navit 0.0.3\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2007-12-17 11:17+0100\n" "PO-Revision-Date: 2007-12-17 11:36+0100\n" "Last-Translator: KaZeR <ka...@al...>\n" --- 8,12 ---- "Project-Id-Version: Navit 0.0.3\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2007-12-18 14:12+0100\n" "PO-Revision-Date: 2007-12-17 11:36+0100\n" "Last-Translator: KaZeR <ka...@al...>\n" *************** *** 26,45 **** msgstr "'%s' mis à '%s'\n" ! #: ../src/main.c:170 #, c-format msgid "No config file navit.xml, navit.xml.local found\n" msgstr "Fichier de configuration navit.xml ou navit.xml.local non trouvé\n" ! #: ../src/main.c:174 #, c-format msgid "Error parsing '%s': %s\n" msgstr "Erreur lors du traitement de '%s': %s\n" ! #: ../src/main.c:177 #, c-format msgid "Using '%s'\n" msgstr "Utilisation de '%s'\n" ! #: ../src/main.c:180 #, c-format msgid "No instance has been created, exiting\n" --- 26,45 ---- msgstr "'%s' mis à '%s'\n" ! #: ../src/main.c:173 #, c-format msgid "No config file navit.xml, navit.xml.local found\n" msgstr "Fichier de configuration navit.xml ou navit.xml.local non trouvé\n" ! #: ../src/main.c:177 #, c-format msgid "Error parsing '%s': %s\n" msgstr "Erreur lors du traitement de '%s': %s\n" ! #: ../src/main.c:180 #, c-format msgid "Using '%s'\n" msgstr "Utilisation de '%s'\n" ! #: ../src/main.c:183 #, c-format msgid "No instance has been created, exiting\n" *************** *** 76,180 **** msgstr "dans %d.%d kilomètres" ! #: ../src/navigation.c:195 msgid "one kilometer" ! msgstr "un kilomètre" ! ! #: ../src/navigation.c:197 ! msgid "in one kilometer" ! msgstr "dans un kilomètre" ! ! #: ../src/navigation.c:200 ! msgid "two kilometers" ! msgstr "deux kilomètres" ! ! #: ../src/navigation.c:202 ! msgid "in two kilometers" ! msgstr "dans deux kilomètres" ! ! #: ../src/navigation.c:205 ! msgid "three kilometers" ! msgstr "trois kilomètres" ! ! #: ../src/navigation.c:207 ! msgid "in three kilometers" ! msgstr "dans trois kilomètres" ! ! #: ../src/navigation.c:210 ! msgid "four kilometers" ! msgstr "quatre kilomètres" ! ! #: ../src/navigation.c:212 ! msgid "in four kilometers" ! msgstr "dans quatre kilomètres" ! ! #: ../src/navigation.c:215 ! #, c-format ! msgid "%d kilometers" ! msgstr "%d kilomètres" ! #: ../src/navigation.c:217 #, c-format ! msgid "in %d kilometers" ! msgstr "dans %d kilomètres" ! #: ../src/navigation.c:421 msgid "right" msgstr "à droite" ! #: ../src/navigation.c:429 msgid "left" msgstr "à gauche" ! #: ../src/navigation.c:433 msgid "easily " msgstr "légérement " ! #: ../src/navigation.c:437 msgid "strongly " msgstr "fortement " ! #: ../src/navigation.c:440 msgid "unknown " msgstr "inconnu" ! #: ../src/navigation.c:446 msgid "When possible, please turn around" msgstr "Dès que possible, faites demi-tour" ! #: ../src/navigation.c:453 #, c-format msgid "Follow the road for the next %s" msgstr "Suivez la route sur %s" ! #: ../src/navigation.c:457 msgid "soon" msgstr "bientôt" ! #: ../src/navigation.c:463 msgid "now" msgstr "maintenant" ! #: ../src/navigation.c:466 msgid "error" msgstr "erreur" ! #: ../src/navigation.c:471 ! msgid "strength_pos" ! msgstr "2" ! ! #: ../src/navigation.c:473 ! msgid "direction_pos" ! msgstr "3" ! ! #: ../src/navigation.c:475 ! msgid "distance_pos" ! msgstr "1" ! ! #: ../src/navigation.c:485 ! #, c-format ! msgid "Turn %s%s %s" msgstr "%s tournez %s%s" ! #: ../src/navigation.c:488 #, c-format msgid "You have reached your destination %s" --- 76,141 ---- msgstr "dans %d.%d kilomètres" ! #: ../src/navigation.c:193 ! #, c-format msgid "one kilometer" ! msgid_plural "%d kilometers" ! msgstr[0] "un kilomètre" ! msgstr[1] "un kilomètre" ! #: ../src/navigation.c:195 #, c-format ! msgid "in one kilometer" ! msgid_plural "in %d kilometers" ! msgstr[0] "dans un kilomètre" ! msgstr[1] "dans un kilomètre" ! #: ../src/navigation.c:398 msgid "right" msgstr "à droite" ! #: ../src/navigation.c:405 msgid "left" msgstr "à gauche" ! #: ../src/navigation.c:409 msgid "easily " msgstr "légérement " ! #: ../src/navigation.c:413 msgid "strongly " msgstr "fortement " ! #: ../src/navigation.c:416 msgid "unknown " msgstr "inconnu" ! #: ../src/navigation.c:422 msgid "When possible, please turn around" msgstr "Dès que possible, faites demi-tour" ! #: ../src/navigation.c:429 #, c-format msgid "Follow the road for the next %s" msgstr "Suivez la route sur %s" ! #: ../src/navigation.c:433 msgid "soon" msgstr "bientôt" ! #: ../src/navigation.c:439 msgid "now" msgstr "maintenant" ! #: ../src/navigation.c:442 msgid "error" msgstr "erreur" ! #. TRANSLATORS: The first argument is strength, the second direction and the third distance ! #: ../src/navigation.c:446 ! #, fuzzy, c-format ! msgid "Turn %1$s%2$s %3$s" msgstr "%s tournez %s%s" ! #: ../src/navigation.c:449 #, c-format msgid "You have reached your destination %s" *************** *** 189,192 **** --- 150,179 ---- msgstr "Projection" + #: ../src/navit.c:674 + #, fuzzy + msgid "Former Destinations" + msgstr "Destination" + + #: ../src/navit.c:684 + msgid "Bookmarks" + msgstr "" + + #: ../src/navit.c:722 + msgid "Vehicle" + msgstr "" + + #: ../src/navit.c:778 ../src/gui/gtk/gui_gtk_action.c:189 + msgid "Roadbook" + msgstr "Carnet de route" + + #: ../src/navit.c:997 ../src/gui/gtk/destination.c:365 + #: ../src/gui/gtk/gui_gtk_action.c:184 + msgid "Map" + msgstr "Carte" + + #: ../src/navit.c:1004 ../src/gui/gtk/gui_gtk_action.c:183 + msgid "Route" + msgstr "Route" + #: ../src/country.c:24 msgid "Czech Republic" *************** *** 437,463 **** msgstr "Spitzberg" ! #: ../src/gui/gtk/destination.c:330 msgid "Country" msgstr "Pays" ! #: ../src/gui/gtk/destination.c:332 msgid "Zip Code" msgstr "Code postal" ! #: ../src/gui/gtk/destination.c:334 msgid "City" msgstr "Ville" ! #: ../src/gui/gtk/destination.c:336 msgid "District/Township" msgstr "District" ! #: ../src/gui/gtk/destination.c:339 ! msgid "Street" ! msgstr "Rue" ! #: ../src/gui/gtk/destination.c:341 ! msgid "Number" ! msgstr "Numéro" #: ../src/gui/gtk/gui_gtk_action.c:182 --- 424,495 ---- msgstr "Spitzberg" ! #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:100 ! #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 ! #, fuzzy ! msgid "Car" ! msgstr "Effacer" ! ! #: ../src/gui/gtk/destination.c:99 ! msgid "Iso2" ! msgstr "" ! ! #: ../src/gui/gtk/destination.c:99 ! msgid "Iso3" ! msgstr "" ! ! #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:331 msgid "Country" msgstr "Pays" ! #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 ! #: ../src/gui/gtk/destination.c:102 ! #, fuzzy ! msgid "Postal" ! msgstr "Portugal" ! ! #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 ! #: ../src/gui/gtk/destination.c:102 ! msgid "Town" ! msgstr "" ! ! #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 ! #: ../src/gui/gtk/destination.c:102 ! #, fuzzy ! msgid "District" ! msgstr "District" ! ! #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 ! #: ../src/gui/gtk/destination.c:340 ! msgid "Street" ! msgstr "Rue" ! ! #: ../src/gui/gtk/destination.c:102 ../src/gui/gtk/destination.c:342 ! msgid "Number" ! msgstr "Numéro" ! ! #: ../src/gui/gtk/destination.c:326 ! #, fuzzy ! msgid "Enter Destination" ! msgstr "Destination" ! ! #: ../src/gui/gtk/destination.c:333 msgid "Zip Code" msgstr "Code postal" ! #: ../src/gui/gtk/destination.c:335 msgid "City" msgstr "Ville" ! #: ../src/gui/gtk/destination.c:337 msgid "District/Township" msgstr "District" ! #: ../src/gui/gtk/destination.c:366 ! msgid "Bookmark" ! msgstr "" ! #: ../src/gui/gtk/destination.c:367 ../src/gui/gtk/gui_gtk_action.c:195 ! msgid "Destination" ! msgstr "Destination" #: ../src/gui/gtk/gui_gtk_action.c:182 *************** *** 465,476 **** msgstr "Affichage" - #: ../src/gui/gtk/gui_gtk_action.c:183 - msgid "Route" - msgstr "Route" - - #: ../src/gui/gtk/gui_gtk_action.c:184 - msgid "Map" - msgstr "Carte" - #: ../src/gui/gtk/gui_gtk_action.c:186 msgid "ZoomOut" --- 497,500 ---- *************** *** 485,500 **** msgstr "Rafraichir" - #: ../src/gui/gtk/gui_gtk_action.c:189 - msgid "Roadbook" - msgstr "Carnet de route" - #: ../src/gui/gtk/gui_gtk_action.c:191 ../src/gui/gtk/gui_gtk_action.c:193 msgid "Info" msgstr "Info" - #: ../src/gui/gtk/gui_gtk_action.c:195 - msgid "Destination" - msgstr "Destination" - #: ../src/gui/gtk/gui_gtk_action.c:196 msgid "Clear" --- 509,516 ---- *************** *** 552,553 **** --- 568,602 ---- msgid "RouteGraph" msgstr "RouteGraph" + + #~ msgid "two kilometers" + #~ msgstr "deux kilomètres" + + #~ msgid "in two kilometers" + #~ msgstr "dans deux kilomètres" + + #~ msgid "three kilometers" + #~ msgstr "trois kilomètres" + + #~ msgid "in three kilometers" + #~ msgstr "dans trois kilomètres" + + #~ msgid "four kilometers" + #~ msgstr "quatre kilomètres" + + #~ msgid "in four kilometers" + #~ msgstr "dans quatre kilomètres" + + #~ msgid "%d kilometers" + #~ msgstr "%d kilomètres" + + #~ msgid "in %d kilometers" + #~ msgstr "dans %d kilomètres" + + #~ msgid "strength_pos" + #~ msgstr "2" + + #~ msgid "direction_pos" + #~ msgstr "3" + + #~ msgid "distance_pos" + #~ msgstr "1" |
From: Martin S. <mar...@us...> - 2007-12-18 12:08:08
|
Update of /cvsroot/navit/navit/src/gui/gtk In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18998/src/gui/gtk Modified Files: destination.c Log Message: Improved i18n Index: destination.c =================================================================== RCS file: /cvsroot/navit/navit/src/gui/gtk/destination.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** destination.c 25 Nov 2007 01:32:14 -0000 1.10 --- destination.c 18 Dec 2007 12:07:38 -0000 1.11 *************** *** 97,104 **** char **columns_text[] = { ! (char *[]){"Car","Iso2","Iso3","Country",NULL}, ! (char *[]){"Car","Postal","Town","District",NULL}, ! (char *[]){"Car","Postal","Town","District","Street",NULL}, ! (char *[]){"Car","Postal","Town","District","Street","Number",NULL}, }; --- 97,104 ---- char **columns_text[] = { ! (char *[]){_n("Car"),_n("Iso2"),_n("Iso3"),_n("Country"),NULL}, ! (char *[]){_n("Car"),_n("Postal"),_n("Town"),_n("District"),NULL}, ! (char *[]){_n("Car"),_n("Postal"),_n("Town"),_n("District"),_n("Street"),NULL}, ! (char *[]){_n("Car"),_n("Postal"),_n("Town"),_n("District"),_n("Street"),_n("Number"),NULL}, }; *************** *** 120,124 **** printf("*column_text=%s\n", *column_text); GtkCellRenderer *cell=gtk_cell_renderer_text_new(); ! gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (param->treeview),-1, *column_text, cell, "text", i, NULL); i++; column_text++; --- 120,124 ---- printf("*column_text=%s\n", *column_text); GtkCellRenderer *cell=gtk_cell_renderer_text_new(); ! gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (param->treeview),-1, gettext(*column_text), cell, "text", i, NULL); i++; column_text++; *************** *** 324,327 **** --- 324,328 ---- window2 = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_title(GTK_WINDOW(window2),_("Enter Destination")); vbox = gtk_vbox_new(FALSE, 0); table = gtk_table_new(3, 8, FALSE); *************** *** 362,368 **** hseparator2 = gtk_vseparator_new(); ! button1 = gtk_button_new_with_label("Karte"); ! button2 = gtk_button_new_with_label("Bookmark"); ! button3 = gtk_button_new_with_label("Ziel"); gtk_table_attach(GTK_TABLE(table), label_country, 0, 1, 0, 1, 0, GTK_FILL, 0, 0); --- 363,369 ---- hseparator2 = gtk_vseparator_new(); ! button1 = gtk_button_new_with_label(_("Map")); ! button2 = gtk_button_new_with_label(_("Bookmark")); ! button3 = gtk_button_new_with_label(_("Destination")); gtk_table_attach(GTK_TABLE(table), label_country, 0, 1, 0, 1, 0, GTK_FILL, 0, 0); |
From: Martin S. <mar...@us...> - 2007-12-18 12:07:43
|
Update of /cvsroot/navit/navit/po In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18998/po Modified Files: de.po Log Message: Improved i18n Index: de.po =================================================================== RCS file: /cvsroot/navit/navit/po/de.po,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** de.po 5 Nov 2007 23:54:28 -0000 1.17 --- de.po 18 Dec 2007 12:07:41 -0000 1.18 *************** *** 8,12 **** "Project-Id-Version: Navit 0.0.3\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2007-11-05 21:44+0100\n" "PO-Revision-Date: 2007-07-10 21:53+0200\n" "Last-Translator: Martin Schaller <mar...@so...>\n" --- 8,12 ---- "Project-Id-Version: Navit 0.0.3\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2007-12-18 12:58+0100\n" "PO-Revision-Date: 2007-07-10 21:53+0200\n" "Last-Translator: Martin Schaller <mar...@so...>\n" *************** *** 15,191 **** "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" ! ! #: ../src/main.c:94 ! #, c-format ! msgid "Running from source directory\n" ! msgstr "Aufruf aus Quellverzeichnis\n" ! ! #: ../src/main.c:110 ! #, fuzzy, c-format ! msgid "setting '%s' to '%s'\n" ! msgstr "Benutze '%s'\n" ! ! #: ../src/main.c:170 ! msgid "No config file navit.xml or navit.xml.local found\n" ! msgstr "" ! ! #: ../src/main.c:172 ! #, c-format ! msgid "Error parsing '%s': %s\n" ! msgstr "Fehler beim Parsen von '%s': %s\n" ! ! #: ../src/main.c:174 ! #, c-format ! msgid "Using '%s'\n" ! msgstr "Benutze '%s'\n" ! ! #: ../src/main.c:177 ! #, c-format ! msgid "No instance has been created, exiting\n" ! msgstr "Es wurde keine Instanz erzeugt, Ende\n" ! ! #: ../src/navigation.c:173 ! #, c-format ! msgid "%d m" ! msgstr "%d Meter" ! ! #: ../src/navigation.c:175 ! #, c-format ! msgid "in %d m" ! msgstr "In %d metern" ! ! #: ../src/navigation.c:179 ! #, c-format ! msgid "%d meters" ! msgstr "%d Meter" ! ! #: ../src/navigation.c:181 ! #, c-format ! msgid "in %d meters" ! msgstr "In %d metern" ! ! #: ../src/navigation.c:187 ! #, c-format ! msgid "%d.%d kilometer" ! msgstr "%d,%d Kilometer" ! ! #: ../src/navigation.c:189 ! #, c-format ! msgid "in %d.%d kilometers" ! msgstr "In %d,%d Kilometern" ! ! #: ../src/navigation.c:195 ! msgid "one kilometer" ! msgstr "einen Kilometer" ! ! #: ../src/navigation.c:197 ! msgid "in one kilometer" ! msgstr "in einem Kilometer" ! ! #: ../src/navigation.c:200 ! msgid "two kilometers" ! msgstr "zwei Kilometer" ! ! #: ../src/navigation.c:202 ! msgid "in two kilometers" ! msgstr "in zwei Kilometern" ! ! #: ../src/navigation.c:205 ! msgid "three kilometers" ! msgstr "drei Kilometer" ! ! #: ../src/navigation.c:207 ! msgid "in three kilometers" ! msgstr "in drei Kilometern" ! ! #: ../src/navigation.c:210 ! msgid "four kilometers" ! msgstr "vier Kilometer" ! ! #: ../src/navigation.c:212 ! msgid "in four kilometers" ! msgstr "in vier Kilometern" ! ! #: ../src/navigation.c:215 ! #, c-format ! msgid "%d kilometers" ! msgstr "%d Kilometer" ! ! #: ../src/navigation.c:217 ! #, c-format ! msgid "in %d kilometers" ! msgstr "In %d Kilometern" ! ! #: ../src/navigation.c:421 ! msgid "right" ! msgstr "rechts" ! ! #: ../src/navigation.c:429 ! msgid "left" ! msgstr "links" ! ! #: ../src/navigation.c:433 ! msgid "easily " ! msgstr "leicht " ! ! #: ../src/navigation.c:437 ! msgid "strongly " ! msgstr "scharf " ! ! #: ../src/navigation.c:440 ! msgid "unknown " ! msgstr "unbekannt " ! ! # ! #: ../src/navigation.c:446 ! msgid "When possible, please turn around" ! msgstr "Wenn möglich bitte wenden" ! ! #: ../src/navigation.c:453 ! #, c-format ! msgid "Follow the road for the next %s" ! msgstr "Dem StraÃenverlauf %s folgen" ! ! #: ../src/navigation.c:457 ! msgid "soon" ! msgstr "Demnächst" ! ! #: ../src/navigation.c:463 ! msgid "now" ! msgstr "Jetzt" ! ! #: ../src/navigation.c:466 ! msgid "error" ! msgstr "fehler" ! ! #: ../src/navigation.c:471 ! msgid "strength_pos" ! msgstr "2" ! ! #: ../src/navigation.c:473 ! msgid "direction_pos" ! msgstr "3" ! ! #: ../src/navigation.c:475 ! msgid "distance_pos" ! msgstr "1" ! ! #: ../src/navigation.c:485 ! #, c-format ! msgid "Turn %s%s %s" ! msgstr "%s %s%s abbiegen" ! ! #: ../src/navigation.c:488 ! #, c-format ! msgid "You have reached your destination %s" ! msgstr "%s haben Sie ihr Ziel erreicht" ! ! #: ../src/navit.c:449 ../src/gui/gtk/gui_gtk_action.c:180 ! msgid "Layout" ! msgstr "Layout" ! ! #: ../src/navit.c:462 ! msgid "Projection" ! msgstr "Projektion" #: ../src/country.c:24 --- 15,19 ---- "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" ! "Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../src/country.c:24 *************** *** 438,550 **** msgstr "Svalbard und Jan Mayen" ! #: ../src/gui/gtk/destination.c:325 msgid "Country" msgstr "Land" ! #: ../src/gui/gtk/destination.c:327 ! msgid "Zip Code" msgstr "PLZ" ! #: ../src/gui/gtk/destination.c:329 ! msgid "City" msgstr "Ort" ! #: ../src/gui/gtk/destination.c:331 ! msgid "District/Township" ! msgstr "Ortsteil/Gemeinde" ! #: ../src/gui/gtk/destination.c:334 msgid "Street" msgstr "StraÃe" ! #: ../src/gui/gtk/destination.c:336 msgid "Number" msgstr "Nummer" ! #: ../src/gui/gtk/gui_gtk_action.c:177 msgid "Display" msgstr "Anzeige" ! #: ../src/gui/gtk/gui_gtk_action.c:178 msgid "Route" msgstr "Route" ! #: ../src/gui/gtk/gui_gtk_action.c:179 ! msgid "Map" ! msgstr "Karte" ! #: ../src/gui/gtk/gui_gtk_action.c:181 msgid "ZoomOut" msgstr "Verkleinern" ! #: ../src/gui/gtk/gui_gtk_action.c:182 msgid "ZoomIn" msgstr "VergröÃern" ! #: ../src/gui/gtk/gui_gtk_action.c:183 msgid "Refresh" msgstr "Aktualisieren" ! #: ../src/gui/gtk/gui_gtk_action.c:184 msgid "Roadbook" msgstr "StraÃenliste" ! #: ../src/gui/gtk/gui_gtk_action.c:186 ../src/gui/gtk/gui_gtk_action.c:188 msgid "Info" msgstr "Info" ! #: ../src/gui/gtk/gui_gtk_action.c:190 ! msgid "Destination" ! msgstr "Ziel" ! ! #: ../src/gui/gtk/gui_gtk_action.c:191 msgid "Clear" msgstr "Löschen" ! #: ../src/gui/gtk/gui_gtk_action.c:192 msgid "Test" msgstr "Test" ! #: ../src/gui/gtk/gui_gtk_action.c:193 msgid "_Quit" msgstr "Beenden" ! #: ../src/gui/gtk/gui_gtk_action.c:200 msgid "Cursor" msgstr "Marke" ! #: ../src/gui/gtk/gui_gtk_action.c:201 msgid "Tracking" msgstr "Spurverfolgung" ! #: ../src/gui/gtk/gui_gtk_action.c:202 msgid "Orientation" msgstr "Orientierung" ! #: ../src/gui/gtk/gui_gtk_action.c:204 ../src/gui/gtk/gui_gtk_action.c:206 msgid "Fullscreen" msgstr "Vollbild" ! #: ../src/gui/gtk/gui_gtk_action.c:214 msgid "Data" msgstr "Daten" ! #: ../src/gui/gtk/gui_gtk_action.c:215 msgid "VisibleBlocks" msgstr "Sichtbare Blöcke" ! #: ../src/gui/gtk/gui_gtk_action.c:216 msgid "VisibleTowns" msgstr "Sichtbare Städte" ! #: ../src/gui/gtk/gui_gtk_action.c:217 msgid "VisiblePolys" msgstr "Sichtbare Polygone" ! #: ../src/gui/gtk/gui_gtk_action.c:218 msgid "VisibleStreets" msgstr "Sichtbare StraÃen" ! #: ../src/gui/gtk/gui_gtk_action.c:219 msgid "VisiblePoints" msgstr "Sichtbare Punkte" --- 266,616 ---- msgstr "Svalbard und Jan Mayen" ! #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:100 ! #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 ! msgid "Car" ! msgstr "Auto" ! ! #: ../src/gui/gtk/destination.c:99 ! msgid "Iso2" ! msgstr "Iso2" ! ! #: ../src/gui/gtk/destination.c:99 ! msgid "Iso3" ! msgstr "Iso3" ! ! #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:331 msgid "Country" msgstr "Land" ! # ! #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 ! #: ../src/gui/gtk/destination.c:102 ! msgid "Postal" msgstr "PLZ" ! #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 ! #: ../src/gui/gtk/destination.c:102 ! msgid "Town" msgstr "Ort" ! # ! #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 ! #: ../src/gui/gtk/destination.c:102 ! msgid "District" ! msgstr "Ortsteil" ! #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 ! #: ../src/gui/gtk/destination.c:340 msgid "Street" msgstr "StraÃe" ! #: ../src/gui/gtk/destination.c:102 ../src/gui/gtk/destination.c:342 msgid "Number" msgstr "Nummer" ! # ! #: ../src/gui/gtk/destination.c:326 ! msgid "Enter Destination" ! msgstr "Ziel eingeben" ! ! #: ../src/gui/gtk/destination.c:333 ! msgid "Zip Code" ! msgstr "PLZ" ! ! #: ../src/gui/gtk/destination.c:335 ! msgid "City" ! msgstr "Ort" ! ! #: ../src/gui/gtk/destination.c:337 ! msgid "District/Township" ! msgstr "Ortsteil/Gemeinde" ! ! #: ../src/gui/gtk/destination.c:365 ../src/gui/gtk/gui_gtk_action.c:184 ! #: ../src/navit.c:997 ! msgid "Map" ! msgstr "Karte" ! ! #: ../src/gui/gtk/destination.c:366 ! msgid "Bookmark" ! msgstr "Lesezeichen" ! ! #: ../src/gui/gtk/destination.c:367 ../src/gui/gtk/gui_gtk_action.c:195 ! msgid "Destination" ! msgstr "Ziel" ! ! #: ../src/gui/gtk/gui_gtk_action.c:182 msgid "Display" msgstr "Anzeige" ! #: ../src/gui/gtk/gui_gtk_action.c:183 ../src/navit.c:1004 msgid "Route" msgstr "Route" ! #: ../src/gui/gtk/gui_gtk_action.c:185 ../src/navit.c:603 ! msgid "Layout" ! msgstr "Layout" ! #: ../src/gui/gtk/gui_gtk_action.c:186 msgid "ZoomOut" msgstr "Verkleinern" ! #: ../src/gui/gtk/gui_gtk_action.c:187 msgid "ZoomIn" msgstr "VergröÃern" ! #: ../src/gui/gtk/gui_gtk_action.c:188 msgid "Refresh" msgstr "Aktualisieren" ! #: ../src/gui/gtk/gui_gtk_action.c:189 ../src/navit.c:778 msgid "Roadbook" msgstr "StraÃenliste" ! #: ../src/gui/gtk/gui_gtk_action.c:191 ../src/gui/gtk/gui_gtk_action.c:193 msgid "Info" msgstr "Info" ! #: ../src/gui/gtk/gui_gtk_action.c:196 msgid "Clear" msgstr "Löschen" ! #: ../src/gui/gtk/gui_gtk_action.c:197 msgid "Test" msgstr "Test" ! #: ../src/gui/gtk/gui_gtk_action.c:198 msgid "_Quit" msgstr "Beenden" ! #: ../src/gui/gtk/gui_gtk_action.c:205 msgid "Cursor" msgstr "Marke" ! #: ../src/gui/gtk/gui_gtk_action.c:206 msgid "Tracking" msgstr "Spurverfolgung" ! #: ../src/gui/gtk/gui_gtk_action.c:207 msgid "Orientation" msgstr "Orientierung" ! #: ../src/gui/gtk/gui_gtk_action.c:209 ../src/gui/gtk/gui_gtk_action.c:211 msgid "Fullscreen" msgstr "Vollbild" ! #: ../src/gui/gtk/gui_gtk_action.c:219 msgid "Data" msgstr "Daten" ! #: ../src/gui/gtk/gui_gtk_action.c:220 msgid "VisibleBlocks" msgstr "Sichtbare Blöcke" ! #: ../src/gui/gtk/gui_gtk_action.c:221 msgid "VisibleTowns" msgstr "Sichtbare Städte" ! #: ../src/gui/gtk/gui_gtk_action.c:222 msgid "VisiblePolys" msgstr "Sichtbare Polygone" ! #: ../src/gui/gtk/gui_gtk_action.c:223 msgid "VisibleStreets" msgstr "Sichtbare StraÃen" ! #: ../src/gui/gtk/gui_gtk_action.c:224 msgid "VisiblePoints" msgstr "Sichtbare Punkte" + + #: ../src/gui/gtk/gui_gtk_action.c:225 + msgid "RouteGraph" + msgstr "Route-Graph" + + #: ../src/main.c:94 + #, c-format + msgid "Running from source directory\n" + msgstr "Aufruf aus Quellverzeichnis\n" + + #: ../src/main.c:110 + #, c-format + msgid "setting '%s' to '%s'\n" + msgstr "setze '%s' auf '%s'\n" + + #: ../src/main.c:170 + #, c-format + msgid "No config file navit.xml, navit.xml.local found\n" + msgstr "Keine Konfigurationsdatei navit.xml, navit.xml.local gefunden\n" + + #: ../src/main.c:174 + #, c-format + msgid "Error parsing '%s': %s\n" + msgstr "Fehler beim Parsen von '%s': %s\n" + + #: ../src/main.c:177 + #, c-format + msgid "Using '%s'\n" + msgstr "Benutze '%s'\n" + + #: ../src/main.c:180 + #, c-format + msgid "No instance has been created, exiting\n" + msgstr "Es wurde keine Instanz erzeugt, Ende\n" + + #: ../src/navigation.c:173 + #, c-format + msgid "%d m" + msgstr "%d Meter" + + #: ../src/navigation.c:175 + #, c-format + msgid "in %d m" + msgstr "In %d metern" + + #: ../src/navigation.c:179 + #, c-format + msgid "%d meters" + msgstr "%d Meter" + + #: ../src/navigation.c:181 + #, c-format + msgid "in %d meters" + msgstr "In %d metern" + + #: ../src/navigation.c:187 + #, c-format + msgid "%d.%d kilometer" + msgstr "%d,%d Kilometer" + + #: ../src/navigation.c:189 + #, c-format + msgid "in %d.%d kilometers" + msgstr "In %d,%d Kilometern" + + #: ../src/navigation.c:193 + #, c-format + msgid "one kilometer" + msgid_plural "%d kilometers" + msgstr[0] "einen Kilometer" + msgstr[1] "%d Kilometer" + + #: ../src/navigation.c:195 + #, c-format + msgid "in one kilometer" + msgid_plural "in %d kilometers" + msgstr[0] "In einem Kilometer" + msgstr[1] "In %d Kilometern" + + #: ../src/navigation.c:398 + msgid "right" + msgstr "rechts" + + #: ../src/navigation.c:405 + msgid "left" + msgstr "links" + + #: ../src/navigation.c:409 + msgid "easily " + msgstr "leicht " + + #: ../src/navigation.c:413 + msgid "strongly " + msgstr "scharf " + + #: ../src/navigation.c:416 + msgid "unknown " + msgstr "unbekannt " + + # + #: ../src/navigation.c:422 + msgid "When possible, please turn around" + msgstr "Wenn möglich bitte wenden" + + #: ../src/navigation.c:429 + #, c-format + msgid "Follow the road for the next %s" + msgstr "Dem StraÃenverlauf %s folgen" + + #: ../src/navigation.c:433 + msgid "soon" + msgstr "Demnächst" + + #: ../src/navigation.c:439 + msgid "now" + msgstr "Jetzt" + + #: ../src/navigation.c:442 + msgid "error" + msgstr "fehler" + + #. TRANSLATORS: The first argument is strength, the second direction and the third distance + #: ../src/navigation.c:446 + #, c-format + msgid "Turn %1$s%2$s %3$s" + msgstr "%3$s %1$s%2$s abbiegen" + + #: ../src/navigation.c:449 + #, c-format + msgid "You have reached your destination %s" + msgstr "%s haben Sie ihr Ziel erreicht" + + #: ../src/navit.c:619 + msgid "Projection" + msgstr "Projektion" + + #: ../src/navit.c:674 + msgid "Former Destinations" + msgstr "Frühere Ziele" + + #: ../src/navit.c:684 + msgid "Bookmarks" + msgstr "Lesezeichen" + + #: ../src/navit.c:722 + msgid "Vehicle" + msgstr "Fahrzeug" + + #: ../src/popup.c:229 + #, c-format + msgid "Point 0x%x 0x%x" + msgstr "Punkt 0x%x 0x%x" + + #: ../src/popup.c:230 + #, c-format + msgid "Screen %d %d" + msgstr "Bildschirm %d %d" + + #: ../src/popup.c:239 + msgid "Set as position" + msgstr "Als Position setzen" + + #: ../src/popup.c:240 + msgid "Set as destination" + msgstr "Als Ziel setzen" + + #: ../src/popup.c:241 + msgid "Add as bookmark" + msgstr "Als Lesezeichen aufnehmen" + + #~ msgid "two kilometers" + #~ msgstr "zwei Kilometer" + + #~ msgid "in two kilometers" + #~ msgstr "in zwei Kilometern" + + #~ msgid "three kilometers" + #~ msgstr "drei Kilometer" + + #~ msgid "in three kilometers" + #~ msgstr "in drei Kilometern" + + #~ msgid "four kilometers" + #~ msgstr "vier Kilometer" + + #~ msgid "in four kilometers" + #~ msgstr "in vier Kilometern" + + #~ msgid "%d kilometers" + #~ msgstr "%d Kilometer" + + #~ msgid "in %d kilometers" + #~ msgstr "In %d Kilometern" |
From: Martin S. <mar...@us...> - 2007-12-18 12:07:42
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18998/src Modified Files: navigation.c popup.c navit.c Log Message: Improved i18n Index: popup.c =================================================================== RCS file: /cvsroot/navit/navit/src/popup.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** popup.c 3 Dec 2007 13:17:19 -0000 1.18 --- popup.c 18 Dec 2007 12:07:40 -0000 1.19 *************** *** 4,7 **** --- 4,8 ---- #include <fcntl.h> #include <unistd.h> + #include <libintl.h> #include <glib.h> #include "popup.h" *************** *** 20,23 **** --- 21,25 ---- #include "route.h" + #define _(STRING) gettext(STRING) #if 0 static void *************** *** 225,230 **** popup=gui_popup_new(navit_get_gui(nav)); transform_reverse(navit_get_trans(nav), p, &co); ! men=popup_printf(popup, menu_type_submenu, "Point 0x%x 0x%x", co.x, co.y); ! popup_printf(men, menu_type_menu, "Screen %d %d", p->x, p->y); transform_to_geo(transform_get_projection(navit_get_trans(nav)), &co, &g); transform_geo_text(&g, buffer); --- 227,232 ---- popup=gui_popup_new(navit_get_gui(nav)); transform_reverse(navit_get_trans(nav), p, &co); ! men=popup_printf(popup, menu_type_submenu, _("Point 0x%x 0x%x"), co.x, co.y); ! popup_printf(men, menu_type_menu, _("Screen %d %d"), p->x, p->y); transform_to_geo(transform_get_projection(navit_get_trans(nav)), &co, &g); transform_geo_text(&g, buffer); *************** *** 235,241 **** c.x = co.x; c.y = co.y; ! popup_printf_cb(men, menu_type_menu, callback_new_2(callback_cast(popup_set_position), nav, &c), "Set as position"); ! popup_printf_cb(men, menu_type_menu, callback_new_2(callback_cast(popup_set_destination), nav, &c), "Set as destination"); ! popup_printf_cb(men, menu_type_menu, callback_new_2(callback_cast(popup_set_bookmark), nav, &c), "Add as bookmark"); popup_display(nav, popup, p); } --- 237,243 ---- c.x = co.x; c.y = co.y; ! popup_printf_cb(men, menu_type_menu, callback_new_2(callback_cast(popup_set_position), nav, &c), _("Set as position")); ! popup_printf_cb(men, menu_type_menu, callback_new_2(callback_cast(popup_set_destination), nav, &c), _("Set as destination")); ! popup_printf_cb(men, menu_type_menu, callback_new_2(callback_cast(popup_set_bookmark), nav, &c), _("Add as bookmark")); popup_display(nav, popup, p); } Index: navigation.c =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** navigation.c 29 Nov 2007 08:14:01 -0000 1.28 --- navigation.c 18 Dec 2007 12:07:40 -0000 1.29 *************** *** 190,220 **** } } ! switch (dist) { ! case 1000: ! if (is_length) ! return g_strdup_printf(_("one kilometer")); ! else ! return g_strdup_printf(_("in one kilometer")); ! case 2000: ! if (is_length) ! return g_strdup_printf(_("two kilometers")); ! else ! return g_strdup_printf(_("in two kilometers")); ! case 3000: ! if (is_length) ! return g_strdup_printf(_("three kilometers")); ! else ! return g_strdup_printf(_("in three kilometers")); ! case 4000: ! if (is_length) ! return g_strdup_printf(_("four kilometers")); ! else ! return g_strdup_printf(_("in four kilometers")); ! default: ! if (is_length) ! return g_strdup_printf(_("%d kilometers"), dist/1000); ! else ! return g_strdup_printf(_("in %d kilometers"), dist/1000); ! } } --- 190,197 ---- } } ! if (is_length) ! return g_strdup_printf(ngettext("one kilometer","%d kilometers", dist/1000), dist/1000); ! else ! return g_strdup_printf(ngettext("in one kilometer","in %d kilometers", dist/1000), dist/1000); } *************** *** 423,428 **** char *d,*ret; int delta=cmd->delta; ! int level,i,pos[3]; ! char *arg[3],*str[3]; level=1; if (delta < 0) { --- 400,404 ---- char *d,*ret; int delta=cmd->delta; ! int level; level=1; if (delta < 0) { *************** *** 467,487 **** } if (cmd->itm->next) { ! for (i = 0 ; i < 3 ; i++) ! arg[i]=NULL; ! pos[0]=atoi(_("strength_pos")); ! str[0]=strength; ! pos[1]=atoi(_("direction_pos")); ! str[1]=dir; ! pos[2]=atoi(_("distance_pos")); ! str[2]=d; ! ! for (i = 0 ; i < 3 ; i++) { ! if (pos[i] > 0 && pos[i] < 4) { ! arg[pos[i]-1]=str[i]; ! } else ! arg[i]=str[i]; ! } ! ! ret=g_strdup_printf(_("Turn %s%s %s"), arg[0], arg[1], arg[2]); } else --- 443,448 ---- } if (cmd->itm->next) { ! /* TRANSLATORS: The first argument is strength, the second direction and the third distance */ ! ret=g_strdup_printf(_("Turn %1$s%2$s %3$s"), strength, dir, d); } else Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** navit.c 16 Dec 2007 22:30:29 -0000 1.49 --- navit.c 18 Dec 2007 12:07:41 -0000 1.50 *************** *** 672,676 **** { if (men) ! this_->destinations=menu_add(men, "Former Destinations", menu_type_submenu, NULL); else this_->destinations=NULL; --- 672,676 ---- { if (men) ! this_->destinations=menu_add(men, _("Former Destinations"), menu_type_submenu, NULL); else this_->destinations=NULL; *************** *** 682,686 **** { if (men) ! this_->bookmarks=menu_add(men, "Bookmarks", menu_type_submenu, NULL); else this_->bookmarks=NULL; --- 682,686 ---- { if (men) ! this_->bookmarks=menu_add(men, _("Bookmarks"), menu_type_submenu, NULL); else this_->bookmarks=NULL; *************** *** 720,724 **** navit_add_menu_vehicle(struct navit *this_, struct menu *men) { ! men=menu_add(men, "Vehicle", menu_type_submenu, NULL); navit_add_menu_vehicles(this_, men); } --- 720,724 ---- navit_add_menu_vehicle(struct navit *this_, struct menu *men) { ! men=menu_add(men, _("Vehicle"), menu_type_submenu, NULL); navit_add_menu_vehicles(this_, men); } *************** *** 776,780 **** this_->roadbook_callback=callback_new_1(callback_cast(navit_window_roadbook_update), this_); navigation_register_callback(this_->navigation, attr_navigation_long, this_->roadbook_callback); ! this_->roadbook_window=gui_datawindow_new(this_->gui, "Roadbook", NULL, callback_new_1(callback_cast(navit_window_roadbook_destroy), this_)); navit_window_roadbook_update(this_); } --- 776,780 ---- this_->roadbook_callback=callback_new_1(callback_cast(navit_window_roadbook_update), this_); navigation_register_callback(this_->navigation, attr_navigation_long, this_->roadbook_callback); ! this_->roadbook_window=gui_datawindow_new(this_->gui, _("Roadbook"), NULL, callback_new_1(callback_cast(navit_window_roadbook_destroy), this_)); navit_window_roadbook_update(this_); } *************** *** 995,999 **** navigation_set_mapset(this_->navigation, ms); if (this_->menubar) { ! men=menu_add(this_->menubar, "Map", menu_type_submenu, NULL); if (men) { navit_add_menu_layout(this_, men); --- 995,999 ---- navigation_set_mapset(this_->navigation, ms); if (this_->menubar) { ! men=menu_add(this_->menubar, _("Map"), menu_type_submenu, NULL); if (men) { navit_add_menu_layout(this_, men); *************** *** 1002,1006 **** navit_add_menu_maps(this_, ms, men); } ! men=menu_add(this_->menubar, "Route", menu_type_submenu, NULL); if (men) { navit_add_menu_former_destinations(this_, men, this_->route); --- 1002,1006 ---- navit_add_menu_maps(this_, ms, men); } ! men=menu_add(this_->menubar, _("Route"), menu_type_submenu, NULL); if (men) { navit_add_menu_former_destinations(this_, men, this_->route); |
From: Martin S. <mar...@us...> - 2007-12-17 21:47:18
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14600 Modified Files: osm2navit.c Log Message: Added support for one-way in roundabouts Index: osm2navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/osm2navit.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** osm2navit.c 17 Dec 2007 10:05:28 -0000 1.18 --- osm2navit.c 17 Dec 2007 21:47:19 -0000 1.19 *************** *** 323,326 **** --- 323,332 ---- level=5; } + if (! strcmp(k,"junction")) { + if (! strcmp(v,"roundabout")) { + flags_attr_value=AF_ONEWAY; + flags_attr.len=2; + } + } if (! strcmp(k,"maxspeed")) { level=5; |
From: Martin S. <mar...@us...> - 2007-12-17 16:27:12
|
Update of /cvsroot/navit/navit/src/xpm In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3922 Added Files: attraction.xpm restroom.xpm swimming.xpm traffic_signals.xpm Log Message: Added some more icons from matth1 (thanks!) --- NEW FILE: swimming.xpm --- /* XPM */ static char * swimming_xpm[] = { "16 16 119 2", " c None", ". c #262CA6", "+ c #242CA6", "@ c #242DA7", "# c #232EA8", "$ c #232DA7", "% c #2131AB", "& c #2032AC", "* c #2233AB", "= c #2031AB", "- c #222EA8", "; c #222FA8", "> c #1C33AC", ", c #222EA7", "' c #0E44BC", ") c #0B4CC2", "! c #5584BF", "~ c #B9C7D9", "{ c #EFF3F5", "] c #5987BF", "^ c #1243BD", "/ c #1C36AF", "( c #1E33AC", "_ c #1E33AB", ": c #1B34AD", "< c #1937AE", "[ c #1B35AD", "} c #7B94B7", "| c #B3C1D3", "1 c #A4B7CE", "2 c #658ABD", "3 c #C0CEDE", "4 c #EEF1F4", "5 c #3778C9", "6 c #1D34AE", "7 c #212FA9", "8 c #3B69BD", "9 c #7190B9", "0 c #1048BC", "a c #212FA8", "b c #1935AF", "c c #1A35AE", "d c #1C35AD", "e c #2436AB", "f c #2230A9", "g c #0F46C0", "h c #183BB5", "i c #2051BC", "j c #E5EBEF", "k c #E3E9EF", "l c #2348B6", "m c #2446B4", "n c #F5F7F7", "o c #FEFFFB", "p c #93A8C1", "q c #1141B6", "r c #1A34AD", "s c #1E2FA8", "t c #173AB2", "u c #173CB4", "v c #2869C3", "w c #8799C4", "x c #D2D8E7", "y c #FEFEFE", "z c #D3DCE5", "A c #2739AC", "B c #EBF0F1", "C c #FDFEFA", "D c #869DBA", "E c #1F33AB", "F c #123CB4", "G c #1838B0", "H c #1A37AE", "I c #5A80B7", "J c #BDCAD9", "K c #F9FBF9", "L c #FCFDFB", "M c #FCFCFC", "N c #FCFCFA", "O c #C0CCDA", "P c #266DC4", "Q c #437ABF", "R c #084EC2", "S c #1D33AB", "T c #1837AF", "U c #3355B1", "V c #AFBED1", "W c #7C96B6", "X c #A8B9CE", "Y c #6B8DB7", "Z c #A2B6CC", "` c #7291B8", " . c #9BB0C9", ".. c #7391B7", "+. c #93AAC3", "@. c #3E78C0", "#. c #1441B7", "$. c #1A3AAF", "%. c #0349BD", "&. c #2A37A8", "*. c #516BAE", "=. c #7E96B4", "-. c #6788B5", ";. c #8098B6", ">. c #6588B7", ",. c #859CB9", "'. c #6C8DB6", "). c #7A96B6", "!. c #6C8BB6", "~. c #7E97B6", "{. c #5F84B7", "]. c #7790B3", "^. c #4375B9", "/. c #708CB2", "(. c #2F64B3", "_. c #1B35AC", ":. c #252CA6", "<. c #2130A9", "[. c #1F32AB", ". . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . + ", "@ # $ # % & * & & = - + - $ ; > ", ", - ' ) ! ~ { ] ^ . = / ( _ . : ", "< [ } | 1 2 3 4 5 6 7 8 9 0 a b ", "c d e f g h i j k l m n o p q . ", "r s t u v w x y y z A B C D E F ", "G H I J K L y M y N O P Q R S T ", ". U V W X Y Z ` ...+.@.#._ $.%.", "&.*.=.-.;.>.,.'.).!.~.{.].^./.(.", "_.:.. . :.:.<.[.<.# ; ; - - , , ", ":.. . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . ", ":.. . . . . . . . . . . . . . . "}; --- NEW FILE: traffic_signals.xpm --- /* XPM */ static char * traffic_signals_xpm[] = { "16 16 120 2", " c None", ". c #FBF9F9", "+ c #D2D2D2", "@ c #CCCCCC", "# c #C5C2C2", "$ c #C4BFBD", "% c #D3CFC9", "& c #DDDDDC", "* c #FFFEFC", "= c #F0EFEF", "- c #2D2B2B", "; c #3D1618", "> c #5F0101", ", c #5F0205", "' c #42221E", ") c #5B5A59", "! c #EEECEC", "~ c #0C0505", "{ c #8C0007", "] c #E90002", "^ c #E80103", "/ c #5A0202", "( c #433D3A", "_ c #F0EDED", ": c #490E0D", "< c #CF0006", "[ c #F70301", "} c #F20200", "| c #9A0300", "1 c #483937", "2 c #EFEAEA", "3 c #250A09", "4 c #8B0202", "5 c #E70401", "6 c #E00004", "7 c #520002", "8 c #4D3E3F", "9 c #FCFAFA", "0 c #EDE4E4", "a c #0D0606", "b c #1F0603", "c c #843B01", "d c #652703", "e c #110302", "f c #423939", "g c #F9F8F8", "h c #EEE8E9", "i c #171408", "j c #8D9202", "k c #E7ED02", "l c #E1E602", "m c #5F5900", "n c #5C4644", "o c #F7F6F6", "p c #EFE9E9", "q c #362F06", "r c #C8CB02", "s c #F9FE02", "t c #F8FD03", "u c #ABB100", "v c #635045", "w c #F8F8F8", "x c #2C2509", "y c #B9BE04", "z c #F5FF03", "A c #F8FE02", "B c #929C00", "C c #624E48", "D c #EEE9E9", "E c #110906", "F c #4C5001", "G c #BBC401", "H c #A1A603", "I c #2D2D05", "J c #5F494C", "K c #0C0908", "L c #013703", "M c #058301", "N c #017306", "O c #002303", "P c #5E464A", "Q c #081C04", "R c #029A07", "S c #02D204", "T c #02D104", "U c #027403", "V c #524843", "W c #FCFCFC", "X c #EFEBE9", "Y c #0C2906", "Z c #02AB03", "` c #00D108", " . c #02D307", ".. c #029705", "+. c #383E37", "@. c #FDFDFD", "#. c #EFEDEB", "$. c #0A170A", "%. c #067905", "&. c #02C005", "*. c #02B704", "=. c #095003", "-. c #4A3F3E", ";. c #F7F7F7", ">. c #F1EEEB", ",. c #252321", "'. c #0B1A07", "). c #104809", "!. c #123F09", "~. c #101208", "{. c #565454", "]. c #FEFEFE", "^. c #FCFAF8", "/. c #CCCAC8", "(. c #C4C2C1", "_. c #C5C1C1", ":. c #C6C2C2", "<. c #C4C3C3", "[. c #DCDBDB", "}. c #FFFEFE", " . + @ # $ % & * ", " = - ; > , ' ) ", " ! ~ { ] ^ / ( ", " _ : < [ } | 1 ", " 2 3 4 5 6 7 8 9 ", " 0 a b c d e f g ", " h i j k l m n o ", " p q r s t u v w ", " p x y z A B C ", " D E F G H I J ", " D K L M N O P ", " D Q R S T U V W ", " X Y Z ` ...+.@. ", " #.$.%.&.*.=.-.;. ", " >.,.'.).!.~.{.]. ", " ^./.(._.:.<.[.}. "}; --- NEW FILE: restroom.xpm --- /* XPM */ static char * restroom_xpm[] = { "16 16 115 2", " c None", ". c #262CA6", "+ c #2C32A8", "@ c #6D71C2", "# c #3A3FAE", "$ c #2A30A8", "% c #8689CB", "& c #484DB4", "* c #3C42AF", "= c #9699D4", "- c #FEFEFE", "; c #CACBE8", "> c #2E34A9", ", c #E0E0F1", "' c #4E53B6", ") c #FCFCFD", "! c #EDEEF6", "~ c #2D33A9", "{ c #8286CB", "] c #FCFCFC", "^ c #ACAFDC", "/ c #484DB3", "( c #F6F7FA", "_ c #E4E5F3", ": c #2C31A8", "< c #484EB4", "[ c #A0A2D7", "} c #B4B6E0", "| c #A3A6D8", "1 c #4F54B6", "2 c #6065BD", "3 c #A8ABDB", "4 c #BBBDE2", "5 c #B2B4DF", "6 c #A1A4D8", "7 c #272DA6", "8 c #D0D1EA", "9 c #FFFEFE", "0 c #FFFFFF", "a c #FFFFFE", "b c #DADBEE", "c c #E1E1F1", "d c #BEBFE3", "e c #3D42AF", "f c #DFE0F0", "g c #E8E8F4", "h c #EEEFF7", "i c #CED0E9", "j c #474CB3", "k c #262CA5", "l c #E9EAF6", "m c #E7E8F4", "n c #E7E7F4", "o c #C6C6E6", "p c #7D80C9", "q c #B8B9E0", "r c #FEFEFD", "s c #AEB0DD", "t c #898CCE", "u c #AAADDC", "v c #A9ACDB", "w c #C8C9E8", "x c #BDBFE2", "y c #B6B9E0", "z c #B0B2DE", "A c #CBCDE8", "B c #AAACDB", "C c #CBCCE9", "D c #8184CA", "E c #C8C9E7", "F c #CED0EA", "G c #7A7EC8", "H c #E3E4F2", "I c #A8AADA", "J c #A7AADA", "K c #C5C7E6", "L c #343AAC", "M c #F9F9FB", "N c #3B41AE", "O c #3439AB", "P c #9B9ED5", "Q c #DDDEF0", "R c #777BC6", "S c #3036AA", "T c #4A50B4", "U c #A7AADB", "V c #DADBEF", "W c #E6E7F4", "X c #A9ACDC", "Y c #5156B7", "Z c #2F34AA", "` c #CCCEEA", " . c #F6F6FA", ".. c #767AC6", "+. c #AAADDB", "@. c #A5A8DA", "#. c #C0C2E4", "$. c #E0E1F0", "%. c #AAAEDC", "&. c #A6A9DA", "*. c #C0C3E5", "=. c #AAAEDB", "-. c #A7A9DA", ";. c #A0A3D6", ">. c #9598D3", ",. c #B8BAE0", "'. c #9498D2", "). c #C9CAE8", "!. c #F2F3F8", "~. c #7276C4", "{. c #282EA6", "]. c #2A2FA7", "^. c #292FA7", "/. c #7074C3", "(. c #4248B1", ". . + @ # . . $ % . . . & * . . ", ". . = - ; . . > , . . ' ) ! ~ . ", ". . { ] ^ . . > , . . / ( _ : . ", ". < [ } | 1 . > , . 2 3 4 5 6 ' ", "7 8 9 0 a b . > , . c 0 0 0 0 d ", "e f g 0 h i j > , k l m 0 a n o ", "p q - 0 r s t > , . g u 0 a v w ", "x y 0 0 0 z A > , . g u 0 a B C ", "D E 0 0 0 F G > , k H I 0 a J K ", "L M 0 0 0 ] N > , . O P Q M R S ", "T U Q V W X Y Z , . . P ` .... ", ". . +.@.#.. . > $.. . P ` .... ", ". . %.&.*.. . > , . . P ` .... ", ". . =.-.*.. . > , . . P ` .... ", ". . ;.>.,.. . > , . . '.).!.~.. ", ". . {.. ].. . ^./.. . S * (.+ . "}; --- NEW FILE: attraction.xpm --- /* XPM */ static char * attraction_xpm[] = { "16 16 122 2", " c None", ". c #CC1400", "+ c #AE1100", "@ c #FB1800", "# c #BA1200", "$ c #FF1900", "% c #F61800", "& c #DA1500", "* c #DE1500", "= c #E51600", "- c #C31300", "; c #810C00", "> c #F01700", ", c #FE1800", "' c #8B0D00", ") c #8D0D00", "! c #D21400", "~ c #BB1200", "{ c #9D0F00", "] c #B21100", "^ c #AF1100", "/ c #AC1000", "( c #D61500", "_ c #8C0D00", ": c #C11200", "< c #D71500", "[ c #9F0F00", "} c #D31400", "| c #C71300", "1 c #920E00", "2 c #F81800", "3 c #CD1400", "4 c #EE1700", "5 c #DC1500", "6 c #F71800", "7 c #840D00", "8 c #B31100", "9 c #E61600", "0 c #A41000", "a c #970E00", "b c #8A0D00", "c c #B61100", "d c #D11400", "e c #990F00", "f c #8E0D00", "g c #C81300", "h c #EB1700", "i c #E41600", "j c #E71600", "k c #B91200", "l c #B81200", "m c #EC1700", "n c #C61300", "o c #950E00", "p c #E01600", "q c #DB1500", "r c #9C0F00", "s c #AA1000", "t c #C01200", "u c #FA1800", "v c #E31600", "w c #DF1500", "x c #F91800", "y c #940E00", "z c #F31700", "A c #EF1700", "B c #D51400", "C c #B11100", "D c #890D00", "E c #A10F00", "F c #840C00", "G c #F11700", "H c #930E00", "I c #BE1200", "J c #FC1800", "K c #850D00", "L c #F51800", "M c #860D00", "N c #DD1500", "O c #A91000", "P c #EA1700", "Q c #E81600", "R c #FD1800", "S c #A61000", "T c #F41700", "U c #E11600", "V c #B41100", "W c #A00F00", "X c #D91500", "Y c #F21700", "Z c #C91300", "` c #960E00", " . c #CF1400", ".. c #980E00", "+. c #D41400", "@. c #820C00", "#. c #A20F00", "$. c #D61400", "%. c #BF1200", "&. c #830C00", "*. c #9A0F00", "=. c #D01400", "-. c #A71000", ";. c #CA1300", ">. c #B51100", ",. c #EA1600", "'. c #E21600", "). c #E91600", "!. c #A81000", "~. c #B01100", "{. c #F41800", "]. c #8E0E00", "^. c #CB1300", "/. c #ED1700", "(. c #D81500", "_. c #C51300", ":. c #AD1100", "<. c #BD1200", "[. c #CE1400", "}. c #C21300", "|. c #910E00", "1. c #C41300", " ", " $ { ", " $ $ ", " $ $ ", " $ $ ", " $ $ $ $ ", "$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ ", " $ $ $ $ $ $ $ $ $ $ $ $ ", " $ $ $ $ $ $ $ $ $ $ ", " $ $ $ $ $ $ $ $ ", " $ $ $ $ $ $ ", " $ $ $ $ $ $ $ $ ", " $ $ $ $ $ $ $ ", " $ $ $ $ ", " $ $ $ ", " $ $ "}; |
From: Alexander A. <za...@us...> - 2007-12-17 15:13:56
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv643 Modified Files: main.c Log Message: Support for SDL embedding too, Special Thanks goes to tripzero Index: main.c =================================================================== RCS file: /cvsroot/navit/navit/src/main.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** main.c 27 Nov 2007 09:29:39 -0000 1.18 --- main.c 17 Dec 2007 15:13:45 -0000 1.19 *************** *** 134,138 **** gdk_rgb_init(); #endif ! config_file=NULL; if (argc > 1) --- 134,141 ---- gdk_rgb_init(); #endif ! s = getenv("NAVIT_WID"); ! if (s) { ! setenv("SDL_WINDOWID", s, 0); ! } config_file=NULL; if (argc > 1) |
From: KaZeR <ka...@us...> - 2007-12-17 12:10:33
|
Update of /cvsroot/navit/navit/po In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18082 Modified Files: fr.po Log Message: Updated translation by Zilux, which fixes the distance translation Index: fr.po =================================================================== RCS file: /cvsroot/navit/navit/po/fr.po,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** fr.po 25 Nov 2007 16:24:15 -0000 1.29 --- fr.po 17 Dec 2007 12:10:33 -0000 1.30 *************** *** 8,13 **** "Project-Id-Version: Navit 0.0.3\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2007-11-25 15:41+0100\n" ! "PO-Revision-Date: 2007-07-16 13:54+0100\n" "Last-Translator: KaZeR <ka...@al...>\n" "Language-Team: KaZeR <ka...@al...>\n" --- 8,13 ---- "Project-Id-Version: Navit 0.0.3\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2007-12-17 11:17+0100\n" ! "PO-Revision-Date: 2007-12-17 11:36+0100\n" "Last-Translator: KaZeR <ka...@al...>\n" "Language-Team: KaZeR <ka...@al...>\n" *************** *** 22,44 **** #: ../src/main.c:110 ! #, fuzzy, c-format msgid "setting '%s' to '%s'\n" ! msgstr "Utilisation de '%s'\n" #: ../src/main.c:170 ! msgid "No config file navit.xml or navit.xml.local found\n" msgstr "Fichier de configuration navit.xml ou navit.xml.local non trouvé\n" ! #: ../src/main.c:172 #, c-format msgid "Error parsing '%s': %s\n" msgstr "Erreur lors du traitement de '%s': %s\n" ! #: ../src/main.c:174 #, c-format msgid "Using '%s'\n" msgstr "Utilisation de '%s'\n" ! #: ../src/main.c:177 #, c-format msgid "No instance has been created, exiting\n" --- 22,45 ---- #: ../src/main.c:110 ! #, c-format msgid "setting '%s' to '%s'\n" ! msgstr "'%s' mis à '%s'\n" #: ../src/main.c:170 ! #, c-format ! msgid "No config file navit.xml, navit.xml.local found\n" msgstr "Fichier de configuration navit.xml ou navit.xml.local non trouvé\n" ! #: ../src/main.c:174 #, c-format msgid "Error parsing '%s': %s\n" msgstr "Erreur lors du traitement de '%s': %s\n" ! #: ../src/main.c:177 #, c-format msgid "Using '%s'\n" msgstr "Utilisation de '%s'\n" ! #: ../src/main.c:180 #, c-format msgid "No instance has been created, exiting\n" *************** *** 51,57 **** #: ../src/navigation.c:175 ! #, fuzzy, c-format msgid "in %d m" ! msgstr "Dans %d m, tournez %s%s" #: ../src/navigation.c:179 --- 52,58 ---- #: ../src/navigation.c:175 ! #, c-format msgid "in %d m" ! msgstr "dans %d m" #: ../src/navigation.c:179 *************** *** 61,72 **** #: ../src/navigation.c:181 ! #, fuzzy, c-format msgid "in %d meters" ! msgstr "Dans %d m, tournez %s%s" #: ../src/navigation.c:187 #, c-format msgid "%d.%d kilometer" ! msgstr "%d.%d kilomètres" #: ../src/navigation.c:189 --- 62,73 ---- #: ../src/navigation.c:181 ! #, c-format msgid "in %d meters" ! msgstr "dans %d mètres" #: ../src/navigation.c:187 #, c-format msgid "%d.%d kilometer" ! msgstr "%d,%d kilomètres" #: ../src/navigation.c:189 *************** *** 85,89 **** #: ../src/navigation.c:200 msgid "two kilometers" ! msgstr "deux kilomètre" #: ../src/navigation.c:202 --- 86,90 ---- #: ../src/navigation.c:200 msgid "two kilometers" ! msgstr "deux kilomètres" #: ../src/navigation.c:202 *************** *** 173,188 **** #, c-format msgid "Turn %s%s %s" ! msgstr "%s Tournez %s%s" #: ../src/navigation.c:488 ! #, fuzzy, c-format msgid "You have reached your destination %s" ! msgstr "Dans %d m, vous êtes arrivé." ! #: ../src/navit.c:548 ../src/gui/gtk/gui_gtk_action.c:186 msgid "Layout" msgstr "Calques" ! #: ../src/navit.c:561 msgid "Projection" msgstr "Projection" --- 174,189 ---- #, c-format msgid "Turn %s%s %s" ! msgstr "%s tournez %s%s" #: ../src/navigation.c:488 ! #, c-format msgid "You have reached your destination %s" ! msgstr "Vous êtes arrivé à votre destination %s" ! #: ../src/navit.c:603 ../src/gui/gtk/gui_gtk_action.c:185 msgid "Layout" msgstr "Calques" ! #: ../src/navit.c:619 msgid "Projection" msgstr "Projection" *************** *** 234,238 **** #: ../src/country.c:35 msgid "Egypt" ! msgstr "Egypte" #: ../src/country.c:36 --- 235,239 ---- #: ../src/country.c:35 msgid "Egypt" ! msgstr "Ãgypte" #: ../src/country.c:36 *************** *** 460,553 **** msgstr "Numéro" ! #: ../src/gui/gtk/gui_gtk_action.c:183 msgid "Display" msgstr "Affichage" ! #: ../src/gui/gtk/gui_gtk_action.c:184 msgid "Route" msgstr "Route" ! #: ../src/gui/gtk/gui_gtk_action.c:185 msgid "Map" msgstr "Carte" ! #: ../src/gui/gtk/gui_gtk_action.c:187 msgid "ZoomOut" msgstr "Zoom Arrière" ! #: ../src/gui/gtk/gui_gtk_action.c:188 msgid "ZoomIn" msgstr "Zoom Avant" ! #: ../src/gui/gtk/gui_gtk_action.c:189 msgid "Refresh" msgstr "Rafraichir" ! #: ../src/gui/gtk/gui_gtk_action.c:190 msgid "Roadbook" msgstr "Carnet de route" ! #: ../src/gui/gtk/gui_gtk_action.c:192 ../src/gui/gtk/gui_gtk_action.c:194 msgid "Info" msgstr "Info" ! #: ../src/gui/gtk/gui_gtk_action.c:196 msgid "Destination" msgstr "Destination" ! #: ../src/gui/gtk/gui_gtk_action.c:197 msgid "Clear" msgstr "Effacer" ! #: ../src/gui/gtk/gui_gtk_action.c:198 msgid "Test" msgstr "Test" ! #: ../src/gui/gtk/gui_gtk_action.c:199 msgid "_Quit" msgstr "_Quitter" ! #: ../src/gui/gtk/gui_gtk_action.c:206 msgid "Cursor" msgstr "Curseur" ! #: ../src/gui/gtk/gui_gtk_action.c:207 msgid "Tracking" msgstr "Suivi" ! #: ../src/gui/gtk/gui_gtk_action.c:208 msgid "Orientation" msgstr "Orientation" ! #: ../src/gui/gtk/gui_gtk_action.c:210 ../src/gui/gtk/gui_gtk_action.c:212 msgid "Fullscreen" msgstr "Plein écran" ! #: ../src/gui/gtk/gui_gtk_action.c:220 msgid "Data" msgstr "Données" ! #: ../src/gui/gtk/gui_gtk_action.c:221 msgid "VisibleBlocks" ! msgstr "VisibleBlocks" ! #: ../src/gui/gtk/gui_gtk_action.c:222 msgid "VisibleTowns" ! msgstr "VisibleTowns" ! #: ../src/gui/gtk/gui_gtk_action.c:223 msgid "VisiblePolys" ! msgstr "VisiblePolys" ! #: ../src/gui/gtk/gui_gtk_action.c:224 msgid "VisibleStreets" ! msgstr "VisibleStreets" ! #: ../src/gui/gtk/gui_gtk_action.c:225 msgid "VisiblePoints" ! msgstr "VisiblePoints" ! #: ../src/gui/gtk/gui_gtk_action.c:226 ! #, fuzzy msgid "RouteGraph" ! msgstr "Route" --- 461,553 ---- msgstr "Numéro" ! #: ../src/gui/gtk/gui_gtk_action.c:182 msgid "Display" msgstr "Affichage" ! #: ../src/gui/gtk/gui_gtk_action.c:183 msgid "Route" msgstr "Route" ! #: ../src/gui/gtk/gui_gtk_action.c:184 msgid "Map" msgstr "Carte" ! #: ../src/gui/gtk/gui_gtk_action.c:186 msgid "ZoomOut" msgstr "Zoom Arrière" ! #: ../src/gui/gtk/gui_gtk_action.c:187 msgid "ZoomIn" msgstr "Zoom Avant" ! #: ../src/gui/gtk/gui_gtk_action.c:188 msgid "Refresh" msgstr "Rafraichir" ! #: ../src/gui/gtk/gui_gtk_action.c:189 msgid "Roadbook" msgstr "Carnet de route" ! #: ../src/gui/gtk/gui_gtk_action.c:191 ../src/gui/gtk/gui_gtk_action.c:193 msgid "Info" msgstr "Info" ! #: ../src/gui/gtk/gui_gtk_action.c:195 msgid "Destination" msgstr "Destination" ! #: ../src/gui/gtk/gui_gtk_action.c:196 msgid "Clear" msgstr "Effacer" ! #: ../src/gui/gtk/gui_gtk_action.c:197 msgid "Test" msgstr "Test" ! #: ../src/gui/gtk/gui_gtk_action.c:198 msgid "_Quit" msgstr "_Quitter" ! #: ../src/gui/gtk/gui_gtk_action.c:205 msgid "Cursor" msgstr "Curseur" ! #: ../src/gui/gtk/gui_gtk_action.c:206 msgid "Tracking" msgstr "Suivi" ! #: ../src/gui/gtk/gui_gtk_action.c:207 msgid "Orientation" msgstr "Orientation" ! #: ../src/gui/gtk/gui_gtk_action.c:209 ../src/gui/gtk/gui_gtk_action.c:211 msgid "Fullscreen" msgstr "Plein écran" ! #: ../src/gui/gtk/gui_gtk_action.c:219 msgid "Data" msgstr "Données" ! #: ../src/gui/gtk/gui_gtk_action.c:220 msgid "VisibleBlocks" ! msgstr "Blocs visibles" ! #: ../src/gui/gtk/gui_gtk_action.c:221 msgid "VisibleTowns" ! msgstr "Villes visibles" ! #: ../src/gui/gtk/gui_gtk_action.c:222 msgid "VisiblePolys" ! msgstr "Polys visibles" ! #: ../src/gui/gtk/gui_gtk_action.c:223 msgid "VisibleStreets" ! msgstr "Rues visibles" ! #: ../src/gui/gtk/gui_gtk_action.c:224 msgid "VisiblePoints" ! msgstr "Points visibles" ! #: ../src/gui/gtk/gui_gtk_action.c:225 msgid "RouteGraph" ! msgstr "RouteGraph" |
From: Alexander A. <za...@us...> - 2007-12-17 11:15:17
|
Update of /cvsroot/navit/navit/src/gui/sdl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29708 Modified Files: gui_sdl_window.cpp Log Message: Remove the sleep(1) install timeout and do a blocking check for events Index: gui_sdl_window.cpp =================================================================== RCS file: /cvsroot/navit/navit/src/gui/sdl/gui_sdl_window.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** gui_sdl_window.cpp 14 Dec 2007 15:56:07 -0000 1.37 --- gui_sdl_window.cpp 17 Dec 2007 11:15:17 -0000 1.38 *************** *** 161,172 **** } ! static int gui_run_main_loop(struct gui_priv *this_) { using namespace CEGUI; dbg(0,"Entering main loop\n"); bool must_quit = false; ! // get "run-time" in seconds double last_time_pulse = static_cast<double>(SDL_GetTicks()); --- 161,177 ---- } ! static gboolean gui_timeout_cb(gpointer data) { + return TRUE; + } + static int gui_run_main_loop(struct gui_priv *this_) + { + GSource *timeout; using namespace CEGUI; dbg(0,"Entering main loop\n"); bool must_quit = false; ! // get "run-time" in seconds double last_time_pulse = static_cast<double>(SDL_GetTicks()); *************** *** 179,183 **** t=navit_get_trans(this_->nav); ! transform_set_size(t, 800, 600); navit_draw(this_->nav); --- 184,188 ---- t=navit_get_trans(this_->nav); ! transform_set_size(t, 800, 600); navit_draw(this_->nav); *************** *** 192,196 **** ); ! while (!must_quit) { --- 197,203 ---- ); ! timeout = g_timeout_source_new(100); ! g_source_set_callback(timeout, gui_timeout_cb, NULL, NULL); ! g_source_attach(timeout, NULL); while (!must_quit) { *************** *** 219,224 **** if(enable_timer) profile(0,"graphics_redraw"); ! if (!g_main_context_iteration (NULL, FALSE)) ! sleep(1); if(enable_timer) profile(0,"main context"); --- 226,233 ---- if(enable_timer) profile(0,"graphics_redraw"); ! // if (!g_main_context_iteration (NULL, FALSE)) ! // sleep(1); ! g_main_context_iteration (NULL, TRUE); ! // sleep(1); if(enable_timer) profile(0,"main context"); *************** *** 264,268 **** SDL_GL_SwapBuffers(); } ! } --- 273,277 ---- SDL_GL_SwapBuffers(); } ! g_source_destroy(timeout); } |
From: KaZeR <ka...@us...> - 2007-12-17 10:05:26
|
Update of /cvsroot/navit/navit/src/data/binfile In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21514/data/binfile Modified Files: binfile.c Log Message: Added Aurelient's patch about street_name for osm Index: binfile.c =================================================================== RCS file: /cvsroot/navit/navit/src/data/binfile/binfile.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** binfile.c 6 Dec 2007 21:41:22 -0000 1.10 --- binfile.c 17 Dec 2007 10:05:29 -0000 1.11 *************** *** 111,114 **** --- 111,116 ---- size=*(t->pos_attr++); type=t->pos_attr[0]; + if (type == attr_street_name || type == attr_street_name_systematic) + type = attr_label; if (type == attr_type || attr_type == attr_any) { if (attr_type == attr_any) { |
From: KaZeR <ka...@us...> - 2007-12-17 10:05:26
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21514 Modified Files: osm2navit.c Log Message: Added Aurelient's patch about street_name for osm Index: osm2navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/osm2navit.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** osm2navit.c 13 Dec 2007 14:25:03 -0000 1.17 --- osm2navit.c 17 Dec 2007 10:05:28 -0000 1.18 *************** *** 233,236 **** --- 233,246 ---- char label_attr_buffer[1024]; + struct attr_bin street_name_attr = { + 0, attr_street_name + }; + char street_name_attr_buffer[1024]; + + struct attr_bin street_name_systematic_attr = { + 0, attr_street_name_systematic + }; + char street_name_systematic_attr_buffer[1024]; + struct attr_bin debug_attr = { 0, attr_debug *************** *** 325,333 **** --- 335,352 ---- level=5; if (! strcmp(k,"name")) { + if (in_way) { + strcpy(street_name_attr_buffer, v); + pad_text_attr(&street_name_attr, street_name_attr_buffer); + } else { strcpy(label_attr_buffer, v); pad_text_attr(&label_attr, label_attr_buffer); + } level=5; } if (! strcmp(k,"ref")) { + if (in_way) { + strcpy(street_name_systematic_attr_buffer, v); + pad_text_attr(&street_name_systematic_attr, street_name_systematic_attr_buffer); + } level=5; } *************** *** 460,463 **** --- 479,483 ---- nodeid=id; item.type=type_point_unkn; + label_attr.len=0; debug_attr.len=0; sprintf(debug_attr_buffer,"nodeid=%d", nodeid); *************** *** 570,574 **** coord_count=0; item.type=type_street_unkn; ! label_attr.len=0; debug_attr.len=0; flags_attr.len=0; --- 590,595 ---- coord_count=0; item.type=type_street_unkn; ! street_name_attr.len=0; ! street_name_systematic_attr.len=0; debug_attr.len=0; flags_attr.len=0; *************** *** 608,613 **** } pad_text_attr(&debug_attr, debug_attr_buffer); ! if (label_attr.len) ! alen+=label_attr.len+1; if (debug_attr.len) alen+=debug_attr.len+1; --- 629,636 ---- } pad_text_attr(&debug_attr, debug_attr_buffer); ! if (street_name_attr.len) ! alen+=street_name_attr.len+1; ! if (street_name_systematic_attr.len) ! alen+=street_name_systematic_attr.len+1; if (debug_attr.len) alen+=debug_attr.len+1; *************** *** 618,622 **** fwrite(&item, sizeof(item), 1, out); fwrite(coord_buffer, coord_count*sizeof(struct coord), 1, out); ! write_attr(out, &label_attr, label_attr_buffer); write_attr(out, &debug_attr, debug_attr_buffer); write_attr(out, &flags_attr, &flags_attr_value); --- 641,646 ---- fwrite(&item, sizeof(item), 1, out); fwrite(coord_buffer, coord_count*sizeof(struct coord), 1, out); ! write_attr(out, &street_name_attr, street_name_attr_buffer); ! write_attr(out, &street_name_systematic_attr, street_name_systematic_attr_buffer); write_attr(out, &debug_attr, debug_attr_buffer); write_attr(out, &flags_attr, &flags_attr_value); |
From: KaZeR <ka...@us...> - 2007-12-16 22:30:26
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16699 Modified Files: navit.c Log Message: Changed radius of point selection to ease use of navit on OpenMoko Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** navit.c 11 Dec 2007 10:50:09 -0000 1.48 --- navit.c 16 Dec 2007 22:30:29 -0000 1.49 *************** *** 241,245 **** dx=(p->x-this_->pressed.x); dy=(p->y-this_->pressed.y); ! if (dx < -4 || dx > 4 || dy < -4 || dy > 4) { if (this_->button_timeout) { g_source_remove(this_->button_timeout); --- 241,245 ---- dx=(p->x-this_->pressed.x); dy=(p->y-this_->pressed.y); ! if (dx < -8 || dx > 8 || dy < -8 || dy > 8) { if (this_->button_timeout) { g_source_remove(this_->button_timeout); |