diff options
author | Dave Shoreman | 2019-08-21 11:37:42 +0100 |
---|---|---|
committer | Dave Shoreman | 2019-08-21 11:37:42 +0100 |
commit | 16b6126a25620c2f29b50d8ce468037c4b3bda03 (patch) | |
tree | e770ad6b501c79865e1293d812c52678795ef10c | |
parent | 98d24267bd629877db86340e4f2d78d98d43f6cc (diff) | |
download | aur-16b6126a25620c2f29b50d8ce468037c4b3bda03.tar.gz |
Warn about Yad menu bug in versions 1.0 to 4.1
A bug was introduced into Yad 1.0 whereby right clicking on the tray
icon to get a context menu would throw a GTK error instead of actually
opening the menu as you'd expect.
This was not an issue in 0.42.x or earlier, and has been fixed on master
but isn't currently released. The next version including the fix is
likely to be 4.2, but since their version scheme changed recently it's
difficult to tell. If there are other changes made it could be 5.0.
Either way, when the next version is released the message will go away.
-rw-r--r-- | nextshot.install | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nextshot.install b/nextshot.install index 4353e0a5a4c3..80335f55e8c7 100644 --- a/nextshot.install +++ b/nextshot.install @@ -1,5 +1,7 @@ #!/usr/bin/env bash +readonly err=$'\e[0;31m' +readonly errBold=$'\e[1;31m' readonly success=$'\e[1;32m' readonly info=$'\e[0;36m' readonly warn=$'\e[0;33m' @@ -12,8 +14,28 @@ post_install() { echo "${reset}Run 'nextshot --deps' after configuration to ensure" echo "that you have all the required packages installed." echo + + check_yad } post_upgrade() { post_install "$1" } + +check_yad() { + local yMaj yMin yVer yVerParts + + yVer=$(type yad >/dev/null 2>&1 && yad --version | awk '{ print $1 }') + + IFS='.' read -ra yVerParts <<< "${yVer:-"0.0.0"}" + yMaj="${yVerParts[0]}" + yMin="${yVerParts[1]:-0}" + yFix="${yVerParts[2]:-0}" + + if (( yMaj >= 1 )) && (( yMaj < 4 )) || (( yMaj == 4 )) && (( yMin <= 1 )) && (( yFix == 0 )); then + echo "${errBold}WARNING: ${err}Version ${yVer} of Yad is known to break the tray menu!" + echo "${warn}If a version higher than 4.1 is available, you should upgrade to it." + echo "Alternatively, you can switch temporarily to 'yad-git' from the AUR." + echo "${reset}" + fi +} |