[Pidgin] DbusHowto modified
Pidgin
trac at pidgin.im
Sat Apr 9 03:58:45 EDT 2016
Page "DbusHowto" was changed by lew21
Diff URL: <https://developer.pidgin.im/wiki/DbusHowto?action=diff&version=10>
Revision 10
Comment: Update to pydbus 0.5.
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: DbusHowto
=========================================================================
--- DbusHowto (version: 9)
+++ DbusHowto (version: 10)
@@ -150,8 +150,8 @@
For example, to send a message to all your IM windows, you can do:
{{{
#!python
-for conv in purple.PurpleGetIms()[0]:
- purple.PurpleConvImSend(purple.PurpleConvIm(conv)[0], "Ignore.")
+for conv in purple.PurpleGetIms():
+ purple.PurpleConvImSend(purple.PurpleConvIm(conv), "Ignore.")
}}}
Sometimes things are not direct. To set your status message without changing the status, for example, you need to use five calls:
@@ -159,9 +159,9 @@
#!python
def set_message(message):
# Get current status type (Available/Away/etc.)
- current = purple.PurpleSavedstatusGetType(purple.PurpleSavedstatusGetCurrent()[0])[0]
+ current = purple.PurpleSavedstatusGetType(purple.PurpleSavedstatusGetCurrent())
# Create new transient status and activate it
- status = purple.PurpleSavedstatusNew("", current)[0]
+ status = purple.PurpleSavedstatusNew("", current)
purple.PurpleSavedstatusSetMessage(status, message)
purple.PurpleSavedstatusActivate(status)
}}}
-------8<------8<------8<------8<------8<------8<------8<------8<--------
--
Page URL: <https://developer.pidgin.im/wiki/DbusHowto>
Pidgin <https://pidgin.im>
Pidgin
This is an automated message. Someone added your email address to be
notified of changes on 'DbusHowto' page.
If it was not you, please report to datallah at pidgin.im.
More information about the Wikiedit
mailing list