-
Notifications
You must be signed in to change notification settings - Fork 491
GNOME 49 support and misc fixes #2435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It works properly for now, not changing it upstream yet though, as it may still be a temporary case
Otherwise we could still type on the search entry and focus it
These have been removed as part of clutter refactor
|
/cc @aleasto |
|
|
We need to re-implement this as it does not seem possible to re-use upstream code here
We can avoid having this delta downstream, so let's just use the same code upstream as this would work in both cases
Yeah, right... Done. |
aleasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch on the appSpread focus thing.
LGTM
Tested from official link on GNOME 49 rc (most recent from their Git):
|
Sure, that's normal as said you need all the GNOME stack being updated, see #2434 (comment) |
|
Hmmm... I have glib |
You can add this to the import Gio from 'gi://Gio';
import GioUnix from 'gi://GioUnix';
// [ ... ]
if (!GioUnix.DesktopAppInfo.prototype.has_key) {
const reservedNames = ['$gtype', 'prototype', 'length', 'name']
Object.getOwnPropertyNames(GioUnix.DesktopAppInfo).forEach(prop => {
if (reservedNames.includes(prop))
return;
if (prop.startsWith('new'))
return;
if (GioUnix.DesktopAppInfo.prototype[prop] !== undefined)
return;
GioUnix.DesktopAppInfo.prototype[prop] = function (...args) {
return GioUnix.DesktopAppInfo[prop](this, ...args);
};
});
}
Object.entries(Object.getOwnPropertyDescriptors(GioUnix)).forEach(([prop, desc]) => {
if (Object.hasOwn(Gio, prop)) {
console.debug(`Gio already contains property ${prop}`);
return;
}
const newDesc = {
enumerable: true,
configurable: false,
get() {
if (!newDesc._deprecationWarningDone) {
console.warn(`Gio.${prop} is deprecated, please use ` +
`${GioUnix.__name__}.${prop} instead`);
newDesc._deprecationWarningDone = true;
}
return desc.get?.() ?? desc.value;
},
};
Object.defineProperty(Gio, prop, newDesc);
}); |
|
So the whole file would be like this? import { DockManager } from './docking.js';
import { Extension } from './dependencies/shell/extensions/extension.js';
import Gio from 'gi://Gio';
import GioUnix from 'gi://GioUnix';
// We export this so it can be accessed by other extensions
export let dockManager;
export default class DashToDockExtension extends Extension.Extension {
enable() {
dockManager = new DockManager(this);
}
disable() {
dockManager?.destroy();
dockManager = null;
}
}
if (!GioUnix.DesktopAppInfo.prototype.has_key) {
const reservedNames = ['$gtype', 'prototype', 'length', 'name']
Object.getOwnPropertyNames(GioUnix.DesktopAppInfo).forEach(prop => {
if (reservedNames.includes(prop))
return;
if (prop.startsWith('new'))
return;
if (GioUnix.DesktopAppInfo.prototype[prop] !== undefined)
return;
GioUnix.DesktopAppInfo.prototype[prop] = function (...args) {
return GioUnix.DesktopAppInfo[prop](this, ...args);
};
});
}
Object.entries(Object.getOwnPropertyDescriptors(GioUnix)).forEach(([prop, desc]) => {
if (Object.hasOwn(Gio, prop)) {
console.debug(`Gio already contains property ${prop}`);
return;
}
const newDesc = {
enumerable: true,
configurable: false,
get() {
if (!newDesc._deprecationWarningDone) {
console.warn(`Gio.${prop} is deprecated, please use ` +
`${GioUnix.__name__}.${prop} instead`);
newDesc._deprecationWarningDone = true;
}
return desc.get?.() ?? desc.value;
},
};
Object.defineProperty(Gio, prop, newDesc);
}); |
|
Oh, one line was left there, I've edited your comment so that the whole file is fine. |
|
Thanks a lot, but I'm still having the same error as I showed in the screenshot here. |


Backport fixes for 49 from ubuntu-dock branch and handle the dock app icons clicks issues.
Note that this may not yet work properly in not-fully updated GNOME setups.
Close: #2434