From 4b48aca411450fa2eca56ef1ee46638ef77d62bc Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Tue, 16 May 2017 13:51:46 +0200 Subject: [PATCH] Rename flightgear.desktop to org.flightgear.FlightGear.desktop; improve it This closes ticket #1961 (). To be sure the file is found, call app->setDesktopFileName() in src/GUI/QtLauncher.cxx if the Qt version is 5.7 or later. See and for the small changes to the desktop file contents. --- ...lightgear.desktop => org.flightgear.FlightGear.desktop} | 5 +++-- src/GUI/QtLauncher.cxx | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) rename package/{flightgear.desktop => org.flightgear.FlightGear.desktop} (84%) diff --git a/package/flightgear.desktop b/package/org.flightgear.FlightGear.desktop similarity index 84% rename from package/flightgear.desktop rename to package/org.flightgear.FlightGear.desktop index e8e53945e..f93412b12 100644 --- a/package/flightgear.desktop +++ b/package/org.flightgear.FlightGear.desktop @@ -2,6 +2,7 @@ Version=1.1 Name=FlightGear GenericName=Flight Simulator +GenericName[fr]=Simulateur de vol Comment=Practice flight training (airplanes, helicopters...) Comment[de]=Fliegen üben (Flugzeuge, Helikopter...) Comment[fr]=S’entraîner au pilotage (avions, hélicoptères...) @@ -14,9 +15,9 @@ Icon=flightgear Terminal=false Type=Application Categories=Game;Simulation -Keywords=aviation;pilot;piloting;aeronautics;simulation;aircraft;airplane;seaplane;sailplane;glider;helicopter;airship;gas balloon;parachute;paraglider;hang-glider;spacecraft;rocket;space shuttle +Keywords=aviation;pilot;piloting;simulation;aeronautics;aircraft;airplane;seaplane;sailplane;glider;helicopter;airship;gas balloon;parachute;paraglider;hang-glider;spacecraft;rocket;space shuttle Keywords[de]=Simulation;Luftfahrzeug;Flugzeug;Wasserflugzeug;Segelflugzeug;Gleiter;Helikopter;Luftschiff;Gasballon;Heißluftballon;Fallschirm;Gleitschirm;Hängegleiter;Raumfahrzeug;Rakete;Space Shuttle -Keywords[fr]=aviation;vol;pilote;pilotage;simulation;simulateur;aéronautique;aéronef;avion;hydravion;planeur;hélicoptère;ballon dirigeable;montgolfière;parachute;parapente;deltaplane;véhicule spatial;fusée;navette spatiale +Keywords[fr]=aviation;pilote;pilotage;simulation;aéronautique;aéronef;avion;hydravion;planeur;hélicoptère;ballon dirigeable;montgolfière;parachute;parapente;deltaplane;véhicule spatial;fusée;navette spatiale Keywords[it]=simulazione;aeromobile;aereo;idrovolante;aliante;elicottero;dirigibile;mongolfiera;paracadute;parapendio;deltaplano;astronave;razzo;space shuttle Keywords[nl]=simulatie;luchtvaartuig;vliegtuig;watervliegtuig;zweefvliegtuig;helikopter;luchtschip;luchtballon;valscherm;glijscherm;deltavlieger;ruimteschip;raket;ruimteveer Keywords[pt]=simulação;aeronave;avião;helicóptero;dirigível;balão;paraquedas;parapente;asa-delta;espaçonave;foguete;vaivém espacial diff --git a/src/GUI/QtLauncher.cxx b/src/GUI/QtLauncher.cxx index e3781cb91..940e9c93c 100644 --- a/src/GUI/QtLauncher.cxx +++ b/src/GUI/QtLauncher.cxx @@ -23,6 +23,8 @@ #include // Qt +#include +#include #include #include #include @@ -256,6 +258,11 @@ void initApp(int& argc, char** argv, bool doInitQSettings) app->setApplicationName("FlightGear"); app->setOrganizationDomain("flightgear.org"); +#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) + app->setDesktopFileName( + QStringLiteral("org.flightgear.FlightGear.desktop")); +#endif + // reset numeric / collation locales as described at: // http://doc.qt.io/qt-5/qcoreapplication.html#details ::setlocale(LC_NUMERIC, "C");