Bug 150417

Summary: KDialog --textbox should return 1 upon cancellation
Product: [Applications] kdialog Reporter: Tomer Shalev <shalev.tomer>
Component: generalAssignee: Brad Hards <bradh>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tomer Shalev 2007-10-02 17:07:18 UTC
Version:           1.0 (using KDE KDE 3.5.7)
Installed from:    Debian testing/unstable Packages

Hi,

I use a script to show a license and I want to determine whether the user approves a certain file.
I can easily do it using zenity, as it distinguishes whether the user has pressed the 'CLOSE' button, or cancelled the dialog using the 'ESC' button.
I cannot do it using kdialog, as it returns 0, no matter what...

# User presses OK button to approve:

$ kdialog --textbox license.txt ; echo ret=$?
ret=0

# User presses CLOSE button to approve:

$ zenity --text-info --filename notes.txt ; echo ret=$?
ret=0

# User presses on the 'X' button, or the 'ESC' key, to disapprove:

$ kdialog --textbox notes.txt ; echo ret=$?
ret=0
$ zenity --text-info --filename license.txt ; echo ret=$?
ret=1
Comment 1 Urs Wolfer 2008-01-14 21:29:14 UTC
SVN commit 761427 by uwolfer:

Return 1 when textbox got closed with close button or ESC.
BUG: 150417

 M  +1 -2      widgets.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=761427