Re: [PATCH] close windows on unmount

On Thu, 2004-03-11 at 09:42 +0100, Alexander Larsson wrote:

> What about this approach:
> When someone tries to unmount from the UI, we get the pre_unmount
> signal. When this happens we close windows on the to-be-unmounted
> filesystem, allowing you to unmount/eject floppies, usb cameras, etc.
> However, on the real unmount signal we don't close any windows. This
> means that if using FAM, the window will prevent non-ui unmount, and if
> not using fam the automounter can unmount the fs, but the window will
> still be there, and selecting a file in the window will cause it to be
> mounted again.
> Opinions on this approach?

Special casing this way doesn't look quite right to me. I think the
problem is not at the nautilus level, but at the file system abstraction

Perhaps we need a new signal: "unavailable". When the FS unmounts, it
implies that resource is gone from the system, and unlikely to return in
its present form any time soon; so nautilus window closes. When the FS
is unavailable it means that the resource is not reachable, but is still
there when you ask again, provided that "connection" (in what ever form
it may be, whether automounted or network connected) is re-established;
so nautilus keeps the window open, and tries to "reconnect" when an icon
is clicked. If it is unable to reconnect, then it errors out and closes.

That way the two signals capture the semantic difference between "I'm
gone" and "I'm temporarily unavailable".

I think what you propose is a bit hackish. Comments?


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