lib/autotest_notification/linux.rb in autotest-notification-2.3.3 vs lib/autotest_notification/linux.rb in autotest-notification-2.3.4
- old
+ new
@@ -29,11 +29,11 @@
def has_zenity?
system "which zenity > /dev/null 2>&1"
end
def notify_send(title, msg, img, priority = 0)
- urgency = priority > 1 ? 'critical' : priority < 0 ? 'low' : 'normal'
- system "notify-send -t #{Config.expiration_in_seconds * 1000} -i #{img} -u #{urgency} '#{title}' '#{msg}'"
+ urgency = priority < 0 ? 'low' : Config.expiration_in_seconds > 0 ? 'normal' : 'critical'
+ system "notify-send -h int:transient:1 -t #{Config.expiration_in_seconds * 1000} -i #{img} -u #{urgency} '#{title}' '#{msg}'"
end
def kdialog(title, msg, img)
system "kdialog --title '#{title}' --passivepopup '<img src=\"#{img}\" align=\"middle\"> #{msg}' #{Config.expiration_in_seconds}"
end