GNOME Bugzilla – Bug 171397
Diagram menu bar does not include callbacks registered by plug.ins
Last modified: 2006-05-20 13:50:56 UTC
Please describe the problem: Some Python plugins, such as select objects by color or gtkconsole, don't get added to the user interface even though they call filter_register_callback. Specifically, plugins that add themselves to the toolbox menubar are added correctly, but plugins that add themselves elsewhere, such as to the display menubar, are not. Steps to reproduce: 1. Compile from CVS, using --with-python when you ./configure. 2. Start Dia and verify that Python support has been built correctly by looking for a python objects item under the help -> Self Documentation entry of the toolbox menubar. 3. Click on the objects menu of the main display menubar. Look for a "Select by Color" entry, or select anything by color (one of the python plugins offers three such choices). You won't see any. 4. Alter the register_callbacks line of one of the missing python modules to add it to the toolbox menubar in the same way that the pydiadoc module does, and restart Dia. 5. The module you altered should now have a menu entry under the toolbox menubar, even though it wouldn't show up in other locations. Actual results: Expected results: Does this happen every time? Yes. Other information: HB says: BTW: This isn't at all PyDia specific, it just happens that PyDia is the only user of filter_register_callback() and apprently the menu bar does not correctly handle filter_get_callbacks().
Thanks for filing this Greg. I didn't get any response to my enquiry about this problem but I saw the reponse you got and as the issue has been recognised I was planning to file a bug report (but I'm glad you got to it first). I almost always use Dia with the menubar turned on, I'm pretty sure I've missed out on various bits of Dia Python functionality over several releases as a result of this bug.
A little rephrasing: this isn't at all Python specific. The menubar code just needs to handle the registered callbacks - returned by filter_get_callbacks().
*** Bug 332600 has been marked as a duplicate of this bug. ***
The patch in bug #340352 fixes that.
Fixed by applying the patch. 2006-05-20 Hans Breuer <hans@breuer.org> Patch from Robert Staudinger to base dia menus on GtkAction framework instead on deprecated GtkItemFactory. Tracked in bug #340352. En passant fixes bug #171397
should have set the state as well ...