profile/ivi/navit.git
12 years agoFix:gui_internal:Remove visual glitch in Route Description list
mdankov [Sat, 21 Jan 2012 22:59:42 +0000 (22:59 +0000)]
Fix:gui_internal:Remove visual glitch in Route Description list

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4908 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:binding_win32:Out-of-source autotools build for WinCE should be working now
mdankov [Sat, 21 Jan 2012 22:32:30 +0000 (22:32 +0000)]
Fix:binding_win32:Out-of-source autotools build for WinCE should be working now

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4907 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:maptool:fixed a wrong operator in function geom_poly_segments_group() ;
tegzed [Sat, 21 Jan 2012 15:58:46 +0000 (15:58 +0000)]
Fix:maptool:fixed a wrong operator in function geom_poly_segments_group() ;
            eliminated some compiler warnings

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4906 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_internal: Made route description items clickable
mdankov [Fri, 20 Jan 2012 23:54:27 +0000 (23:54 +0000)]
Add:gui_internal: Made route description items clickable

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4905 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_internal:Rearranged Prev and Next buttons and their icons to take less vertic...
mdankov [Fri, 20 Jan 2012 23:28:15 +0000 (23:28 +0000)]
Fix:gui_internal:Rearranged Prev and Next buttons and their icons to take less vertical place on screen.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4904 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:bindings_win32:adjust svn ignore
woglinde [Fri, 20 Jan 2012 23:01:03 +0000 (23:01 +0000)]
Fix:bindings_win32:adjust svn ignore

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4903 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_internal:Fixed memleak in route description code.
mdankov [Fri, 20 Jan 2012 21:55:01 +0000 (21:55 +0000)]
Fix:gui_internal:Fixed memleak in route description code.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4902 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_internal:Made search result lists pageable when onscreen keyboard is hidden...
mdankov [Fri, 20 Jan 2012 21:47:26 +0000 (21:47 +0000)]
Add:gui_internal:Made search result lists pageable when onscreen keyboard is hidden. See #1001.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4901 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:When destroying the graphics, destroy the graphics_gc's too, guard graphics_...
woglinde [Fri, 20 Jan 2012 21:32:30 +0000 (21:32 +0000)]
Fix:core:When destroying the graphics, destroy the graphics_gc's too, guard graphics_destroy_gc against null pointer

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4900 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:clean up a bit the destroy function
woglinde [Fri, 20 Jan 2012 21:32:10 +0000 (21:32 +0000)]
Fix:core:clean up a bit the destroy function

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4899 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:Fix memleak
woglinde [Fri, 20 Jan 2012 21:31:49 +0000 (21:31 +0000)]
Fix:core:Fix memleak

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4898 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core: Fix the format specifier for g_strdup_printf, compiler warning with gcc...
woglinde [Fri, 20 Jan 2012 21:31:29 +0000 (21:31 +0000)]
Fix:core: Fix the format specifier for g_strdup_printf, compiler warning with gcc and clang

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4897 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core: Fix the format specifier for g_strdup_printf, compiler warning with gcc...
woglinde [Fri, 20 Jan 2012 21:31:08 +0000 (21:31 +0000)]
Fix:core: Fix the format specifier for g_strdup_printf, compiler warning with gcc and clang

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4896 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agofix:map/csv: fix order of headers, config.h needs to be load first
woglinde [Thu, 19 Jan 2012 22:23:16 +0000 (22:23 +0000)]
fix:map/csv: fix order of headers, config.h needs to be load first

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4895 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:port_windows:Remove resource.rsc when making clean
mdankov [Thu, 19 Jan 2012 21:46:54 +0000 (21:46 +0000)]
Fix:port_windows:Remove resource.rsc when making clean

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4894 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:binding_win32:Repair autotools build for wince broken in r4892
mdankov [Thu, 19 Jan 2012 21:43:56 +0000 (21:43 +0000)]
Fix:binding_win32:Repair autotools build for wince broken in r4892

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4893 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:core:New binding_win32 module for Windows and WinCE. Some details are at ticket...
mdankov [Wed, 18 Jan 2012 21:11:59 +0000 (21:11 +0000)]
Add:core:New binding_win32 module for Windows and WinCE. Some details are at ticket #970.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4892 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:osd/core:fix compilation on windows platforms
tegzed [Mon, 16 Jan 2012 07:00:31 +0000 (07:00 +0000)]
Fix:osd/core:fix compilation on windows platforms

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4891 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:maptool:added initial support for relation based areas; added some tests to avoid...
tegzed [Sun, 15 Jan 2012 17:28:12 +0000 (17:28 +0000)]
Add:maptool:added initial support for relation based areas; added some tests to avoid generating self-intersecting area items

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4890 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agofix:osd/core:fixed distance calculation in route_guard
tegzed [Sat, 14 Jan 2012 20:06:43 +0000 (20:06 +0000)]
fix:osd/core:fixed distance calculation in route_guard

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4889 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoPatch:Translations:pt_BR strings|Fixes #994. Thanks leonardohamada!
korrosa [Sat, 7 Jan 2012 12:22:23 +0000 (12:22 +0000)]
Patch:Translations:pt_BR strings|Fixes #994. Thanks leonardohamada!

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4888 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:remove duplicate variable definitions
tegzed [Thu, 5 Jan 2012 19:28:14 +0000 (19:28 +0000)]
Fix:remove duplicate variable definitions

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4887 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:Fix crash when set_destination() is called from command interface without...
mdankov [Tue, 3 Jan 2012 21:05:01 +0000 (21:05 +0000)]
Fix:core:Fix crash when set_destination() is called from command interface without its last parameter, description.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4886 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:core:New command in command interface set_position() to set route start point...
mdankov [Tue, 3 Jan 2012 21:02:59 +0000 (21:02 +0000)]
Add:core:New command in command interface set_position() to set route start point, for systems where no GPS source avaliable.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4885 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:osd/core:fixed update_period handling in route_guard osd
tegzed [Mon, 2 Jan 2012 10:58:47 +0000 (10:58 +0000)]
Fix:osd/core:fixed update_period handling in route_guard osd

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4884 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:map_textfile:Rename SIZE define because it's hardly compatible with Win* platform.
mdankov [Sun, 1 Jan 2012 22:40:23 +0000 (22:40 +0000)]
Fix:map_textfile:Rename SIZE define because it's hardly compatible with Win* platform.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4883 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_internal:Made gui_internal_label_new_abbrev abbreviations utf-aware.
mdankov [Sun, 1 Jan 2012 21:53:25 +0000 (21:53 +0000)]
Fix:gui_internal:Made gui_internal_label_new_abbrev abbreviations utf-aware.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4882 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:Quickfix to make win32 cmake builds, broken in svn 4871, working again....
mdankov [Sun, 1 Jan 2012 21:50:55 +0000 (21:50 +0000)]
Fix:core:Quickfix to make win32 cmake builds, broken in svn 4871, working again. Needs further work on it.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4881 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_internal:Fix internal gui crashing when screen is very narrow. Fixes #989.
mdankov [Sun, 1 Jan 2012 19:16:31 +0000 (19:16 +0000)]
Fix:gui_internal:Fix internal gui crashing when screen is very narrow. Fixes #989.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4880 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:- fixed possible usage of uninitialized hash map in command function get_att...
tegzed [Thu, 29 Dec 2011 02:16:15 +0000 (02:16 +0000)]
Fix:core:- fixed possible usage of uninitialized hash map in command function get_attr_var()
         - added debug statements for some command functions

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4879 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:graphics/opengl:-made the opengl driver operable on windows also - thanks efess
tegzed [Wed, 28 Dec 2011 17:22:50 +0000 (17:22 +0000)]
Fix:graphics/opengl:-made the opengl driver operable on windows also - thanks efess

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4878 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_gtk:Add menu accel keys to German translation.
sleske [Mon, 26 Dec 2011 21:25:37 +0000 (21:25 +0000)]
Add:gui_gtk:Add menu accel keys to German translation.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4877 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_gtk:Update .po.in files with new msgids for GTK menu items, because of previo...
sleske [Mon, 26 Dec 2011 21:25:16 +0000 (21:25 +0000)]
Fix:gui_gtk:Update .po.in files with new msgids for GTK menu items, because of previous commit (GTK menu items now contain a "_").

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4876 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_gtk:Add mnemonics to GTK menu entries.
sleske [Mon, 26 Dec 2011 21:23:58 +0000 (21:23 +0000)]
Add:gui_gtk:Add mnemonics to GTK menu entries.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4875 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_gtk:Add more accelerator keys for menu/toolbar commands.
sleske [Mon, 26 Dec 2011 20:56:31 +0000 (20:56 +0000)]
Add:gui_gtk:Add more accelerator keys for menu/toolbar commands.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4874 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_gtk:Activate menu accelerators for GTK GUI; fixes #206.
sleske [Mon, 26 Dec 2011 20:55:56 +0000 (20:55 +0000)]
Fix:gui_gtk:Activate menu accelerators for GTK GUI; fixes #206.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4873 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_internal:Add icon for 'Former destinations'
sleske [Mon, 26 Dec 2011 20:34:23 +0000 (20:34 +0000)]
Add:gui_internal:Add icon for 'Former destinations'

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4872 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Mark destination as stopped in destination.txt, closes ticket #980.
sleske [Sun, 25 Dec 2011 21:07:15 +0000 (21:07 +0000)]
Fix:Core:Mark destination as stopped in destination.txt, closes ticket #980.
Avoids restarting a stopped navigation when Navit is restarted.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4871 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoUndo accidental commit. Sorry :-/.
sleske [Sun, 25 Dec 2011 21:04:50 +0000 (21:04 +0000)]
Undo accidental commit. Sorry :-/.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4870 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoIncrease debug level
sleske [Sun, 25 Dec 2011 21:01:30 +0000 (21:01 +0000)]
Increase debug level

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4869 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Add warning for invalid commands.
sleske [Sun, 25 Dec 2011 18:50:11 +0000 (18:50 +0000)]
Fix:Core:Add warning for invalid commands.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4868 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Remove out-ifdefed code, which no longer makes sense, but breaks cscope.
sleske [Sun, 25 Dec 2011 17:10:19 +0000 (17:10 +0000)]
Fix:Core:Remove out-ifdefed code, which no longer makes sense, but breaks cscope.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4867 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years ago#include <glib.h>
geoghegan [Sat, 24 Dec 2011 21:45:44 +0000 (21:45 +0000)]
#include <glib.h>
#include "config.h"
#include "config_.h"
#include "debug.h"
#include "plugin.h"
#include "point.h"
#include "window.h"
#include "graphics.h"
#include "event.h"
#include "item.h"
#include "callback.h"
#include "color.h"
#include <iconv.h>

#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
#define USE_UIKIT 1
#else
#define USE_UIKIT 0
#endif

#if USE_UIKIT
#import <UIKit/UIKit.h>
#define NSRect CGRect
#define NSMakeRect CGRectMake
#define REVERSE_Y 0

CGContextRef
current_context(void)
{
return UIGraphicsGetCurrentContext();
}

#else
#import <Cocoa/Cocoa.h>
#define UIView NSView
#define UIViewController NSViewController
#define UIApplicationDelegate NSApplicationDelegate
#define UIWindow NSWindow
#define UIApplication NSApplication
#define UIApplicationMain(a,b,c,d) NSApplicationMain(a,b)
#define UIScreen NSScreen
#define UIEvent NSEvent
#define applicationFrame frame
#define REVERSE_Y 1

CGContextRef
current_context(void)
{
return [[NSGraphicsContext currentContext] graphicsPort];
}

#endif

@interface NavitView : UIView {
@public
struct graphics_priv *graphics;
}

@end

static struct graphics_priv {
struct window win;
NavitView *view;
CGLayerRef layer;
CGContextRef layer_context;
struct callback_list *cbl;
struct point p, pclean;
int w, h, wraparound, overlay_disabled, cleanup;
struct graphics_priv *parent, *next, *overlays;
} *global_graphics_cocoa;

