aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2010-05-23 18:48:45 +0800
committerXavier Claessens <xclaesse@gmail.com>2010-05-26 17:34:59 +0800
commita3006260dcca6bac7a2f291389823584a136f2d8 (patch)
treead3d4994750014b5e34879f3925bae8b870267d2 /src
parentea03354dacd0da472875bb64d0f2d8c124f3193b (diff)
downloadgsoc2013-empathy-a3006260dcca6bac7a2f291389823584a136f2d8.tar
gsoc2013-empathy-a3006260dcca6bac7a2f291389823584a136f2d8.tar.gz
gsoc2013-empathy-a3006260dcca6bac7a2f291389823584a136f2d8.tar.bz2
gsoc2013-empathy-a3006260dcca6bac7a2f291389823584a136f2d8.tar.lz
gsoc2013-empathy-a3006260dcca6bac7a2f291389823584a136f2d8.tar.xz
gsoc2013-empathy-a3006260dcca6bac7a2f291389823584a136f2d8.tar.zst
gsoc2013-empathy-a3006260dcca6bac7a2f291389823584a136f2d8.zip
Do not use EmpathyContactMonitor to know when a contact is added
Diffstat (limited to 'src')
-rw-r--r--src/empathy-main-window.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index b526a4c0b..787743f67 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -124,7 +124,7 @@ typedef struct {
GList *actions_connected;
/* The idle event source to migrate butterfly's logs */
- guint butterfly_log_migration_contact_added_id;
+ guint butterfly_log_migration_members_changed_id;
} EmpathyMainWindow;
static EmpathyMainWindow *main_window = NULL;
@@ -1302,14 +1302,21 @@ account_manager_prepared_cb (GObject *source_object,
}
static void
-main_window_contact_added_cb (EmpathyContactMonitor *monitor,
- EmpathyContact *contact,
- EmpathyMainWindow *window)
+main_window_members_changed_cb (EmpathyContactList *list,
+ EmpathyContact *contact,
+ EmpathyContact *actor,
+ guint reason,
+ gchar *message,
+ gboolean is_member,
+ EmpathyMainWindow *window)
{
+ if (!is_member)
+ return;
+
if (!empathy_migrate_butterfly_logs (contact)) {
- g_signal_handler_disconnect (monitor,
- window->butterfly_log_migration_contact_added_id);
- window->butterfly_log_migration_contact_added_id = 0;
+ g_signal_handler_disconnect (list,
+ window->butterfly_log_migration_members_changed_id);
+ window->butterfly_log_migration_members_changed_id = 0;
}
}
@@ -1458,8 +1465,9 @@ empathy_main_window_show (void)
EMPATHY_CONTACT_FEATURE_ALL);
g_signal_connect (monitor, "contact-presence-changed",
G_CALLBACK (main_window_contact_presence_changed_cb), window);
- window->butterfly_log_migration_contact_added_id = g_signal_connect (monitor, "contact-added",
- G_CALLBACK (main_window_contact_added_cb), window);
+ window->butterfly_log_migration_members_changed_id = g_signal_connect (
+ list_iface, "members-changed",
+ G_CALLBACK (main_window_members_changed_cb), window);
g_object_unref (list_iface);
gtk_widget_show (GTK_WIDGET (window->list_view));