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 525706 - "Cannot open" .h file: Mime type not recognized?
"Cannot open" .h file: Mime type not recognized?
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: core application
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: Naba Kumar
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-02 06:48 UTC by Murray Cumming
Modified: 2008-04-03 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glom_db_treemodel.h (9.93 KB, text/plain)
2008-04-02 06:49 UTC, Murray Cumming
Details
application.h (6.70 KB, text/plain)
2008-04-02 14:06 UTC, Murray Cumming
Details

Description Murray Cumming 2008-04-02 06:48:38 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.
Comment 1 Murray Cumming 2008-04-02 06:49:21 UTC
Created attachment 108454 [details]
glom_db_treemodel.h
Comment 2 Johannes Schmid 2008-04-02 09:16:52 UTC
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!
Comment 3 Murray Cumming 2008-04-02 14:06:27 UTC
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
  • #0 find_scope_members_tags
    at tm_workspace.c line 839
  • #1 tm_workspace_find_scope_members
    at tm_workspace.c line 1172
  • #2 check_children_symbols
    at tm_symbol.c line 191
  • #3 tm_symbol_tree_new
    at tm_symbol.c line 455
  • #4 anjuta_symbol_view_refresh_tree
    at an_symbol_view.c line 903
  • #5 project_root_added
    at plugin.c line 377
  • #6 value_added_cb
    at anjuta-plugin.c line 371
  • #7 anjuta_cclosure_marshal_VOID__STRING_BOXED
    at anjuta-marshal.c line 314
  • #8 IA__g_closure_invoke
    at gclosure.c line 490
  • #9 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #10 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #11 IA__g_signal_emit_by_name
    at gsignal.c line 2267
  • #12 anjuta_shell_add_value
    at anjuta-shell.c line 409
  • #13 on_profile_scoped
    at plugin.c line 1296
  • #14 IA__g_cclosure_marshal_VOID__OBJECT
    at gmarshal.c line 636
  • #15 IA__g_closure_invoke
    at gclosure.c line 490
  • #16 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #17 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #18 IA__g_signal_emit_by_name
    at gsignal.c line 2267
  • #19 anjuta_profile_manager_load_profile
    at anjuta-profile-manager.c line 409
  • #20 anjuta_new
    at anjuta.c line 484
  • #21 main

Comment 4 Murray Cumming 2008-04-02 14:06:56 UTC
Created attachment 108472 [details]
application.h
Comment 5 jasen 2008-04-02 22:19:50 UTC
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 
Comment 6 Johannes Schmid 2008-04-03 11:12:17 UTC
(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...
Comment 7 Murray Cumming 2008-04-03 13:20:47 UTC
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.
Comment 8 jasen 2008-04-03 20:07:05 UTC
I trust It's fixed now, as it's not a show stopper. I'll wait for debian to pick up the fix.