]> git.tue.mpg.de Git - gsu.git/commitdiff
gui: Treat dialog exit code 255 just like 1.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 5 Jul 2022 22:10:59 +0000 (00:10 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 14 Feb 2023 13:28:03 +0000 (14:28 +0100)
Dialog exits with code 255 if escape was pressed. This change makes the
escape key more useful in the main menu invoked via _browse() since it
no longer terminates the program but results to show the parent menu.

gui

diff --git a/gui b/gui
index 42975647e6900bb67c900c8108cc9925e4022739..e9eb1a86e8fe1ec66c80ee8fb394fec7425cc3d4 100644 (file)
--- a/gui
+++ b/gui
@@ -30,7 +30,7 @@ _set_dialog_ret()
 
        case "$ec" in
        0) ret=$GSU_SUCCESS;;
-       1) ret=1;; # cancelled
+       1|255) ret=1;; # cancelled
        *)
                result="dialog exit code $ec"
                ret=-$E_GSU_DIALOG