James Turner [Wed, 19 Feb 2014 04:07:29 +0000 (20:07 -0800)]
getprop/setprop allows integer indices.
As suggested by a long-standing enhancement idea,
extend getprop/setprop to accept multiple args,
including integer arguments. This removes the need
for string concatenation (and hence, allocation)
on the Nasal side.
James Turner [Thu, 13 Feb 2014 18:52:52 +0000 (18:52 +0000)]
Use new SGBucket API in tile-manager
- check for invalid tiles / buckets, which occurs at the poles
- use .sibling() method to offset
- no longer need to store view lat/lon in the manager.
Thomas Geymayer [Sun, 9 Feb 2014 16:40:19 +0000 (17:40 +0100)]
Autopilot: add interface properties and property-root.
- Support interface properties as with JSBSim for easy reuse
and parametrization of autopilot components.
- Add property-root property to allow changing property root
for all relative paths. This allows easy use of multiple
instances of the same autopilot component at the same time
by specifiying different property root nodes.
Curtis L. Olson [Wed, 5 Feb 2014 16:04:18 +0000 (10:04 -0600)]
Add an 'overrideRedirect' flag to the window configuration section. For
multi-headed Gnome based linux systems, this provides an extra hint that we
really wish to open up our full screen window spanning all physical displays.
This works around a kink in the gnome window manager where it tries to "lie"
to applications about the full screen size assuming most applications don't
wish their windows to span multiple physical displays.
James Turner [Thu, 23 Jan 2014 17:41:24 +0000 (17:41 +0000)]
Update image-server logic.
- no dependency on libJpeg or Simgear
- no duplicate rendering of the scene (uses a draw callback)
- supports other image types, eg PNG
- threaded so doesn't block the main loop ever
Rebecca Palmer [Fri, 24 Jan 2014 21:20:10 +0000 (21:20 +0000)]
Fix compilation with SYSTEM_SQLITE, from Markus Wanner
Fix error "no known conversion for argument 1 from ‘sqlite3_int64
{aka long long int}’ to ‘PositionedID& {aka long int&}’"
(Both those types are int64, but that evidently isn't enough)
James Turner [Sat, 25 Jan 2014 10:36:00 +0000 (10:36 +0000)]
Report bad command-line args via message box.
This makes the behaviour when FGRun (or other GUI launchers)
send bad options much more explicable. Non Windows/Mac systems
get an SG_ALERT on the console as before.
Firstly search model in $fg-root/AI/ path,
if not found, search model in --fg-aircraft paths,
if not found, search model in $fg-root/Aircraft path
This commit should solve the complaint "I have an aircraft in a separate Aircraft/ folder
but during MP session other user are shown with the aircraft from the $fg-root/Aircraft path
instead of this behaviour I want to see the aircraft from my separate Aircraft/ folder"
James Turner [Mon, 20 Jan 2014 18:43:02 +0000 (18:43 +0000)]
Windows native file-dialog, menu-bar
By Gijs with additions by James. Menubar is disabled at present
since it's not usable and potentially inferior to other solutions,
but committing the code so it doesn't rot.
James Turner [Sun, 19 Jan 2014 16:49:32 +0000 (16:49 +0000)]
Crash-fix: mat-lib is now reference-counted.
Adapt to corresponding SG change to make SGMaterialLib be ref-counted,
and have the 'reload-materials' command notify the tile-manager of this,
so it can update the options struct it passes to new tiles.
James Turner [Wed, 15 Jan 2014 22:00:09 +0000 (22:00 +0000)]
Bug-fix: Cocoa menus work in aircraft with custom dialogs.
Restarting the GUI could cause Cocoa menus to misbehave, due to
destruction behaviour of SGBinding. Use new clear() helper in the
short term to work around this.
James Turner [Wed, 15 Jan 2014 17:10:12 +0000 (17:10 +0000)]
Tweaks to fg-aircraft handling.
Warn (but do not require, since people would probably complain) when
added paths do not contain an Aircraft subdir. When people specify
a path which ends in /Aircraft, use the parent directory.
James Turner [Tue, 14 Jan 2014 13:11:06 +0000 (13:11 +0000)]
Crashfix: move spatial, AI queries in map-widget
In threaded OSG drawing, MapWidget::draw runs in the render
thread context, but touches lots of main thread state. Move most of the
work to an update() helper run on the main thread instead, so draw()
mostly makes pure GL calls.
(This is a fix for 3.0, the real solution is to migrate to a
Canvas-based map and GUI)
James Turner [Mon, 13 Jan 2014 21:08:32 +0000 (21:08 +0000)]
Fix bug 1286 - mouse scroll-wheel+shift ignored
On Mac, the OS is mapping shift+wheel to horizontal scrolling for
those of us without a mighty-mouse or trackpad. Detect this case
and map back to vertical scrolling inside FlightGear for the moment.
James Turner [Mon, 6 Jan 2014 08:28:40 +0000 (08:28 +0000)]
Crash fix: thread-safe material conditions
When tiles are being loaded, re-evaluate the materials cache once
per update cycle. (This is probably too often, but no worse than the
previous approach).
Use the new (in SimGear) sgGMTime helper when comparing METAR age.
This prevents users in time-zones 4 or more hours ahead of GMT from
being unable to use METAR reports.
James Turner [Mon, 30 Dec 2013 15:23:01 +0000 (15:23 +0000)]
Fix crash on exit (cancel the osgDB pager)
- borrow some code from the new reset codepath to cleanly stop the
OSG pager thread during normal shutdown. Avoids a race-condition
destroying various structures the pager thread might be modifying.
Rebecca Palmer [Tue, 17 Dec 2013 18:09:12 +0000 (18:09 +0000)]
Always make sure the Terrasync directory is set and exists
This was previously done only if Terrasync was on, but this made
it impossible to use the GUI dialog to turn it on for the first
time in a fresh install