Re: Bitmap with the menu

2014-07-14 Thread Victor Aurélio Santos
If you're talking about GTK3, MenuItem with images are deprecated!

but... if GTK2, you can use GtkImageMenuItem in conjunction to
GtkImage and then use

gtk_image_menu_item_set_image (gtk_image_item); [1] or use it with stock i.e.

gtk_image_menu_item_new_from_stock ("stock-id", accel_group); [2]


and also if GTK3, you should use GMenu (probably from a XML UI), see
this quotation[3] from Emmanuele Bassi:

"GAction replaces GtkAction; images on menus have been discouraged for
years, and the whole menu system has been replaced by GMenu XML
descriptions that can be exported on the session bus. "

[1]: 
https://developer.gnome.org/gtk2/stable/GtkImageMenuItem.html#gtk-image-menu-item-set-image
[2]: 
https://developer.gnome.org/gtk2/stable/GtkImageMenuItem.html#gtk-image-menu-item-new-from-stock
[3]: http://gtk.10911.n7.nabble.com/Stock-Items-Deprecation-td81617.html#a81775


-- 
Victor Aurélio Santos
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: Bitmap with the menu

2014-06-10 Thread Igor Korot
Hi, ALL,
Can someone give me a simple code example to use for the menu with the bitmap?
I can't find an appropriate function in the docs to associate the
GtkMenuItem with the bitmap/drawable...

Also looking at the documentation it looks like GtkImageMenuItem is a
child of the GtkMenuItem and so
cannot be used to set the image to the
GtkCheckMenuItem/GtkRadioMenuItem. Is this true?

Thank you.
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list