aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:23:02 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:23:02 +0800
commitecfd6a3474144a94caca498c56286b8ad503296e (patch)
treea86c0b6653aba931f408c20be2f26cb30efe248b
parent633dd8bd9ec961c04f73335984d7ea30cc0b5684 (diff)
downloadgsoc2013-empathy-ecfd6a3474144a94caca498c56286b8ad503296e.tar
gsoc2013-empathy-ecfd6a3474144a94caca498c56286b8ad503296e.tar.gz
gsoc2013-empathy-ecfd6a3474144a94caca498c56286b8ad503296e.tar.bz2
gsoc2013-empathy-ecfd6a3474144a94caca498c56286b8ad503296e.tar.lz
gsoc2013-empathy-ecfd6a3474144a94caca498c56286b8ad503296e.tar.xz
gsoc2013-empathy-ecfd6a3474144a94caca498c56286b8ad503296e.tar.zst
gsoc2013-empathy-ecfd6a3474144a94caca498c56286b8ad503296e.zip
Add back "tp-chan" property, still used to inspect the channel handle.
svn path=/trunk/; revision=769
-rw-r--r--libempathy/empathy-tp-chat.c31
-rw-r--r--libempathy/empathy-tp-chatroom.c1
2 files changed, 23 insertions, 9 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index a7aabca69..e97f22054 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -64,6 +64,7 @@ static void empathy_tp_chat_init (EmpathyTpChat *chat);
enum {
PROP_0,
PROP_ACCOUNT,
+ PROP_TP_CHAN,
PROP_CHANNEL,
PROP_ACKNOWLEDGE,
};
@@ -608,6 +609,9 @@ tp_chat_get_property (GObject *object,
case PROP_ACCOUNT:
g_value_set_object (value, priv->account);
break;
+ case PROP_TP_CHAN:
+ g_value_set_object (value, priv->tp_chan);
+ break;
case PROP_CHANNEL:
g_value_set_object (value, priv->channel);
break;
@@ -632,6 +636,9 @@ tp_chat_set_property (GObject *object,
case PROP_ACCOUNT:
priv->account = g_object_ref (g_value_get_object (value));
break;
+ case PROP_TP_CHAN:
+ priv->tp_chan = g_object_ref (g_value_get_object (value));
+ break;
case PROP_CHANNEL:
priv->channel = g_object_ref (g_value_get_object (value));
break;
@@ -665,6 +672,15 @@ empathy_tp_chat_class_init (EmpathyTpChatClass *klass)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class,
+ PROP_TP_CHAN,
+ g_param_spec_object ("tp-chan",
+ "telepathy channel",
+ "The text channel for the chat",
+ TELEPATHY_CHAN_TYPE,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (object_class,
PROP_CHANNEL,
g_param_spec_object ("channel",
"telepathy channel",
@@ -745,12 +761,11 @@ EmpathyTpChat *
empathy_tp_chat_new (McAccount *account,
TpChan *tp_chan)
{
- EmpathyTpChat *chat;
- EmpathyTpChatPriv *priv;
- TpChannel *channel;
- TpConnection *connection;
- MissionControl *mc;
- TpConn *tp_conn;
+ EmpathyTpChat *chat;
+ TpChannel *channel;
+ TpConnection *connection;
+ MissionControl *mc;
+ TpConn *tp_conn;
mc = empathy_mission_control_new ();
tp_conn = mission_control_get_connection (mc, account, NULL);
@@ -760,11 +775,9 @@ empathy_tp_chat_new (McAccount *account,
chat = g_object_new (EMPATHY_TYPE_TP_CHAT,
"account", account,
"channel", channel,
+ "tp-chan", tp_chan,
NULL);
- priv = GET_PRIV (chat);
- priv->tp_chan = g_object_ref (tp_chan);
-
g_object_unref (channel);
g_object_unref (tp_conn);
g_object_unref (connection);
diff --git a/libempathy/empathy-tp-chatroom.c b/libempathy/empathy-tp-chatroom.c
index 52d274e25..de0a684c0 100644
--- a/libempathy/empathy-tp-chatroom.c
+++ b/libempathy/empathy-tp-chatroom.c
@@ -202,6 +202,7 @@ empathy_tp_chatroom_new (McAccount *account,
chatroom = g_object_new (EMPATHY_TYPE_TP_CHATROOM,
"account", account,
"channel", channel,
+ "tp-chan", tp_chan,
NULL);
priv = GET_PRIV (chatroom);