Rewrote the session management script.

This commit is contained in:
Mid Favila 2021-04-23 21:56:58 -03:00
parent 0ee252a557
commit 8f8ebd2d5e
2 changed files with 157 additions and 164 deletions

View File

@ -1 +1 @@
bubble-slope.png lain_god.png

View File

@ -5,164 +5,140 @@ Init
Begin Begin
End End
Widget 1 Widget 1
Property Property
Title {Please select an option.} Title {Please select an option.}
Size 200 30 Size 200 30
Position 75 10 Position 75 10
Type ItemDraw Type ItemDraw
Flags NoReliefString NoFocus Flags NoReliefString NoFocus
Colorset 9
End
Widget 2
Property
Title {Restart FXDE}
Size 100 15
Position 125 54
Type ItemDraw
Flags NoReliefString NoFocus
Colorset 9
End
Widget 3
Property
Title {Halt FXDE}
Size 100 15
Position 113 74
Type ItemDraw
Flags NoReliefString NoFocus
Colorset 9
End
Widget 4
Property
Title {Restart Machine}
Size 100 15
Position 125 94
Type ItemDraw
Flags NoReliefString NoFocus
Colorset 9
End
Widget 5
Property
Title {Halt Machine}
Size 80 15
Position 125 114
Type ItemDraw
Flags NoReliefString NoFocus
Colorset 9
End
Widget 6
Property
Title {}
Size 0 0
Position 105 55
Type RadioButton
Flags
Colorset 10
Value 1
Main Main
Case message of Case message of
SingleClic : SingleClic :
Begin Begin
ChangeValue 6 1
ChangeValue 7 0
ChangeValue 8 0
ChangeValue 9 0
End
End
Widget 7
Property
Title {}
Size 0 0
Position 105 75
Type RadioButton
Flags
Colorset 10
Value 0
Main
Case message of
SingleClic :
Begin
ChangeValue 6 0
ChangeValue 7 1
ChangeValue 8 0
ChangeValue 9 0
End End
End End
Widget 8
Widget 2
Property Property
Title {} Title {}
Size 0 0 Size 0 0
Position 115 55 Position 105 95
Flags NoReliefString
Colorset 10
Type RadioButton Type RadioButton
Value 1 Flags
Main
Case message of
SingleClic :
Begin
ChangeValue 2 1
ChangeValue 3 0
ChangeValue 4 0
ChangeValue 5 0
End
End
Widget 3
Property
Title {}
Size 0 0
Position 115 75
Flags NoReliefString
Colorset 10 Colorset 10
Type RadioButton
Value 0 Value 0
Main Main
Case message of Case message of
SingleClic : SingleClic :
Begin Begin
ChangeValue 2 0 ChangeValue 6 0
ChangeValue 3 1 ChangeValue 7 0
ChangeValue 4 0 ChangeValue 8 1
ChangeValue 5 0 ChangeValue 9 0
End End
End End
Widget 4
Widget 9
Property Property
Title {} Title {}
Size 0 0 Size 0 0
Position 115 95 Position 105 115
Flags NoReliefString
Colorset 10
Type RadioButton Type RadioButton
Value 0 Flags
Main
Case message of
SingleClic :
Begin
ChangeValue 2 0
ChangeValue 3 0
ChangeValue 4 1
ChangeValue 5 0
End
End
Widget 5
Property
Title {}
Size 0 0
Position 115 115
Flags NoReliefString
Colorset 10 Colorset 10
Type RadioButton
Value 0 Value 0
Main Main
Case message of Case message of
SingleClic : SingleClic :
Begin Begin
ChangeValue 2 0 ChangeValue 6 0
ChangeValue 3 0 ChangeValue 7 0
ChangeValue 4 0 ChangeValue 8 0
ChangeValue 5 1 ChangeValue 9 1
End
End
Widget 6
Property
Title {Cancel}
Size 71 28
Position 285 140
Flags NoReliefString
Colorset 13
Type PushButton
Main
Case message of
SingleClic :
Begin
Quit
End
End End
End
Widget 20 # Dear Lord, who art our father in heaven, please forgive me for this sin.
Property Widget 10
Title {Restart FXDE Session}
Size 100 15
Position 130 54
Flags NoReliefString
Colorset 9
Type ItemDraw
End
Widget 30
Property
Title {Halt FXDE Session}
Size 100 15
Position 130 74
Flags NoReliefString
Colorset 9
Type ItemDraw
End
Widget 40
Property
Title {Restart System}
Size 100 15
Position 130 94
Flags NoReliefString
Colorset 9
Type ItemDraw
End
Widget 50
Property
Title {Halt System}
Size 80 15
Position 130 114
Flags NoReliefString
Colorset 9
Type ItemDraw
End
Widget 7
Property Property
Title {Ok} Title {Ok}
Size 71 28 Size 71 28
@ -170,37 +146,54 @@ Property
Position 215 140 Position 215 140
Flags NoReliefString Flags NoReliefString
Type PushButton Type PushButton
Main Main
Case message of Case message of
SingleClic : SingleClic :
Begin Begin
If (GetValue 2) == 1 Then If (GetValue 6) == 1 Then
Begin Begin
Do {Restart} Do {Restart}
Quit Quit
End End
Else Else
Begin Begin
If (GetValue 3) == 1 Then If (GetValue 7) == 1 Then
Begin Begin
Do {Quit} Do {Quit}
Quit Quit
End End
Else Else
Begin Begin
If (GetValue 4) == 1 Then If (GetValue 8) == 1 Then
Begin Begin
Do {Exec exec /bin/sls /bin/reboot} Do {Exec exec /bin/sls /bin/reboot}
Quit Quit
End End
Else Else
Begin Begin
If (GetValue 5) == 1 Then If (GetValue 9) == 1 Then
Begin Begin
Do {Exec exec /bin/sls /bin/shutdown} Do {Exec exec /bin/sls /bin/shutdown}
Quit Quit
End
End
End End
End End
End End
End
End
End
Widget 11
Property
Title {Cancel}
Size 71 28
Colorset 13
Position 286 140
Flags NoReliefString
Type PushButton
Main
Case message of
SingleClic :
Begin
Quit
End
End