-
-
Notifications
You must be signed in to change notification settings - Fork 338
Add support for the Dynamic Launcher portal #3948
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
base: main
Are you sure you want to change the base?
Conversation
Hi, thanks for looking at it, and to @TheEvilSkeleton for rebasing! About the unmarked tasks in the original comment, how do you feel about skipping the Desktop Action configure, and not requiring xdp >= 1.20.1? |
|
Closing due to no activity and I see some tasks in the original comment. Tell me if you are still interested since the feature is a good one. |
|
Not sure how we managed to answer to an old PR almost the same time. Anyway, re-opened. |
I was just getting out of an airplane, maybe some time zone shenanigans 😅 |
|
Oh 👀 |
ed44eae to
d3c68d6
Compare
d3c68d6 to
da21f33
Compare
| from bottles.backend.utils.imagemagick import ImageMagickUtils | ||
|
|
||
| import uuid | ||
| from gi.repository import GLib, Gio, Gtk, Xdp, XdpGtk4 |
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.
GUI libs shall not be used in the backend, do they?
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.
Shouldn't
| skip_icon: bool = False, | ||
| custom_icon: str = "", | ||
| use_xdp: bool = False, | ||
| window: Gtk.Window = None, |
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.
The type signature is lying. Obviously it is an Optional[Gtk.Window].
What is this window used for? Is it even needed? Consider renaming the variable.
| <file preprocess="xml-stripblanks" alias="appdata">@[email protected]</file> | ||
| </gresource> | ||
| <gresource prefix="/com/usebottles/bottles/icons/scalable/apps"> | ||
| <file preprocess="xml-stripblanks" alias="com.usebottles.bottles-program.svg">icons/hicolor/scalable/apps/com.usebottles.bottles-program.svg</file> |
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.
Is this SVG committed to git?
| from bottles.backend.utils.generic import get_mime | ||
| from bottles.backend.utils.imagemagick import ImageMagickUtils | ||
|
|
||
| import uuid |
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.
Is this module used anywhere?
|
Looks great! Is it also possible to remove the added desktop entries? |
Description
This adds support for the xdg-desktop-portal dynamic launcher portal, that will allow to install desktop files without the need for manually giving permission with a command or Flatseal. Upon clicking the
Add Desktop Entryoption of a wine installed application, the portal will open a dialog where the user can see the app icon, can change the name and confirm or cancel.Screenshots:
What's missing:
- [ ] Support for [Desktop Action Configure] group in the .desktop file, currently the portal requires exactly one group in the .desktop file for security reasonsThis is portal limitation, so if wanted, can be done in a follow up MR after adding support for it upstream- [ ] Requiring xdg-desktop-portal version >= 1.20.1, otherwise doesn't work due to flatpak/xdg-desktop-portal#1674Modern distributions should have that version already- [ ] Investigate breakage on GNOME OS, perhaps https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/261 regressed?Can be fixed laterFixes #1366
Type of change
How Has This Been Tested?
Unfortunately, I only managed to test installing the desktop file itself, as I get an error when trying to run apps from the desktop files on main as well:
But the created desktop files are otherwise almost identical to the ones from main (bar the configure action) and show up in the app grid just fine \o/