Previous revision in using signalling method didn't actually ensure the gtk updates were performed in the main thread.
(Commit SHA1:901423020f8c8fbc41052247ff6d8c9414f8077d although it made it more reliable).
Ensure statusbar updates are performed in the main thread via use of gdk_threads_add_idle() when the update is requested from the background.
Rob Norris [Fri, 17 May 2013 09:13:47 +0000 (10:13 +0100)]
Allow Bing Map source URL to be set via the configuration XML file.
Currently ATM only the hostname part will be used via a suitable configuration.
Making the URL part of the data structure means it can be overwritten.
This may be helpful in case the URL changes in the future,
so it can be overridden via an entry in the maps.xml file by the end user without requiring code changes.
This patch generalize the route finder feature. The goal is to allow
the use of different services to compute a route from two clics.
To achieve this I introduced:
- vik_routing_engine as base class for engines
- vik_routing module for registering engines and providing "default"
features
And I rewrote the Google related feature.
The new design seems quite overkill, but many more feature will be add in
the future. One of them is to rewrite the Acquire -> Google Direction.
An other is to add a "filter" on a route/track in order to allow a finer
route computation, based on more than 2 points.
Rob Norris [Sun, 3 Mar 2013 10:55:29 +0000 (10:55 +0000)]
Add a new webtool datasource to allow acquiring data from URLs that return a file.
Adds a built in OpenStreetBugs extension.
Allows defining your own datasource references via a datasources.xml file,
similar to the external_tools.xml methods.
The URL format reference encodes how the location (and zoom) parameters are substituted.
The file type returned should be specified and is passed on for the -i parameter for GPSBabel.
Rob Norris [Sat, 2 Mar 2013 18:29:36 +0000 (18:29 +0000)]
Prepare for dynamic VikDataSourceInterface creation/deletion.
Allow passing in of data into the acquire method.
Enable a function callback on completion of the acquire method,
thus can free the allocated memory of the VikDataSourceInterface itself.
Rob Norris [Tue, 19 Feb 2013 19:13:40 +0000 (19:13 +0000)]
Make window related values available on acquire initialisation.
Primarily to enable getting the viewport, but without going through the add_setup_widgets stage.
Thus it enables an acquire method to start without further user input.
Rob Norris [Fri, 26 Apr 2013 16:08:47 +0000 (17:08 +0100)]
Fix incorrect setting to lowest zoom value when clicking away from the statusbar zoom menu.
The only happens on the very first time since the active menu entry is not assigned and so defaults to first entry.
Unfortunately in GTK+ clicking away from the zoom menu still generates a 'selection-done' callback.
Thus ensure an active menu entry is set on initialization.
Rob Norris [Wed, 17 Apr 2013 20:33:51 +0000 (21:33 +0100)]
Really fix showing map timestamps on Windows on the map tile info dialog.
For some reason it would always show '(null)', so revert back to strftime() and use gmtime() too.
Ditch the gdate stuff as it doesn't simplify the code either
Rob Norris [Wed, 3 Apr 2013 22:34:07 +0000 (23:34 +0100)]
SF#3387591: Improve keyboard copy+paste behaviour when the editing a layer name in the treeview.
Since the default keyboard shortcuts are overridden, we handle them even when a cell is being edited.
Ensure when editing that keyboard shortcuts do something more sensible then copy/pasting layer data.
Thus as we can't get to the internals of the text actually selected,
just copy and paste the layer name.
This also means we can accept pasting in plain text, which can be useful in naming layers.
Also ignore ctrl+<arrow> when editing the treeview which otherwise moves the viewport.
Rob Norris [Sun, 17 Mar 2013 20:05:06 +0000 (20:05 +0000)]
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.
Unlike the previous effort SHA1: 39aec6c6b87a324981a6e1d028ba345320a444ad
This uses the fixed value MAPS_CACHE_DIR rather than the preference value in case the preference has changed.
Michael Klein [Tue, 16 Apr 2013 22:04:22 +0000 (23:04 +0100)]
SF#3610708: Fix Failing to Load DEM files on Big Endian Systems.
Endian awareness is needed in unzip_hgt_file() for processing DEM zip file headers, as the values are in little-endian byte order.
Otherwise loading on a big-endian system such as a PowerPC Mac will fail with the program complaining 'wrong format' for the DEM file.
See http://en.wikipedia.org/wiki/Zip_(file_format)
Wolfgang Goetz [Wed, 10 Apr 2013 19:54:55 +0000 (20:54 +0100)]
Fix Double defined msgid's in po-files.
Unfortunately due to previous commit in simplying the code, which then caused an incorrect commit:
'Update translations for layers menu popup which no longer have to start with '/''
SHA1:33a5209f18fdddfa011eabc3d4834cc23bef5955.
Which aligned the translation to the code. However Po files don't allow repeated text strings as ids.
Simply remove the secondary copy in most places and for the da translation copy the texts into the first place.
Rob Norris [Fri, 22 Feb 2013 18:49:24 +0000 (18:49 +0000)]
Minimum GTK+2.14 required for the build.
Remove now unneeded check for 2.14 existence.
Revise direct access for '->vbox' to use gtk_dialog_get_content_area() instead.
Revise direct access for '->window' to use gtk_widget_get_window() instead.
Remove direct access for '->colorsel' and replace with gtk_color_selection_dialog_get_color_selection()
Rob Norris [Fri, 22 Feb 2013 23:12:31 +0000 (23:12 +0000)]
Position Trackpoint Edit and Waypoint dialogs to not obscure the selected point.
Shift the dialog towards the opposite edge if we think the dialog will be drawn over the selected point.
For Trackpoint Edit this means it gets shifted up or down,
whilst the Waypoint Property/Edit dialog is shifted left or right.
Positioning of the dialog for a new Waypoint is unchanged.
Rob Norris [Wed, 27 Feb 2013 00:00:52 +0000 (00:00 +0000)]
When adding layers insert 'Base' layers (i.e Maps/GeoRef/DEM) below the selected layer.
Consider a common scenario of opening a GPX or KML file so there is now a TrackWaypoint layer.
Then one adds a map layer (previously this then gets inserted above the trackwaypoint layer
and one can no longer see the tracks or waypoints) so now it gets placed below the TRW layer
and hence the GPS info is still visible.
Maintain the ordering of layers when opened from a file.