messageTray: Don't always open the source when clicking on the notification
Some consumers may not always want to open the app, so make clients that want to do this explicitly connect to the 'clicked' signal. https://bugzilla.gnome.org/show_bug.cgi?id=710137
This commit is contained in:
@ -39,6 +39,9 @@ const WindowAttentionHandler = new Lang.Class({
|
||||
let [title, banner] = this._getTitleAndBanner(app, window);
|
||||
|
||||
let notification = new MessageTray.Notification(source, title, banner);
|
||||
notification.connect('clicked', function() {
|
||||
source.open();
|
||||
});
|
||||
notification.setForFeedback(true);
|
||||
|
||||
source.notify(notification);
|
||||
@ -79,7 +82,7 @@ const Source = new Lang.Class({
|
||||
return this._app.create_icon_texture(size);
|
||||
},
|
||||
|
||||
open : function(notification) {
|
||||
open: function() {
|
||||
Main.activateWindow(this._window);
|
||||
this.destroy();
|
||||
}
|
||||
|
Reference in New Issue
Block a user