From 654ac27bdf5aaac64c9a3ed4e2bfa55eccdd6557 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 24 May 2007 21:58:26 +0000 Subject: Preset the server only for jabber protocol to conference.server. This 2007-05-25 Xavier Claessens * libempathy-gtk/gossip-new-chatroom-dialog.c: Preset the server only for jabber protocol to conference.server. This fixes a warning. * libempathy-gtk/gossip-group-chat.h: * libempathy-gtk/gossip-group-chat.c: gossip_group_chat_set_topic() is a public function. * libempathy-gtk/empathy-images.h: * libempathy-gtk/empathy-main-window.glade: * libempathy-gtk/empathy-status-icon.glade: Make use of empathy-new-message icon name. * libempathy-gtk/gossip-contact-list-store.c: By default we sort by contacts names. * libempathy-gtk/gossip-chat.c: Do not display composing state if it's our own contact that is composing. * src/empathy-chat-main.c: * libempathy/empathy-tp-chat.c: * libempathy/empathy-tp-chat.h: Make possible to build the id based on the account and the channel's name. For private chats that means the contact's id. * libempathy-gtk/gossip-chat-window.c: Un-comment the code related to chatrooms that is now implemented. We can now Show/Hide contact list for group chats, DnD contact on the window to begin a discussion, join a new chatroom. * libempathy-gtk/gossip-account-chooser.c: Add a FIXME message. * data/22x22/empathy-new-message.png: * data/22x22/empathy-proto-irc.png: * data/22x22/Makefile.am: * data/32x32/empathy-proto-irc.png: * data/32x32/Makefile.am: * data/gtalk.profile: * data/16x16/empathy-new-message: * data/16x16/empathy-message-new.png: * data/16x16/empathy-proto-irc.png: * data/16x16/Makefile.am: * data/scalable/empathy-proto-irc.svg: * data/scalable/Makefile.am: * data/irc.profile: Adding icons for empathy-new-message and IRC protocol. Make use of the irc icon in the irc profile. svn path=/trunk/; revision=91 --- libempathy/empathy-tp-chat.c | 22 +++++++++++++++------- libempathy/empathy-tp-chat.h | 26 ++++++++++++++------------ 2 files changed, 29 insertions(+), 19 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 8e8a52aca..3c4f55423 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -488,14 +488,24 @@ empathy_tp_chat_get_id (EmpathyTpChat *chat) return priv->id; } - priv->id = empathy_tp_chat_build_id (priv->account, priv->tp_chan); + priv->id = empathy_tp_chat_build_id_for_chan (priv->account, priv->tp_chan); return priv->id; } gchar * -empathy_tp_chat_build_id (McAccount *account, - TpChan *tp_chan) +empathy_tp_chat_build_id (McAccount *account, + const gchar *contact_id) +{ + /* A handle name is unique only for a specific account */ + return g_strdup_printf ("%s/%s", + mc_account_get_unique_name (account), + contact_id); +} + +gchar * +empathy_tp_chat_build_id_for_chan (McAccount *account, + TpChan *tp_chan) { MissionControl *mc; TpConn *tp_conn; @@ -511,6 +521,7 @@ empathy_tp_chat_build_id (McAccount *account, tp_conn = mission_control_get_connection (mc, account, NULL); g_object_unref (mc); + /* Get the handle's name */ handles = g_array_new (FALSE, FALSE, sizeof (guint)); g_array_append_val (handles, tp_chan->handle); if (!tp_conn_inspect_handles (DBUS_G_PROXY (tp_conn), @@ -528,10 +539,7 @@ empathy_tp_chat_build_id (McAccount *account, return NULL; } - /* A handle name is unique only for a specific account */ - id = g_strdup_printf ("%s/%s", - mc_account_get_unique_name (account), - *names); + id = empathy_tp_chat_build_id (account, *names); g_strfreev (names); g_object_unref (tp_conn); diff --git a/libempathy/empathy-tp-chat.h b/libempathy/empathy-tp-chat.h index 0bd3395f2..a9278c3f1 100644 --- a/libempathy/empathy-tp-chat.h +++ b/libempathy/empathy-tp-chat.h @@ -55,18 +55,20 @@ struct _EmpathyTpChatClass { GObjectClass parent_class; }; -GType empathy_tp_chat_get_type (void) G_GNUC_CONST; -EmpathyTpChat *empathy_tp_chat_new (McAccount *account, - TpChan *tp_chan); -EmpathyTpChat *empathy_tp_chat_new_with_contact (GossipContact *contact); -void empathy_tp_chat_request_pending (EmpathyTpChat *chat); -void empathy_tp_chat_send (EmpathyTpChat *chat, - GossipMessage *message); -void empathy_tp_chat_set_state (EmpathyTpChat *chat, - TelepathyChannelChatState state); -const gchar * empathy_tp_chat_get_id (EmpathyTpChat *chat); -gchar * empathy_tp_chat_build_id (McAccount *account, - TpChan *tp_chan); +GType empathy_tp_chat_get_type (void) G_GNUC_CONST; +EmpathyTpChat *empathy_tp_chat_new (McAccount *account, + TpChan *tp_chan); +EmpathyTpChat *empathy_tp_chat_new_with_contact (GossipContact *contact); +void empathy_tp_chat_request_pending (EmpathyTpChat *chat); +void empathy_tp_chat_send (EmpathyTpChat *chat, + GossipMessage *message); +void empathy_tp_chat_set_state (EmpathyTpChat *chat, + TelepathyChannelChatState state); +const gchar * empathy_tp_chat_get_id (EmpathyTpChat *chat); +gchar * empathy_tp_chat_build_id (McAccount *account, + const gchar *contact_id); +gchar * empathy_tp_chat_build_id_for_chan (McAccount *account, + TpChan *tp_chan); G_END_DECLS -- cgit v1.2.3