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)
=============
Output.....
u...@computer:~$ python Desktop/pidgin_substatus.py
[email protected]
2
Traceback (most recent call last):
File "Desktop/pidgin_substatus.py", line 18, in <module>
purple.PurpleSavedstatusSetSubstatus(status, accs[i], current,
"woohoo"+str(i))
File "/var/lib/python-support/python2.6/dbus/proxies.py", line 140, in
__call__
**keywords)
File "/var/lib/python-support/python2.6/dbus/connection.py", line 622, in
call_blocking
message, timeout)
dbus.exceptions.DBusException: im.pidgin.purple.InvalidHandle:
PurpleStatusType object with ID = 2 not found
=============
Why does the code result in an error?
http://developer.pidgin.im/doxygen/dev/html/savedstatuses_8h.html#6e3e33d0908ed603858ec404d1122458
That page says that the third argument in PurpleSavedstatusSetSubstatus
needs to be "PurpleStatusType".
A working example would be great...
_______________________________________________
[email protected] mailing list
Want to unsubscribe? Use this link:
http://pidgin.im/cgi-bin/mailman/listinfo/support