From 52c5f9b144ad6d673843f4d7dd9f5e5ebd1cf73f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 16 Aug 2011 16:59:34 +0200 Subject: [PATCH] ApproverSource: takes a gicon rather than an icon name https://bugzilla.gnome.org/show_bug.cgi?id=653940 --- js/ui/telepathyClient.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js index 9c38ccec5..b0d1218fe 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 }); }