Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GCompris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
27
Issues
27
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
GCompris
Commits
f3afd95a
Commit
f3afd95a
authored
Feb 29, 2020
by
Timothée Giet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
algebra, gletters, smallnumbers, wordsgame, some cleaning in Options
parent
b1da8995
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
104 deletions
+56
-104
src/activities/algebra_by/ActivityConfig.qml
src/activities/algebra_by/ActivityConfig.qml
+6
-12
src/activities/algebra_div/ActivityConfig.qml
src/activities/algebra_div/ActivityConfig.qml
+6
-12
src/activities/algebra_minus/ActivityConfig.qml
src/activities/algebra_minus/ActivityConfig.qml
+6
-12
src/activities/algebra_plus/ActivityConfig.qml
src/activities/algebra_plus/ActivityConfig.qml
+6
-12
src/activities/gletters/ActivityConfig.qml
src/activities/gletters/ActivityConfig.qml
+6
-16
src/activities/smallnumbers/ActivityConfig.qml
src/activities/smallnumbers/ActivityConfig.qml
+6
-12
src/activities/smallnumbers2/ActivityConfig.qml
src/activities/smallnumbers2/ActivityConfig.qml
+14
-13
src/activities/wordsgame/ActivityConfig.qml
src/activities/wordsgame/ActivityConfig.qml
+6
-15
No files found.
src/activities/algebra_by/ActivityConfig.qml
View file @
f3afd95a
...
...
@@ -56,21 +56,15 @@ Item {
property
var
dataToSave
function
setDefaultValues
()
{
speedSlider
.
value
=
Qt
.
binding
(
function
()
{
return
activityConfiguration
.
speedSetting
;})
if
(
dataToSave
.
speedSetting
)
{
activityConfiguration
.
speedSetting
=
dataToSave
.
speedSetting
}
else
{
activityConfiguration
.
speedSetting
=
5
}
}
function
saveValues
()
{
var
configHasChanged
=
false
var
oldSpeed
=
activityConfiguration
.
speedSetting
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
speedSetting
"
:
speedSetting
}
if
(
oldSpeed
!==
speedSetting
)
{
configHasChanged
=
true
}
// Restart the activity with new information
if
(
configHasChanged
)
{
background
.
stop
();
background
.
start
();
}
}
}
src/activities/algebra_div/ActivityConfig.qml
View file @
f3afd95a
...
...
@@ -56,21 +56,15 @@ Item {
property
var
dataToSave
function
setDefaultValues
()
{
speedSlider
.
value
=
Qt
.
binding
(
function
()
{
return
activityConfiguration
.
speedSetting
;})
if
(
dataToSave
.
speedSetting
)
{
activityConfiguration
.
speedSetting
=
dataToSave
.
speedSetting
}
else
{
activityConfiguration
.
speedSetting
=
5
}
}
function
saveValues
()
{
var
configHasChanged
=
false
var
oldSpeed
=
activityConfiguration
.
speedSetting
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
speedSetting
"
:
speedSetting
}
if
(
oldSpeed
!==
speedSetting
)
{
configHasChanged
=
true
}
// Restart the activity with new information
if
(
configHasChanged
)
{
background
.
stop
();
background
.
start
();
}
}
}
src/activities/algebra_minus/ActivityConfig.qml
View file @
f3afd95a
...
...
@@ -57,21 +57,15 @@ Item {
property
var
dataToSave
function
setDefaultValues
()
{
speedSlider
.
value
=
Qt
.
binding
(
function
()
{
return
activityConfiguration
.
speedSetting
;})
if
(
dataToSave
.
speedSetting
)
{
activityConfiguration
.
speedSetting
=
dataToSave
.
speedSetting
}
else
{
activityConfiguration
.
speedSetting
=
5
}
}
function
saveValues
()
{
var
configHasChanged
=
false
var
oldSpeed
=
activityConfiguration
.
speedSetting
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
speedSetting
"
:
speedSetting
}
if
(
oldSpeed
!==
speedSetting
)
{
configHasChanged
=
true
}
// Restart the activity with new information
if
(
configHasChanged
)
{
background
.
stop
();
background
.
start
();
}
}
}
src/activities/algebra_plus/ActivityConfig.qml
View file @
f3afd95a
...
...
@@ -57,21 +57,15 @@ Item {
property
var
dataToSave
function
setDefaultValues
()
{
speedSlider
.
value
=
Qt
.
binding
(
function
()
{
return
activityConfiguration
.
speedSetting
;})
if
(
dataToSave
.
speedSetting
)
{
activityConfiguration
.
speedSetting
=
dataToSave
.
speedSetting
}
else
{
activityConfiguration
.
speedSetting
=
5
}
}
function
saveValues
()
{
var
configHasChanged
=
false
var
oldSpeed
=
activityConfiguration
.
speedSetting
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
speedSetting
"
:
speedSetting
}
if
(
oldSpeed
!==
speedSetting
)
{
configHasChanged
=
true
}
// Restart the activity with new information
if
(
configHasChanged
)
{
background
.
stop
();
background
.
start
();
}
}
}
src/activities/gletters/ActivityConfig.qml
View file @
f3afd95a
...
...
@@ -77,7 +77,6 @@ Item {
}
property
var
dataToSave
function
setDefaultValues
()
{
// Recreate the binding
uppercaseBox
.
checked
=
Qt
.
binding
(
function
(){
return
activityConfiguration
.
uppercaseOnly
;})
...
...
@@ -96,35 +95,26 @@ Item {
}
activityConfiguration
.
locale
=
localeUtf8
activityConfiguration
.
uppercaseOnly
=
(
dataToSave
.
uppercaseMode
===
"
true
"
)
if
(
dataToSave
.
speedSetting
)
{
activityConfiguration
.
speedSetting
=
dataToSave
.
speedSetting
}
else
{
activityConfiguration
.
speedSetting
=
10
}
}
function
saveValues
()
{
var
configHasChanged
=
false
var
oldLocale
=
activityConfiguration
.
locale
;
var
newLocale
=
activityConfiguration
.
availableLangs
[
activityConfiguration
.
localeBox
.
currentIndex
].
locale
;
// Remove .UTF-8
if
(
newLocale
.
indexOf
(
'
.
'
)
!=
-
1
)
{
newLocale
=
newLocale
.
substring
(
0
,
newLocale
.
indexOf
(
'
.
'
))
}
var
oldUppercaseMode
=
activityConfiguration
.
uppercaseOnly
activityConfiguration
.
uppercaseOnly
=
activityConfiguration
.
uppercaseBox
.
checked
var
oldSpeed
=
activityConfiguration
.
speedSetting
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
locale
"
:
newLocale
,
"
uppercaseMode
"
:
""
+
activityConfiguration
.
uppercaseOnly
,
"
speedSetting
"
:
speedSetting
}
activityConfiguration
.
locale
=
newLocale
;
if
(
oldLocale
!==
newLocale
||
oldUppercaseMode
!==
activityConfiguration
.
uppercaseOnly
||
oldSpeed
!==
speedSetting
)
{
configHasChanged
=
true
;
}
// Restart the activity with new information
if
(
configHasChanged
)
{
background
.
stop
();
background
.
start
();
}
}
}
src/activities/smallnumbers/ActivityConfig.qml
View file @
f3afd95a
...
...
@@ -57,21 +57,15 @@ Item {
property
var
dataToSave
function
setDefaultValues
()
{
speedSlider
.
value
=
Qt
.
binding
(
function
()
{
return
activityConfiguration
.
speedSetting
;})
if
(
dataToSave
.
speedSetting
)
{
activityConfiguration
.
speedSetting
=
dataToSave
.
speedSetting
}
else
{
activityConfiguration
.
speedSetting
=
10
}
}
function
saveValues
()
{
var
configHasChanged
=
false
var
oldSpeed
=
activityConfiguration
.
speedSetting
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
speedSetting
"
:
speedSetting
}
if
(
oldSpeed
!==
speedSetting
)
{
configHasChanged
=
true
}
// Restart the activity with new information
if
(
configHasChanged
)
{
background
.
stop
();
background
.
start
();
}
}
}
src/activities/smallnumbers2/ActivityConfig.qml
View file @
f3afd95a
...
...
@@ -75,21 +75,22 @@ Item {
property
var
dataToSave
function
setDefaultValues
()
{
speedSlider
.
value
=
Qt
.
binding
(
function
()
{
return
activityConfiguration
.
speedSetting
;})
for
(
var
i
=
0
;
i
<
availableModes
.
length
;
i
++
)
{
if
(
availableModes
[
i
].
value
===
dataToSave
[
"
mode
"
])
{
modeBox
.
currentIndex
=
i
;
break
;
}
}
if
(
dataToSave
.
speedSetting
)
{
activityConfiguration
.
speedSetting
=
dataToSave
.
speedSetting
}
function
saveValues
()
{
var
configHasChanged
=
false
var
oldSpeed
=
activityConfiguration
.
speedSetting
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
speedSetting
"
:
speedSetting
}
if
(
oldSpeed
!==
speedSetting
)
{
configHasChanged
=
true
else
{
activityConfiguration
.
speedSetting
=
10
}
// Restart the activity with new information
if
(
configHasChanged
)
{
background
.
stop
();
background
.
start
();
}
function
saveValues
()
{
var
newMode
=
availableModes
[
modeBox
.
currentIndex
].
value
;
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
mode
"
:
newMode
,
"
speedSetting
"
:
speedSetting
}
}
}
src/activities/wordsgame/ActivityConfig.qml
View file @
f3afd95a
...
...
@@ -95,35 +95,26 @@ Item {
}
activityConfiguration
.
locale
=
localeUtf8
activityConfiguration
.
uppercaseOnly
=
(
dataToSave
.
uppercaseMode
===
"
true
"
)
if
(
dataToSave
.
speedSetting
)
{
activityConfiguration
.
speedSetting
=
dataToSave
.
speedSetting
}
else
{
activityConfiguration
.
speedSetting
=
10
}
}
function
saveValues
()
{
var
configHasChanged
=
false
var
oldLocale
=
activityConfiguration
.
locale
;
var
newLocale
=
activityConfiguration
.
availableLangs
[
activityConfiguration
.
localeBox
.
currentIndex
].
locale
;
// Remove .UTF-8
if
(
newLocale
.
indexOf
(
'
.
'
)
!=
-
1
)
{
newLocale
=
newLocale
.
substring
(
0
,
newLocale
.
indexOf
(
'
.
'
))
}
var
oldUppercaseMode
=
activityConfiguration
.
uppercaseOnly
activityConfiguration
.
uppercaseOnly
=
activityConfiguration
.
uppercaseBox
.
checked
var
oldSpeed
=
activityConfiguration
.
speedSetting
speedSetting
=
speedSlider
.
value
dataToSave
=
{
"
locale
"
:
newLocale
,
"
uppercaseMode
"
:
""
+
activityConfiguration
.
uppercaseOnly
,
"
speedSetting
"
:
speedSetting
}
activityConfiguration
.
locale
=
newLocale
;
if
(
oldLocale
!==
newLocale
||
oldUppercaseMode
!==
activityConfiguration
.
uppercaseOnly
||
oldSpeed
!==
speedSetting
)
{
configHasChanged
=
true
;
}
// Restart the activity with new information
if
(
configHasChanged
)
{
background
.
stop
();
background
.
start
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment