diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-10-13 15:55:05 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-10-13 15:55:05 +0800 |
commit | 8ed3271c0c6387dba8a163f0405ac83828898f93 (patch) | |
tree | 254a053196f4b0f4e78c5e6b5fbd521b689fff6e /libempathy/empathy-chatroom-manager.c | |
parent | 8486629b36efe0ab5a75678be0e346a51063ae4a (diff) | |
download | gsoc2013-empathy-8ed3271c0c6387dba8a163f0405ac83828898f93.tar.gz gsoc2013-empathy-8ed3271c0c6387dba8a163f0405ac83828898f93.tar.zst gsoc2013-empathy-8ed3271c0c6387dba8a163f0405ac83828898f93.zip |
only save the chatrooms xml when a favorite chatroom is added/removed
svn path=/trunk/; revision=1566
Diffstat (limited to 'libempathy/empathy-chatroom-manager.c')
-rw-r--r-- | libempathy/empathy-chatroom-manager.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c index add543172..a0dd00049 100644 --- a/libempathy/empathy-chatroom-manager.c +++ b/libempathy/empathy-chatroom-manager.c @@ -267,8 +267,16 @@ empathy_chatroom_manager_add (EmpathyChatroomManager *manager, if (!empathy_chatroom_manager_find (manager, empathy_chatroom_get_account (chatroom), empathy_chatroom_get_room (chatroom))) { + gboolean favorite; + + g_object_get (chatroom, "favorite", &favorite, NULL); + add_chatroom (manager, chatroom); - chatroom_manager_file_save (manager); + + if (favorite) + { + chatroom_manager_file_save (manager); + } g_signal_emit (manager, signals[CHATROOM_ADDED], 0, chatroom); @@ -296,9 +304,15 @@ empathy_chatroom_manager_remove (EmpathyChatroomManager *manager, this_chatroom = l->data; if (empathy_chatroom_equal (chatroom, this_chatroom)) { + gboolean favorite; priv->chatrooms = g_list_delete_link (priv->chatrooms, l); - chatroom_manager_file_save (manager); + g_object_get (chatroom, "favorite", &favorite, NULL); + + if (favorite) + { + chatroom_manager_file_save (manager); + } g_signal_emit (manager, signals[CHATROOM_REMOVED], 0, this_chatroom); g_object_unref (this_chatroom); |