Updating 46/vertical-workspaces to version 46.2+20240828 [5b87af5].
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
6c3def31e8
commit
f2db668ec8
27 changed files with 6003 additions and 4248 deletions
|
@ -10,9 +10,13 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import Clutter from 'gi://Clutter';
|
||||
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js';
|
||||
|
||||
const shellVersion46 = !Clutter.Container;
|
||||
|
||||
let Me;
|
||||
let opt;
|
||||
|
||||
|
@ -86,9 +90,8 @@ const WindowAttentionHandlerCommon = {
|
|||
}
|
||||
|
||||
const app = this._tracker.get_window_app(window);
|
||||
// const source = new WindowAttentionHandler.WindowAttentionSource(app, window);
|
||||
let args;
|
||||
if (!Main.overview.dash.add_actor) // detects GS 46 - Clutter.Container has been removed
|
||||
if (shellVersion46)
|
||||
args = { title: app.get_name() };
|
||||
else
|
||||
args = app.get_name();
|
||||
|
@ -98,24 +101,44 @@ const WindowAttentionHandlerCommon = {
|
|||
source._init(app, window);
|
||||
Main.messageTray.add(source);
|
||||
|
||||
let [title, banner] = this._getTitleAndBanner(app, window);
|
||||
let [title, body] = this._getTitleAndBanner(app, window);
|
||||
args = shellVersion46
|
||||
? [{ source, title, body, forFeedback: true }]
|
||||
: [source, title, body];
|
||||
|
||||
const notification = new MessageTray.Notification(...args);
|
||||
if (!shellVersion46)
|
||||
notification.setForFeedback(true);
|
||||
|
||||
const notification = new MessageTray.Notification(source, title, banner);
|
||||
notification.connect('activated', () => {
|
||||
source.open();
|
||||
});
|
||||
notification.setForFeedback(true);
|
||||
|
||||
if (opt.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS)
|
||||
// just push the notification to the message tray without showing notification
|
||||
source.pushNotification(notification);
|
||||
else
|
||||
source.showNotification(notification);
|
||||
if (shellVersion46) {
|
||||
notification.acknowledged = opt.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS;
|
||||
source.addNotification(notification);
|
||||
if (opt.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS) {
|
||||
// just push the notification to the message tray without showing notification
|
||||
notification.acknowledged = true;
|
||||
Main.messageTray._notificationQueue.push(notification);
|
||||
Main.panel.statusArea.dateMenu._indicator.show();
|
||||
}
|
||||
window.connectObject('notify::title', () => {
|
||||
[title, body] = this._getTitleAndBanner(app, window);
|
||||
notification.set({ title, body });
|
||||
}, source);
|
||||
} else {
|
||||
if (opt.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS)
|
||||
// just push the notification to the message tray without showing notification
|
||||
source.pushNotification(notification);
|
||||
else
|
||||
source.showNotification(notification);
|
||||
|
||||
window.connectObject('notify::title', () => {
|
||||
[title, banner] = this._getTitleAndBanner(app, window);
|
||||
notification.update(title, banner);
|
||||
}, source);
|
||||
window.connectObject('notify::title', () => {
|
||||
[title, body] = this._getTitleAndBanner(app, window);
|
||||
notification.update(title, body);
|
||||
}, source);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue