aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-tp-group.c60
-rw-r--r--libempathy/empathy-tp-group.h1
2 files changed, 7 insertions, 54 deletions
diff --git a/libempathy/empathy-tp-group.c b/libempathy/empathy-tp-group.c
index b2fc30903..0558bcb28 100644
--- a/libempathy/empathy-tp-group.c
+++ b/libempathy/empathy-tp-group.c
@@ -39,13 +39,12 @@
struct _EmpathyTpGroupPriv {
McAccount *account;
- TpChan *tp_chan;
TpChannel *channel;
+ gboolean ready;
EmpathyContactFactory *factory;
gchar *group_name;
guint self_handle;
- gboolean ready;
GList *members;
GList *local_pendings;
GList *remote_pendings;
@@ -66,7 +65,6 @@ enum {
enum {
PROP_0,
PROP_ACCOUNT,
- PROP_TP_CHAN,
PROP_CHANNEL,
PROP_READY
};
@@ -552,9 +550,6 @@ tp_group_finalize (GObject *object)
tp_factory = empathy_contact_factory_get_tp_factory (priv->factory, priv->account);
g_signal_handlers_disconnect_by_func (tp_factory, tp_group_factory_ready_cb, object);
- if (priv->tp_chan) {
- g_object_unref (priv->tp_chan);
- }
if (priv->channel) {
g_signal_handlers_disconnect_by_func (priv->channel,
tp_group_invalidated_cb,
@@ -615,9 +610,6 @@ tp_group_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;
@@ -642,9 +634,6 @@ tp_group_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;
@@ -673,14 +662,6 @@ empathy_tp_group_class_init (EmpathyTpGroupClass *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 old TpChan",
- 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",
@@ -756,31 +737,16 @@ empathy_tp_group_init (EmpathyTpGroup *group)
EmpathyTpGroup *
empathy_tp_group_new (McAccount *account,
- TpChan *tp_chan)
+ TpChannel *channel)
{
- EmpathyTpGroup *group;
- TpChannel *channel;
- TpConnection *connection;
- MissionControl *mc;
-
g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
- g_return_val_if_fail (TELEPATHY_IS_CHAN (tp_chan), NULL);
+ g_return_val_if_fail (TP_IS_CHANNEL (channel), NULL);
- mc = empathy_mission_control_new ();
- connection = mission_control_get_tpconnection (mc, account, NULL);
- channel = tp_chan_dup_channel (tp_chan, connection, NULL);
- group = g_object_new (EMPATHY_TYPE_TP_GROUP,
- "account", account,
- "channel", channel,
- "tp-chan", tp_chan,
- NULL);
-
- g_object_unref (channel);
- g_object_unref (connection);
- g_object_unref (mc);
-
- return group;
+ return g_object_new (EMPATHY_TYPE_TP_GROUP,
+ "account", account,
+ "channel", channel,
+ NULL);
}
static void
@@ -966,18 +932,6 @@ empathy_tp_group_get_self_contact (EmpathyTpGroup *group)
return tp_group_get_contact (group, priv->self_handle);
}
-TpChan *
-empathy_tp_group_get_channel (EmpathyTpGroup *group)
-{
- EmpathyTpGroupPriv *priv;
-
- g_return_val_if_fail (EMPATHY_IS_TP_GROUP (group), NULL);
-
- priv = GET_PRIV (group);
-
- return priv->tp_chan;
-}
-
gboolean
empathy_tp_group_is_member (EmpathyTpGroup *group,
EmpathyContact *contact)
diff --git a/libempathy/empathy-tp-group.h b/libempathy/empathy-tp-group.h
index f52c611c3..9309c94af 100644
--- a/libempathy/empathy-tp-group.h
+++ b/libempathy/empathy-tp-group.h
@@ -78,7 +78,6 @@ GList * empathy_tp_group_get_local_pendings (EmpathyTpGroup *gr
GList * empathy_tp_group_get_remote_pendings (EmpathyTpGroup *group);
const gchar * empathy_tp_group_get_name (EmpathyTpGroup *group);
EmpathyContact * empathy_tp_group_get_self_contact (EmpathyTpGroup *group);
-TpChannel * empathy_tp_group_get_channel (EmpathyTpGroup *group);
gboolean empathy_tp_group_is_member (EmpathyTpGroup *group,
EmpathyContact *contact);
gboolean empathy_tp_group_is_ready (EmpathyTpGroup *group);