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 781428 - build-manager: Disable build buttons when appropriate
build-manager: Disable build buttons when appropriate
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-18 03:30 UTC by Matthew Leeds
Modified: 2017-04-18 21:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revert "Revert "buildmanager: disable actions when can-build is FALSE"" (4.00 KB, patch)
2017-04-18 03:30 UTC, Matthew Leeds
committed Details | Review
build-manager: Emit action-enabled-changed for install (1.05 KB, patch)
2017-04-18 03:30 UTC, Matthew Leeds
committed Details | Review
build-manager: Add a helper to enable/disable actions (3.74 KB, patch)
2017-04-18 03:30 UTC, Matthew Leeds
committed Details | Review
build-manager: Add a setter for can-build (2.90 KB, patch)
2017-04-18 03:30 UTC, Matthew Leeds
committed Details | Review

Description Matthew Leeds 2017-04-18 03:30:42 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?
Comment 1 Matthew Leeds 2017-04-18 03:30:45 UTC
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.
Comment 2 Matthew Leeds 2017-04-18 03:30:48 UTC
Created attachment 349970 [details] [review]
build-manager: Emit action-enabled-changed for install
Comment 3 Matthew Leeds 2017-04-18 03:30:51 UTC
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.
Comment 4 Matthew Leeds 2017-04-18 03:30:54 UTC
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.
Comment 5 Christian Hergert 2017-04-18 21:54:24 UTC
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