Re: [Nautilus-list] Proposed Open with menu change



On 27 Feb 2002, Jonas De Vuyst wrote:

> Hello,
> 
> I was looking at the Nautilus source code as a newbie looking for some
> changes I could make as a way to familiarise myself for the code.
> 
> I ended up in in fm-directory-view where I noticed that the Open with
> menu is only enabled when exactly one file is selected. Is there a
> reason why, when multiple files are selected, not the selected files'
> common open actions aren't displayed in it?
> 
> If not, I'd like to try to change this behaviour.

I'd guess this is due to the behaviour in this case not always being easy 
to decide. What if you select a textfile and an image, what apps do you 
propose to list then? Then there is the issue that not all apps support 
multiple file open. This is specified per application in the mime data 
like this:

dia
        command=dia
        name=Diagram Editor (dia)
        can_open_multiple_files=true

I guess looking at the mime type for all the selected items and list the 
apps that support all of the selected mime-types. Then you probably need 
to look at the can_open_multiple_files flag and warn if the action would 
need to launch multiple copies of the app, and let the user cancel the 
action.

For viewers the issue is even thornier. You can really only launch one 
viewer, since it embedds in the nautilus window. Perhaps if the viewer 
supports multiple arguments this would work, although i'm not sure the 
viewer interfaces allow this. If it did it would be cool though. You'd 
e.g. select a bunch of images and view them in EOG, and EOG could have 
next/previous functions. That would rock.

> One question I have though is what to do with the "An application..."
> and "A viewer..." menu option. Since they are modal dialogs I can't just
> open X boxes for the different files. Also, when the user only wants to
> go to the control center to edit the application list for a certain file
> type, it would not be desirable to open the dialog for every single
> file. If I were to make this change, should I just disable these two
> menu options?

They would need to be modified to allow multiple mimetypes and multiple 
files too. The only part that wouldn't really work with this is the 
"Modyfy..." button and corresponding label. Perhaps that could be made 
inactive and the label changed to some descriptive text that says why it's 
disabled.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an impetuous one-eyed paramedic trapped in a world he never made. She's a 
manipulative mute hooker 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]