Commit 0282370a authored by Holger Kaelberer's avatar Holger Kaelberer
Browse files

core, main: ask for downloading voices at the first start

... to avoid that users miss the voices download.
parent cddea516
......@@ -22,6 +22,7 @@ import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Window 2.1
import QtQuick.Dialogs 1.1
import QtQml 2.2
import GCompris 1.0
import "qrc:/gcompris/src/core/core.js" as Core
......@@ -98,14 +99,24 @@ Window {
// first run
var buttonHandler = new Array();
var dialog;
buttonHandler[StandardButton.Ok] = function() {};
buttonHandler[StandardButton.Yes] = function() {
// yes -> start download
if (DownloadManager.downloadResource(
DownloadManager.getVoicesResourceForLocale(ApplicationInfo.localeShort)))
var downloadDialog = Core.showDownloadDialog(main, {});
};
buttonHandler[StandardButton.No] = function() {};
dialog = Core.showMessageDialog(main, qsTr("Welcome to GCompris!"),
qsTr("You are running GCompris for the first time."),
qsTr("You should verify that your application settings especially your language is set correctly, and that all language specific sound files are installed. You can do this in the Preferences Dialog.") +
"\n" +
qsTr("Your current locale is '%1'").arg(ApplicationInfo.localeShort) +
qsTr("Have Fun!") +
"\n" +
qsTr("Have Fun!"),
qsTr("Your current language is %1 (%2).")
.arg(Qt.locale(ApplicationInfo.localeShort).nativeLanguageName)
.arg(ApplicationInfo.localeShort) +
"\n" +
qsTr("Do you want to download the corresponding sound files now?"),
StandardIcon.Information,
buttonHandler
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment