Commit b55398e8 authored by intrigeri's avatar intrigeri

Pass --ellipsize to zenity (refs: #16286)

This fixes dialog width and height on Buster:
https://gitlab.gnome.org/GNOME/zenity/commit/3b64d05e8a1aae1581d2bec7288d80ac4699e1b1
parent ec28190b
......@@ -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,
......
......@@ -24,7 +24,7 @@ Renaming it to <i>keepassx.kdbx</i> would allow <i>KeePassX</i> 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}"
}
......
......@@ -131,6 +131,7 @@ sub notify_user {
exec(
qw{/usr/bin/zenity --warning},
q{--ellipsize},
q{--title}, gettext('Known security issues'),
q{--text}, $body,
);
......
......@@ -73,7 +73,8 @@ def error(msg):
dialog_text = '''<b><big>{}</big></b>\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)
......
......@@ -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"
}
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment