dolphin/kdialog/progresscanceldemo
Laurent Montel 2d61f749b7 kdialog is not generated by default in local
svn path=/trunk/KDE/kdebase/apps/; revision=838244
2008-07-27 11:31:50 +00:00

10 lines
485 B
Text
Executable file

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