Switch to the corresponding app when the notification icon is clicked
This adds some meaningful functionality to the notification icons in the tray and in the notification pop-up and allows to switch to the application that sent the notification. We get the application from the notification context and set it on the source for the notification.
This commit is contained in:
@ -85,12 +85,18 @@ Notification.prototype = {
|
||||
}
|
||||
|
||||
let icon = this.source.createIcon(ICON_SIZE);
|
||||
icon.reactive = true;
|
||||
this.actor.add(icon, { row: 0,
|
||||
col: 0,
|
||||
x_expand: false,
|
||||
y_expand: false,
|
||||
y_fill: false });
|
||||
|
||||
icon.connect('button-release-event', Lang.bind(this,
|
||||
function () {
|
||||
this.source.clicked();
|
||||
}));
|
||||
|
||||
// The first line should have the title, followed by the
|
||||
// banner text, but ellipsized if they won't both fit. We can't
|
||||
// make St.Table or St.BoxLayout do this the way we want (don't
|
||||
|
Reference in New Issue
Block a user