Commit 97d122d3 authored by Sjoerd Simons's avatar Sjoerd Simons

remove usage of empathy_account_equal

parent a5a46b1d
......@@ -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) {
......
......@@ -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)) {
......
......@@ -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);
......
......@@ -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++;
}
}
......
......@@ -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 *
......
......@@ -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)
{
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment