From 81ac24311b709733c31ce5c2f42954378b6912c2 Mon Sep 17 00:00:00 2001 From: Ragner Magalhaes Date: Tue, 2 Dec 2008 21:02:45 +0000 Subject: [PATCH] Added delete accounts function Added delete accounts funtion Signed-off-by: Dinorah Monteiro git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1394 596f6dd7-e928-0410-a184-9e12fd12cf7e --- account.pyx | 7 +++++++ libpurple/account.pxd | 2 ++ 2 files changed, 9 insertions(+) diff --git a/account.pyx b/account.pyx index 0823efa..5e92065 100644 --- a/account.pyx +++ b/account.pyx @@ -490,3 +490,10 @@ cdef class Account: return account.c_purple_account_get_remember_password(c_account) else: return None + + def remove(self, acc): + cdef account.PurpleAccount *c_account + + c_account = account.c_purple_accounts_find(acc[0], acc[1]) + if c_account: + account.c_purple_accounts_delete(c_account) diff --git a/libpurple/account.pxd b/libpurple/account.pxd index c3c9170..0e6dc89 100644 --- a/libpurple/account.pxd +++ b/libpurple/account.pxd @@ -160,3 +160,5 @@ cdef extern from "libpurple/account.h": (char *name, char *protocol) glib.GList *c_purple_accounts_get_all "purple_accounts_get_all" () void c_purple_accounts_add "purple_accounts_add" (PurpleAccount *account) + void c_purple_accounts_delete "purple_accounts_delete" (PurpleAccount + *account) -- 1.7.9.5