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 171397 - Diagram menu bar does not include callbacks registered by plug.ins
Diagram menu bar does not include callbacks registered by plug.ins
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
CVS head
Other All
: Normal normal
: 0.96
Assigned To: Dia maintainers
Dia maintainers
: 332600 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-03-23 19:05 UTC by Greg Steffensen
Modified: 2006-05-20 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Greg Steffensen 2005-03-23 19:05:08 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().
Comment 1 Alan Horkan 2005-03-23 20:51:59 UTC
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.  
Comment 2 Hans Breuer 2005-03-23 21:30:00 UTC
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().
Comment 3 Hans Breuer 2006-02-26 08:30:16 UTC
*** Bug 332600 has been marked as a duplicate of this bug. ***
Comment 4 Rob Staudinger 2006-05-16 21:07:09 UTC
The patch in bug #340352 fixes that.
Comment 5 Hans Breuer 2006-05-20 13:50:25 UTC
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
Comment 6 Hans Breuer 2006-05-20 13:50:56 UTC
should have set the state as well ...