Commit 354f925d authored by Leesoo Ahn's avatar Leesoo Ahn Committed by Debarshi Ray

main-toolbar: Enable the gear menu only when the item is loaded

The "app.gear-menu" GAction is enabled and disabled from both
photos_application_actions_update and the MainToolbar when the mode
changes. This makes things unpredictable by relying on the order in
which the callbacks are invoked. Currently the MainToolbar was
winning and rendering parts of commit 031df27c ineffective.

Instead, this should only be handled in one place -
photos_application_actions_update. It's a lot more fine-grained and
informed than the MainToolbar itself. eg., the MainToolbar only knows
about the mode changing to PREVIEW, but doesn't know whether the item
has finished loading.

This code was added in commit 7e12154b, and the above rationale
held true even then. However, back then, the item's loading state was
not looked at. This is probably why the problem got overlooked.

parent 7eeac04d
Pipeline #55516 passed with stage
in 16 minutes and 16 seconds