Package: gtk

Function gtk:icon-factory-add

Lambda List

gtk:icon-factory-add (factory stock-id iconset)

Arguments

factory -- a gtk:icon-factory object
stock-id -- a string with the icon name
iconset -- a gtk:icon-set instance

Details

Adds the given iconset to the icon factory, under the name stock-id. The stock-id argument should be namespaced for your application, e.g. "myapp-whatever-icon". Normally applications create a gtk:icon-factory object, then add it to the list of default factories with the gtk:icon-factory-add-default function. Then they pass the stock-id argument to widgets such as a gtk:image widget to display the icon. Themes can provide an icon with the same name, such as "myapp-whatever-icon", to override your default icons of the application. If an icon already existed in factory for stock-id, it is unreferenced and replaced with the new iconset instance.

Warning

The gtk:icon-factory-add function has been deprecated since version 3.10 and should not be used in newly written code. Use the gtk:icon-theme API instead.
 

See also

#2023-3-27