From b55398e8d97f347d3ca1e24e887628d4d2603809 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 5 Jan 2019 11:55:59 +0000 Subject: [PATCH] Pass --ellipsize to zenity (refs: #16286) This fixes dialog width and height on Buster: https://gitlab.gnome.org/GNOME/zenity/commit/3b64d05e8a1aae1581d2bec7288d80ac4699e1b1 --- config/chroot_local-includes/usr/local/bin/electrum | 1 + config/chroot_local-includes/usr/local/bin/keepassx | 2 +- .../chroot_local-includes/usr/local/bin/tails-security-check | 1 + .../usr/local/bin/tails-upgrade-frontend-wrapper | 3 ++- config/chroot_local-includes/usr/local/bin/tor-browser | 2 +- config/chroot_local-includes/usr/local/sbin/unsafe-browser | 4 ++-- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config/chroot_local-includes/usr/local/bin/electrum b/config/chroot_local-includes/usr/local/bin/electrum index 9c6e371f54..62bb02089a 100755 --- a/config/chroot_local-includes/usr/local/bin/electrum +++ b/config/chroot_local-includes/usr/local/bin/electrum @@ -65,6 +65,7 @@ def verify_start(): # results 0 == True; 1 == False; 5 == Timeout results = sh.zenity('--question', '--title', '', '--default-cancel', + '--ellipsize', '--ok-label', launch_text, '--cancel-label', exit_text, '--text', dialog_msg, diff --git a/config/chroot_local-includes/usr/local/bin/keepassx b/config/chroot_local-includes/usr/local/bin/keepassx index 806259ca8e..e790c9605f 100755 --- a/config/chroot_local-includes/usr/local/bin/keepassx +++ b/config/chroot_local-includes/usr/local/bin/keepassx @@ -24,7 +24,7 @@ Renaming it to keepassx.kdbx would allow KeePassX to open it autom " local rename="`gettext \"Rename\"`" local open="`gettext \"Keep current name\"`" - zenity --question --title "" --text "${dialog_msg}" --default-cancel \ + zenity --question --ellipsize --title "" --text "${dialog_msg}" --default-cancel \ --ok-label "${rename}" --cancel-label "${open}" } diff --git a/config/chroot_local-includes/usr/local/bin/tails-security-check b/config/chroot_local-includes/usr/local/bin/tails-security-check index ce86ee17e4..f9f547e5c9 100755 --- a/config/chroot_local-includes/usr/local/bin/tails-security-check +++ b/config/chroot_local-includes/usr/local/bin/tails-security-check @@ -131,6 +131,7 @@ sub notify_user { exec( qw{/usr/bin/zenity --warning}, + q{--ellipsize}, q{--title}, gettext('Known security issues'), q{--text}, $body, ); diff --git a/config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper b/config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper index e85bf6f569..1a738f40d1 100755 --- a/config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper +++ b/config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper @@ -73,7 +73,8 @@ def error(msg): dialog_text = '''{}\n\n{}'''.format(gettext('Error'), msg) print(cli_text, file=sys.stderr) - sh.zenity('--error', '--title', "", '--text', dialog_text, _ok_code=[0,1,5]) + sh.zenity('--error', '--ellipsize', '--title', "", '--text', dialog_text, + _ok_code=[0,1,5]) sys.exit(1) diff --git a/config/chroot_local-includes/usr/local/bin/tor-browser b/config/chroot_local-includes/usr/local/bin/tor-browser index 14a624530e..4abdcd2008 100755 --- a/config/chroot_local-includes/usr/local/bin/tor-browser +++ b/config/chroot_local-includes/usr/local/bin/tor-browser @@ -44,7 +44,7 @@ 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 --question --title "$dialog_title" --text="$dialog_text" \ + zenity --question --ellipsize --title "$dialog_title" --text="$dialog_text" \ --default-cancel --ok-label "$dialog_start" --cancel-label "$dialog_cancel" } diff --git a/config/chroot_local-includes/usr/local/sbin/unsafe-browser b/config/chroot_local-includes/usr/local/sbin/unsafe-browser index 24eb30e0ab..bf0d711934 100755 --- a/config/chroot_local-includes/usr/local/sbin/unsafe-browser +++ b/config/chroot_local-includes/usr/local/sbin/unsafe-browser @@ -29,7 +29,7 @@ error () { ${@}" echo "${cli_text}" >&2 - sudo -u "${SUDO_USER}" zenity --error --title "" --text "${dialog_text}" + sudo -u "${SUDO_USER}" zenity --error --ellipsize --title "" --text "${dialog_text}" exit 1 } @@ -41,7 +41,7 @@ verify_start () { local launch="`gettext \"_Launch\"`" local exit="`gettext \"_Exit\"`" if ! sudo -u "${SUDO_USER}" \ - zenity --question --title "" --text "${dialog_msg}" --default-cancel \ + zenity --question --ellipsize --title "" --text "${dialog_msg}" --default-cancel \ --ok-label "${launch}" --cancel-label "${exit}"; then exit 0 fi -- GitLab