[gnome-shell] popupMenu: Add a check ornament
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] popupMenu: Add a check ornament
- Date: Tue, 23 Apr 2013 19:57:43 +0000 (UTC)
commit 84303533897f62e0b6a634e26fb9eac0650fc62b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Apr 19 21:13:37 2013 -0400
popupMenu: Add a check ornament
This will be used to replace switches in the remote menu
https://bugzilla.gnome.org/show_bug.cgi?id=698427
js/ui/popupMenu.js | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 8f600a4..9844baf 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -22,6 +22,7 @@ const SLIDER_SCROLL_STEP = 0.05; /* Slider scrolling step in % */
const Ornament = {
NONE: 0,
DOT: 1,
+ CHECK: 2,
};
function _ensureStyle(actor) {
@@ -192,6 +193,9 @@ const PopupBaseMenuItem = new Lang.Class({
if (ornament == Ornament.DOT) {
this._ornamentLabel.text = '\u2022';
this.actor.add_accessible_state(Atk.StateType.CHECKED);
+ } else if (ornament == Ornament.CHECK) {
+ this._ornamentLabel.text = '\u2713';
+ this.actor.add_accessible_state(Atk.StateType.CHECKED);
} else if (ornament == Ornament.NONE) {
this._ornamentLabel.text = '';
this.actor.remove_accessible_state(Atk.StateType.CHECKED);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]