iconv_t utf8_macosroman;

struct graphics_gc_priv {
CGFloat rgba[4];
int w;
};

struct graphics_font_priv {
int size;
char *name;
};

@implementation NavitView

- (void)drawRect:(NSRect)rect
{
struct graphics_priv *gr=NULL;
#if 0
NSLog(@"NavitView:drawRect...");
#endif

CGContextRef X = current_context();

CGContextDrawLayerAtPoint(X, CGPointZero, graphics->layer);
if (!graphics->overlay_disabled)
gr=graphics->overlays;
while (gr) {
if (!gr->overlay_disabled) {
struct CGPoint pc;
pc.x=gr->p.x;
pc.y=gr->p.y;
if (gr->wraparound) {
if (pc.x < 0)
pc.x+=graphics->w;
if (pc.y < 0)
pc.y+=graphics->h;
}
#if REVERSE_Y
pc.y=graphics->h-pc.y-gr->h;
#endif
dbg(0,"draw %dx%d at %f,%f\n",gr->w,gr->h,pc.x,pc.y);
CGContextDrawLayerAtPoint(X, pc, gr->layer);
}
gr=gr->next;
}
}

#if USE_UIKIT
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSArray *arr=touches.allObjects;
UITouch *touch=[arr objectAtIndex: 0];
struct CGPoint pc=[touch locationInView: self];
struct point p;
p.x=pc.x;
p.y=pc.y;
dbg(0,"Enter count=%d %d %d\n",touches.count,p.x,p.y);
        callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(1), GINT_TO_POINTER(1), (void *)&p);
}

- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
{
NSArray *arr=touches.allObjects;
UITouch *touch=[arr objectAtIndex: 0];
struct CGPoint pc=[touch locationInView: self];
struct point p;
p.x=pc.x;
p.y=pc.y;
dbg(0,"Enter count=%d %d %d\n",touches.count,p.x,p.y);
        callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(0), GINT_TO_POINTER(1), (void *)&p);
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
NSArray *arr=touches.allObjects;
UITouch *touch=[arr objectAtIndex: 0];
struct CGPoint pc=[touch locationInView: self];
struct point p;
p.x=pc.x;
p.y=pc.y;
dbg(0,"Enter count=%d %d %d\n",touches.count,p.x,p.y);
        callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(0), GINT_TO_POINTER(1), (void *)&p);
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
NSArray *arr=touches.allObjects;
UITouch *touch=[arr objectAtIndex: 0];
struct CGPoint pc=[touch locationInView: self];
struct point p;
p.x=pc.x;
p.y=pc.y;
dbg(0,"Enter count=%d %d %d\n",touches.count,p.x,p.y);
callback_list_call_attr_1(graphics->cbl, attr_motion, (void *)&p);
}

#else
- (void)mouseDown:(UIEvent *)theEvent
{
struct point p;
p.x=theEvent.locationInWindow.x;
p.y=graphics->h-theEvent.locationInWindow.y;

dbg(0,"Enter %d %d\n",p.x,p.y);
        callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(1), GINT_TO_POINTER(1), (void *)&p);
}

- (void)mouseUp:(UIEvent *)theEvent
{
struct point p;
p.x=theEvent.locationInWindow.x;
p.y=graphics->h-theEvent.locationInWindow.y;

dbg(0,"Enter %d %d\n",p.x,p.y);
        callback_list_call_attr_3(graphics->cbl, attr_button, GINT_TO_POINTER(0), GINT_TO_POINTER(1), (void *)&p);
}

- (void)mouseDragged:(UIEvent *)theEvent
{
struct point p;
p.x=theEvent.locationInWindow.x;
p.y=graphics->h-theEvent.locationInWindow.y;

dbg(0,"Enter %d %d\n",p.x,p.y);
callback_list_call_attr_1(graphics->cbl, attr_motion, (void *)&p);
}
#endif

- (void)dealloc {
[super dealloc];
}

@end

@interface NavitViewController : UIViewController
{
NSRect frame;
CGLayerRef layer;
}

@property (nonatomic) NSRect frame;

- (id) init_withFrame : (NSRect) _frame;

@end

@implementation NavitViewController

@synthesize frame;

- (id) init_withFrame : (NSRect) _frame
{
NSLog(@"init with frame\n");
frame = _frame;
return [self init];
}

static
void free_graphics(struct graphics_priv *gr)
{
if (gr->layer) {
CGLayerRelease(gr->layer);
gr->layer=NULL;
}
}

