You have been subscribed to a public bug:
'cancel' button does not work
in /usr/share/gnome/help-langpack/zenity/en_GB/progress.page example
the return code tested is -1 "An unexpected error has occurred." rather
than 1 "The user has either pressed Cancel, or used the window functions
to close the dialog."
change
if [ "$?" = -1 ] ; then
to
if [ "$?" = 1 ] ; then
or maybe
case $? in
1)
zenity --error \
--text="Update canceled."
;;
-1)
zenity --error \
--text="An unexpected error has occurred."
;;
esac
from /usr/share/gnome/help-langpack/zenity/en_GB:
...
<code>
#!/bin/sh
(
echo "10" ; sleep 1
echo "# Updating mail logs" ; sleep 1
echo "20" ; sleep 1
echo "# Resetting cron jobs" ; sleep 1
echo "50" ; sleep 1
echo "This line will just be ignored" ; sleep 1
echo "75" ; sleep 1
echo "# Rebooting system" ; sleep 1
echo "100" ; sleep 1
) |
zenity --progress \
--title="Update System Logs" \
--text="Scanning mail logs..." \
--percentage=0
if [ "$?" = -1 ] ; then
zenity --error \
--text="Update canceled."
fi
</code>
...
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: ubuntu-docs 12.10.2
ProcVersionSignature: Ubuntu 3.5.0-16.25-generic 3.5.4
Uname: Linux 3.5.0-16-generic x86_64
ApportVersion: 2.5.3-0ubuntu1
Architecture: amd64
Date: Sun Sep 30 07:16:43 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120905.2)
PackageArchitecture: all
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ubuntu-docs
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: zenity (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug quantal running-unity
--
error in example for zenity progress dialog
https://bugs.launchpad.net/bugs/1059102
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to zenity in Ubuntu.
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp