views:

11

answers:

0

Hello,

I am trying to script the bringing online (or putting offline) an account, looking at purple-url-handler script I see that simple snippet which looks perfect for me :

def bring_account_online(account):
    if not cpurple.PurpleAccountIsConnected(account):
        # The last argument is meant to be a GList * but the D-Bus binding
        # generator thing just wants a UInt32, which is pretty failing.
        # Happily, passing a 0 to mean an empty list turns out to work anyway.
        purple.PurpleAccountSetStatusList(account, "online", 1, 0)
        purple.PurpleAccountConnect(account)

but that does not seem to do anything on the GUI, I am sure account is right I am getting it from cpurple.PurpleAccountsGetAll()

any ideas, what I am doing wrong ?

Thanks for reading.