From kde-bugs-dist Fri Sep 08 05:53:00 2006 From: Juan Luis Baptiste Date: Fri, 08 Sep 2006 05:53:00 +0000 To: kde-bugs-dist Subject: [Bug 133744] New: kdialog --proressbar wasCancelled dcop call always Message-Id: <20060908075258.133744.juan.baptiste () kdemail ! net> X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=115769479218046 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. http://bugs.kde.org/show_bug.cgi?id=133744 Summary: kdialog --proressbar wasCancelled dcop call always return true after called one time Product: kdialog Version: 1.0 Platform: Compiled Sources OS/Version: Linux Status: NEW Severity: normal Priority: NOR Component: general AssignedTo: bradh frogmouth net ReportedBy: juan.baptiste kdemail net Version: 1.0 (using KDE Devel) Installed from: Compiled sources Compiler: gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk) Using built-in specs. Target: i586-mandriva-linux-gnu Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --host=i586-mandriva-linux-gnu --with-cpu=generic --with-system-zlib --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo --enable-ssp --disable-libssp Thread model: posix OS: Linux When using a progress bar with cancel button, after pressing the cancel button, the call to the wasCancelled dcop call always return true, which doesn't should be that way. For example, if the cancel button is pressed, and a --warningcontinuecancel box is shown, If the continue button of the warning window is pressed (to cancel the cancel button of the progress bar) , then the warning window will appear every time that the wasCancelled dcop call is called because wasCancelled is always returning true after the first time the cancel button was pressed. Here's an example: #!/bin/sh dcopRef=`./kdialog --progressbar "Press Cancel at Any time" 10` dcop $dcopRef showCancelButton true loop=`dcop $dcopRef wasCancelled` until test "true" == $loop; do sleep 1 if [ "true" == `dcop $dcopRef wasCancelled` ]; then kdialog --warningyesno "Are you sure you want to cancel?" if [ $? -eq 0 ]; then dcop $dcopRef close exit 1; fi loop="false" fi inc=$((`dcop $dcopRef progress` + 1)) dcop $dcopRef setProgress $inc; done dcop $dcopRef close It should be possible to call a setCancel(false) dcop call to undo the cancel button order.