1
0
Fork 0
Commit graph

955 commits

Author SHA1 Message Date
James Turner
d800c49cb9 Custom MP server support. 2016-07-12 16:52:59 +01:00
James Turner
9650cf4e6a Initial MP support in the launcher. 2016-07-08 09:36:54 +01:00
James Turner
40b74c4e32 Fix an assert on Windows 2016-06-29 16:25:42 +01:00
James Turner
0b11dd626a Further Windows SGpath fixes 2016-06-28 16:52:42 +01:00
James Turner
6d0c2070fd Use future-proof SGPath APIs.
Remove uses of .str(), .c_str() and some other methods of SGPath.
Pass SGPath directly where possible, or explicitly convert to the
appropriate 8-bit encoding.
2016-06-28 10:08:38 +01:00
James Turner
16814800ce Use Paths instead of strings. 2016-06-22 17:36:05 +01:00
James Turner
03ecac9dbc Work with new SGPath API. 2016-06-22 17:36:05 +01:00
James Turner
6f95e61da8 For stable versions, download data tarball directly
Part of https://sourceforge.net/p/flightgear/codetickets/1865/
2016-06-17 22:48:24 +01:00
James Turner
1d912c91df Avoid overlap of ratings / progress bar
Part of issues mentioned in:

https://sourceforge.net/p/flightgear/codetickets/1865/
2016-06-17 22:42:33 +01:00
James Turner
3f7e59a1a5 Allow scenery installation from the launcher.
Replaces FGadmin functionality.
2016-06-15 22:28:54 +01:00
James Turner
3a15b2f979 Launcher: fix a crash on searching locations
When hitting return multiple times, could hit a null-pointer
crash here.
2016-06-09 11:04:32 +01:00
James Turner
95f86b658c Hide add-ons tab when running launcher in-app 2016-06-08 12:00:35 +01:00
James Turner
5d624b4882 Fallback URL when official catalog is not found.
Tolerate the case where a URL matching the exact FG version is
not found; lookup a generic URL, in the hope it supports our
version (additional changes will make this more likely)
2016-05-26 17:37:26 +01:00
James Turner
7dfe556b4a Real fix for Mac deployment issues. 2016-05-21 14:00:29 +01:00
James Turner
f2273c7793 Testing if this change broke Mac deployment.
Hopefully it didn’t but the time-frame is correct and it’s just
about the only code that happens before QApplication is created.
2016-05-21 10:36:51 +01:00
James Turner
2da1d38c56 Clearer aircraft search prompt. 2016-04-17 18:00:37 +01:00
Alessandro Menti
98a6b60b00 Launcher: silence 'Unknown aircraft URI scheme' warning on empty selection
------------------------------------------------------------------------
If no aircraft is selected in the launcher, the routine
AircraftItemModel::indexOfAircraftURI is called with an empty QUri,
triggering a warning in the terminal.

This commit removes such warning by ignoring QUris with empty schemes
(the routine still returns an invalid index).
2016-04-17 17:55:05 +01:00
Alessandro Menti
550dde314f Launcher: do not launch the simulator when closing the Qt launcher with ESC 2016-04-17 17:54:41 +01:00
Alessandro Menti
4820026907 Launcher: fix window flags on the "Add catalog" progress dialog 2016-04-17 17:54:02 +01:00
Alessandro Menti
e9e05081d5 Launcher: state that it is needed to press Enter to search for the airport 2016-04-17 17:53:36 +01:00
Alessandro Menti
0381ba8468 Launcher: disable Close button on the initial progress dialog 2016-04-17 17:53:24 +01:00
Alessandro Menti
34fd51d35c Launcher: spelling fix in "Add Catalog" dialog window 2016-04-17 17:53:02 +01:00
James Turner
bbd15eb370 Fix a typo 2016-04-15 18:03:01 +01:00
James Turner
a63da0cbde Minor improvement to hangar list in the launcher. 2016-04-15 17:27:29 +01:00
James Turner
31cad6d384 Fixes to launcher description rendering. 2016-04-15 17:21:49 +01:00
James Turner
6095646a62 Prompt the user when the default hangar is missing.
In the Qt launcher, when the default hangar isn’t found, show
a hint in the aircraft list.
2016-04-15 17:06:53 +01:00
James Turner
43add4f820 Fix stray back-button in Qt launcher
- when no location is set, don’t show the back button.
2016-04-14 18:54:27 +01:00
James Turner
5e4063b761 Move launcher settings store inside FG_HOME
Settings now in .ini format, at $FG_HOME/flightgear.org/FlightGear.ini
2016-04-08 10:40:26 +01:00
James Turner
5341d327fd Restructure paths handling in the launcher
- move the dialog into a new ‘add-ons’ tab

