mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Fix notification mappings missing .desktop
This commit is contained in:
@@ -1681,7 +1681,7 @@ export const TaskbarAppIcon = GObject.registerClass(
|
||||
let panelSize =
|
||||
this.dtpPanel.geom[this.dtpPanel.checkIfVertical() ? 'w' : 'h']
|
||||
let fontSize = Math.round(
|
||||
Math.max(10, 0.3 * panelSize) / Utils.getScaleFactor(),
|
||||
Math.max(11, 0.3 * panelSize) / Utils.getScaleFactor(),
|
||||
)
|
||||
let size = Math.round(fontSize * 1.3)
|
||||
let style = `
|
||||
|
||||
@@ -25,7 +25,7 @@ import { EventEmitter } from 'resource:///org/gnome/shell/misc/signals.js'
|
||||
import * as Utils from './utils.js'
|
||||
|
||||
const tracker = Shell.WindowTracker.get_default()
|
||||
const knownCorrespondances = {
|
||||
const knownIdMappings = {
|
||||
'org.gnome.Evolution': [/^org\.gnome\.[eE]volution([.-].+)?$/g],
|
||||
}
|
||||
|
||||
@@ -80,16 +80,17 @@ export const NotificationsMonitor = class extends EventEmitter {
|
||||
// depending of the notification source, some app id end
|
||||
// with ".desktop" and some don't ¯\_(ツ)_/¯
|
||||
appId = appId.replace('.desktop', '')
|
||||
appId = `${appId}.desktop`
|
||||
|
||||
// some app have different source app id, deamon and such,
|
||||
// but it maps to a desktop app so match those here
|
||||
if (!ignoreMapping && !knownCorrespondances[appId])
|
||||
if (!ignoreMapping && !knownIdMappings[appId])
|
||||
appId =
|
||||
Object.keys(knownCorrespondances).find((k) =>
|
||||
knownCorrespondances[k].some((regex) => appId.match(regex)),
|
||||
Object.keys(knownIdMappings).find((k) =>
|
||||
knownIdMappings[k].some((regex) => appId.match(regex)),
|
||||
) || appId
|
||||
|
||||
|
||||
appId = `${appId}.desktop`
|
||||
this._state[appId] = this._state[appId] || {}
|
||||
this._mergeState(appId, state)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user