~ubuntu-branches/ubuntu/lucid/kdebase/lucid

1
2
3
4
5
6
7
8
9
10
dbusRef=`kdialog --progressbar "Press Cancel at Any time" 10`
qdbus $dbusRef org.kde.kdialog.ProgressDialog.showCancelButton true

until test "true" = `qdbus $dbusRef org.kde.kdialog.ProgressDialog.wasCancelled`; do
  sleep 1
  inc=$((`qdbus $dbusRef org.freedesktop.DBus.Properties.Get org.kde.kdialog.ProgressDialog value` + 1))
  qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value $inc;
done

qdbus $dbusRef org.kde.kdialog.ProgressDialog.close