GNOME Bugzilla – Bug 781428
build-manager: Disable build buttons when appropriate
Last modified: 2017-04-18 21:54:35 UTC
These commits disable the build, rebuild, install, and clean buttons when the build isn't possible, such as when the runtime is missing. I think every code path that causes the actions to enable or disable leads to update_action_enabled() which calls propagate_action_enabled(), so we can delete other calls to that, right?
Created attachment 349969 [details] [review] Revert "Revert "buildmanager: disable actions when can-build is FALSE"" Christian didn't have enough time to finish this feature so I'm picking it up in this series of commits.
Created attachment 349970 [details] [review] build-manager: Emit action-enabled-changed for install
Created attachment 349971 [details] [review] build-manager: Add a helper to enable/disable actions Since the actions (build, rebuild, etc) enabled status depend on the pipeline's busy property and the manager's can-build property, so a simple property binding wouldn't work. Instead, use a helper function.
Created attachment 349972 [details] [review] build-manager: Add a setter for can-build Since update_action_enabled() needs to be called whenever can-build changes, it makes sense to use a setter function.
Attachment 349969 [details] pushed as ee6e00b - Revert "Revert "buildmanager: disable actions when can-build is FALSE"" Attachment 349970 [details] pushed as 1a4b6cc - build-manager: Emit action-enabled-changed for install Attachment 349971 [details] pushed as 17d9bcb - build-manager: Add a helper to enable/disable actions Attachment 349972 [details] pushed as 228bbe8 - build-manager: Add a setter for can-build