[gnome-shell] ApproverSource: takes a gicon rather than an icon name



commit 52c5f9b144ad6d673843f4d7dd9f5e5ebd1cf73f
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Aug 16 16:59:34 2011 +0200

    ApproverSource: takes a gicon rather than an icon name
    
    https://bugzilla.gnome.org/show_bug.cgi?id=653940

 js/ui/telepathyClient.js |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
index 9c38cce..b0d1218 100644
--- a/js/ui/telepathyClient.js
+++ b/js/ui/telepathyClient.js
@@ -225,7 +225,8 @@ Client.prototype = {
 
         // FIXME: We don't have a 'chat room' icon (bgo #653737) use
         // system-users for now as Empathy does.
-        let source = new ApproverSource(dispatchOp, _("Invitation"), 'system-users');
+        let source = new ApproverSource(dispatchOp, _("Invitation"),
+                                        Shell.util_icon_from_string('system-users'));
         Main.messageTray.add(source);
 
         let notif = new RoomInviteNotification(source, dispatchOp, channel, contacts[0]);
@@ -288,7 +289,9 @@ Client.prototype = {
           isVideo = true;
 
         // We got the TpContact
-        let source = new ApproverSource(dispatchOp, _("Call"), isVideo ? 'camera-web' : 'audio-input-microphone');
+        let source = new ApproverSource(dispatchOp, _("Call"), isVideo ?
+                                        Shell.util_icon_from_string('camera-web') :
+                                        Shell.util_icon_from_string('audio-input-microphone'));
         Main.messageTray.add(source);
 
         let notif = new AudioVideoNotification(source, dispatchOp, channel, contacts[0], isVideo);
@@ -843,17 +846,17 @@ ChatNotification.prototype = {
     }
 };
 
-function ApproverSource(dispatchOp, text, icon) {
-    this._init(dispatchOp, text, icon);
+function ApproverSource(dispatchOp, text, gicon) {
+    this._init(dispatchOp, text, gicon);
 }
 
 ApproverSource.prototype = {
     __proto__: MessageTray.Source.prototype,
 
-    _init: function(dispatchOp, text, icon) {
+    _init: function(dispatchOp, text, gicon) {
         MessageTray.Source.prototype._init.call(this, text);
 
-        this._icon = icon;
+        this._gicon = gicon;
         this._setSummaryIcon(this.createNotificationIcon());
 
         this._dispatchOp = dispatchOp;
@@ -876,7 +879,7 @@ ApproverSource.prototype = {
     },
 
     createNotificationIcon: function() {
-        return new St.Icon({ icon_name: this._icon,
+        return new St.Icon({ gicon: this._gicon,
                              icon_type: St.IconType.FULLCOLOR,
                              icon_size: this.ICON_SIZE });
     }



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