21 lines
555 B
Groovy
21 lines
555 B
Groovy
package eu.mikroskeem.notificationhackery.linux
|
|
|
|
import eu.mikroskeem.notificationhackery.INotificationBackend
|
|
import org.gnome.gtk.Gtk
|
|
import org.gnome.notify.Notification
|
|
import org.gnome.notify.Notify
|
|
|
|
class LibNotify implements INotificationBackend {
|
|
LibNotify() throws Exception {
|
|
Gtk.init()
|
|
}
|
|
|
|
@Override void sendNotification(String title, String body) {
|
|
Notify.init(title)
|
|
def notification = new Notification(title, body, "dialog-information")
|
|
notification.show()
|
|
}
|
|
|
|
@Override void cleanup(){}
|
|
}
|