Re: Initial ideas on portals for file access



On fre, 2015-03-06 at 15:42 -0600, Michael Catanzaro wrote:
On Fri, 2015-03-06 at 21:34 +0100, Alexander Larsson wrote:
    Allow Save() without UI until a new version of the document
    Allow reading the file until a new version of the document

Hm. Say I am gedit, and I have a text file open. I want to prompt the
user with an info bar when I detect that the file has changed, offering
to reload the file. Am I correct to say I can't do that with this model:
I have to pop open the system-controlled open dialog instead, because
the file has changed and I no longer have permission to edit it. That
doesn't seem good.

There are two replies here. First of all, if you're running in a sandbox
there are some kinds of features you just can't get, and its something
we have to accept. For instance, a sandboxed gedit can't really have a
file selector sidebar. This is just a fact of life, and our goal is to
make the sandboxing APIs good enough that this does not hurt your
everyday use.

Secondly, this specific case. Monitoring is just a more efficient way of
polling, so, i think it makes a lot of sense for the system to allow
monitoring as a feature, and to have its permissions be keyed of if the
app has the permissions to do a polling version of the monitor.

So, the question becomes one of: If I've opened or written the latest
version of a file, and then some *other* app creates a new version of
it. Am I allowed to read/write that version?

I believe that we should at least allow reading it, as that is a not
something i think would surprise most users. Allow writing to the new
file without reading the old one first could risk losing data, so we
should perhaps open a dialog warning about that. On the other hand, in
the gedit case above that would cause two warnings about the same thing.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's an immortal guitar-strumming ex-con searching for his wife's true 
killer. She's a pregnant extravagent fairy princess who believes she is 
the reincarnation of an ancient Egyptian queen. They fight crime! 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]