[gnome-shell/wip/message-tray-menu: 5/20] messageTray: Rename the context menu to the tray menu



commit 1efb8bfaf46cc22dd22011ca173f085c458c9847
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Apr 19 12:00:44 2013 -0400

    messageTray: Rename the context menu to the tray menu

 js/ui/messageTray.js |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 0e0bf8f..7e544cc 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1487,8 +1487,8 @@ const SummaryItem = new Lang.Class({
 });
 Signals.addSignalMethods(SummaryItem.prototype);
 
-const MessageTrayContextMenu = new Lang.Class({
-    Name: 'MessageTrayContextMenu',
+const MessageTrayMenu = new Lang.Class({
+    Name: 'MessageTrayMenu',
     Extends: PopupMenu.PopupMenu,
 
     _init: function(tray) {
@@ -1719,9 +1719,9 @@ const MessageTray = new Lang.Class({
         this.actor.add_actor(this._noMessages);
         this._updateNoMessagesLabel();
 
-        this._contextMenu = new MessageTrayContextMenu(this);
-        this._contextMenuManager = new PopupMenu.PopupMenuManager({ grabHelper: this._grabHelper });
-        this._contextMenuManager.addMenu(this._contextMenu);
+        this._trayMenu = new MessageTrayMenu(this);
+        this._trayMenuManager = new PopupMenu.PopupMenuManager({ grabHelper: this._grabHelper });
+        this._trayMenuManager.addMenu(this._trayMenu);
 
         let clickAction = new Clutter.ClickAction();
         this.actor.add_action(clickAction);
@@ -1729,7 +1729,7 @@ const MessageTray = new Lang.Class({
         clickAction.connect('clicked', Lang.bind(this, function(action) {
             let button = action.get_button();
             if (button == 3)
-                this._openContextMenu();
+                this._openTrayMenu();
         }));
 
         clickAction.connect('long-press', Lang.bind(this, function(action, actor, state) {
@@ -1737,16 +1737,16 @@ const MessageTray = new Lang.Class({
             case Clutter.LongPressState.QUERY:
                 return true;
             case Clutter.LongPressState.ACTIVATE:
-                this._openContextMenu();
+                this._openTrayMenu();
             }
             return false;
         }));
     },
 
-    _openContextMenu: function () {
+    _openTrayMenu: function () {
         let [x, y, mask] = global.get_pointer();
-        this._contextMenu.setPosition(Math.round(x), Math.round(y));
-        this._contextMenu.open(BoxPointer.PopupAnimation.FULL);
+        this._trayMenu.setPosition(Math.round(x), Math.round(y));
+        this._trayMenu.open(BoxPointer.PopupAnimation.FULL);
     },
 
     close: function() {


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