GNOME Bugzilla – Bug 702811
Widget with related action, setting visibile or sensitive still produces effect
Last modified: 2018-05-02 15:41:03 UTC
If a widget (GtkButton) has a related action set and the action is hidden and not sensitive, the code below changes the behavior of the button. g_object_set(G_OBJECT(button), "visible", TRUE, NULL); g_object_set(G_OBJECT(button), "sensitive", TRUE, NULL); I'm expecting that visible and sensitive are valid only when changed through the related action.
I'm not sure this is really a problem. If you set an Action on a widget implementing GtkActionable, its visibility and sensitivity should become exclusively controlled by that Action, and other code should not try to override these properties. IMO, it is fine to leave such cases as a programmer error, rather than making the toolkit spend time preventing it. Do you have a rationale of how a situation would arise where these properties would be subject to change, and that change must be blocked, and how it's not a programmer error to get into that situation?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/428.