GNOME Bugzilla – Bug 525706
"Cannot open" .h file: Mime type not recognized?
Last modified: 2008-04-03 20:07:05 UTC
When trying to open one of my .h files, I saw this dialog: " Cannot open "glom_db_treemodel.h". There is no plugin, default action, or application configured to handle this file type. Mime type: . You may choose to try opening it with the following plugins or applications. " Then it offers me the choice to "Open With:" the "Document Manager". It does then open it, though without syntax highlighting. I'm using Ubuntu Hardy which has 2.4.0. I am attaching the .h file though I don't think there is anything special about it.
Created attachment 108454 [details] glom_db_treemodel.h
Should be fixed in trunk in anjuta-2-4 branch now. Seems gnome-vfs is a bit more picky with mime-types in recent versions and we should use gnome_vfs_get_mime_type_slow() now. The syntax highlighting depends on the editor, for gtksourceview it should also be fixed now. Could you please verify that? I couldn't reproduce it for this file, only for some Makefile.am and *.in files but I think the problem is the same. gnome_vfs_get_mime_type() returns an empty mime-type for them, while gnome_vfs_get_mime_type_slow() returns the correct. Thanks!
I built anjuta 2.4 (and gnome-build) in jhbuild. When I started it, it obviously tried to open my old anjuta project, but it gave me much the same error, this time on application.h (I forget it I had that error with that file before): " Cannot open "application.h#99". There is no plugin, default action, or application configured to handle this file type. Mime type: . You may choose to try opening it with the following plugins or applications. " I'll attach that file. By the way, it took about 3 minutes to get that far, showing an unresponsive splash screen, apparently doing this: Some extra progress bar there would be a good idea maybe. It's not that big a deal to me. (gdb) bt
+ Trace 194008
Created attachment 108472 [details] application.h
I'm seeing the same thing but with the .c entension which comes out in the message as .c#[linenumber] syntax highlichting comes and goes also. I get hightlighting if i click 'OK' but if I click cancel and then open the file I just get black text. first time starting after the upgrade was slow but now seems the same as usual. debian version 2:2.4.0-2
(In reply to comment #3) > I built anjuta 2.4 (and gnome-build) in jhbuild. When I started it, it > obviously tried to open my old anjuta project, but it gave me much the same > error, this time on application.h (I forget it I had that error with that file > before): Hmm, I tried with anjuta 2.4 today after the fix and I cannot reproduce it for any file in glom. What mime-type does nautilus report for application.h? Here it's "text/x-chdr". I built anjuta against latest gnome-build and gdl but not against the jhbuild version of any other library (gnome-vfs, gtk+, etc are from Ubuntu). > By the way, it took about 3 minutes to get that far, showing an unresponsive > splash screen, apparently doing this: > > Some extra progress bar there would be a good idea maybe. It's not that big a > deal to me. We are already working on a multi-threaded database-based version of this ctags stuff...
Sorry, I thought I had built anjuta from svn, but I really had not. When I really used a built-from-svn anjuta, the problem did go away. Thanks for the fix.
I trust It's fixed now, as it's not a show stopper. I'll wait for debian to pick up the fix.