static void
setup_graphics(struct graphics_priv *gr)
{
CGRect lr=CGRectMake(0, 0, gr->w, gr->h);
gr->layer=CGLayerCreateWithContext(current_context(), lr.size, NULL);
gr->layer_context=CGLayerGetContext(gr->layer);
#if REVERSE_Y
CGContextScaleCTM(gr->layer_context, 1, -1);
CGContextTranslateCTM(gr->layer_context, 0, -gr->h);
#endif
CGContextSetRGBFillColor(gr->layer_context, 0, 0, 0, 0);
   CGContextSetRGBStrokeColor(gr->layer_context, 0, 0, 0, 0);
CGContextClearRect(gr->layer_context, lr);
}

- (void)loadView
{
NSLog(@"loadView");
NavitView* myV = [NavitView alloc];

if (global_graphics_cocoa) {
global_graphics_cocoa->view=myV;
myV->graphics=global_graphics_cocoa;
global_graphics_cocoa->w=frame.size.width;
global_graphics_cocoa->h=frame.size.height;
setup_graphics(global_graphics_cocoa);
}

[myV initWithFrame: frame];

[self setView: myV];

[myV release];
}

- (void)didReceiveMemoryWarning {
dbg(0,"enter\n");
}

- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}

- (void)dealloc {
[super dealloc];
}

@end

@class NavitViewController;

@interface NavitAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
NavitViewController *viewController;
}

@property (nonatomic, retain) /*IBOutlet*/ UIWindow *window;
@property (nonatomic, retain) /*IBOutlet*/ NavitViewController *viewController;

@end

@implementation NavitAppDelegate

@synthesize window;
@synthesize viewController;

#if USE_UIKIT
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
#else
- (void)
applicationDidFinishLaunching:(NSNotification *)aNotification
#endif
{
NSLog(@"DidFinishLaunching\n");
#if USE_UIKIT
[[UIApplication sharedApplication] setStatusBarHidden:NO];
#endif

NSRect appFrame = [UIScreen mainScreen].applicationFrame;

self.viewController = [[[NavitViewController alloc] init_withFrame : appFrame] autorelease];

NSRect windowRect = NSMakeRect(0, 0, appFrame.size.width, appFrame.size.height);

#if USE_UIKIT
self.window = [[[UIWindow alloc] initWithFrame:windowRect] autorelease];
#else
self.window = [[[UIWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO] autorelease];
#endif
utf8_macosroman=iconv_open("MACROMAN","UTF-8");

#if USE_UIKIT
[window addSubview:viewController.view];
[window makeKeyAndVisible];
#else
NSWindowController * controller = [[NSWindowController alloc] initWithWindow : window];
NSLog(@"Setting view\n");
[viewController loadView];
[window setContentView : viewController.view];
[controller setWindow : window];
[controller showWindow : nil];

#endif

if (global_graphics_cocoa) {
callback_list_call_attr_2(global_graphics_cocoa->cbl, attr_resize, (int)appFrame.size.width, (int)appFrame.size.height);

}

#if USE_UIKIT
return YES;
#endif
}

- (void)dealloc {
[viewController release];
[window release];
[super dealloc];
}

@end

static void
draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
{
if (mode == draw_mode_end) {
dbg(0,"end %p\n",gr);
if (!gr->parent) {
#if USE_UIKIT
[gr->view setNeedsDisplay];
#else
[gr->view display];
#endif
}
}
}

static void
draw_lines(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count)
{
CGPoint points[count];
int i;
for (i = 0 ; i < count ; i++) {
points[i].x=p[i].x;
points[i].y=p[i].y;
}
CGContextSetStrokeColor(gr->layer_context, gc->rgba);
CGContextSetLineWidth(gr->layer_context, gc->w);
CGContextSetLineCap(gr->layer_context, kCGLineCapRound);
     CGContextBeginPath(gr->layer_context);
CGContextAddLines(gr->layer_context, points, count);
CGContextStrokePath(gr->layer_context);

}

static void
draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count)
{
CGPoint points[count];
int i;
for (i = 0 ; i < count ; i++) {
points[i].x=p[i].x;
points[i].y=p[i].y;
}
CGContextSetFillColor(gr->layer_context, gc->rgba);
     CGContextBeginPath(gr->layer_context);
CGContextAddLines(gr->layer_context, points, count);
CGContextFillPath(gr->layer_context);
}

static void
draw_rectangle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int w, int h)
{
CGRect lr=CGRectMake(p->x, p->y, w, h);
if (p->x <= 0 && p->y <= 0 && p->x+w+1 >= gr->w && p->y+h+1 >= gr->h) {
dbg(0,"clear %p %dx%d\n",gr,w,h);
free_graphics(gr);
setup_graphics(gr);
}
CGContextSetFillColor(gr->layer_context, gc->rgba);
CGContextFillRect(gr->layer_context, lr);
}

static void
draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy)
{
size_t len,inlen=strlen(text)+1,outlen=strlen(text)+1;
char outb[outlen];
char *inp=text,*outp=outb;

len=iconv (utf8_macosroman, &inp, &inlen, &outp, &outlen);

CGContextSetFillColor(gr->layer_context, fg->rgba);

CGContextSelectFont(gr->layer_context, font->name, font->size/16.0, kCGEncodingMacRoman);
CGContextSetTextDrawingMode(gr->layer_context, kCGTextFill);
CGAffineTransform xform = CGAffineTransformMake(dx/65536.0, dy/65536.0, dy/65536.0, -dx/65536.0, 0.0f, 0.0f);
CGContextSetTextMatrix(gr->layer_context, xform);
CGContextShowTextAtPoint(gr->layer_context, p->x, p->y, outb, strlen(outb));
}

