aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-account-chooser.c8
-rw-r--r--libempathy-gtk/empathy-chat.c2
-rw-r--r--libempathy-gtk/empathy-log-window.c2
-rw-r--r--libempathy/empathy-chatroom-manager.c11
-rw-r--r--libempathy/empathy-chatroom.c3
-rw-r--r--libempathy/empathy-utils.c7
-rw-r--r--libempathy/empathy-utils.h2
-rw-r--r--megaphone/src/megaphone-applet.c2
-rw-r--r--src/empathy-chat-window.c2
-rw-r--r--src/empathy-chatrooms-window.c2
10 files changed, 13 insertions, 28 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 7c6f52fa5..a91b0eb29 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -545,7 +545,7 @@ account_chooser_find_account_foreach (GtkTreeModel *model,
gtk_tree_model_get (model, iter, COL_ACCOUNT_POINTER, &account, -1);
- if (empathy_account_equal (account, data->account)) {
+ if (account == data->account) {
data->found = TRUE;
*(data->iter) = *iter;
g_object_unref (account);
@@ -688,10 +688,8 @@ account_chooser_set_account_foreach (GtkTreeModel *model,
if ((data->account == NULL) != (account == NULL)) {
equal = FALSE;
}
- else if (data->account == account) {
- equal = TRUE;
- } else {
- equal = empathy_account_equal (data->account, account);
+ else {
+ equal = (data->account == account);
}
if (account) {
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index a8ca745e2..0358b0ada 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -204,7 +204,7 @@ chat_new_connection_cb (EmpathyAccountManager *manager,
EmpathyAccount *account;
account = empathy_account_manager_get_account (manager, connection);
- if (!priv->tp_chat && empathy_account_equal (account, priv->account) &&
+ if (!priv->tp_chat && account == priv->account &&
priv->handle_type != TP_HANDLE_TYPE_NONE &&
!EMP_STR_EMPTY (priv->id)) {
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 7add30136..11ddca74b 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -774,7 +774,7 @@ log_window_chats_set_selected (EmpathyLogWindow *window,
COL_CHAT_IS_CHATROOM, &this_is_chatroom,
-1);
- if (empathy_account_equal (this_account, account) &&
+ if (this_account == account &&
strcmp (this_chat_id, chat_id) == 0 &&
this_is_chatroom == is_chatroom) {
gtk_tree_selection_select_iter (selection, &iter);
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c
index 649dcc9cf..c5f9864a1 100644
--- a/libempathy/empathy-chatroom-manager.c
+++ b/libempathy/empathy-chatroom-manager.c
@@ -580,9 +580,8 @@ empathy_chatroom_manager_find (EmpathyChatroomManager *manager,
this_account = empathy_chatroom_get_account (chatroom);
this_room = empathy_chatroom_get_room (chatroom);
- if (this_account && this_room &&
- empathy_account_equal (account, this_account) &&
- strcmp (this_room, room) == 0) {
+ if (this_account && this_room && account == this_account
+ && strcmp (this_room, room) == 0) {
return chatroom;
}
}
@@ -611,8 +610,7 @@ empathy_chatroom_manager_get_chatrooms (EmpathyChatroomManager *manager,
chatroom = l->data;
- if (empathy_account_equal (account,
- empathy_chatroom_get_account (chatroom))) {
+ if (account == empathy_chatroom_get_account (chatroom)) {
chatrooms = g_list_append (chatrooms, chatroom);
}
}
@@ -641,8 +639,7 @@ empathy_chatroom_manager_get_count (EmpathyChatroomManager *manager,
chatroom = l->data;
- if (empathy_account_equal (account,
- empathy_chatroom_get_account (chatroom))) {
+ if (account == empathy_chatroom_get_account (chatroom)) {
count++;
}
}
diff --git a/libempathy/empathy-chatroom.c b/libempathy/empathy-chatroom.c
index b62d6ad77..33df9a3d6 100644
--- a/libempathy/empathy-chatroom.c
+++ b/libempathy/empathy-chatroom.c
@@ -480,8 +480,7 @@ empathy_chatroom_equal (gconstpointer v1,
room_a = empathy_chatroom_get_room (EMPATHY_CHATROOM (v1));
room_b = empathy_chatroom_get_room (EMPATHY_CHATROOM (v2));
- return empathy_account_equal (account_a, account_b) &&
- !tp_strdiff (room_a, room_b);
+ return account_a == account_b && !tp_strdiff (room_a, room_b);
}
EmpathyTpChat *
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 1e1377a8d..db35e94dd 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -227,13 +227,6 @@ empathy_xml_node_find_child_prop_value (xmlNodePtr node,
return found;
}
-gboolean
-empathy_account_equal (gconstpointer a,
- gconstpointer b)
-{
- return a == b;
-}
-
const gchar *
empathy_presence_get_default_message (TpConnectionPresenceType presence)
{
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 3ab4077f5..c6aebb4f2 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -62,8 +62,6 @@ xmlNodePtr empathy_xml_node_find_child_prop_value (xmlNodePtr node,
const gchar *prop_value);
/* Others */
-gboolean empathy_account_equal (gconstpointer a,
- gconstpointer b);
const gchar * empathy_presence_get_default_message (TpConnectionPresenceType presence);
const gchar * empathy_presence_to_str (TpConnectionPresenceType presence);
TpConnectionPresenceType empathy_presence_from_str (const gchar *str);
diff --git a/megaphone/src/megaphone-applet.c b/megaphone/src/megaphone-applet.c
index 8d70d6241..1ef88ebc1 100644
--- a/megaphone/src/megaphone-applet.c
+++ b/megaphone/src/megaphone-applet.c
@@ -197,7 +197,7 @@ megaphone_applet_new_connection_cb (EmpathyAccountManager *manager,
{
MegaphoneAppletPriv *priv = GET_PRIV (applet);
- if (priv->contact || !empathy_account_equal (account, priv->account)) {
+ if (priv->contact || account != priv->account) {
return;
}
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 03644026b..9694a653c 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1778,7 +1778,7 @@ empathy_chat_window_find_chat (EmpathyAccount *account,
chat = ll->data;
- if (empathy_account_equal (account, empathy_chat_get_account (chat)) &&
+ if (account == empathy_chat_get_account (chat) &&
!tp_strdiff (id, empathy_chat_get_id (chat))) {
return chat;
}
diff --git a/src/empathy-chatrooms-window.c b/src/empathy-chatrooms-window.c
index 3b5dd1f77..4ec71ec49 100644
--- a/src/empathy-chatrooms-window.c
+++ b/src/empathy-chatrooms-window.c
@@ -514,7 +514,7 @@ chatrooms_window_chatroom_added_cb (EmpathyChatroomManager *manager,
if (!account) {
chatrooms_window_model_add (window, chatroom, FALSE);
} else {
- if (empathy_account_equal (account, empathy_chatroom_get_account (chatroom))) {
+ if (account == empathy_chatroom_get_account (chatroom)) {
chatrooms_window_model_add (window, chatroom, FALSE);
}