-
Notifications
You must be signed in to change notification settings - Fork 26
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
extension: add a desktop entry #297
Conversation
Add a desktop file so ddterm is displayed more nicely (with an icon and a proper name) in the activities view and application menu. Install the file to the user's local applications directory when the extension is enabled and remove it when the extension is disabled.
I ran the linter locally and it seems that the only files that are throwing errors are |
It shouldn't lint rxjs and handlebars at all - they should be ignored. Try running Here eslint fails on And, by the way, ddterm still supports Ubuntu 20.04 with rather old versions of GNOME Shell and gjs, so some language features may be missing (though I'm not sure if eslint rejects the initializer here correctly). |
I wonder why the error doesn't generate an annotation on the pull request though... |
Since ddterm provides an "Activate" method via dbus, specify that in its desktop entry. In accordance with the Freedesktop Spec, the Exec key is not removed to keep compatibility with implementations that do not handle the DBusActivatable key properly.
Make all properties and methods of the DesktopEntry class non-static, so it can be instantiated on enable() and destroyed on disable()
If caught exception happens because desktop file already exists, do nothing. Otherwise, throw the caught exception.
Thank you for taking the time to review this PR and (especially) for pointing me to good references and learning resources. I've made the changes you requested, but it is now failing a ton of tests on every OS. I'll try to figure out what's going on. |
There is a lot of noise, but I believe the root cause is that the extension fails to load:
Maybe Every concurrent test session spawns a new container, so it shouldn't be a race between file creation/deletion/existence check. |
Make all properties and methods of the DesktopEntry class non-static, so it can be instantiated on enable() and destroyed on disable()
If caught exception happens because desktop file already exists, do nothing. Otherwise, throw the caught exception.
It now ensures the user applications directory exists before it installs the desktop file there. I'll now address the case that the extension is installed system-wide. |
All tests passed 🙌🏻
Your intuition was correct! |
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.
Sorry that I didn't respond with all questions at once - I didn't notice multiple things at the first sight
There seems to be a permission error now, which I don't get. When using |
88b3422
to
c76f7f0
Compare
Thanks for your patience and fixing all issues |
`terminal` isn't a standard icon name. Maybe it's available in some icon themes, but not in the default GNOME one. The correct name is `utilities-terminal`: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html (which is also used by the panel icon) Fix for #297
Thanks for your patience teaching me how to fix them! Cheers |
If you wish to work on D-Bus activation - you would really help a lot if you implemented it. Multiple features have it as a prerequisite. |
Sure would like to :) |
Add a desktop file so ddterm is displayed more nicely (with an icon and a proper name) in the activities view and application menu. Install the file to the user's local applications directory when the extension is enabled and remove it when the extension is disabled.
Here's a demo of it working:
Kooha-2023-01-08-15-56-21.mp4
Closes #123.