All pastes #1191410 Raw Edit

Untitled

public text v1 · immutable
#1191410 ·published 2008-09-02 11:32 UTC
rendered paste body
make_dialog()
{

    local title="$1"
    local text_label="$2"
    local buttons="$3"
    local image="$4"
    tkdialog=$(cat << EOF
from libtovid.appdialogs import ConfirmDialog
from Tkinter import Tk

buttons = '$buttons'.split(',')

root = Tk()
a = ConfirmDialog(root, '$title', '$text_label', buttons, '$image')
a.run()
EOF)

    echo "$tkdialog"
    python <<< "$tkdialog"

}

if make_dialog "Preview" "Preview OK ?" "yes,no" "$HOME/preview.gif"; then
    echo 'yes'
else
    echo 'no'
fi