# Entete contenant les valeur par defaut

WindowTitle "Logout"
WindowSize 400 250		# Taille
WindowPosition 191 143		# Position
ForeColor	black
BackColor	grey75
ShadowColor	grey45
HilightColor		grey88
Font		-adobe-helvetica-bold-r-*-*-12-*

Init
 Begin
  WarpPointer 1
  Do "Exec playsnd /usr/lib/sounds/icon.raw"
  Set $ToDo = Restart
 End

Item 6
Property
 Title "Are you sure to:"
 Size 200 26
 Position 50 40
 Type ItemDraw
 Value 0
 Font -adobe-helvetica-bold-r-*-*-12-*
Main
 Case message of
  ClicMouse :
  Begin
  End
End


Item 1
Property
 Title "OK"
 Size 60 28
 Position 280 180
 Type PushButton
 Value 1
Main
 Case message of
  ClicMouse :
  Begin
   If $ToDo == Logout Then
   Begin
    Do "Quit"
   End
   Else
   Begin
    If $ToDo == Restart Then
    Begin
     Do "Exec xterm -geometry 80x12+150+130 -bg grey -fg red -cr red -e /sbin/shutdown -r -q now | sync"
     Quit
    End
    Else
    Begin
     Do "Exec xterm -geometry 80x12+150+130 -bg grey -fg red -cr red -e /sbin/shutdown -h -q now | sync"
     Quit
    End
   End
  End
End

Item 2
Property
 Title "Cancel"
 Size 60 28
 Position 190 180
 Type PushButton
 Value 1
Main
 Case message of
  ClicMouse :
  Begin
   Quit
  End
End

Item 3
Property
 Title "Shut down the computer"
 Position 80 80
 Size 180 20
 Type RadioButton
 Value 0
Main
 Case message of
  ClicMouse :
  Begin
   ChangeValue 4 0 
   ChangeValue 5 0 
   Set $ToDo = Halt
  End
End

Item 4
Property
 Title "Restart the computer"
 Size 150 20
 Position 80 110
 Type RadioButton
 Value 1
Main
 Case message of
  ClicMouse :
  Begin
   ChangeValue 3 0
   ChangeValue 5 0
   Set $ToDo = Restart
  End
End

Item 5
Property
 Title "Logout"
 Size 60 20
 Position 80 140
 Type RadioButton
 Value 0
Main
 Case message of
  ClicMouse :
  Begin
   ChangeValue 3 0
   ChangeValue 4 0
   Set $ToDo = Logout
  End
End