static void
draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img)
{
CGImageRef imgc=(CGImageRef) img;
int w=CGImageGetWidth(imgc);
int h=CGImageGetHeight(imgc);
CGRect rect=CGRectMake(0, 0, w, h);
CGContextSaveGState(gr->layer_context);
CGContextTranslateCTM(gr->layer_context, p->x, p->y+h);
CGContextScaleCTM(gr->layer_context, 1.0, -1.0);
CGContextDrawImage(gr->layer_context, rect, imgc);
CGContextRestoreGState(gr->layer_context);
}

static void font_destroy(struct graphics_font_priv *font)
{
g_free(font);
}

static struct graphics_font_methods font_methods = {
font_destroy
};

static void
draw_drag(struct graphics_priv *gr, struct point *p)
{
if (!gr->cleanup) {
gr->pclean=gr->p;
gr->cleanup=1;
}
if (p)
gr->p=*p;
else {
gr->p.x=0;
gr->p.y=0;
}
}

static struct graphics_font_priv *font_new(struct graphics_priv *gr, struct graphics_font_methods *meth, char *font,  int size, int flags)
{
struct graphics_font_priv *ret=g_new0(struct graphics_font_priv, 1);
*meth=font_methods;

ret->size=size;
ret->name="Helvetica";
return ret;
}

static void
gc_destroy(struct graphics_gc_priv *gc)
{
g_free(gc);
}

static void
gc_set_linewidth(struct graphics_gc_priv *gc, int w)
{
gc->w=w;
}

static void
gc_set_dashes(struct graphics_gc_priv *gc, int w, int offset, unsigned char *dash_list, int n)
{
}

static void
gc_set_foreground(struct graphics_gc_priv *gc, struct color *c)
{
gc->rgba[0]=c->r/65535.0;
gc->rgba[1]=c->g/65535.0;
gc->rgba[2]=c->b/65535.0;
gc->rgba[3]=c->a/65535.0;
}

static void
gc_set_background(struct graphics_gc_priv *gc, struct color *c)
{
}

static void
gc_set_stipple(struct graphics_gc_priv *gc, struct graphics_image_priv *img)
{
}

static struct graphics_gc_methods gc_methods = {
gc_destroy,
gc_set_linewidth,
gc_set_dashes,
gc_set_foreground,
gc_set_background,
gc_set_stipple,
};

static struct graphics_gc_priv *gc_new(struct graphics_priv *gr, struct graphics_gc_methods *meth)
{
        struct graphics_gc_priv *gc=g_new(struct graphics_gc_priv, 1);
gc->w=1;

        *meth=gc_methods;
        return gc;
}

static void
background_gc(struct graphics_priv *gr, struct graphics_gc_priv *gc)
{
}

static struct graphics_priv *
overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int alpha, int wraparound);

static struct graphics_image_priv *
image_new(struct graphics_priv *gra, struct graphics_image_methods *meth, char *path, int *w, int *h, struct point *hot, int rotation)
{
NSString *s=[[NSString alloc]initWithCString:path encoding:NSMacOSRomanStringEncoding];
CGDataProviderRef imgDataProvider = CGDataProviderCreateWithCFData((CFDataRef)[NSData dataWithContentsOfFile:s]);
[s release];

if (!imgDataProvider)
return NULL;

CGImageRef image = CGImageCreateWithPNGDataProvider(imgDataProvider, NULL, true, kCGRenderingIntentDefault);
CGDataProviderRelease(imgDataProvider);
dbg(0,"size %dx%d\n",CGImageGetWidth(image),CGImageGetHeight(image));
if (w)
*w=CGImageGetWidth(image);
if (h)
*h=CGImageGetHeight(image);
if (hot) {
hot->x=CGImageGetWidth(image)/2;
hot->y=CGImageGetHeight(image)/2;
}
return (struct graphics_image_priv *)image;
}

static void *
get_data(struct graphics_priv *this, const char *type)
{
dbg(0,"enter\n");
if (strcmp(type,"window"))
return NULL;
return &this->win;
}

static void
image_free(struct graphics_priv *gr, struct graphics_image_priv *priv)
{
CGImageRelease((CGImageRef)priv);
}

static void
get_text_bbox(struct graphics_priv *gr, struct graphics_font_priv *font, char *text, int dx, int dy, struct point *ret, int estimate)
{
int len = g_utf8_strlen(text, -1);
int xMin = 0;
int yMin = 0;
int yMax = 13*font->size/256;
int xMax = 9*font->size*len/256;

ret[0].x = xMin;
ret[0].y = -yMin;
ret[1].x = xMin;
ret[1].y = -yMax;
ret[2].x = xMax;
ret[2].y = -yMax;
ret[3].x = xMax;
ret[3].y = -yMin;
}

static void
overlay_disable(struct graphics_priv *gr, int disabled)
{
gr->overlay_disabled=disabled;
}

static struct graphics_methods graphics_methods = {
NULL, /* graphics_destroy, */
draw_mode,
draw_lines,
draw_polygon,
draw_rectangle,
NULL, /* draw_circle, */
draw_text,
draw_image,
NULL, /* draw_image_warp, */
NULL, /* draw_restore, */
draw_drag,
font_new,
gc_new,
background_gc,
overlay_new,
image_new,
get_data,
image_free,
get_text_bbox,
overlay_disable,
NULL, /* overlay_resize, */
NULL, /* set_attr, */
};

static struct graphics_priv *
overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int alpha, int wraparound)
{
struct graphics_priv *ret=g_new0(struct graphics_priv, 1);
*meth=graphics_methods;
ret->p=*p;
ret->w=w;
ret->h=h;
ret->parent=gr;
ret->next=gr->overlays;
ret->wraparound=wraparound;
gr->overlays=ret;
setup_graphics(gr);
return ret;
}

struct graphics_priv *
graphics_cocoa_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl)
{
struct graphics_priv *ret;
*meth=graphics_methods;
dbg(0,"enter\n");
if(!event_request_system("cocoa","graphics_cocoa"))
return NULL;
ret=g_new0(struct graphics_priv, 1);
ret->cbl=cbl;
global_graphics_cocoa=ret;
return ret;
}

static void
event_cocoa_main_loop_run(void)
{

dbg(0,"enter\n");
#if 0
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *logPath = [documentsDirectory stringByAppendingPathComponent:@"console.log"];
freopen("/tmp/log.txt","a+",stderr);
NSLog(@"Test\n");
#endif
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
#if USE_UIKIT
dbg(0,"calling main\n");
int retval = UIApplicationMain(main_argc, main_argv, nil, @"NavitAppDelegate");
dbg(0,"retval=%d\n",retval);
#else
NavitAppDelegate * delegate = [[NavitAppDelegate alloc] init];
NSApplication * application = [NSApplication sharedApplication];
[application setDelegate:delegate];
NSLog(@"Test\n");

[NSApp run];

[delegate release];
#endif
[pool release];
}

@interface NavitTimer : NSObject{
@public
struct callback *cb;
NSTimer *timer;
}
- (void)onTimer:(NSTimer*)theTimer;

@end

@implementation NavitTimer

- (void)onTimer:(NSTimer*)theTimer
{
callback_call_0(cb);
}

@end

struct event_idle {
struct callback *cb;
NSTimer *timer;
};

static struct event_timeout *
event_cocoa_add_timeout(int timeout, int multi, struct callback *cb)
{
NavitTimer *ret=[[NavitTimer alloc]init];
ret->cb=cb;
ret->timer=[NSTimer scheduledTimerWithTimeInterval:(timeout/1000.0) target:ret selector:@selector(onTimer:) userInfo:nil repeats:multi?YES:NO];
dbg(0,"timer=%p\n",ret->timer);
return (struct event_timeout *)ret;
}

static void
event_cocoa_remove_timeout(struct event_timeout *ev)
{
NavitTimer *t=(NavitTimer *)ev;

[t->timer invalidate];
[t release];
}

static struct event_idle *
event_cocoa_add_idle(int priority, struct callback *cb)
{
NavitTimer *ret=[[NavitTimer alloc]init];
ret->cb=cb;
ret->timer=[NSTimer scheduledTimerWithTimeInterval:(0.0) target:ret selector:@selector(onTimer:) userInfo:nil repeats:YES];

dbg(0,"timer=%p\n",ret->timer);
return (struct event_idle *)ret;
}

static void
event_cocoa_remove_idle(struct event_idle *ev)
{
NavitTimer *t=(NavitTimer *)ev;

[t->timer invalidate];
[t release];
}

static struct event_methods event_cocoa_methods = {
event_cocoa_main_loop_run,
NULL, /* event_cocoa_main_loop_quit, */
NULL, /* event_cocoa_add_watch, */
NULL, /* event_cocoa_remove_watch, */
event_cocoa_add_timeout,
event_cocoa_remove_timeout,
event_cocoa_add_idle,
event_cocoa_remove_idle,
NULL, /* event_cocoa_call_callback, */
};

static struct event_priv *
event_cocoa_new(struct event_methods *meth)
{
dbg(0,"enter\n");
*meth=event_cocoa_methods;
return NULL;
}

void
plugin_init(void)
{
dbg(0,"enter\n");
plugin_register_graphics_type("cocoa", graphics_cocoa_new);
plugin_register_event_type("cocoa", event_cocoa_new);
}

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4866 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Android:English text strings, fixing grammar
korrosa [Sun, 18 Dec 2011 22:36:47 +0000 (22:36 +0000)]
Fix:Android:English text strings, fixing grammar

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4865 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_internal:When map is clicked, display the closest visible item details. Close...
mdankov [Sun, 18 Dec 2011 13:18:09 +0000 (13:18 +0000)]
Add:gui_internal:When map is clicked, display the closest visible item details. Closes #962.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4864 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:vehicle_demo:Free everything on destroy
martin-s [Fri, 16 Dec 2011 22:50:32 +0000 (22:50 +0000)]
Fix:vehicle_demo:Free everything on destroy

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4863 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Made navigation_unregister_callback more reasonable
martin-s [Fri, 16 Dec 2011 22:49:28 +0000 (22:49 +0000)]
Fix:Core:Made navigation_unregister_callback more reasonable

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4862 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_internal:Revert "back behaviour" in internal gui introduced accidently by...
woglinde [Fri, 16 Dec 2011 18:49:32 +0000 (18:49 +0000)]
Fix:gui_internal:Revert "back behaviour" in internal gui introduced accidently by rev 4860, because it needs to be discussed

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4861 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:xpm: replace unknown.xpm with nicer unknown.svg, had to edit the svg to set non...
woglinde [Fri, 16 Dec 2011 15:30:43 +0000 (15:30 +0000)]
Fix:xpm: replace unknown.xpm with nicer unknown.svg, had to edit the svg to set non float width and height to make rsvg happy, closes ticket #976, thanks to sleske

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4860 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:graphics_win32:Added bmp padding in xpm2bmp conversion for odd picture widths...
mdankov [Thu, 15 Dec 2011 22:09:27 +0000 (22:09 +0000)]
Fix:graphics_win32:Added bmp padding in xpm2bmp conversion for odd picture widths. Fixes trac.navit-project.org/ticket/498.|Thank you sleske for noticing picture size dependencies and mvglasow for tickets merge.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4859 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:Build:Missing file
martin-s [Mon, 12 Dec 2011 07:19:49 +0000 (07:19 +0000)]
Add:Build:Missing file

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4858 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Handle multiple calls to navigation_set_route correctly
martin-s [Sun, 11 Dec 2011 23:15:37 +0000 (23:15 +0000)]
Fix:Core:Handle multiple calls to navigation_set_route correctly

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4857 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Don't crash on right click with no gui
martin-s [Sun, 11 Dec 2011 23:14:50 +0000 (23:14 +0000)]
Fix:Core:Don't crash on right click with no gui

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4856 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui/internal:added NULL check to avoid crash in street search dialog. Fixes ticke...
tegzed [Sun, 11 Dec 2011 14:24:07 +0000 (14:24 +0000)]
Fix:gui/internal:added NULL check to avoid crash in street search dialog. Fixes ticket #973

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4855 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:Core:New profile to calculate shortest car route (within some limits)
martin-s [Sun, 4 Dec 2011 18:17:04 +0000 (18:17 +0000)]
Add:Core:New profile to calculate shortest car route (within some limits)

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4854 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:vehicle_demo:improved attribute handling
martin-s [Sun, 4 Dec 2011 18:15:49 +0000 (18:15 +0000)]
Add:vehicle_demo:improved attribute handling

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4853 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:Core:Attribute to query current announcement level
martin-s [Sun, 4 Dec 2011 18:15:08 +0000 (18:15 +0000)]
Add:Core:Attribute to query current announcement level

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4852 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:Build:cmake svn:ingore settings
martin-s [Sun, 4 Dec 2011 10:35:36 +0000 (10:35 +0000)]
Add:Build:cmake svn:ingore settings

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4851 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:Build:cmake svn:ingore settings
martin-s [Sun, 4 Dec 2011 10:31:19 +0000 (10:31 +0000)]
Add:Build:cmake svn:ingore settings

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4850 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:Made Aborting Navigation work again. Fixes #971. Thank you sleske.
mdankov [Mon, 28 Nov 2011 19:21:17 +0000 (19:21 +0000)]
Fix:core:Made Aborting Navigation work again. Fixes #971. Thank you sleske.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4849 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoUpdate:i18n: update italian translation generated from latest svn and ticket #968...
woglinde [Sat, 26 Nov 2011 21:34:24 +0000 (21:34 +0000)]
Update:i18n: update italian translation generated from latest svn and ticket #968, thanks codex

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4848 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_internal:Do not allow duplicate entries in the list of former destinations...
mdankov [Wed, 23 Nov 2011 21:25:30 +0000 (21:25 +0000)]
Fix:gui_internal:Do not allow duplicate entries in the list of former destinations. Fixes #955. Thank you sleske.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4847 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:map/binfile:Also search for districts, when searching for a town. (fixes: #805...
rikky [Fri, 4 Nov 2011 23:25:22 +0000 (23:25 +0000)]
Fix:map/binfile:Also search for districts, when searching for a town. (fixes: #805, #523)

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4846 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Fixes an issue if the destination.txt file cannot be read as per ticket...
geoghegan [Thu, 3 Nov 2011 22:17:41 +0000 (22:17 +0000)]
Fix:Core:Fixes an issue if the destination.txt file cannot be read as per ticket #959

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4845 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:Android: Adds Russia to the download section
geoghegan [Wed, 2 Nov 2011 18:09:09 +0000 (18:09 +0000)]
Add:Android: Adds Russia to the download section

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4844 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agofix:osd/core:fix max speed calculation
tegzed [Mon, 24 Oct 2011 11:56:20 +0000 (11:56 +0000)]
fix:osd/core:fix max speed calculation

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4843 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoadd:osd/core:-added support to display max speed in odometer
tegzed [Sun, 23 Oct 2011 12:06:53 +0000 (12:06 +0000)]
add:osd/core:-added support to display max speed in odometer

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4842 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_internal:Allow adding former destinations to bookmarks.
mdankov [Thu, 20 Oct 2011 21:05:05 +0000 (21:05 +0000)]
Add:gui_internal:Allow adding former destinations to bookmarks.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4841 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:gui_internal Clip table containing long text lines by screen size. Fixes Prev...
mdankov [Thu, 20 Oct 2011 21:00:11 +0000 (21:00 +0000)]
Fix:gui_internal Clip table containing long text lines by screen size. Fixes Prev/Next buttons placement in Route description and Former destinations lists.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4840 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_internal:Made former destinations list pageable. Closes trac ticket #948
mdankov [Thu, 20 Oct 2011 19:51:13 +0000 (19:51 +0000)]
Add:gui_internal:Made former destinations list pageable. Closes trac ticket #948

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4839 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:avoid usage of uninitialized hashtable in get_attr_var()
tegzed [Sun, 9 Oct 2011 16:21:01 +0000 (16:21 +0000)]
Fix:core:avoid usage of uninitialized hashtable in get_attr_var()

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4838 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:avoid double free on the return value of get_int_var()
tegzed [Sun, 9 Oct 2011 15:32:23 +0000 (15:32 +0000)]
Fix:core:avoid double free on the return value of get_int_var()

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4837 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:core:initialize hastable on first usage of set_int_var()
tegzed [Sun, 9 Oct 2011 15:26:12 +0000 (15:26 +0000)]
Fix:core:initialize hastable on first usage of set_int_var()

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4836 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:NLS:Updated german translations
martin-s [Sun, 9 Oct 2011 10:24:50 +0000 (10:24 +0000)]
Fix:NLS:Updated german translations

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4835 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Avoid double in announcement for roundabouts
martin-s [Sun, 9 Oct 2011 10:23:38 +0000 (10:23 +0000)]
Fix:Core:Avoid double in announcement for roundabouts

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4834 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Changed command new working, expand attributes if necessary
martin-s [Fri, 7 Oct 2011 20:57:17 +0000 (20:57 +0000)]
Fix:Core:Changed command new working, expand attributes if necessary

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4833 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Obey file->cache
martin-s [Fri, 7 Oct 2011 20:22:36 +0000 (20:22 +0000)]
Fix:Core:Obey file->cache

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4832 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:maptool:Don't duplicate combined cycle and footways
martin-s [Thu, 6 Oct 2011 22:35:08 +0000 (22:35 +0000)]
Fix:maptool:Don't duplicate combined cycle and footways

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4831 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Build:Enable NLS on visual studio
martin-s [Wed, 5 Oct 2011 13:49:20 +0000 (13:49 +0000)]
Fix:Build:Enable NLS on visual studio

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4830 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:gui_internal:support for saving gui settings
martin-s [Tue, 4 Oct 2011 18:24:51 +0000 (18:24 +0000)]
Add:gui_internal:support for saving gui settings

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4829 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:Core:Integrated functions to add or remove an attribute
martin-s [Tue, 4 Oct 2011 18:23:45 +0000 (18:23 +0000)]
Add:Core:Integrated functions to add or remove an attribute

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4828 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:map_binfile:Better diagnostics in case of problems
martin-s [Tue, 4 Oct 2011 18:22:38 +0000 (18:22 +0000)]
Add:map_binfile:Better diagnostics in case of problems

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4827 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Build:Made download sample map work
martin-s [Tue, 4 Oct 2011 18:12:19 +0000 (18:12 +0000)]
Fix:Build:Made download sample map work

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4826 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Build:Fixed osx bundle creation
martin-s [Tue, 4 Oct 2011 17:49:06 +0000 (17:49 +0000)]
Fix:Build:Fixed osx bundle creation

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4825 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agofix:core: now navit_say() takes speech.active state into account
tegzed [Mon, 3 Oct 2011 16:38:09 +0000 (16:38 +0000)]
fix:core: now navit_say() takes speech.active state into account

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4824 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:osd/core:added the possibility to selectively enable/disable speedcam warnings...
tegzed [Mon, 3 Oct 2011 10:39:19 +0000 (10:39 +0000)]
Fix:osd/core:added the possibility to selectively enable/disable speedcam warnings for different camera types using the flags attribute

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4823 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:support_libc:Reverted accidential change
martin-s [Sat, 1 Oct 2011 08:08:56 +0000 (08:08 +0000)]
Fix:support_libc:Reverted accidential change

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4822 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:graphics_win32:Restored mingw32ce compatibility
martin-s [Sat, 1 Oct 2011 08:08:13 +0000 (08:08 +0000)]
Fix:graphics_win32:Restored mingw32ce compatibility

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4821 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Build:Add missing package
martin-s [Fri, 30 Sep 2011 14:02:38 +0000 (14:02 +0000)]
Fix:Build:Add missing package

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4820 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Option to skip qt detection
martin-s [Fri, 30 Sep 2011 13:59:46 +0000 (13:59 +0000)]
Fix:Core:Option to skip qt detection

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4819 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:graphics_win32:define dummy struct for alpha blending if not available
martin-s [Fri, 30 Sep 2011 13:34:17 +0000 (13:34 +0000)]
Fix:graphics_win32:define dummy struct for alpha blending if not available

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4818 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Move declarations to the begin to be c95 compatible
martin-s [Fri, 30 Sep 2011 13:29:30 +0000 (13:29 +0000)]
Fix:Core:Move declarations to the begin to be c95 compatible

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4817 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:Core:Move declarations to the begin
martin-s [Fri, 30 Sep 2011 12:53:31 +0000 (12:53 +0000)]
Fix:Core:Move declarations to the begin

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4816 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:support_libc:Missing functions for vc
martin-s [Fri, 30 Sep 2011 12:40:19 +0000 (12:40 +0000)]
Add:support_libc:Missing functions for vc

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4815 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:support_libc:Missing functions for vc
martin-s [Fri, 30 Sep 2011 12:35:29 +0000 (12:35 +0000)]
Add:support_libc:Missing functions for vc

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4814 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:support_libc:Missing functions for vc
martin-s [Fri, 30 Sep 2011 12:31:02 +0000 (12:31 +0000)]
Add:support_libc:Missing functions for vc

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4813 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:support_xgetopt:Removed unneccessary c++ dependency
martin-s [Fri, 30 Sep 2011 12:13:11 +0000 (12:13 +0000)]
Fix:support_xgetopt:Removed unneccessary c++ dependency

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4812 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:support_xgetopt:Removed unneccessary c++ dependency
martin-s [Fri, 30 Sep 2011 12:12:50 +0000 (12:12 +0000)]
Fix:support_xgetopt:Removed unneccessary c++ dependency

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4811 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoFix:support_glib:TLS_OUT_OF_INDEXES not always defined
martin-s [Fri, 30 Sep 2011 12:08:01 +0000 (12:08 +0000)]
Fix:support_glib:TLS_OUT_OF_INDEXES not always defined

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4810 ffa7fe5e-494d-0410-b361-a75ebd5db220

12 years agoAdd:support_libc:strerror dummy for wince
martin-s [Fri, 30 Sep 2011 10:21:33 +0000 (10:21 +0000)]
Add:support_libc:strerror dummy for wince

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4809 ffa7fe5e-494d-0410-b361-a75ebd5db220