After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 343930 - Properties dialog does not show "Open with" when multiple files are selected.
Properties dialog does not show "Open with" when multiple files are selected.
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File Properties Dialog
2.21.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-05 16:38 UTC by chris
Modified: 2008-02-20 15:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
patch (6.14 KB, patch)
2008-02-16 18:50 UTC, Cosimo Cecchi
none Details | Review
patch v2 (13.55 KB, patch)
2008-02-19 11:18 UTC, Cosimo Cecchi
committed Details | Review

Description chris 2006-06-05 16:38:31 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:
Comment 1 Elijah Newren 2006-06-05 17:12:58 UTC
This was marked as fixed in bug 105653 (see also bug 40582 and bug 83753), so this would appear to be a regression.
Comment 2 chris 2006-06-05 18:30:40 UTC
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.
Comment 3 Sergej Kotliar 2006-06-05 18:41:42 UTC
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.
Comment 4 Cosimo Cecchi 2008-02-10 21:16:49 UTC
Reproducible, confirming.
Comment 5 Cosimo Cecchi 2008-02-16 18:50:44 UTC
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.
Comment 6 Alexander Larsson 2008-02-18 11:43:23 UTC
+	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?
Comment 7 Alexander Larsson 2008-02-18 11:54:25 UTC
string break requested.
Comment 8 Cosimo Cecchi 2008-02-19 11:18:43 UTC
Created attachment 105571 [details] [review]
patch v2

Updated patch according to your last comment.
Comment 9 Alexander Larsson 2008-02-20 11:49:40 UTC
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.
Comment 10 Cosimo Cecchi 2008-02-20 15:12:13 UTC
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).