aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-list-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-contact-list-view.c')
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index c106653b1..f7b506e7c 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -32,7 +32,6 @@
#include <gtk/gtk.h>
#include <telepathy-glib/util.h>
-#include <libmissioncontrol/mc-account.h>
#include <libempathy/empathy-account-manager.h>
#include <libempathy/empathy-call-factory.h>
@@ -121,7 +120,7 @@ contact_list_view_tooltip_destroy_cb (GtkWidget *widget,
EmpathyContactListView *view)
{
EmpathyContactListViewPriv *priv = GET_PRIV (view);
-
+
if (priv->tooltip_widget) {
DEBUG ("Tooltip destroyed");
g_object_unref (priv->tooltip_widget);
@@ -230,7 +229,7 @@ contact_list_view_drag_got_contact (EmpathyTpContactFactory *factory,
if (data->new_group) {
empathy_contact_list_add_to_group (list, contact, data->new_group);
}
- if (data->old_group && data->action == GDK_ACTION_MOVE) {
+ if (data->old_group && data->action == GDK_ACTION_MOVE) {
empathy_contact_list_remove_from_group (list, contact, data->old_group);
}
}
@@ -247,7 +246,7 @@ contact_list_view_drag_data_received (GtkWidget *view,
EmpathyContactListViewPriv *priv;
EmpathyAccountManager *account_manager;
EmpathyTpContactFactory *factory = NULL;
- McAccount *account;
+ EmpathyAccount *account;
GtkTreeModel *model;
GtkTreeViewDropPosition position;
GtkTreePath *path;
@@ -302,19 +301,17 @@ contact_list_view_drag_data_received (GtkWidget *view,
strv = g_strsplit (id, "/", 2);
account_id = strv[0];
contact_id = strv[1];
- account = mc_account_lookup (account_id);
+ account_manager = empathy_account_manager_dup_singleton ();
+ account = empathy_account_manager_lookup (account_manager, account_id);
if (account) {
TpConnection *connection;
- /* FIXME: We assume we have already an account manager */
- account_manager = empathy_account_manager_dup_singleton ();
- connection = empathy_account_manager_get_connection (account_manager,
- account);
+ connection = empathy_account_get_connection (account);
if (connection) {
factory = empathy_tp_contact_factory_dup_singleton (connection);
}
- g_object_unref (account_manager);
}
+ g_object_unref (account_manager);
if (!factory) {
DEBUG ("Failed to get factory for account '%s'", account_id);
@@ -451,7 +448,7 @@ contact_list_view_drag_data_get (GtkWidget *widget,
GtkTreeIter iter;
GtkTreeModel *model;
EmpathyContact *contact;
- McAccount *account;
+ EmpathyAccount *account;
const gchar *contact_id;
const gchar *account_id;
gchar *str;
@@ -481,7 +478,7 @@ contact_list_view_drag_data_get (GtkWidget *widget,
}
account = empathy_contact_get_account (contact);
- account_id = mc_account_get_unique_name (account);
+ account_id = empathy_account_get_unique_name (account);
contact_id = empathy_contact_get_id (contact);
g_object_unref (contact);
str = g_strconcat (account_id, "/", contact_id, NULL);
@@ -1272,7 +1269,7 @@ empathy_contact_list_view_new (EmpathyContactListStore *store,
EmpathyContactFeatureFlags contact_features)
{
g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store), NULL);
-
+
return g_object_new (EMPATHY_TYPE_CONTACT_LIST_VIEW,
"store", store,
"contact-features", contact_features,
@@ -1344,7 +1341,7 @@ contact_list_view_remove_dialog_show (GtkWindow *parent,
{
GtkWidget *dialog;
gboolean res;
-
+
dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
"%s", message);
@@ -1446,7 +1443,7 @@ contact_list_view_remove_activate_cb (GtkMenuItem *menuitem,
{
EmpathyContactListViewPriv *priv = GET_PRIV (view);
EmpathyContact *contact;
-
+
contact = empathy_contact_list_view_dup_selected (view);
if (contact) {
@@ -1455,7 +1452,7 @@ contact_list_view_remove_activate_cb (GtkMenuItem *menuitem,
parent = empathy_get_toplevel_window (GTK_WIDGET (view));
text = g_strdup_printf (_("Do you really want to remove the contact '%s'?"),
- empathy_contact_get_name (contact));
+ empathy_contact_get_name (contact));
if (contact_list_view_remove_dialog_show (parent, _("Removing contact"), text)) {
EmpathyContactList *list;