I tried to explore Git in order to identify copyright related issues.
The result is quite incomplete or incoherent: the changes I made does
not use strict rules. So, I hope I did not irritate anybody.
If you think your name should be listed somewhere, or should be removed,
send the patch.
Rob Norris [Fri, 15 Oct 2010 19:19:17 +0000 (20:19 +0100)]
Various improvements and tidy ups.
Improve concepts:
. Add what is a Layer
. Mention Statusbar
Better use of 'appname'
Move verbose/debug mode to bottom + add example for a map download
General GUI reference improvements.
Add Begin Track Icon.
Other misc bits as I went along...
Rob Norris [Sun, 31 Oct 2010 20:11:44 +0000 (20:11 +0000)]
Fix extend track using magic scissors.
Should only need to click once to select the next point to extend the current track, hence need to mark that the first point is known (via the 'magic scissors started' variable).
Sven Wegener [Thu, 14 Oct 2010 19:46:11 +0000 (21:46 +0200)]
Fix autodownloading while panning
Since commit 1c6a6010 ("Disable autodownloading when dragging the map")
we only trigger an autodownload when starting to pan and not on stop,
which is pretty bad. Also pan_move is never reset, resulting in no
update when panning with keyboard shortcuts after panning with the
mouse.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Rob Norris [Mon, 18 Oct 2010 19:25:51 +0000 (20:25 +0100)]
Prevent crashes when downloading Expedia Maps.
Fix expedia code to use updated vikmapslayer_compat.h, which was modified for:
'Allow reuse of curl connection objects'
SHA: 825413bac81e7234ed27a8ff3343a8295cc393e2
Jon Burgess [Sun, 26 Sep 2010 14:25:28 +0000 (16:25 +0200)]
Fix memcheck error
What I think happens is:
1) We first do a request for a tile with an ETag and apply a custom
header, this gets set into the conn->data->set.headers pointer
2) The header gets freed, but the set.headers pointer is left as a
dangling reference to the memory
3) A subsequent request is generated for a tile without an etag so we do
not overwrite the set.headers pointer and it keeps the old, invalid
value and the HTTP request code tries to reference it.
I believe the associated change should fix it by ensuring the dangling
pointer gets cleared during step (2).
I recently discovered that a recent commit introduce a significant
change on CPU usage.
The commit is 71eff775d86be02173e28421cea7f7d3f5a8344. It offers a
smooth pan when drag&drop, but it introduces a huge amount of tile
requests.
For exemple, when I drag the map, I quickly observe around 600
requests on local tile cache while around 10 requests would be enough.
The matter is, in order to keep a smooth dragging, the viewport is
requested to redraw completly. While doing this, all displayed maps
need to check their local cache. And this, for each X event.
This fix is a temporary one.
A better solution implies certainly a significant refactoring
of display/download.
This commit introduced a behaviour quite confusing: a saved .vik file
cannot be reopened after a change on prefered cache directory.
At least the old way is deterministic.
Rob Norris [Thu, 30 Sep 2010 20:51:32 +0000 (21:51 +0100)]
Make more portable .vik file, as don't save the map cache directory if it's the map cache default directory.
The map cache default directory is dependent on the user and OS, however on reading in when it's blank it automatically puts in the map cache default directory.
Jon Burgess [Sun, 26 Sep 2010 18:51:43 +0000 (19:51 +0100)]
Prevent access to undefined data when fgets() returns NULL
If viking.prefs is empty this triggers the following warning at startup in valgrind:
==21725== Conditional jump or move depends on uninitialised value(s)
==21725== at 0x447354: preferences_load_from_file (preferences.c:147)
==21725== by 0x447444: a_preferences_get (preferences.c:318)
==21725== by 0x41019D: a_vik_get_default_lat (globals.c:133)
==21725== by 0x42B6F3: viewport_init (vikviewport.c:167)
...
This occurs when fgets() returns NULL but the code still tries to
interpret the uninitialized contents of buf.
The minimum speed difference is far too great so reduce from 20m/s to 5m/s, otherwise the values shown can be very small compared to the overall graph maximum. For tracks with a bigger difference it automatically uses a sensible difference.
Rob Norris [Sun, 26 Sep 2010 18:15:49 +0000 (19:15 +0100)]
Use speed units in display of Track/Waypoint layer draw by velocity config values, but maintain units as metres per second when read from/saved to files.
Rob Norris [Thu, 23 Sep 2010 23:00:46 +0000 (00:00 +0100)]
DEM layer properties tidy up.
Remove unused line thickness property (although 'used' in setting up GCs, no actual line drawing takes place so the value is irrelevant).
Change the colour property from a string to a proper GdkGC, so one can use the colour picker to choose the colour. The default is blue.
Use this colour for height's less than then the minimum elevation property (as well as specifically for zero).
Remove the unused single GC.
Rob Norris [Sun, 5 Sep 2010 10:44:24 +0000 (11:44 +0100)]
Extend set/get param interface to have knowledge of what type of operation it is - i.e. is it related to file i/o or display/cut/copy usage.
This means differing actions can be taken dependent on the usage, such as in determining if conversion operations are required.
Thus when called from file.c the parameter is set to true, and elsewhere it is set to false.
Rob Norris [Fri, 17 Sep 2010 19:04:58 +0000 (20:04 +0100)]
Prevent lock up in attempt to download maps along a track in UTM mode.
Method that attempts to get maps between far apart points only appears to work in Mercator (LATLON) mode. Thus only do this when in LATLON mode (i.e. it is skipped when in UTM mode)
It is always really good for a .c file to include its own .h header file.
At least to check that declaration and definition of a function share the
same prototype.
Jon Burgess [Sun, 12 Sep 2010 16:34:20 +0000 (17:34 +0100)]
Add explicit linking against libz and libm
This fixes the following link errors on Fedora 13+
/usr/bin/ld: libviking.a(vikviewport.o): undefined reference to symbol 'tan@@GLIBC_2.2.5'
/usr/bin/ld: note: 'tan@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
/usr/bin/ld: libviking.a(dem.o): undefined reference to symbol 'inflateInit2_'
/usr/bin/ld: note: 'inflateInit2_' is defined in DSO /lib64/libz.so.1 so try adding it to the linker command line
I don't know why, but the warning message about a wrong draw mode
does not display. Gtk claimed:
Gtk-CRITICAL **: gtk_widget_get_toplevel: assertion `GTK_IS_WIDGET (widget)' failed
I imagine something is not completly initialised in VikMapsLayer object.
Using VikViewport is just fine and more secure: we know that viewport
already exists.