#! /bin/bash . /usr/local/share/gtkbash/gtk.bash msg[0]="All of out ancient history, as one of our wits remarked, is no more then then accepted fiction. -- Voltaire" msg[1]="Unix is simple and coherent, but it takes a genius (or at any rate, a programmer) to understand and appreciate the simplicity. -- Dennis M Ritchie" msg[2]="It looked insanely complicated, and this was one of the reasons why the snug plastic cover it fitted into had the words DON'T PANIC printed on it in large friendly letters. -- Douglas Adams, The Hitch Hiker's Guide to the Galaxy" msg[3]="I never could make out what those damned dots meant. -- Lord Randolph Churchill" npresses=0 function pressed { if [ $npresses -le 3 ] then echo ${msg[$npresses]} | fmt npresses=$((npresses + 1)) else gtk_exit 0 fi } gtk_init $* gtk_window_new MAIN GTK_WINDOW_TOPLEVEL # gtk_window_set_title MAIN "hello, world" gtk_container_border_width $MAIN 10 gtk_button_new_with_label BUTTON "Hello, World!" g_signal_connect $BUTTON clicked pressed "" gtk_container_add $MAIN $BUTTON gtk_tooltips_new TOOLTIP gtk_tooltips_set_tip $TOOLTIP $BUTTON "Press for a message" "" gtk_widget_show $BUTTON gtk_widget_show $MAIN gtk_main