[gnome-shell] Revert the other half of "St: don't attempt to give focus to non reactive actors"
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Revert the other half of "St: don't attempt to give focus to non reactive actors"
- Date: Sun, 26 Aug 2012 14:57:34 +0000 (UTC)
commit 8a86540090b18fbec222e03beb5d2f3fcaec9bf1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Aug 19 21:40:09 2012 -0400
Revert the other half of "St: don't attempt to give focus to non reactive actors"
This reverts commit 26d3b1929e2cd9dcedf829a2224857a533040729.
https://bugzilla.gnome.org/show_bug.cgi?id=667439
js/ui/networkAgent.js | 1 +
js/ui/popupMenu.js | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/networkAgent.js b/js/ui/networkAgent.js
index f91a4ba..dbfb758 100644
--- a/js/ui/networkAgent.js
+++ b/js/ui/networkAgent.js
@@ -168,6 +168,7 @@ const NetworkSecretDialog = new Lang.Class({
}
this._okButton.button.reactive = valid;
+ this._okButton.button.can_focus = valid;
},
_onOk: function() {
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index dcc23d7..70c4360 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -134,6 +134,7 @@ const PopupBaseMenuItem = new Lang.Class({
this.sensitive = sensitive;
this.actor.reactive = sensitive;
+ this.actor.can_focus = sensitive;
this.emit('sensitive-changed', sensitive);
},
@@ -717,7 +718,8 @@ const Switch = new Lang.Class({
_init: function(state) {
this.actor = new St.Bin({ style_class: 'toggle-switch',
- accessible_role: Atk.Role.CHECK_BOX});
+ accessible_role: Atk.Role.CHECK_BOX,
+ can_focus: true });
// Translators: this MUST be either "toggle-switch-us"
// (for toggle switches containing the English words
// "ON" and "OFF") or "toggle-switch-intl" (for toggle
@@ -1876,7 +1878,7 @@ const RemoteMenu = new Lang.Class({
}));
}
- item.actor.reactive = action.enabled;
+ item.actor.reactive = item.actor.can_focus = action.enabled;
destroyId = item.connect('destroy', Lang.bind(this, function() {
item.disconnect(destroyId);
@@ -2008,7 +2010,7 @@ const RemoteMenu = new Lang.Class({
if (action.items.length) {
for (let i = 0; i < action.items.length; i++) {
let item = action.items[i];
- item.actor.reactive = action.enabled;
+ item.actor.reactive = item.actor.can_focus = action.enabled;
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]