Indicate the current active profile
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 1 Apr 2009 03:36:49 +0000 (20:36 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 1 Apr 2009 03:36:49 +0000 (20:36 -0700)
test/list-profiles

index 9a68d20..710a36c 100755 (executable)
@@ -9,8 +9,13 @@ manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
 
 properties = manager.GetProperties()
 
+active = properties["ActiveProfile"]
+
 for path in properties["Profiles"]:
-       print "[ %s ]" % (path)
+       if (active == path):
+               print "[ %s ]  <== active" % (path)
+       else:
+               print "[ %s ]" % (path)
 
        profile = dbus.Interface(bus.get_object("org.moblin.connman", path),
                                                "org.moblin.connman.Profile")