Bug 150417 - KDialog --textbox should return 1 upon cancellation
Summary: KDialog --textbox should return 1 upon cancellation
Status: RESOLVED FIXED
Alias: None
Product: kdialog
Classification: Applications
Component: general (show other bugs)
Version: 1.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Brad Hards
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-02 17:07 UTC by Tomer Shalev
Modified: 2008-01-14 21:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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