Re: automounting / autorunning



Hi,

On Mon, 2008-01-14 at 14:20 +0100, Alexander Larsson wrote:
> On Mon, 2008-01-14 at 03:33 -0500, David Zeuthen wrote:
> > Hi,
> > 
> > Here's a patch to make Nautilus automount new media as well as handling
> > autoplay/autorun. This is what gnome-volume-manager currently does,
> > however there's a few issues with this program
> 
> Sounds good to me. I commited it with various cleanups (coding style,
> using availible helper functions, etc).

Great, thanks.

> > I'm a bit torn about the Media tab; I ended up with this design (only
> > show common media types); another alternative is some design where you
> > have a combo box to select the x-content type and then once that is
> > selected you can select the default. I don't know. Thoughts?
> 
> Not sure. The hold-shift thing is kinda weird...

Indeed. The attached patch changes it to this version

http://people.freedesktop.org/~david/nautilus-fmp-3.png

Notably the check box for whether automounting is on/off is gone; after
some discussion in #fedora-desktop I was convinced it doesn't belong in
the UI. It's still in gconf though (and would make a great addition to
some gnometweakui-2000-ng-++ program or so). 

I've also included UI to edit less common media actions; was about to
hide it behind a GtkExpander. But maybe it's good enough for now. Don't
know.

Also, there's a new option to avoid autostarting/prompting; somewhat an
enterprise feature for paranoid admins. Not sure the option itself
belongs in the UI but it felt weird to leave it out because if it's own
the rest of the tab is insensitive. I don't know.

> > Some things I'm undecided about
> > 
> >  - what should happen if you double-click an mount icon? Either we open
> >    the folder; otherwise we launch the configured program. I'm leaning
> >    to the former and then having a clue-bar in the folder window. I
> >    don't know.
> 
> Maybe it should do the same as when it is mounted (i.e. depending on
> prefs). Then we can have a right-click option if you want to actually
> browse it.
> 
> >  - should the available handlers for x-content/* appear in an Open With
> >    menu when right-clicking a mount icon?  
> 
> Yeah, I think so.

I'll look into doing this next...

Other features in this patch

 - Add a "Open Folder" option in addition to the "Ask me" and "Do
   Nothing" stock options. This is to mimic the "Browse media when
   inserted" option for mounts with no x-content type.

 - The dialog for asking the user what to do now disappears if the
   media is unmounted/ejected.

 - support for the eject button on drives

 - Almost finalized the list of x-content types that I think make sense;
   any comments (glaring omissions or superfluous stuff?) on these?

 - We automount all unmounted mountable volumes at startup. I originally
   wanted to unmount these at shutdown as well but after thinking more
   about it it's the wrong place (you want to catch all mounts done
   in the whole session). At some point in the future I'll teach hal
   about unmounting stuff mounted in a session when that session
   terminates; that's probably the right thing. Maybe.

   There's some hacky code to avoid autorunning stuff on volumes
   automounted at startup; couldn't think of a better way to do it.

 - I thought about adding an "Open with other app..." item

   http://people.freedesktop.org/~david/nautilus-utopia-5.png

   but I couldn't find a good way for the user to remove the apps he
   associated. Maybe we can add this later; it's not super important..

Items left on my TODO list

 - finish mount sniffing code
   - will need to get the device file for the GMount (to get the disc
     type at least) so will do that patch for gio
 - add support for .autorun-ish stuff
 - the context menu stuff discussed above
 - write a small draft spec for the x-content stuff, discuss it with
   some KDE and XFCE people and then and propose it on xdg
 - file bugs against gnome apps to use x-content stuff
 - finish the gphoto2 gvfs backend so this stuff works with PTP / 
   non-storage cameras

There's also a small gvfs patch that fixes some bugs with the hal
backend that I ran into when doing all this. The patches are here

http://people.freedesktop.org/~david/nautilus-autorun-fixes.patch
http://people.freedesktop.org/~david/gvfs-hal-stuff.patch

Thanks.

     David




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