panel: Add a screen recording indicator

The indicator shows the recording duration and lets the user stop it on
click. It is more discoverable than the stop entry in the aggregate
menu.

The class extends ButtonBox directly rather than Button because Button
does nothing that it uses, and actually causes issues with its dummy
menu (its vfunc_hide() throws an "open-state-changed: Error: incorrect
pop").

The menu-set signal declaration is required by the panel.

The screencast is stopped upon button press in vfunc_event(), which
matches PanelMenu.Button's input handling.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2163>
This commit is contained in:
Ivan Molodetskikh
2022-02-08 19:18:01 +03:00
committed by Marge Bot
parent 33cf163f95
commit 6ec8480052
4 changed files with 110 additions and 3 deletions

View File

@ -91,7 +91,7 @@ const _modes = {
panel: {
left: ['activities', 'appMenu'],
center: ['dateMenu'],
right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'],
right: ['screenRecording', 'dwellClick', 'a11y', 'keyboard', 'aggregateMenu'],
},
},
};