[gnome-shell] telepathyClient: Code cleanup



commit 80b98d8787c20759f6b263040c23974a3fd1d261
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Jul 17 15:25:42 2011 -0400

    telepathyClient: Code cleanup
    
    Move a function to where it's used and rename "_createSource"
    to reflect that it creates *chat* sources.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=654791

 js/ui/telepathyClient.js |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
index 1d91ba4..fb2d834 100644
--- a/js/ui/telepathyClient.js
+++ b/js/ui/telepathyClient.js
@@ -139,14 +139,14 @@ Client.prototype = {
                             return;
 
                         /* We got the TpContact */
-                        this._createSource(account, conn, channel, contacts[0]);
+                        this._createChatSource(account, conn, channel, contacts[0]);
                     }), null);
         }
 
         context.accept();
     },
 
-    _createSource: function(account, conn, channel, contact) {
+    _createChatSource: function(account, conn, channel, contact) {
         if (this._chatSources[channel.get_object_path()])
             return;
 
@@ -167,6 +167,12 @@ Client.prototype = {
                        }));
     },
 
+    _handleChannels: function(handler, account, conn, channels,
+                              requests, user_action_time, context) {
+        this._handlingChannels(account, conn, channels);
+        context.accept();
+    },
+
     _handlingChannels: function(account, conn, channels) {
         let len = channels.length;
         for (let i = 0; i < len; i++) {
@@ -290,12 +296,6 @@ Client.prototype = {
         context.accept();
     },
 
-    _handleChannels: function(handler, account, conn, channels,
-                              requests, user_action_time, context) {
-        this._handlingChannels(account, conn, channels);
-        context.accept();
-    },
-
     _delegatedChannelsCb: function(client, channels) {
         // Nothing to do as we don't make a distinction between observed and
         // handled channels.



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