[gnome-shell-extensions/wip/rstrode/heads-up-display: 10/62] apps-menu: Explicitly set label_actor




commit 86b1dbe15bed281f4f4187a1d2c33d29c912b7c8
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Mar 17 17:15:38 2016 +0100

    apps-menu: Explicitly set label_actor
    
    For some reason orca fails to pick up the label of category items,
    so set the label_actor explicitly as workaround.

 extensions/apps-menu/extension.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index d62e3d7..cc399c6 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -29,7 +29,9 @@ class ActivitiesMenuItem extends PopupMenu.PopupBaseMenuItem {
     constructor(button) {
         super();
         this._button = button;
-        this.actor.add_child(new St.Label({ text: _('Activities Overview') }));
+        let label = new St.Label({ text: _('Activities Overview') });
+        this.actor.add_child(label);
+        this.actor.label_actor = label;
     }
 
     activate(event) {
@@ -120,7 +122,9 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
         else
             name = _('Favorites');
 
-        this.actor.add_child(new St.Label({ text: name }));
+        let label = new St.Label({ text: name });
+        this.actor.add_child(label);
+        this.actor.label_actor = label;
         this.actor.connect('motion-event', this._onMotionEvent.bind(this));
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]