GNOME Bugzilla – Bug 343930
Properties dialog does not show "Open with" when multiple files are selected.
Last modified: 2008-02-20 15:12:13 UTC
When you select multiple files of the same type (e.g. a bunch of text files - all mime type text/plain) the "open with tab" does not show. Simple workaround: only select one of the files - But it would be nice to detect this case and show the "open with" nevertheless. Other information:
This was marked as fixed in bug 105653 (see also bug 40582 and bug 83753), so this would appear to be a regression.
Yes, i can still reproduce the bug (sorry but i didn't search that far back in the bug list) I'm using debian packages, Gnome (Panel) Version 2.14.2 (31.5.2006) Nautilus Version 2.14.1 I encountered this behaviour when i selected a couple of .txt files - so both/all of them have the same mime-type. I just checked it - same behaviour with directories, binaries, jpeg-images. Open With will only show if exactly one item is selected.
Elijah: those bugs are about Open With in the context menu, this one is if I understand correctly about the tab "Open With" in the preferences not being shown... And that I can reproduce too.
Reproducible, confirming.
Created attachment 105402 [details] [review] patch Adds the requested behaviour. Also, modifies the displayed string in the open with tab when there are multiple files selected.
+ char *name = NULL; + char *extension = NULL; No initialization at declaration. It doesn't seem to handle the case where you select multiple unknown type files with the same extension. Also, this is a string break at this time. Do we want to request permission to break it?
string break requested.
Created attachment 105571 [details] [review] patch v2 Updated patch according to your last comment.
This looks pretty good, but there is still one issue with extensions and multiple files. To test it, do echo $'\4binarydata' > a.ext1 echo $'\4binarydata' > b.ext2 echo $'\4binarydata' > c.ext1 All these are by default sniffed as application/octet-stream. However, if we select anyone by itself we should see the extension and map it to an autogenerated application/x-extension-xxx type. This seems to work. However, if yo select a.ex1 and c.ext1 the same should happen, and if you select a.ext1 and b.ext2 then it should change the application/octet-stream mimetype instead. Anyway, i commited the current patch in order to get the string change in as soon as possible, but we should try to get the last details fixed too.
Committed a fix for this last issues. Closing. 2008-02-20 Cosimo Cecchi <cosimoc@gnome.org> * libnautilus-private/nautilus-mime-application-chooser.c: (get_extension_from_file), (set_uri_and_type_for_multiple_files): Finish work on open with tab with multiple files selected. (#343930).