empathy r898 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r898 - trunk/libempathy
- Date: Fri, 11 Apr 2008 14:10:46 +0100 (BST)
Author: xclaesse
Date: Fri Apr 11 14:10:45 2008
New Revision: 898
URL: http://svn.gnome.org/viewvc/empathy?rev=898&view=rev
Log:
Remove all references to TpChan in EmpathyTpGroup
Modified:
trunk/libempathy/empathy-tp-group.c
trunk/libempathy/empathy-tp-group.h
Modified: trunk/libempathy/empathy-tp-group.c
==============================================================================
--- trunk/libempathy/empathy-tp-group.c (original)
+++ trunk/libempathy/empathy-tp-group.c Fri Apr 11 14:10:45 2008
@@ -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 {
PROP_0,
PROP_ACCOUNT,
- PROP_TP_CHAN,
PROP_CHANNEL,
PROP_READY
};
@@ -552,9 +550,6 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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)
Modified: trunk/libempathy/empathy-tp-group.h
==============================================================================
--- trunk/libempathy/empathy-tp-group.h (original)
+++ trunk/libempathy/empathy-tp-group.h Fri Apr 11 14:10:45 2008
@@ -78,7 +78,6 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]