From 0e0658058e4f91befd2747d65e9d6dea492d57ce Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 13 Oct 2008 07:53:03 +0000 Subject: Save chatrooms to XML only if they are marked as favorite svn path=/trunk/; revision=1534 --- libempathy/empathy-chatroom-manager.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c index b9eef3c09..fb2571fcc 100644 --- a/libempathy/empathy-chatroom-manager.c +++ b/libempathy/empathy-chatroom-manager.c @@ -433,6 +433,7 @@ chatroom_manager_parse_chatroom (EmpathyChatroomManager *manager, } chatroom = empathy_chatroom_new_full (account, room, name, auto_connect); + g_object_set (chatroom, "favorite", TRUE, NULL); priv->chatrooms = g_list_prepend (priv->chatrooms, chatroom); g_signal_emit (manager, signals[CHATROOM_ADDED], 0, chatroom); @@ -470,8 +471,14 @@ chatroom_manager_file_save (EmpathyChatroomManager *manager) EmpathyChatroom *chatroom; xmlNodePtr node; const gchar *account_id; + gboolean favorite; chatroom = l->data; + + g_object_get (chatroom, "favorite", &favorite, NULL); + if (!favorite) + continue; + account_id = mc_account_get_unique_name (empathy_chatroom_get_account (chatroom)); node = xmlNewChild (root, NULL, "chatroom", NULL); -- cgit v1.2.3