PurpleSavedstatusSetSubstatus
Ka-Hing Cheung
khc at pidgin.im
Thu Jul 30 19:04:33 EDT 2009
On Thu, Jul 30, 2009 at 10:48:04PM +0200, Stefan Wennborg wrote:
> I want to use it for auto updating my status message for 1 (out of 4
> accounts)
> IE setting the status message for that account to the output of another
> python script. so i dont want / need to save the status
>
> doesnt this code create a new saved status?
> ##
> current =
> purple.PurpleSavedstatusGetType(purple.PurpleSavedstatusGetCurrent())
> status = purple.PurpleSavedstatusNew("", current)
> ##
>
>
> ## this is what i want my statuses to look like
> myaccount1 at whatever.com - hum
> myaccount2 at whatever.com - hum
> myaccount3 at whatever.com - woohoo3
> myaccount4 at whatever.com - hum
If you don't want it to be saved, don't create a saved status. I think you
want something like:
# find the right account to modify
p = purple.PurpleAccountGetPresence(account)
status = purple.PurplePresenceGetActiveStatus(p)
purple.PurpleStatusSetAttrString(status, "message", "woohoo3")
purple.PurplePrplChangeAccountStatus(account, status, status)
-khc
More information about the Support
mailing list