0

My application has an "Actions" menu with a "Delete" submenu which does not get sensitized the first time I select an item from a list, even though I am explicitly calling

gtk_widget_set_sensitive(GTK_WIDGET(DeleteMenuItem), TRUE);

in the button release event of the treeview for the list.

However... If I select an item from the list, select the "Actions" menu, then select another item from the list, then select "Actions" menu item, the "Delete" menu item is now sensitized.

Is this a bug in GTK? (version 2.4.6, I know, but unfortunately, I am not able to go to a newer version of the GTK)

I appreciate the help, bernie

1 Answer 1

0

It looks like the "button release event" is not triggered, maybe because there is not "release event" the first time. You might want to use a different event (I could not get clearly the use case, so I am not suggesting any event in particular).

In short: gtk_widget_set_sensitive() is not the problem, the problem is when you call it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.