- separate out ‘restore settings’ from selecting a new fg-data

- actually relaunch the app
2016-04-08 10:26:34 +01:00
James Turner
08ea386197 Fix corrupt HUD fonts
osg::texture2D changes GL_UNPACK_ROW_LENGTH, which fntLoadTXF is not
prepared to deal with. Reset the value back to 0 before loading +
caching TXF fonts on the PLIB side.
2016-03-28 22:54:24 +01:00
James Turner
5baca8598f Improve download-dir behaviour.
When set on the command line, will be used for aircraft packages. When
set in the Qt launcher, will also be used for aircraft downloads at
all times.

When changing the path in the launcher, the set of aircraft catalogs
is refresh automatically. Note the default catalog may need to be
re-installed.
2016-03-24 15:10:06 +00:00
James Turner
733e3b3f0c HTTP subsystem has a default name.
Switch to using type-safe accessors now.
2016-03-24 15:08:38 +00:00
James Turner
cbf16b7966 Fix copy-paste bug setting season in the Qt guy
Spotted by Adrian Serrano!
2016-03-22 10:56:05 +00:00
James Turner
74f17d2882 Fix missing menubar on Mac in some setups
- Only clear the OSG ‘pose as standalone’ flag when we really show
  a dialog, as opposed to when we /might/ show.

Tested:
 - Qt build using launcher
 - No Qt build 
 - Qt build but launcher not requested
2016-03-19 14:46:11 +00:00
Torsten Dreyer
1bf5fe1c27 Fix for FreeBSD and a typo
Fix provided by Ganael LAPLANCHE, thanks!
2016-03-12 20:55:46 +01:00
James Turner
43b4db7ef7 Improve UI around adding aircraft dirs
- Check if the selected path, or an ‘Aircraft’ subdir,  contains
some -set.xml files, and if not, warn the user.
2016-03-05 09:35:02 +00:00
James Turner
688ae7d156 Bugfix: Qt launcher, enable variant aircraft on-disk
When mapping a URI to a QModelIndex, we were only considering the 
primary aircraft path, for on-disk aircraft as opposed to packages.
2016-03-05 09:34:16 +00:00
James Turner
1aa6482a59 Fix bug #1845, closing the Qt launcher
Intercept the close event and quit the app instead of continuing to
run the main FlightGear application.

https://sourceforge.net/p/flightgear/codetickets/1845/
2016-02-24 21:50:48 +02:00
Rebecca N. Palmer
e1d0699bdb add new QtFileDialog to avoid using Nasal in file selectors
(and hence avoid applying Nasal security rules to them)
2016-02-10 22:58:56 +00:00
James Turner
c72309360e Defensive handling of locales.
- Use setlocale() to ensure consistent handling of locales and
  string handling irrespective of whether or not QCoreApplication
  is invoked. Forces a the C locale for numerics and collation,
  since many pieces of FG assume this.
2016-02-02 20:44:46 +00:00
James Turner
2677b3a226 Use target_include_directories in some places.
I didn’t know about this feature when doing the original CMake files,
we can use this to target header-file includes more precisely.

(Probably more cases exist that can be changed from global to target-
specific includes)
2016-01-26 07:48:30 +01:00
James Turner
d81d353940 Improved fg-root control from the Qt Launcher
- add a button to the main dialog, explaining how to adjust the 
  fg-root path via the GUI
- tweak the GUI flow to support explicitly changing the path even
  when the default path is acceptable.
2016-01-18 20:06:43 -05:00
James Turner
e32b02b28f Launcher: fix slot name for old-style syntax 2016-01-12 17:25:54 -06:00
Erik Hofman
f19c8ac05d Apperently maybeRestoreAircraftSelection() needs to be a slot 2016-01-11 09:46:16 +01:00
James Turner
409ffc971d Fixes to launcher aircraft delegate.
- fix some text size computation issues
2016-01-10 23:46:44 -06:00
James Turner
d10d279064 Launcher finds parking positions from scenery
- change launcher to examine the scenery paths and hence load
  ground-net files for airports to populate parking data.

- refactor ground-net XML parsing to use FGGroundNetwork only, not
  AirportDynamics. 

- change parenting  of GroundNetwork to Airport, since it contains
  immutable data now.
2016-01-10 16:38:01 -06:00
James Turner
4befe0e6ea Launcher: Maintain aircraft selection better
- when launching or toggling settings, try to keep the current
  aircraft selected and in-view.
2016-01-10 13:47:57 -06:00
James Turner
b0ee3f98f3 ‘only show installed checkbox’ for Qt launcher
- will be replaced when I think of a prettier UI, but this
  feature is important to have for now.
2016-01-10 12:56:46 -06:00
James Turner
e5c6d14cef Allow re-ordering of paths in the launcher.
- suggested by Gilberto, allow the user to set the order of the
  scenery and aircraft paths by dragging.
2016-01-09 17:17:58 -06:00
James Turner
359f924ec9 Package variants working. 2016-01-03 20:58:03 -06:00
James Turner
fc9c43b48d Remove FontCache from globals.
- access via a singleton instead.
2016-01-03 12:00:15 -06:00
Torsten Dreyer
7a69b9beff don't always open "file opened in new browser window" popup
Setting /sim/gui/show-browser-open-hint to false disables the popup.
Default is true (show the popup)
2015-12-22 11:42:27 +01:00
James Turner
7afedb1702 Work on visualisation of Vias 2015-12-11 13:43:25 -06:00
James Turner
846fd21698 GUI support for VIA/Discontinuity 2015-12-11 13:43:25 -06:00
James Turner
8877b442f8 ATC/Traffic doesn’t crash reset.
- remove some global headers from AI headers, to avoid pollution
- change how ATC owns the ‘player’ FGAIAircraft so reset works
- ensure AIAircraft controllers are cleared on unbind for reset
2015-12-11 12:11:59 -06:00
James Turner
fc887b106b Checkpoint - ground-net skips the cache 2015-12-01 14:01:32 +00:00
James Turner
cec1de6219 Use a transaction when indexing polylines. 2015-11-29 14:18:30 +00:00
James Turner
5e4f212b84 Remove some debugs 2015-11-27 23:25:24 +00:00
James Turner
6ee7e51af3 Clamp diagram zoom.
- avoid poor performance and unusable UI when zooming out
2015-11-27 23:25:11 +00:00
James Turner
242e79f5e9 Fix some coastline issues. 2015-11-27 23:02:42 +00:00
James Turner
bfb539f090 Launcher shows polygon/polyline data 2015-11-27 23:02:42 +00:00
James Turner
6a41353bdc Remove accidentally duplicated functions. 2015-11-26 23:48:16 +00:00
James Turner
f39fc0f086 Remove a stray debug. 2015-11-26 23:48:16 +00:00
James Turner
a63fff14cc Graphical picking of parking/helipads too. 2015-11-24 22:14:22 +00:00
James Turner
cfcdd9da45 Add helipad support to the diagram.
- stops crashes selecting a heliport.
2015-11-24 21:46:14 +00:00
James Turner
3cee5eea73 Initial work on rendering parking locations. 2015-11-24 21:46:14 +00:00
Rebecca N. Palmer
cc725c61de Use SLOT for both uses of QTimer::singleShot
(fix Qt < 5.4 build)
2015-11-24 18:40:54 +00:00
James Turner
2d1c5d47ee Fix MSVC2012 build
- multi-line QStringLiteral doesn’t work on MSVC prior to 2013. Boo.
2015-11-24 15:36:53 +00:00
James Turner
9e60dcba61 Use old-style SLOT macro for Qtimer::singleShot
- member-function-pointer variant was only added in 5.4
2015-11-24 08:05:17 +00:00
Rebecca N. Palmer
997a431d53 {fatal,modal}MessageBox: Use Qt on Linux when available
(console error messages are invisible when started from an icon)
2015-11-24 07:24:32 +00:00
James Turner
be1291f689 Change handling of default hangar / catalog.
- no longer re-add it on startup, add an explicit button in the UI

