#!/bin/bash
# Copyright (c) 2004-2005 by Silvan Calarco <silvan.calarco@qilinux.it>
# Copyright (c) 2007 by Davide Madrisan <davide.madrisan@gmail.com>

displayfile="$1"
wintitle="$2"
winicon="$3"

tmpfile=`mktemp -q -t ${0##*/}.XXXXXXXX` ||
 { echo "${0##*/}: error: cannot create temporary files." >&2 >> $logfile
    { (exit 1); exit 1; }; }

trap "rm -f $tmpfile" 0 1 2 5 15

sed "s|\x1b\[\S\{1,5\}[mG]||g" $displayfile > $tmpfile

kdialog \
   --textbox $tmpfile 800 600 \
   --caption "$wintitle"

exit 0
