From 69210acf76dceea939ce6844bab411e0c8e63343 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 13 Oct 2008 07:55:10 +0000 Subject: automatically save the chatroom mgr XML file when one chatroom is modified svn path=/trunk/; revision=1568 --- libempathy/empathy-chatroom-manager.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c index fa12cd277..373ac8c29 100644 --- a/libempathy/empathy-chatroom-manager.c +++ b/libempathy/empathy-chatroom-manager.c @@ -270,9 +270,9 @@ reset_save_timeout (EmpathyChatroomManager *self) } static void -chatroom_favorite_changed_cb (EmpathyChatroom *chatroom, - GParamSpec *spec, - EmpathyChatroomManager *self) +chatroom_changed_cb (EmpathyChatroom *chatroom, + GParamSpec *spec, + EmpathyChatroomManager *self) { reset_save_timeout (self); } @@ -285,8 +285,17 @@ add_chatroom (EmpathyChatroomManager *self, priv->chatrooms = g_list_prepend (priv->chatrooms, g_object_ref (chatroom)); + /* FIXME: disconnect when removed */ g_signal_connect (chatroom, "notify::favorite", - G_CALLBACK (chatroom_favorite_changed_cb), self); + G_CALLBACK (chatroom_changed_cb), self); + g_signal_connect (chatroom, "notify::name", + G_CALLBACK (chatroom_changed_cb), self); + g_signal_connect (chatroom, "notify::auto-connect", + G_CALLBACK (chatroom_changed_cb), self); + g_signal_connect (chatroom, "notify::room", + G_CALLBACK (chatroom_changed_cb), self); + g_signal_connect (chatroom, "notify::account", + G_CALLBACK (chatroom_changed_cb), self); } gboolean -- cgit v1.2.3