RSS/Atom feed Twitter
Site is read-only, email is disabled

sensitive actions (Hacking GIMP)

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

sensitive actions (Hacking GIMP) Jordan Stinson 24 Jun 06:26
  sensitive actions (Hacking GIMP) Martin Nordholts 24 Jun 06:56
Jordan Stinson
2009-06-24 06:26:29 UTC (over 15 years ago)

sensitive actions (Hacking GIMP)

Hi all,
I'm trying to figure out which menu items are sensitive. It looks to me as though this property is usually changed when the ui manager updates the actions groups which updates the actions. I'm adding some additional items to the toolbox (as a test, I'm adding some layer actions). At the time of the toolbox initialization, the actions that i'm adding are all sensitive. The menu items that correspond to these are not sensitive when i view them and there doesn't appear to be any calls to the layer actions update function after I've initialized the toolbox. Could someone tell me how the "sensitive" property is decided initially for menu items if not by the action's "sensitive" property? Also could someone tell me how actions and menu items are related? Hopefully my questions are clear enough.

Thanks, Jordan

Martin Nordholts
2009-06-24 06:56:23 UTC (over 15 years ago)

sensitive actions (Hacking GIMP)

Jordan Stinson wrote:

Hi all,
I'm trying to figure out which menu items are sensitive. It looks to me as though this property is usually changed when the ui manager updates the actions groups which updates the actions. I'm adding some additional items to the toolbox (as a test, I'm adding some layer actions). At the time of the toolbox initialization, the actions that i'm adding are all sensitive. The menu items that correspond to these are not sensitive when i view them and there doesn't appear to be any calls to the layer actions update function after I've initialized the toolbox. Could someone tell me how the "sensitive" property is decided initially for menu items if not by the action's "sensitive" property? Also could someone tell me how actions and menu items are related? Hopefully my questions are clear enough.

Hi Jordan

The sensitivity of menu items are updated in the callback specified in the action_groups array in app/actions/actions.c. For example, the sensitivity of Image menu items is updated in image_actions_update() in app/actions/image-actions.c. This update mechanism is also used for calculating the initial sensitivity of menu menu items.

A GtkAction is an entity that does something, and a menu is a way to execute a GtkAction.

Also refer to my previous mail to you on this topic: http://lists.xcf.berkeley.edu/lists/gimp-developer/2009-June/022495.html

Feel free to ask further questions if things are still unclear.

BR, Martin