[gnome-shell] telepathyClient: Add support for aliases on the self-contact
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] telepathyClient: Add support for aliases on the self-contact
- Date: Mon, 14 Mar 2011 22:53:11 +0000 (UTC)
commit 6ff69da0deca3f595d3592ff27bd96b15ea2797a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Feb 26 09:25:11 2011 -0500
telepathyClient: Add support for aliases on the self-contact
Upgrade the connection's self contact to allow aliases, so that we
don't show the internal telepathy identifier anywhere user-visible.
https://bugzilla.gnome.org/show_bug.cgi?id=642793
js/ui/telepathyClient.js | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
index 4056679..89a1861 100644
--- a/js/ui/telepathyClient.js
+++ b/js/ui/telepathyClient.js
@@ -68,7 +68,22 @@ Client.prototype = {
_observeChannels: function(observer, account, conn, channels,
dispatchOp, requests, context) {
- let connPath = conn.get_object_path();
+ // If the self_contact doesn't have the ALIAS, make sure
+ // to fetch it before trying to grab the channels.
+ let self_contact = conn.get_self_contact();
+ if (self_contact.has_feature(Tp.ContactFeature.ALIAS)) {
+ this._finishObserveChannels(account, conn, channels, context);
+ } else {
+ Shell.get_self_contact_features(conn,
+ contactFeatures.length, contactFeatures,
+ Lang.bind(this, function() {
+ this._finishObserveChannels(account, conn, channels, context);
+ }));
+ context.delay();
+ }
+ },
+
+ _finishObserveChannels: function(account, conn, channels, context) {
let len = channels.length;
for (let i = 0; i < len; i++) {
let channel = channels[i];
@@ -91,7 +106,6 @@ Client.prototype = {
}), null);
}
- // Allow dbus method to return
context.accept();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]