Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 13f5dcef5358e9d5a2a5a1ae6baf28fc > files > 229

gtkdialog-0.8.3-1.mga5.x86_64.rpm

#!/bin/sh

GTKDIALOG=gtkdialog

funcentCreate() {
	local f=$1

	while [ $f -lt $2 ]; do
		echo '<entry editable="false"><default>"'$f'"</default></entry>'
		f=$((f + 1))
	done
}

MAIN_DIALOG='
<window title="VBox Scrollable" resizable="false">
	<vbox>
		<frame vbox widget scrolled window functionality>
			<hbox>
				<vbox scrollable="true" width="200" height="200">
					'"`funcentCreate 0 10`"'
				</vbox>
				<vbox scrollable="true" width-request="500" width="400" height="200">
					'"`funcentCreate 0 10`"'
				</vbox>
			</hbox>
			<hbox>
				<vbox scrollable="true" height-request="500" width="400" height="200">
					'"`funcentCreate 0 10`"'
				</vbox>
				<vbox scrollable="true" width-request="500" height-request="500" width="200" height="200">
					'"`funcentCreate 0 10`"'
				</vbox>
			</hbox>
		</frame>
		<hbox homogeneous="true">
			<button ok></button>
		</hbox>
	</vbox>
</window>
'
export MAIN_DIALOG

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