aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-18 21:53:25 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-19 03:09:34 +0800
commitfa08a8879c77e99f706ee805df0e2821f202e9de (patch)
tree75526241ec164d580278d6a90d1d066d0cd725a3
parentea9f4b06393425e7496a3494e084520da3de7618 (diff)
downloadgsoc2013-empathy-fa08a8879c77e99f706ee805df0e2821f202e9de.tar
gsoc2013-empathy-fa08a8879c77e99f706ee805df0e2821f202e9de.tar.gz
gsoc2013-empathy-fa08a8879c77e99f706ee805df0e2821f202e9de.tar.bz2
gsoc2013-empathy-fa08a8879c77e99f706ee805df0e2821f202e9de.tar.lz
gsoc2013-empathy-fa08a8879c77e99f706ee805df0e2821f202e9de.tar.xz
gsoc2013-empathy-fa08a8879c77e99f706ee805df0e2821f202e9de.tar.zst
gsoc2013-empathy-fa08a8879c77e99f706ee805df0e2821f202e9de.zip
don't mix code and variable declarations
-rw-r--r--libempathy-gtk/empathy-chat.c8
-rw-r--r--libempathy/empathy-tp-chat.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index cc946b1e1..372e90cf0 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1791,12 +1791,12 @@ chat_members_changed_cb (EmpathyTpChat *tp_chat,
gboolean is_member,
EmpathyChat *chat)
{
- g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED != reason);
-
EmpathyChatPriv *priv = GET_PRIV (chat);
const gchar *name = empathy_contact_get_name (contact);
gchar *str;
+ g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED != reason);
+
if (priv->block_events_timeout_id != 0)
return;
@@ -1819,10 +1819,10 @@ chat_member_renamed_cb (EmpathyTpChat *tp_chat,
gchar *message,
EmpathyChat *chat)
{
- g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED == reason);
-
EmpathyChatPriv *priv = GET_PRIV (chat);
+ g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED == reason);
+
if (priv->block_events_timeout_id == 0) {
gchar *str;
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index aebeb6670..c1a70b6ca 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -986,6 +986,7 @@ tp_chat_got_renamed_contacts_cb (EmpathyTpContactFactory *factory,
const TpIntSet *members;
TpHandle handle;
EmpathyContact *old = NULL, *new = NULL;
+ ContactRenameData *rename_data = (ContactRenameData*) user_data;
if (error) {
DEBUG ("Error: %s", error->message);
@@ -995,8 +996,6 @@ tp_chat_got_renamed_contacts_cb (EmpathyTpContactFactory *factory,
/* renamed members can only be delivered one at a time */
g_warn_if_fail (n_contacts == 1);
- ContactRenameData *rename_data = (ContactRenameData*) user_data;
-
new = contacts[0];
members = tp_channel_group_get_members (priv->channel);
@@ -1039,6 +1038,7 @@ tp_chat_group_members_changed_cb (TpChannel *self,
EmpathyContact *actor_contact = NULL;
guint i;
ContactRenameData *rename_data;
+ TpHandle old_handle;
/* Contact renamed */
if (reason == TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED) {
@@ -1046,7 +1046,7 @@ tp_chat_group_members_changed_cb (TpChannel *self,
g_warn_if_fail(removed->len == 1);
g_warn_if_fail(added->len == 1);
- TpHandle old_handle = g_array_index (removed, guint, 0);
+ old_handle = g_array_index (removed, guint, 0);
rename_data = contact_rename_data_new (old_handle, reason, message);
empathy_tp_contact_factory_get_from_handles (priv->factory,