a11y: adding a proper state for menu items with a dot

https://bugzilla.gnome.org/show_bug.cgi?id=682366
This commit is contained in:
Alejandro Piñeiro 2012-07-31 17:53:37 +02:00
parent 83a1c7283d
commit 8ebd2ff9eb

View File

@ -179,12 +179,14 @@ const PopupBaseMenuItem = new Lang.Class({
this._dot = new St.DrawingArea({ style_class: 'popup-menu-item-dot' }); this._dot = new St.DrawingArea({ style_class: 'popup-menu-item-dot' });
this._dot.connect('repaint', Lang.bind(this, this._onRepaintDot)); this._dot.connect('repaint', Lang.bind(this, this._onRepaintDot));
this.actor.add_actor(this._dot); this.actor.add_actor(this._dot);
this.actor.add_accessible_state (Atk.StateType.CHECKED);
} else { } else {
if (!this._dot) if (!this._dot)
return; return;
this._dot.destroy(); this._dot.destroy();
this._dot = null; this._dot = null;
this.actor.remove_accessible_state (Atk.StateType.CHECKED);
} }
}, },