summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-02-12 21:13:25 +0000
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2010-02-15 12:39:43 +1100
commit38ee32ffe4cf760878cdbebc83c6e5c60f6087cf (patch)
tree2af20eebbb66532745a5cd11e8aa66f2ce4d5336
parentd4288c9388049e9471d9eb28339774d4565e6d1e (diff)
downloadtelepathy-logger-38ee32ffe4cf760878cdbebc83c6e5c60f6087cf.tar.gz
using obj = g_object_ref (obj)
-rw-r--r--telepathy-logger/channel-text.c6
-rw-r--r--telepathy-logger/channel.c3
-rw-r--r--telepathy-logger/contact.c6
-rw-r--r--telepathy-logger/log-manager.c33
-rw-r--r--telepathy-logger/log-store-empathy.c3
5 files changed, 17 insertions, 34 deletions
diff --git a/telepathy-logger/channel-text.c b/telepathy-logger/channel-text.c
index e270042..8e564e8 100644
--- a/telepathy-logger/channel-text.c
+++ b/telepathy-logger/channel-text.c
@@ -410,8 +410,7 @@ tpl_channel_text_set_remote_contact (TplChannelText *self,
g_return_if_fail (TP_IS_CONTACT (data));
g_return_if_fail (priv->remote_contact == NULL);
- priv->remote_contact = data;
- g_object_ref (data);
+ priv->remote_contact = g_object_ref (data);
}
@@ -425,8 +424,7 @@ tpl_channel_text_set_my_contact (TplChannelText *self,
g_return_if_fail (TP_IS_CONTACT (data));
g_return_if_fail (priv->my_contact == NULL);
- priv->my_contact = data;
- g_object_ref (data);
+ priv->my_contact = g_object_ref (data);
}
diff --git a/telepathy-logger/channel.c b/telepathy-logger/channel.c
index 0eab694..d55906c 100644
--- a/telepathy-logger/channel.c
+++ b/telepathy-logger/channel.c
@@ -174,8 +174,7 @@ tpl_channel_set_account (TplChannel *self,
g_return_if_fail (TP_IS_ACCOUNT (data));
g_return_if_fail (priv->account == NULL);
- priv->account = data;
- g_object_ref (data);
+ priv->account = g_object_ref (data);
}
diff --git a/telepathy-logger/contact.c b/telepathy-logger/contact.c
index 6b008b3..54f6efc 100644
--- a/telepathy-logger/contact.c
+++ b/telepathy-logger/contact.c
@@ -367,8 +367,7 @@ tpl_contact_set_contact (TplContact *self,
g_return_if_fail (TP_IS_CONTACT (data));
g_return_if_fail (priv->contact == NULL);
- priv->contact = data;
- g_object_ref (data);
+ priv->contact = g_object_ref (data);
}
@@ -382,8 +381,7 @@ tpl_contact_set_account (TplContact *self,
g_return_if_fail (TP_IS_ACCOUNT (data));
g_return_if_fail (priv->account == NULL);
- priv->account = data;
- g_object_ref (data);
+ priv->account = g_object_ref (data);
}
diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c
index c116cec..7b4935c 100644
--- a/telepathy-logger/log-manager.c
+++ b/telepathy-logger/log-manager.c
@@ -711,11 +711,9 @@ tpl_log_manager_add_message_async (TplLogManager *manager,
"message argument passed is not a TplLogEntry instance",
callback, user_data);
- chat_info->logentry = message;
- g_object_ref (chat_info->logentry);
+ chat_info->logentry = g_object_ref (message);
- async_data->manager = manager;
- g_object_ref (manager);
+ async_data->manager = g_object_ref (manager);
async_data->request = chat_info;
async_data->request_free =
(TplLogManagerFreeFunc) tpl_log_manager_chat_info_free;
@@ -844,14 +842,12 @@ tpl_log_manager_get_messages_for_date_async (TplLogManager *manager,
"date argument passed cannot be empty string or NULL ptr",
callback, user_data);
- chat_info->account = account;
- g_object_ref (account);
+ chat_info->account = g_object_ref (account);
chat_info->chat_id = g_strdup (chat_id);
chat_info->is_chatroom = is_chatroom;
chat_info->date = g_strdup (date);
- async_data->manager = manager;
- g_object_ref (manager);
+ async_data->manager = g_object_ref (manager);
async_data->request = chat_info;
async_data->request_free =
(TplLogManagerFreeFunc) tpl_log_manager_chat_info_free;
@@ -921,16 +917,14 @@ tpl_log_manager_get_filtered_messages_async (TplLogManager *manager,
"filter function should be not NULL",
callback, user_data);
- chat_info->account = account;
- g_object_ref (account);
+ chat_info->account = g_object_ref (account);
chat_info->chat_id = g_strdup (chat_id);
chat_info->is_chatroom = is_chatroom;
chat_info->num_messages = num_messages;
chat_info->filter = filter;
chat_info->user_data = filter_user_data;
- async_data->manager = manager;
- g_object_ref (manager);
+ async_data->manager = g_object_ref (manager);
async_data->request = chat_info;
async_data->request_free =
(TplLogManagerFreeFunc) tpl_log_manager_chat_info_free;
@@ -980,11 +974,9 @@ tpl_log_manager_get_chats_async (TplLogManager *manager,
"account argument is not a TpAccount instance",
callback, user_data);
- chat_info->account = account;
- g_object_ref (account);
+ chat_info->account = g_object_ref (account);
- async_data->manager = manager;
- g_object_ref (manager);
+ async_data->manager = g_object_ref (manager);
async_data->request = chat_info;
async_data->request_free =
(TplLogManagerFreeFunc) tpl_log_manager_chat_info_free;
@@ -1038,13 +1030,11 @@ tpl_log_manager_search_in_identifier_chats_new_async (TplLogManager *manager,
"account argument is not a TpAccount instance",
callback, user_data);
- chat_info->account = account;
- g_object_ref (account);
+ chat_info->account = g_object_ref (account);
chat_info->chat_id = g_strdup (identifier);
chat_info->search_text = g_strdup (text);
- async_data->manager = manager;
- g_object_ref (manager);
+ async_data->manager = g_object_ref (manager);
async_data->request = chat_info;
async_data->request_free =
(TplLogManagerFreeFunc) tpl_log_manager_chat_info_free;
@@ -1092,8 +1082,7 @@ tpl_log_manager_search_new_async (TplLogManager *manager,
chat_info->search_text = g_strdup (text);
- async_data->manager = manager;
- g_object_ref (manager);
+ async_data->manager = g_object_ref (manager);
async_data->request = chat_info;
async_data->request_free =
(TplLogManagerFreeFunc) tpl_log_manager_chat_info_free;
diff --git a/telepathy-logger/log-store-empathy.c b/telepathy-logger/log-store-empathy.c
index f0e024b..e774839 100644
--- a/telepathy-logger/log-store-empathy.c
+++ b/telepathy-logger/log-store-empathy.c
@@ -712,8 +712,7 @@ log_store_empathy_search_hit_new (TplLogStore *self,
if (!tp_strdiff (name, account_name))
{
g_assert (hit->account == NULL);
- hit->account = account;
- g_object_ref (account);
+ hit->account = g_object_ref (account);
}
g_free (name);
}