Deprecated function ed icons on button



Hi,
I'm starting to learn GTK+ and I'm using beginner tutorial found on GTK web
site.
(I'm working on linux debian testing amd64 with Xfce)
The actual version of GTK is 3.x and the tutorial is related to 2.x
This means that some time there are some deprecated function that have to
be substituted with the new ones.
Some time the task is easy like

gtk_vbox_new(FALSE, 0) ==> gtk_box_new(GTK_ORIENTATION_VERTICAL, 0)

some time not so easy.

One of these case is  gtk_image_menu_item_new_from_stock(GTK_STOK_NEW,NULL)
The new version is
gtk_menu_item_new_with_label or
gtk_menu_item_new_with_mnemonic.

I made the new version, the compiler do not print any message but the final
result is that the icon
disappear.

Googling I found that this is the new philosophy of GTK and to see the
icons I have to made some settings in my environment.

Somewhere I found that I have to put in ~/.config/gtk-3.0/settings.ini
some like
[Settings]
gtk-menu-images=1
gtk-button-images=1

Running the GTK program I do not see any icons!

Could you help me to find a solution, please?

Thanks in Advance


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]