Class: AutotestNotification::Linux

Inherits:
Object
  • Object
show all
Defined in:
lib/autotest_notification/linux.rb

Class Method Summary collapse

Class Method Details

.notify(title, msg, img, total = 1, failures = 0, priority = 0) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/autotest_notification/linux.rb', line 5

def notify(title, msg, img, total = 1, failures = 0, priority = 0)
  Config.expiration_in_seconds = 0 if failures > 0 && STICKY

  if has_notify?
    notify_send(title, msg, img, priority)
  elsif has_zenity?
    zenity(title, msg, img)
  elsif has_kdialog?
    kdialog(title, msg, img)
  end

  say(total, failures) if SPEAKING
end