comparison libpurple/plugins/dbus-buddyicons-example.py @ 15373:5fe8042783c1

Rename gtk/ and libgaim/ to pidgin/ and libpurple/
author Sean Egan <seanegan@gmail.com>
date Sat, 20 Jan 2007 02:32:10 +0000
parents
children 598b1b15b199
comparison
equal deleted inserted replaced
15372:f79e0f4df793 15373:5fe8042783c1
1 #!/usr/bin/env python
2 #
3 # Print the aliases of buddies who have a buddy-icon set.
4 #
5 # Gaim 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
7 # source distribution.
8 #
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
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #
23
24 import dbus
25
26 bus = dbus.SessionBus()
27 obj = bus.get_object("net.sf.gaim.GaimService", "/net/sf/gaim/GaimObject")
28 gaim = dbus.Interface(obj, "net.sf.gaim.GaimInterface")
29
30 node = gaim.GaimBlistGetRoot()
31 while node != 0:
32 if gaim.GaimBlistNodeIsBuddy(node):
33 icon = gaim.GaimBuddyGetIcon(node)
34 if icon != 0:
35 print gaim.GaimBuddyGetAlias(node)
36 node = gaim.GaimBlistNodeNext(node, 0)