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 552466 - gedit is not offered for opening text/css files
gedit is not offered for opening text/css files
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-09-16 08:21 UTC by Pacho Ramos
Modified: 2009-01-03 05:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
gedit.desktop (525 bytes, text/plain)
2008-09-16 08:24 UTC, Pacho Ramos
Details
gvim.desktop (852 bytes, text/plain)
2008-09-16 08:24 UTC, Pacho Ramos
Details

Description Pacho Ramos 2008-09-16 08:21:53 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
Comment 1 Pacho Ramos 2008-09-16 08:24:10 UTC
Created attachment 118813 [details]
gedit.desktop
Comment 2 Pacho Ramos 2008-09-16 08:24:34 UTC
Created attachment 118814 [details]
gvim.desktop
Comment 3 Paolo Borelli 2008-11-29 15:39:55 UTC
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
Comment 4 Pacho Ramos 2008-11-29 22:54:14 UTC
(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 :-)
Comment 5 Paolo Borelli 2008-11-30 02:56:57 UTC
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. 
Comment 6 Pacho Ramos 2008-11-30 11:56:07 UTC
OK, thanks a lot =)
Comment 7 Matthias Clasen 2009-01-03 05:44:49 UTC
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.