From fa83e5e05e62fa5c6707312d375b97195143e6b7 Mon Sep 17 00:00:00 2001 From: Ragner Magalhaes Date: Tue, 2 Dec 2008 21:11:28 +0000 Subject: [PATCH] Fixed get account c-structure on Protocol class. FIXES: - Fixed get account c-structure on Protocol class. Signed-off-by: Bruno Abinader Acked-by: Ragner Magalhaes Acked-by: Ricardo Guimaraes git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1420 596f6dd7-e928-0410-a184-9e12fd12cf7e --- account.pyx | 2 -- protocol.pyx | 10 +++++----- purple.pyx | 3 ++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/account.pyx b/account.pyx index a6d2412..d896dd0 100644 --- a/account.pyx +++ b/account.pyx @@ -19,8 +19,6 @@ cimport purple -from protocol import Protocol - cdef class Account: """ Account class diff --git a/protocol.pyx b/protocol.pyx index e8d8999..b482e6e 100644 --- a/protocol.pyx +++ b/protocol.pyx @@ -29,14 +29,14 @@ cdef class Protocol: self.__account = account self.__protocol_id = protocol_id + cdef account.PurpleAccount *__account_get_structure(self): + return account.purple_accounts_find(self.__account.username, \ + self.__account.protocol_id) + def __get_protocol_id(self): return self.__protocol_id.protocol_id protocol_id = property(__get_protocol_id) - def __get_account(self): - return self.__account - account = property(__get_account) - def _set_protocol_id(self, protocol_id): account.purple_account_set_protocol_id( \ - self.__account._get_structure(), protocol_id) + self.__account_get_structure(), protocol_id) diff --git a/purple.pyx b/purple.pyx index 9601af7..5d87af3 100644 --- a/purple.pyx +++ b/purple.pyx @@ -378,7 +378,8 @@ cdef class Purple: return account_list -include "plugin.pyx" +include "protocol.pyx" +#include "plugin.pyx" include "proxy.pyx" #include "protocol.pyx" include "account.pyx" -- 1.7.9.5