Factor common code out of xboard and gnushogi engines.
[kaya/ydirson.git] / lib / board / notify.rb
blob1489a7e5d5f01a8c2f0813e01a43783aaa2417fc
1 # Copyright (c) 2009 Paolo Capriotti <p.capriotti@gmail.com>
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 class Notify
9   def initialize(window)
10     @window = window
11   end
12   
13   def [](events)
14     events.each do |event, text|
15       KDE::Notification.event(event.to_s, text,
16         Qt::Pixmap.new, @window)
17     end
18   end
19 end