drawing icon indicating copy to clipboard operation
drawing copied to clipboard

Add a "Recent files" menu

Open silocoder opened this issue 4 years ago • 8 comments

Add ability to open recent files. Thanks!

silocoder avatar Jul 20 '20 15:07 silocoder

since sandboxed packaging formats broke the existing GtkRecentChooser, this is not possible.

First I supposed their idea was to manage this feature desktop-wide, using lists on app launchers, but they don't look interested in this idea either, so i did it as a GNOME Shell extension https://github.com/maoschanz/quicklists-gnome-shell-extension

(if you're using an other DE, you could suggest them to implement it too, it's not a complex code)

i let it open, in case xdg-portal creates something to support this use-case

maoschanz avatar Jul 20 '20 16:07 maoschanz

Just curious. Can't you roll your own and save in some local user config file ?

silocoder avatar Jul 20 '20 16:07 silocoder

i can save anything in the app's config folder, but the code inside the sandbox doesn't know the actual paths of the files it edits (only temporary /run/user/1000/doc/**/* paths), so the data i could store would be quite hard to use

edit: impossible actually, they're read-only?????

maoschanz avatar Jul 20 '20 17:07 maoschanz

I can't say I know a lot about this, but it seems like you can configure the access Flatpak builds have according to their site documentation. Seems like you could enable say home directory access to enable this feature? Sorry if this is something you've already looked at..as I said I don't know much just doing a quick search on the topic..

alenbasic avatar Jul 25 '20 14:07 alenbasic

drilling huge holes in the sandbox annihilates the entire point of the sandbox, and it doesn't even cover files outside of home

i will not do this for such a minor feature. Actually if apps demands absurd permissions, flathub maintainers might think it's suspicious

maoschanz avatar Jul 26 '20 02:07 maoschanz

I personally have no dog in this fight as I don't need the feature so if the feature is there or not I'm fine either way, but I assume a flatpak is used not because people desire the sandbox but because they desire the ease of use (for both the packager and the user). A sandbox app that has its functionality gimped is probably not that desirable. That said, access to the file system hardly seems absurd; considering the entire functionality of the app is based on working with files...like it seems pretty relevant to me.

Anyway, that's just my 2 cents.

EDIT: the flag --filesystem=host seems to cover normal file access aside from system files. Exactly what an app like this would be expected to have I imagine.

alenbasic avatar Jul 26 '20 07:07 alenbasic

I assume a flatpak is used not because people desire the sandbox but because they desire the ease of use

native packages are installable in 1 click too, so many flatpak users do appreciate the sandbox. As a developer i desire both

the flag --filesystem=host

Ok but that's an even bigger hole

A sandbox app that has its functionality gimped is probably not that desirable.

But why should a clone of Paint be able to read every file on the system (and to overwrite every file in home)? Just in order to show the list of recent files in a menu instead of in the current dialog? In my opinion it would be pretty insane...

Putting such a minor feature aside isn't crippling the functionalities

Exactly what an app like this would be expected to have I imagine.

Yet the app currently works without a single file system access permission: if you've already opened the doc, you can go to the "portals" section, they are the normal way to access resources outside of the sandbox.

But they don't provide direct access to the file and its actual path: it uses a kind of proxy, so the paths the app knows are like /run/user/1000/doc/**/*. The app can remember them, but based on #238 i'm not sure it'll be able to open them with write permissions

Eventually they'll add a portal for recent files, meanwhile i focus on improving the editor

maoschanz avatar Jul 26 '20 16:07 maoschanz

No problems, appreciate the explanation :)

alenbasic avatar Jul 26 '20 16:07 alenbasic