From kde-commits Mon Jul 18 22:06:54 2016 From: Bruno Coudoin Date: Mon, 18 Jul 2016 22:06:54 +0000 To: kde-commits Subject: [gcompris] src: core, replace and improve command line disable_config Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=146887962314132 Git commit 09e99faf5e0518035bd5bb57adc3c3f6620f1f28 by Bruno Coudoin. Committed on 18/07/2016 at 22:03. Pushed by bcoudoin into branch 'master'. core, replace and improve command line disable_config The disable-config is in fact coded as a disable-kioskmode. This patch chan= ges the command line switches. Also the disabling of the kiosk mode was not removing the quit button and t= he esc button which makes sense to remove for a kiosk mode. I did left ctrl-q to quit GCompris supposing the children won't find it. M +1 -1 src/activities/menu/Menu.qml M +1 -1 src/core/Bar.qml M +8 -8 src/core/main.cpp http://commits.kde.org/gcompris/09e99faf5e0518035bd5bb57adc3c3f6620f1f28 diff --git a/src/activities/menu/Menu.qml b/src/activities/menu/Menu.qml index 6706a97..2501b29 100644 --- a/src/activities/menu/Menu.qml +++ b/src/activities/menu/Menu.qml @@ -54,7 +54,7 @@ ActivityBase { } = onHome: { - if(pageView.depth =3D=3D=3D 1) { + if(pageView.depth =3D=3D=3D 1 && !ApplicationSettings.isKioskMode)= { Core.quit(main); } else { diff --git a/src/core/Bar.qml b/src/core/Bar.qml index 5ae660f..191f850 100644 --- a/src/core/Bar.qml +++ b/src/core/Bar.qml @@ -182,7 +182,7 @@ Item { { 'bid': exit, 'contentId': content.exit, - 'allowed': true + 'allowed': !ApplicationSettings.isKioskMode }, { 'bid': about, diff --git a/src/core/main.cpp b/src/core/main.cpp index 3299555..d7dc70a 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -158,12 +158,12 @@ int main(int argc, char *argv[]) QCommandLineOption clMute(QStringList() << "m" << "mute", QObject::tr("Run GCompris without s= ound.")); parser.addOption(clMute); - QCommandLineOption clWithoutConfig(QStringList() << "disable-config", - QObject::tr("Disable the configurat= ion button.")); - parser.addOption(clWithoutConfig); - QCommandLineOption clWithConfig(QStringList() << "enable-config", - QObject::tr("Enable the configurati= on button (default).")); - parser.addOption(clWithConfig); + QCommandLineOption clWithoutKioskMode(QStringList() << "disable-kioskm= ode", + QObject::tr("Disable the kiosk mode= .")); + parser.addOption(clWithoutKioskMode); + QCommandLineOption clWithKioskMode(QStringList() << "enable-kioskmode", + QObject::tr("Enable the kiosk mode = (default).")); + parser.addOption(clWithKioskMode); parser.process(app); = = @@ -224,10 +224,10 @@ int main(int argc, char *argv[]) ApplicationSettings::getInstance()->setIsAudioEffectsEnabled(true); ApplicationSettings::getInstance()->setIsAudioVoicesEnabled(true); } - if(parser.isSet(clWithConfig)) { + if(parser.isSet(clWithoutKioskMode)) { ApplicationSettings::getInstance()->setKioskMode(false); } - if(parser.isSet(clWithoutConfig)) { + if(parser.isSet(clWithKioskMode)) { ApplicationSettings::getInstance()->setKioskMode(true); } =20