summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2016-05-21 18:11:26 +0000
committerintrigeri <intrigeri@boum.org>2016-05-21 18:11:26 +0000
commit66ffb1b198414ec04a3cf8d9f12b0dfb48f42b60 (patch)
treec753abeb4376b655541ef41ce901482483e1da67 /config/chroot_local-includes
parentc9426d8155088a9005515d7d01385a42bad66176 (diff)
parentbbf75c8533f4cbae30200b28c265615b9a34d0ad (diff)
Merge remote-tracking branch 'origin/feature/11229-remove-zenity-focus-hacks' into devel
Diffstat (limited to 'config/chroot_local-includes')
-rwxr-xr-xconfig/chroot_local-includes/usr/local/bin/electrum8
-rwxr-xr-xconfig/chroot_local-includes/usr/local/bin/icedove8
-rwxr-xr-xconfig/chroot_local-includes/usr/local/bin/tor-browser7
-rwxr-xr-xconfig/chroot_local-includes/usr/local/sbin/i2p-browser7
-rwxr-xr-xconfig/chroot_local-includes/usr/local/sbin/unsafe-browser7
5 files changed, 12 insertions, 25 deletions
diff --git a/config/chroot_local-includes/usr/local/bin/electrum b/config/chroot_local-includes/usr/local/bin/electrum
index 7941df1..52aa937 100755
--- a/config/chroot_local-includes/usr/local/bin/electrum
+++ b/config/chroot_local-includes/usr/local/bin/electrum
@@ -22,12 +22,8 @@ verify_start () {
"
local launch="`gettext \"_Launch\"`"
local exit="`gettext \"_Exit\"`"
- # Since zenity can't set the default button to cancel, we switch the
- # labels and interpret the return value as its negation.
- if zenity --question --title "" --ok-label "${exit}" \
- --cancel-label "${launch}" --text "${dialog_msg}"; then
- return 1
- fi
+ zenity --question --title "" --text "${dialog_msg}" --default-cancel \
+ --ok-label "${launch}" --cancel-label "${exit}"
}
if ! electrum_config_is_persistent; then
diff --git a/config/chroot_local-includes/usr/local/bin/icedove b/config/chroot_local-includes/usr/local/bin/icedove
index 440dfa3..839b652 100755
--- a/config/chroot_local-includes/usr/local/bin/icedove
+++ b/config/chroot_local-includes/usr/local/bin/icedove
@@ -29,12 +29,8 @@ warn_about_claws_mail_persistence() {
local launch="`gettext \"_Launch\"`"
local exit="`gettext \"_Exit\"`"
- # Since zenity can't set the default button to cancel, we switch the
- # labels and interpret the return value as its negation.
- if zenity --question --title "" --ok-label "${exit}" \
- --cancel-label "${launch}" --text "${dialog_msg}"; then
- return 1
- fi
+ zenity --question --title "" --text "${dialog_msg}" --default-cancel \
+ --ok-label "${launch}" --cancel-label "${exit}"
}
start_icedove() {
diff --git a/config/chroot_local-includes/usr/local/bin/tor-browser b/config/chroot_local-includes/usr/local/bin/tor-browser
index 0e18b79..ac3905f 100755
--- a/config/chroot_local-includes/usr/local/bin/tor-browser
+++ b/config/chroot_local-includes/usr/local/bin/tor-browser
@@ -41,11 +41,8 @@ ask_for_confirmation() {
local dialog_text="`gettext \"Tor is not ready. Start Tor Browser anyway?\"`"
local dialog_start="`gettext \"Start Tor Browser\"`"
local dialog_cancel="`gettext \"Cancel\"`"
- # zenity can't set the default button to cancel, so we switch the
- # labels and interpret the return value as its negation.
- ! zenity --question \
- --title "$dialog_title" --text="$dialog_text" \
- --cancel-label "$dialog_start" --ok-label "$dialog_cancel"
+ zenity --question --title "$dialog_title" --text="$dialog_text" \
+ --default-cancel --ok-label "$dialog_start" --cancel-label "$dialog_cancel"
}
start_browser() {
diff --git a/config/chroot_local-includes/usr/local/sbin/i2p-browser b/config/chroot_local-includes/usr/local/sbin/i2p-browser
index e72b759..32f0b7d 100755
--- a/config/chroot_local-includes/usr/local/sbin/i2p-browser
+++ b/config/chroot_local-includes/usr/local/sbin/i2p-browser
@@ -37,10 +37,9 @@ verify_start () {
`gettext \"The I2P router console is not ready.\"`"
local launch="`gettext \"_Launch\"`"
local exit="`gettext \"_Exit\"`"
- # Since zenity can't set the default button to cancel, we switch the
- # labels and interpret the return value as its negation.
- if sudo -u "${SUDO_USER}" zenity --question --title "" --ok-label "${exit}" \
- --cancel-label "${launch}" --text "${dialog_msg}"; then
+ if ! sudo -u "${SUDO_USER}" \
+ zenity --question --title "" --text "${dialog_msg}" --default-cancel \
+ --cancel-label "${exit}" --ok-label "${launch}" ; then
exit 0
fi
}
diff --git a/config/chroot_local-includes/usr/local/sbin/unsafe-browser b/config/chroot_local-includes/usr/local/sbin/unsafe-browser
index ed439c9..81211f2 100755
--- a/config/chroot_local-includes/usr/local/sbin/unsafe-browser
+++ b/config/chroot_local-includes/usr/local/sbin/unsafe-browser
@@ -40,10 +40,9 @@ verify_start () {
`gettext \"Network activity within the Unsafe Browser is <b>not anonymous</b>.\\nOnly use the Unsafe Browser if necessary, for example\\nif you have to login or register to activate your Internet connection.\"`"
local launch="`gettext \"_Launch\"`"
local exit="`gettext \"_Exit\"`"
- # Since zenity can't set the default button to cancel, we switch the
- # labels and interpret the return value as its negation.
- if sudo -u "${SUDO_USER}" zenity --question --title "" --ok-label "${exit}" \
- --cancel-label "${launch}" --text "${dialog_msg}"; then
+ if ! sudo -u "${SUDO_USER}" \
+ zenity --question --title "" --text "${dialog_msg}" --default-cancel \
+ --ok-label "${launch}" --cancel-label "${exit}"; then
exit 0
fi
}