Re: [PATCH] close windows on unmount



On Tue, 2004-03-09 at 12:31, Stefan Voelkel wrote:
> On Tue, 2004-03-09 at 12:18, Alexander Larsson wrote:
> > You mean you want file manager windows to prevent unmounts. Why is that?
> 
> Because a shell does so too. Or do not close the window on unmount,
> because then autofs windows get closed silently.
> 
> We have a software/document archive exported via NFS. I use the
> automounter to mount this on demand. There are lots of files and folders
> on this server, so I do have to open around 5 to 8 folders until I find
> the file I want.
> 
> Now someone calls/comes over/whatever and distracts me. After some time
> the automounter unmounts the server share and the nautilus window gets
> closed. This is pretty anoying since I have to open a new window and
> browse to the file again.
> 
> If the window stays open the automounter would silently mount the share 
> if I use it again.
> 
> How about an option to disable this behaviour?

I can see your point for the automounter case. However, the more normal
case where a filemanager window prevents unmount in a bad way is for
removable media, when somewhere there is an open window on e.g the
floppy (possibly hidden by another window, workspace or whatever) and
you just *can't* get the damn floppy to unmount.

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?

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an obese vegetarian firefighter who dotes on his loving old ma. She's a 
warm-hearted African-American opera singer with a flame-thrower. They fight 
crime! 




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