(will add a more obvious item to the aircraft list in a follow-up
commit)
2015-11-23 22:58:00 +00:00
James Turner
4ea093ecc4 Ensure aircraft list stays in sync
- when removing a catalog, use the new notification to refresh
  the list, so we don’t show stale package data.
2015-11-23 17:59:16 +00:00
James Turner
3ccea681ea Fix merge noise 2015-11-23 01:19:03 +00:00
James Turner
579881322e Lat-lon startup location fixes. 2015-11-23 00:48:21 +00:00
James Turner
5184f3404c Labels on large airports in the diagram 2015-11-23 00:48:21 +00:00
James Turner
e356e691b2 Cap number of airports displayed in diagrams
- restrict heliports / seaports by aircraft type
- prioritise by runway length
- clean up airport label names
2015-11-23 00:48:21 +00:00
James Turner
1010caeaf6 Remove some debugs. 2015-11-23 00:48:20 +00:00
James Turner
97a5e15aaf Show paused message when starting frozen. 2015-11-23 00:48:20 +00:00
James Turner
e63a95feb9 Draw aircraft on airport diagram 2015-11-23 00:48:20 +00:00
James Turner
5fd350cb3d Fix unproject / navaid drawing. 2015-11-23 00:48:20 +00:00
James Turner
eb06aeba97 Closed airport support. 2015-11-23 00:48:20 +00:00
James Turner
f4500e03f4 Label de-overlapping for diagrams 2015-11-23 00:48:20 +00:00
James Turner
317498fe4a Move airplane drawing into the base class.
- ground work for showing airplane on airport diagram
2015-11-23 00:48:20 +00:00
James Turner
6ec9c36afb Fix Linux compilation issues. 2015-11-23 00:48:20 +00:00
James Turner
9ab672abd8 Location history re-instaed 2015-11-23 00:48:20 +00:00
James Turner
19a8fc8822 Fixing launcher save/restore of settings. 2015-11-23 00:48:20 +00:00
James Turner
b9acb26c07 Work on launcher diagrams. 2015-11-23 00:47:01 +00:00
James Turner
5043bf0966 Fixes to launcher aircraft thumbnail sizing
- handle large images and longer descriptions correctly
2015-11-23 00:47:01 +00:00
James Turner
ceebd59001 Fallback when aircraft description is missing.
- avoids corrupted delegate display caused by asking for
  bounds of empty string.
2015-11-23 00:47:01 +00:00
James Turner
a39df48772 Navaid diagram for launcher
- work in progress, needs labels
2015-11-23 00:47:01 +00:00
James Turner
2b18479859 Lat-lon position support 2015-11-23 00:47:01 +00:00
James Turner
adedf7af65 Navaid diagram work 2015-11-23 00:47:01 +00:00
James Turner
c277395010 Start-paused for in-air starts 2015-11-23 00:47:01 +00:00
James Turner
addcc432fd ILS drawing in the airport diagram 2015-11-23 00:47:01 +00:00
James Turner
09cac14089 Work on LocationWidget for Qt launcher 2015-11-23 00:47:01 +00:00
James Turner
56d7d049bc Launcher GUI for in-air / navaid starts 2015-11-23 00:46:25 +00:00
James Turner
1e213201cf Work on the launcher 2015-11-23 00:45:21 +00:00
Rebecca N. Palmer
9d0fe40a45 QtLauncher::initApp: store argc to avoid crash
As QApplication only stores a reference to argc, it may crash if
the argc passed to it goes out of scope.  (One way to trigger this
is to pass an invalid --fg-root, triggering an initApp call from
Options::setupRoot.)  Copy argc to prevent this.
2015-11-22 21:05:09 +00:00
James Turner
b49dd70de9 Remove some debug noise 2015-09-27 23:13:18 -05:00
James Turner
43bcc85919 Correct handling of updating packages 2015-09-27 19:44:29 -05:00