GNOME Bugzilla – Bug 552466
gedit is not offered for opening text/css files
Last modified: 2009-01-03 05:44:49 UTC
Please describe the problem: When I try to open a text/css files, it's opened with gvim, if I right click on it, I have to add gedit from applications full list for being able to open it with gedit automatically Steps to reproduce: 1. 2. 3. Actual results: Expected results: I would expect that gedit would be offered also for opening css file without having to add it from applications full list Does this happen every time? Other information: Thanks
Created attachment 118813 [details] gedit.desktop
Created attachment 118814 [details] gvim.desktop
Well, I think this is a gio bug (is it gio that chooses the app?). It should consider all the mime hierarchy. That gvim file is definately wrong and we should not go down the same path
(In reply to comment #3) > That gvim file is definately wrong and we should not go down the same path > I also thought it because of gedit not having more MimeTypes than text/plain but, can you please (if you have enough time of course) why it is not ok and what should be used instead? Thanks a lot, it is only for knowing a bit more, if you cannot reply don't worry :-)
Well, the issue is that a text editor (gedit or gvim) is a text editor and it can edit files of type text/plain. Such an editor should not try to register itself for all the file types it can handle, since it's gio that should recognize that a file of type X (where X for instance is text/html) is also a of type text/plain since html is a child of text/plain. The mime system is designed so that a text editor can say that it handles "text/plain" while a browser say it can handle "html": this way by default an html file is opened in the browser but if you right click you can also open it in an editor. Gvim by registirend itself for css etc is lieing since it is basically saying that it can deal with css files better than someone that handles them as text files.
OK, thanks a lot =)
Works for me; gvfs-info reports text/css for css files, gvfs-open opens them in gedit, and nautilus offers "Open with Text Editor" in the context menu.