davemds pushed a commit to branch master.

commit 73d49c134aa87506809b97cbdf346fdd449d3b3b
Author: davemds <[email protected]>
Date:   Sun May 5 18:00:12 2013 +0200

    Python-EFL: espionage: add an option to hide the internal dbus 
introspection interfaces.
---
 examples/dbus/test_dbus_spy.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/examples/dbus/test_dbus_spy.py b/examples/dbus/test_dbus_spy.py
index d10d318..fe3ce21 100755
--- a/examples/dbus/test_dbus_spy.py
+++ b/examples/dbus/test_dbus_spy.py
@@ -22,10 +22,17 @@ from efl.elementary.genlist import Genlist, GenlistItem, 
GenlistItemClass
 from efl.dbus_mainloop import DBusEcoreMainLoop
 
 
+class Options(object):
+    """class to contain application options"""
+    def __init__(self):
+        self.hide_introspect_stuff = True
+
+
 ### connect to session and system buses, and set session as the current one
 session_bus = dbus.SessionBus(mainloop=DBusEcoreMainLoop())
 system_bus = dbus.SystemBus(mainloop=DBusEcoreMainLoop())
 bus = session_bus
+options = Options()
 
 
 ### Classes to describe various DBus nodes
@@ -356,6 +363,9 @@ class DetailList(Genlist):
             
             # interfaces
             for iface in obj.interfaces:
+                if options.hide_introspect_stuff and \
+                   iface.name.startswith("org.freedesktop.DBus"):
+                  continue
                 iface_item = self.item_append(self.itc, iface,
                                               parent_item=obj_item,
                                               flags=elm.ELM_GENLIST_ITEM_TREE)

-- 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may

Reply via email to