Closed Avinash-Bhat closed 10 years ago
GtkImageMenuItem and GtkTearoffMenuItem are deprecated (since GTK 3.10 and 3.4 respectively) so I won't add support for those. GtkSeparatorMenuItem is already implemented. I'll work on adding support for GtkCheckMenuItem.
It hasn't been mentioned yet, but GtkRadioMenuItem needs to be implemented as well.
GtkImageMenuItem and GtkTearoffMenuItem are deprecated (since GTK 3.10 and 3.4 respectively)
That's a shame :-) I am using Glade (gtk2) and was trying to convert a python project (hobby project) to Go. Everything but this is working out so well.
BTW, Although it's true that GtkImageMenuItem
is deprecated, the release notes itself mentions that it will be available until gtk+ 4. (see: https://mail.gnome.org/archives/gtk-list/2013-September/msg00021.html)
- We've started deprecating stock APIs, including GtkIconFactory, GtkIconSet, GtkIconSource, GtkImageMenuItem, GtkAction, GtkUIManager. These APIs will continue to work until GTK+ 4, so there is no need to rush to replace them.
So will it be supported or ignored as others?
I'd rather not. The reasons being:
Since GtkImageMenuItem isn't deprecated in <=3.8, I'd be willing to take a patch for it that is only included when built with the gtk_3_6 and gtk_3_8 build tags. There are other projects that need my attention more, however, so I won't do it.
Another option that may be possible in your situation may be to wrap both the Image and AccelLabel in a Box or Grid and Add() it to a MenuItem (since the MenuItem is a Bin). Untested, but it might achieve your goal. You could also search for posts on the gtk mailing list about menu images (or make a new post if none) and see what plans upstream has for them.
Here's a short example of creating a custom menuicon widget: http://sprunge.us/iDDg
Looks like it could use some spacing love to make it look like old GTK, but it's a start.
the subtypes of GtkImageMenuItem, GtkCheckMenuItem GtkSeparatorMenuItem, GtkTearoffMenuItem are missing and trying to access them throws errors like
This is quite unfortunate as there is no way to connect the activate signal on them.