[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [gcompris] src: core, replace and improve command line disable_config
From: Bruno Coudoin <bruno.coudoin () gcompris ! net>
Date: 2016-07-18 22:06:54
Message-ID: E1bPGgg-0002sz-Gy () code ! kde ! org
[Download RAW message or body]
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 changes
the command line switches.
Also the disabling of the kiosk mode was not removing the quit button and the 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 === 1) {
+ if(pageView.depth === 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 sound."));
parser.addOption(clMute);
- QCommandLineOption clWithoutConfig(QStringList() << "disable-config",
- QObject::tr("Disable the configuration button."));
- parser.addOption(clWithoutConfig);
- QCommandLineOption clWithConfig(QStringList() << "enable-config",
- QObject::tr("Enable the configuration button (default)."));
- parser.addOption(clWithConfig);
+ QCommandLineOption clWithoutKioskMode(QStringList() << "disable-kioskmode",
+ 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);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic