Icon view context menu items disappear on first click



I've just installed Gnome 2.8.0 desktop from source.
The following happens in nautilus icon view. The first
time I right click on an icon, the context menu pops up
with the appropriate "Open with..." items for the mimetype.
Then, 1/3 of a second later, these items disappear and I only
have "Open with other application...".

On the next click, the menu is initially empty of
"Open with..." items, but these appear after 1/3 of a
second.

I did some debugging and digging in the source code.
It appears that "schedule_update_menus" is being called
from this point:

#0  schedule_update_menus (view=0x821f9b8) at fm-directory-view.c:6185
#1  0x080a142a in icons_changed_callback (callback_data=0x821f9b8) at
fm-directo#2  0x40b80b33 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.#3  0x40b6fa6a in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#4  0x40b806c6 in signal_emit_unlocked_R () from
/usr/lib/libgobject-2.0.so.0
#5  0x40b7f802 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#6  0x40b7faab in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#7  0x4009d055 in mime_type_data_changed_callback (monitor=0x8125818,
user_data=#8  0x40b80b33 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.#9  0x40b6fa6a in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#10 0x40b806c6 in signal_emit_unlocked_R () from
/usr/lib/libgobject-2.0.so.0
#11 0x40b7f802 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#12 0x40b7faab in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#13 0x407719b9 in _gnome_vfs_mime_monitor_emit_data_changed () from
/usr/lib/lib#14 0x40770e78 in emit_mime_changed () from
/usr/lib/libgnomevfs-2.so.0
#15 0x40c3afbc in g_idle_dispatch () from /usr/lib/libglib-2.0.so.0
...

After the timeout (300ms) this causes the calls:

#0  reset_bonobo_open_with_menu (view=0x8220d68, selection=0x82c8bc0) at
fm-dire#1  0x080aac64 in real_update_menus (view=0x8220d68) at
fm-directory-view.c:5985#2  0x080b5925 in fm_icon_view_update_menus
(view=0x8220d68) at fm-icon-view.c:1#3  0x080ae1f9 in
fm_directory_view_update_menus (view=0x8220d68) at fm-director#4 
0x080a3909 in update_menus_timeout_callback (data=0x8220d68) at
fm-directory#5  0x40c3a8b3 in g_timeout_dispatch () from
/usr/lib/libglib-2.0.so.0
...

But at this time nautilus_mime_get_open_with_applications_for_file()
returns NULL, since
nautilus_mime_actions_check_if_open_with_attributes_ready (file)
returns false.

I guess the system assumes that the callback
is being invoked because these mime attributes are ready... but
in fact it is for some other reason (who knows what emit_mime_changed
does?).

I have not had time to investigate further; however, it seems that
the menu should not be cleared if the mime attributes are simply
temporarily unavailable; the menu updates should be scheduled
again in this case.

Note this problem only occurs once at nautilus startup, but it is
irritating...


Peter Wainwright






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]