]> git.0d.be Git - empathy.git/commitdiff
Save changes to chatrooms.xml configuration file only when needed.
authorChandni Verma <chandniverma2112@gmail.com>
Sat, 7 May 2011 19:14:43 +0000 (00:44 +0530)
committerChandni Verma <chandniverma2112@gmail.com>
Mon, 9 May 2011 12:52:55 +0000 (18:22 +0530)
Changes will be written to the file only when changes are made to a
chatroom property that is listed in the file.

Fixes room-list flicker: https://bugzilla.gnome.org/show_bug.cgi?id=642087

libempathy/empathy-chatroom-manager.c

index 9ad75ee03269b1e07ca3494f658aad193c8fd92d..7872bbb194fc42975468ceb7296115b5ac602876 100644 (file)
@@ -192,7 +192,16 @@ add_chatroom (EmpathyChatroomManager *self,
 
   priv->chatrooms = g_list_prepend (priv->chatrooms, g_object_ref (chatroom));
 
-  g_signal_connect (chatroom, "notify",
+  /* Watch only those properties which are exported in the save file */
+  g_signal_connect (chatroom, "notify::name",
+      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);
+  g_signal_connect (chatroom, "notify::auto-connect",
+      G_CALLBACK (chatroom_changed_cb), self);
+  g_signal_connect (chatroom, "notify::always_urgent",
       G_CALLBACK (chatroom_changed_cb), self);
 }