hi all,

I work for the RabbitVCS project and I'm trying to track down and debug an
issue that I'm having with my extension's menu items.  Basically, the issue
is that menu items don't show up in the correct order, or in unpredictable
order.  This manifests itself when you change the context menuitems on a
regular basis like we do.  I wrote to this mailing list in february and
included a simple python extension that displayed the behavior, but now I'm
coming back with an extension written in C that displays the behavior.

The way the extension works is it creates a set of five menuitems (item0
through item4) and adds it to the extension group on the nautilus context
menu. Every time a user clicks on a file it will recreate the menu but a
random number generator will determine that some items will not be added.
This will cause us to create a "new" menu every time a new file is selected.

The expected behavior is that if some items don't appear they should show up
like: item0 item2 item4 (1 and 3 are missing).  Unfortunately, what does
happen is sometimes we get item2 item4 item0 or item4 item2 item0.  It is
completely random and unpredictable.

So I've been looking in the nautilus source code, in the
src/file-manager/fm-directory-view.c file specifically, trying to figure out
where in the stack the menu is losing its ordering.  I found the
real_update_menus function, and in turn found the
reset_extension_actions_menu function, and when I print out the generated
menu items, they show up in the correct order.  So I know it is something
happening later than that.  But I'm at a loss as to where to look next or
how to debug this.

I'm hoping for a couple possible outcomes from this email.

    1. That someone smarter or more informed than me will load my text
extension, see the problem, and figure out how to fix it.
    2. That someone will take pity on me and give me some ideas for where I
can look next.

I've attached my test extension.  You should be able to run "sh autogen.sh ;
make ; make install" to install it.

Thanks!

Adam

Attachment: nautilus-menuorder-extension.tar.gz
Description: GNU Zip compressed data

-- 
nautilus-list mailing list
nautilus-list@gnome.org
http://mail.gnome.org/mailman/listinfo/nautilus-list

Reply via email to