X-Git-Url: https://jfr.im/git/irc/quakenet/qwebirc.git/blobdiff_plain/83d2124308a28050aca90b21c993c05c10ad4613..f63006ab1aac07357148022344625257f0b7fd3f:/js/ui/baseui.js diff --git a/js/ui/baseui.js b/js/ui/baseui.js index c20129e..34623fb 100644 --- a/js/ui/baseui.js +++ b/js/ui/baseui.js @@ -412,16 +412,25 @@ qwebirc.ui.NotificationUI = new Class({ this.__beeper = new qwebirc.ui.Beeper(this.uiOptions); this.__flasher = new qwebirc.ui.Flasher(this.uiOptions); - - this.beep = this.__beeper.beep.bind(this.__beeper); - - this.flash = this.__flasher.flash.bind(this.__flasher); + this.__notifier = new qwebirc.ui.Notifier(this.uiOptions); + this.cancelFlash = this.__flasher.cancelFlash.bind(this.__flasher); }, + beep: function() { + this.__beeper.beep(); + }, + notify: function(title, message, callback) { + this.__beeper.beep(); + this.__flasher.flash(); + this.__notifier.notify(title, message, callback); + }, setBeepOnMention: function(value) { if(value) this.__beeper.soundInit(); }, + setNotifications: function(value) { + this.__notifier.setEnabled(value); + }, updateTitle: function(text) { if(this.__flasher.updateTitle(text)) this.parent(text); @@ -429,6 +438,7 @@ qwebirc.ui.NotificationUI = new Class({ focusChange: function(value) { this.parent(value); this.__flasher.focusChange(value); + this.__notifier.focusChange(value); } });