#!/bin/sh

GTKDIALOG=gtkdialog

export MAIN_DIALOG='
<vbox>
  <frame Checkbox example>
    <checkbox>
      <label>This is a checkbox...</label>
      <variable>CHECKBOX</variable>
      <action>echo Checkbox is $CHECKBOX now.</action>
      <action>if true enable:ENTRY</action>
      <action>if false disable:ENTRY</action>
    </checkbox>
    <entry>
      <default>Text in the entry</default>
      <variable>ENTRY</variable>
      <sensitive>false</sensitive>
    </entry>
    <checkbox>
      <label>I want an OK button NOW!</label>
      <default>true</default>
      <variable>ANOTHER_CHECKBOX</variable>
      <action>if true enable:OKBUTTON</action>
      <action>if false disable:OKBUTTON</action>
    </checkbox>
  </frame>
  <hbox>
    <button ok>
      <variable>OKBUTTON</variable>
    </button>
    <button cancel></button>
  </hbox>
</vbox>
'

$GTKDIALOG --program=MAIN_DIALOG
