Mercurial > pidgin.yaz
comparison libpurple/plugins/dbus-buddyicons-example.py @ 16143:598b1b15b199
Trac Ticket #149 from JensenDied
This patch does a rename of our DBus stuff.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 15 Apr 2007 18:09:14 +0000 |
parents | 5fe8042783c1 |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
16142:74b2d576f458 | 16143:598b1b15b199 |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Print the aliases of buddies who have a buddy-icon set. | 3 # Print the aliases of buddies who have a buddy-icon set. |
4 # | 4 # |
5 # Gaim is the legal property of its developers, whose names are too numerous | 5 # Purple is the legal property of its developers, whose names are too numerous |
6 # to list here. Please refer to the COPYRIGHT file distributed with this | 6 # to list here. Please refer to the COPYRIGHT file distributed with this |
7 # source distribution. | 7 # source distribution. |
8 # | 8 # |
9 # This program is free software; you can redistribute it and/or modify | 9 # This program is free software; you can redistribute it and/or modify |
10 # it under the terms of the GNU General Public License as published by | 10 # it under the terms of the GNU General Public License as published by |
22 # | 22 # |
23 | 23 |
24 import dbus | 24 import dbus |
25 | 25 |
26 bus = dbus.SessionBus() | 26 bus = dbus.SessionBus() |
27 obj = bus.get_object("net.sf.gaim.GaimService", "/net/sf/gaim/GaimObject") | 27 obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject") |
28 gaim = dbus.Interface(obj, "net.sf.gaim.GaimInterface") | 28 purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface") |
29 | 29 |
30 node = gaim.GaimBlistGetRoot() | 30 node = purple.PurpleBlistGetRoot() |
31 while node != 0: | 31 while node != 0: |
32 if gaim.GaimBlistNodeIsBuddy(node): | 32 if purple.PurpleBlistNodeIsBuddy(node): |
33 icon = gaim.GaimBuddyGetIcon(node) | 33 icon = purple.PurpleBuddyGetIcon(node) |
34 if icon != 0: | 34 if icon != 0: |
35 print gaim.GaimBuddyGetAlias(node) | 35 print purple.PurpleBuddyGetAlias(node) |
36 node = gaim.GaimBlistNodeNext(node, 0) | 36 node = purple.PurpleBlistNodeNext(node, 0) |