After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 666392 - widget: Flip the sensitive flag even if the state doesn't change
widget: Flip the sensitive flag even if the state doesn't change
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-12-16 23:59 UTC by Rui Matos
Modified: 2011-12-17 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
widget: Flip the sensitive flag even if the state doesn't change (1.80 KB, patch)
2011-12-16 23:59 UTC, Rui Matos
none Details | Review
widget: Flip the sensitive flag even if the state doesn't change (1.46 KB, patch)
2011-12-17 11:58 UTC, Rui Matos
committed Details | Review
tests: Add a test for latest commit (1.54 KB, patch)
2011-12-17 11:59 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2011-12-16 23:59:28 UTC
Even if we can't change our sensitivity because the parent is insensitive we
should still flip the sensitive flag. Otherwise, with and insensitive parent,

child.set_sensitive(True)
...
parent.set_sensitive(True)

would result in child still being insensitive.
Comment 1 Rui Matos 2011-12-16 23:59:31 UTC
Created attachment 203711 [details] [review]
widget: Flip the sensitive flag even if the state doesn't change
Comment 2 Benjamin Otte (Company) 2011-12-17 10:01:18 UTC
This will break make check. Because I added a test for what I wanted to fix with 94f00eb04dd1433cf1cc9a3341f485124e38abd1 :)

But yeah, we need to toggle widget.sensitive but not toggle widget.state_flag_sensitive. I'll do that - and add a test.
Comment 3 Rui Matos 2011-12-17 11:58:50 UTC
Created attachment 203721 [details] [review]
widget: Flip the sensitive flag even if the state doesn't change

--
Simplified the patch.
Comment 4 Rui Matos 2011-12-17 11:59:17 UTC
Created attachment 203722 [details] [review]
tests: Add a test for latest commit
Comment 5 Rui Matos 2011-12-17 12:02:15 UTC
Attachment 203721 [details] pushed as 9d6da33 - widget: Flip the sensitive flag even if the state doesn't change
Attachment 203722 [details] pushed as 4a11339 - tests: Add a test for latest commit