diff options
author | Chandni Verma <chandniverma2112@gmail.com> | 2011-01-12 19:28:27 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-01-13 16:52:24 +0800 |
commit | 876df65bb9a150cffcd67f22ade017d3dd7fcb6a (patch) | |
tree | 2b29198f8242215b8ae4388e656fb59a498dc08f /libempathy-gtk/empathy-chat.c | |
parent | 3de1ceb50c21c2ccc34bf44cd2b6abec3853239b (diff) | |
download | gsoc2013-empathy-876df65bb9a150cffcd67f22ade017d3dd7fcb6a.tar gsoc2013-empathy-876df65bb9a150cffcd67f22ade017d3dd7fcb6a.tar.gz gsoc2013-empathy-876df65bb9a150cffcd67f22ade017d3dd7fcb6a.tar.bz2 gsoc2013-empathy-876df65bb9a150cffcd67f22ade017d3dd7fcb6a.tar.lz gsoc2013-empathy-876df65bb9a150cffcd67f22ade017d3dd7fcb6a.tar.xz gsoc2013-empathy-876df65bb9a150cffcd67f22ade017d3dd7fcb6a.tar.zst gsoc2013-empathy-876df65bb9a150cffcd67f22ade017d3dd7fcb6a.zip |
Chat command nick modified to use RequestRename instead of SetAliases
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index f98fc302f..4b3bcb427 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -775,23 +775,27 @@ chat_command_msg (EmpathyChat *chat, #endif static void +callback_for_request_rename(TpProxy *proxy, + const GError *error, + gpointer user_data, + GObject *weak_object) +{ + if (error != NULL) { + DEBUG ("Call to RequestRename method failed: %s",error->message); + } +} + +static void chat_command_nick (EmpathyChat *chat, GStrv strv) { EmpathyChatPriv *priv = GET_PRIV (chat); - TpConnection *connection; - GHashTable *new_alias; - TpHandle handle; - - connection = tp_account_get_connection (priv->account); - handle = tp_connection_get_self_handle (connection); - new_alias = g_hash_table_new (g_direct_hash, g_direct_equal); - g_hash_table_insert (new_alias, GUINT_TO_POINTER (handle), strv[1]); + TpProxy *proxy; - tp_cli_connection_interface_aliasing_call_set_aliases (connection, -1, - new_alias, NULL, NULL, NULL, NULL); + proxy = TP_PROXY (tp_account_get_connection (priv->account)); - g_hash_table_destroy (new_alias); + emp_cli_connection_interface_renaming_call_request_rename (proxy, -1, + strv[1], callback_for_request_rename, NULL, NULL, NULL); } static void |