[gnome-shell/wip/fmuellner/notification-redux+sass: 113/141] messageTray: Remove UI bits from Source



commit a0b0ccb2999987ac160423fd1ed5b1e8a430d5b5
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Feb 19 14:31:11 2015 +0100

    messageTray: Remove UI bits from Source
    
    Since the summary area was removed from the message tray, Source are not
    longer represented in the UI, so right-click menus and summary icons are
    no longer a thing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744850

 js/ui/components/telepathyClient.js |   16 -----------
 js/ui/messageTray.js                |   51 -----------------------------------
 2 files changed, 0 insertions(+), 67 deletions(-)
---
diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js
index 7758ee2..210360f 100644
--- a/js/ui/components/telepathyClient.js
+++ b/js/ui/components/telepathyClient.js
@@ -476,22 +476,6 @@ const ChatSource = new Lang.Class({
         this._getLogMessages();
     },
 
-    buildRightClickMenu: function() {
-        let item;
-
-        let rightClickMenu = this.parent();
-        item = new PopupMenu.PopupMenuItem('');
-        item.actor.connect('notify::mapped', Lang.bind(this, function() {
-            item.label.set_text(this.isMuted ? _("Unmute") : _("Mute"));
-        }));
-        item.connect('activate', Lang.bind(this, function() {
-            this.setMuted(!this.isMuted);
-            this.emit('done-displaying-content', false);
-        }));
-        rightClickMenu.add(item.actor);
-        return rightClickMenu;
-    },
-
     _createPolicy: function() {
         return new MessageTray.NotificationApplicationPolicy('empathy');
     },
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 8a85944..82d4b77 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1246,7 +1246,6 @@ const Source = new Lang.Class({
 
         this.isChat = false;
         this.isMuted = false;
-        this.keepTrayOnSummaryClick = false;
 
         this.notifications = [];
 
@@ -1282,27 +1281,6 @@ const Source = new Lang.Class({
         return new NotificationPolicy();
     },
 
-    buildRightClickMenu: function() {
-        let item;
-        let rightClickMenu = new St.BoxLayout({ name: 'summary-right-click-menu',
-                                                vertical: true });
-
-        item = new PopupMenu.PopupMenuItem(_("Open"));
-        item.connect('activate', Lang.bind(this, function() {
-            this.open();
-            this.emit('done-displaying-content', true);
-        }));
-        rightClickMenu.add(item.actor);
-
-        item = new PopupMenu.PopupMenuItem(_("Remove"));
-        item.connect('activate', Lang.bind(this, function() {
-            this.destroy();
-            this.emit('done-displaying-content', false);
-        }));
-        rightClickMenu.add(item.actor);
-        return rightClickMenu;
-    },
-
     setTitle: function(newTitle) {
         this.title = newTitle;
         this.emit('title-changed');
@@ -1327,20 +1305,6 @@ const Source = new Lang.Class({
         return new Gio.ThemedIcon({ name: this.iconName });
     },
 
-    _ensureMainIcon: function() {
-        if (this._mainIcon)
-            return;
-
-        this._mainIcon = new SourceActorWithLabel(this, this.SOURCE_ICON_SIZE);
-    },
-
-    // Unlike createIcon, this always returns the same actor;
-    // there is only one summary icon actor for a Source.
-    getSummaryIcon: function() {
-        this._ensureMainIcon();
-        return this._mainIcon.actor;
-    },
-
     _onNotificationDestroy: function(notification) {
         let index = this.notifications.indexOf(notification);
         if (index < 0)
@@ -1392,25 +1356,10 @@ const Source = new Lang.Class({
         this.emit('destroy', reason);
     },
 
-    // A subclass can redefine this to "steal" clicks from the
-    // summaryitem; Use Clutter.get_current_event() to get the
-    // details, return true to prevent the default handling from
-    // ocurring.
-    handleSummaryClick: function() {
-        return false;
-    },
-
     iconUpdated: function() {
         this.emit('icon-updated');
     },
 
-    //// Protected methods ////
-    _setSummaryIcon: function(icon) {
-        this._ensureMainIcon();
-        this._mainIcon.setIcon(icon);
-        this.iconUpdated();
-    },
-
     // To be overridden by subclasses
     open: function() {
     },


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