PurpleSavedstatusSetSubstatus

Ka-Hing Cheung khc at pidgin.im
Thu Jul 30 16:09:20 EDT 2009


On Fri, Jul 10, 2009 at 09:34:45PM +0200, Stefan Wennborg wrote:
> I want to set a different subsatus for each signed in account.
> 
> This is what I got so far...
> Code......
> 
> #!/usr/bin/env python
> 
> import dbus
> 
> bus = dbus.SessionBus()
> obj = bus.get_object("im.pidgin.purple.PurpleService",
> "/im/pidgin/purple/PurpleObject")
> purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")
> 
> accs = purple.PurpleAccountsGetAllActive()
> 
> for i in range(len(accs)):
>         print purple.PurpleAccountGetUsername(accs[i])
> 
>         current =
> purple.PurpleSavedstatusGetType(purple.PurpleSavedstatusGetCurrent())
>         status = purple.PurpleSavedstatusNew("", current)
>         print current
> 
>         purple.PurpleSavedstatusSetMessage(status, "hum")
> 
>         purple.PurpleSavedstatusSetSubstatus(status, accs[i], current,
> "woohoo"+str(i)) #Fails here
>         purple.PurpleSavedstatusActivate(status)

The sub status stuff only applies to a saved status, is that what you wish to
modify? Or do you just want to do a one shot setting?

-khc




More information about the Support mailing list