Skip to content
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

Update for GNOME 45 #25

Merged

Conversation

This allows GNOME Shell to automatically initialize translations.
The Mainloop import has been deprecated, and is not available with
ESModules anyways, so switch to the GLib import.
Switch from legacy `imports` to ESModule's `import` statements, and
use `export` instead of `var` for exports.
@andyholmes
Copy link
Contributor Author

I tried to touch as little as possible, leaving anything unrelated to the porting process as-is. I also left the version bump to you, but let me know if I missed anything 🙂

@prometoys prometoys mentioned this pull request Sep 26, 2023
@ciscorucinski
Copy link

I downloaded the code for the PR and added it to my system (and renamed the folder), but I got an error message.

@andyholmes were you able to get the PR working on your machine? Given that Gnome 45 will not be added anytime in the foreseeable future (#26), it might be advisable to create your own fork and upload it so others on Gnome 45 can use this extension

@andyholmes
Copy link
Contributor Author

Yep, it worked for me. Renaming the folder might have caused problems, since the folder name must match the UUID in metadata.json. Other than that, an error message would give more clues 🙂

@ciscorucinski
Copy link

ciscorucinski commented Sep 30, 2023

Yes, I had to rename it to the UUID
.local/share/gnome-shell/extensions/date-menu-formatter@marcinjakubowski.github.com

The settings of extension date-menu-formatter@marcinjakubowski.github.com had an error:

SyntaxError: import declarations may only appear at top level of a module

Stack trace:

_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:204:33
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:22
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:222:19
start@resource:///org/gnome/gjs/modules/script/package.js:206:8
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

@andyholmes
Copy link
Contributor Author

Are you sure it's the version here installed? It works for me:

Screencast.from.2023-09-30.16-09-36.webm

Here's a ZIP:

date-menu-formatter@marcinjakubowski.github.com.shell-extension.zip

@ciscorucinski
Copy link

I was getting the same error message after installing using the above zip file. I was just copy-pasting-renaming directories.

I then tried to use gnome-extensions create -i and just copy-pasted the files from the zip into the newly created extension directory, and followed some gnome extension creation documentation online to enable and restart. My Extension Application showed there was a new version available and to restart my system. After restarting the system, the extension is working now as expected.

Screenshot from 2023-10-01 18-13-51

@gamersi
Copy link

gamersi commented Oct 10, 2023

it works for me! thanks!

@queenbiscuit311
Copy link

queenbiscuit311 commented Oct 17, 2023

I couldn't get the gnome-extensions create -i solution to work at first but it would appear that contrary to guides online restarting the shell does not work but restarting the system does. Working great now.

@ciscorucinski
Copy link

One thing I noticed afterwards is that my system wasn't using Gnome 45, so I was so confused as to why the code was working for an older Gnome version. I was unable to download any older versions before.

But, I guess, when my extensions app said there was a new version, it downloaded an older version as none of the code uses the new import declarations anymore. But I'm confused as to why I wasn't able to download an older version before.

@lateparty
Copy link

Downloaded the zip from #25 (comment) and confirmed as working for me on Gnome 45.1 and Arch synced to the latest repos.

@ciro-mota
Copy link

Working normally for me for weeks.
Arch Linux - GNOME 45.

@queenbiscuit311
Copy link

Working normally for me for weeks.
Arch Linux - GNOME 45.

Same here. Had the clock freeze once but that's about it, working perfectly otherwise.

@marcinjakubowski marcinjakubowski merged commit 2e5f8a8 into marcinjakubowski:master Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants