When right clicking on a Google Drive file or folder, show a 'Copy Google URL to clipboard' context menu action.
It works so it's not "wrong". The alternative is to create a private library with all the gdrive sources and link the new plugin to this library. That would also avoid to build gdriveurl.cpp twice, which this patch currently does.
Question: do we really need debug in this plugin? Maybe it can be avoided.
Question 2: do we really need the GDriveUrl class here? It's basically used only to compare the scheme with the "gdrive" string...
Why are we stating the URL again? We already have the KFileItem for it which can give us access to its UDSEntry object.
This doesn't seem to work on Wayland. Haven't tested on X11 yet.
Please do not add translations manually, they will be added by a bot when ready.
|33 ↗||(On Diff #65842)|
IMHO this is overkill, we can just use UDS_EXTRA in the fastInsert() call.
In this scenario I guess usage of both debug and GDriveUrl can be avoided, however the private library might need to be considered. In the future I would like to add a way to change file permissions after right clicking and to do so I will very probably need access to other parts of kio-gdrive. Any ideas?
I just tried it out simply selecting "Plasma (Wayland)" in SDDM and it seems to work, I think the bug is elsewhere. What were you right clicking on?
I would create the library when we cannot actually avoid it. Simple as that :)
Missing const; prefer at(0).
I'd call it "Copy Google URL to clipboard", since it can be a "drive" url (drive.google.com) but also a "document" url (docs.google.com).
Nevermind, it works. It just doesn't show up in the clipboard plasmoid, but that's surely not a bug introduced by this patch.