Port empathy.c to new API
authorXavier Claessens <xclaesse@gmail.com>
Tue, 17 Feb 2009 13:48:07 +0000 (14:48 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 22 Apr 2009 10:21:10 +0000 (12:21 +0200)
src/empathy.c

index a2115a6cff4cf9568ef5b9fbf2a487f4ec472d95..817b9bc37fe6cdd6344522f01c014acd0f7aba65 100644 (file)
@@ -42,6 +42,7 @@
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-call-factory.h>
 #include <libempathy/empathy-chatroom-manager.h>
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-call-factory.h>
 #include <libempathy/empathy-chatroom-manager.h>
+#include <libempathy/empathy-account-manager.h>
 #include <libempathy/empathy-dispatcher.h>
 #include <libempathy/empathy-dispatch-operation.h>
 #include <libempathy/empathy-log-manager.h>
 #include <libempathy/empathy-dispatcher.h>
 #include <libempathy/empathy-dispatch-operation.h>
 #include <libempathy/empathy-log-manager.h>
@@ -96,10 +97,16 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
                }
 
                if (id) {
                }
 
                if (id) {
+                       EmpathyAccountManager *manager;
+                       TpConnection *connection;
                        McAccount *account;
 
                        McAccount *account;
 
-                       account = empathy_tp_chat_get_account (tp_chat);
+                       manager = empathy_account_manager_dup_singleton ();
+                       connection = empathy_tp_chat_get_connection (tp_chat);
+                       account = empathy_account_manager_get_account (manager,
+                                                                      connection);
                        chat = empathy_chat_window_find_chat (account, id);
                        chat = empathy_chat_window_find_chat (account, id);
+                       g_object_unref (manager);
                }
 
                if (chat) {
                }
 
                if (chat) {