#!/bin/sh

GTKDIALOG=gtkdialog

#export TMPDIR=/tmp/gtkdialog/examples/"`basename $0`"
#mkdir -p "$TMPDIR"

. gettext.sh 

MAIN_DIALOG='
<window title="Janky BT" icon-name="bluetooth" window-position="1">
			<vbox>
			<vbox>
         <text><label>"'"$(gettext "    Connect To Bluetooth    ")"'"</label></text>
			<button>
		        <label>"'"$(gettext "Instructions")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="info"></input>
				<action>geany /usr/local/janky_bt/instructions &</action>
			</button>
			<button>
		        <label>"'"$(gettext "Start Bluetooth")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="bluetooth"></input>
				<action>/usr/local/janky_bt/startbluetooth &</action>
			</button>
			<button>
		        <label>"'"$(gettext "Add Phone")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="phone_mobile"></input>
				<action>geany /usr/local/janky_bt/startnetwork &</action>
			</button>
			<button>
		        <label>"'"$(gettext "Tether to Phone")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="internet"></input>
				<action>/usr/local/janky_bt/startnetwork &</action>
			</button>
			<button>
		        <label>"'"$(gettext "Add Speaker")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="edit"></input>
				<action>geany /usr/local/janky_bt/asound.conf &</action>
			</button>
			<button>
		        <label>"'"$(gettext "Connect to Speaker")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="audio"></input>
				<action>/usr/local/janky_bt/startspeaker &</action>
			</button>
			<button>
		        <label>"'"$(gettext "Disconnect Speaker")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="audio-volume-muted-symbolic"></input>
				<action>/usr/local/janky_bt/disconnectspeaker &</action>
			</button>
			</vbox>
		<hbox>
			<button cancel></button>
			</hbox>
	</vbox>
</window>'
GUI="
<window>
 <vbox>
  <menubar>
   ...
  </menubar>
 </vbox>
 <action signal=\"hide\">exit:Exit</action>
</window>"
export MAIN_DIALOG

case $1 in
	-d | --dump) echo "$MAIN_DIALOG" ;;
	*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac
