diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2016-12-25 23:40:07 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2016-12-25 23:40:07 +0000 |
commit | 5e761f5d93077b2e43e24b42dc2f2b4327372cbf (patch) | |
tree | c3307e71838dd43ab756758a7344c53d4c849348 /libsisyphus.sh | |
parent | a11db1a67423810f3c88db9b6ce2703e8cb47792 (diff) |
kill any running operation if worker window is closed
Diffstat (limited to 'libsisyphus.sh')
-rwxr-xr-x | libsisyphus.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libsisyphus.sh b/libsisyphus.sh index 689d12f..b3d7e9b 100755 --- a/libsisyphus.sh +++ b/libsisyphus.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash -# export dialog flags +# export dialog && abort flags export local showdialog="yad --title "sisyphus" --text-info --width 800 --height 600 --center --no-buttons --on-top --sticky --fixed --skip-taskbar --listen --tail" +export local abortnow="killall -9 emerge" # import user interfaces source /usr/lib64/sisyphus/accesoriesui.sh @@ -31,23 +32,28 @@ export local mainui=' <hbox space-expand="false" space-extend="false"> <button space-expand="true" space-extend="true" tooltip-text="Search package(s)"> <input file>/usr/share/sisyphus/appsearch.svg</input> - <action>epkg search $pkgname|$showdialog</action> + <action signal="button-press-event">epkg search $pkgname|$showdialog</action> + <action signal="button-release-event">$abortnow</action> </button> <button space-expand="true" space-extend="true" tooltip-text="Install package(s)"> <input file>/usr/share/sisyphus/appinstall.svg</input> - <action>epkg autoinstall $pkgname|$showdialog</action> + <action signal="button-press-event">epkg autoinstall $pkgname|$showdialog</action> + <action signal="button-release-event">$abortnow</action> </button> <button space-expand="true" space-extend="true" tooltip-text="Uninstall package(s)"> <input file>/usr/share/sisyphus/appremove.svg</input> - <action>epkg autoremove $pkgname|$showdialog</action> + <action signal="button-press-event">epkg autoremove $pkgname|$showdialog</action> + <action signal="button-release-event">$abortnow</action> </button> <button space-expand="true" space-extend="true" tooltip-text="Upgrade system"> <input file>/usr/share/sisyphus/appupgrade.svg</input> - <action>epkg autoupgrade|$showdialog</action> + <action signal="button-press-event">epkg autoupgrade|$showdialog</action> + <action signal="button-release-event">$abortnow</action> </button> <button space-expand="true" space-extend="true" tooltip-text="Remove orphan packages(s) aka no longer needed"> <input file>/usr/share/sisyphus/appcleanup.svg</input> - <action>epkg autoclean|$showdialog</action> + <action signal="button-press-event">epkg autoclean|$showdialog</action> + <action signal="button-release-event">$abortnow</action> </button> </hbox> <hseparator space-expand="true" space-extend="true"></hseparator> |