[gnome-shell] legacyTray: Add to ctrl-alt-tab
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] legacyTray: Add to ctrl-alt-tab
- Date: Fri, 13 Mar 2015 16:16:52 +0000 (UTC)
commit 775a2ea051b2179764c38d23ace6d8c898eb77ce
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Mar 11 20:44:10 2015 +0100
legacyTray: Add to ctrl-alt-tab
While legacy status icons are notoriously bad with regard to
accessibility (well, among many other things), we should still
make them available via ctrl-alt-tab ...
https://bugzilla.gnome.org/show_bug.cgi?id=746022
js/ui/legacyTray.js | 15 ++++++++++++++-
po/POTFILES.in | 1 +
2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/legacyTray.js b/js/ui/legacyTray.js
index f3d8613..8c23167 100644
--- a/js/ui/legacyTray.js
+++ b/js/ui/legacyTray.js
@@ -3,6 +3,7 @@ const GObject = imports.gi.GObject;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
+const CtrlAltTab = imports.ui.ctrlAltTab;
const Lang = imports.lang;
const Layout = imports.ui.layout;
const Main = imports.ui.main;
@@ -53,7 +54,10 @@ const LegacyTray = new Lang.Class({
this._box = new St.BoxLayout();
this._slider.add_actor(this._box);
- this._concealHandle = new St.Button({ style_class: 'legacy-tray-handle' });
+ this._concealHandle = new St.Button({ style_class: 'legacy-tray-handle',
+ /* translators: 'Hide' is a verb */
+ accessible_name: _("Hide tray"),
+ can_focus: true });
this._concealHandle.child = new St.Icon({ icon_name: 'go-previous-symbolic' });
this._box.add_child(this._concealHandle);
@@ -83,6 +87,9 @@ const LegacyTray = new Lang.Class({
Main.layoutManager.addChrome(this.actor, { affectsInputRegion: false });
Main.layoutManager.trackChrome(this._slider, { affectsInputRegion: true });
+ Main.ctrlAltTabManager.addGroup(this.actor,
+ _("Status Icons"), 'focus-legacy-systray-symbolic',
+ { sortGroup: CtrlAltTab.SortGroup.BOTTOM });
this._trayManager = new Shell.TrayManager();
this._trayIconAddedId = this._trayManager.connect('tray-icon-added', Lang.bind(this,
this._onTrayIconAdded));
@@ -121,14 +128,20 @@ const LegacyTray = new Lang.Class({
return;
let button = new St.Button({ child: icon,
+ style_class: 'legacy-tray-icon',
button_mask: St.ButtonMask.ONE |
St.ButtonMask.TWO |
St.ButtonMask.THREE,
+ can_focus: true,
x_fill: true, y_fill: true });
button.connect('clicked',
function() {
icon.click(Clutter.get_current_event());
});
+ button.connect('key-focus-in', Lang.bind(this,
+ function() {
+ this._concealHandle.show();
+ }));
this._iconBox.add_actor(button);
this._sync();
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 69942b8..aa535bb 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -30,6 +30,7 @@ js/ui/endSessionDialog.js
js/ui/extensionDownloader.js
js/ui/extensionSystem.js
js/ui/keyboard.js
+js/ui/legacyTray.js
js/ui/lookingGlass.js
js/ui/main.js
js/ui/messageTray.js
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]