Ejemplo n.º 1
0
def printLevel(category, depth=0):
	results = KServiceTypeTrader.self().query('KCModule', "([X-KDE-System-Settings-Parent-Category] == '%s')"%(category))
	for result in results:
		print ("	"*depth)+'%s [%s]' % (result.property('Name', QVariant.String).toString(), result.desktopEntryPath())
		if result.property('Comment', QVariant.String).toString().isEmpty():
			print("	"*depth)+"***No comment!***"
	categories = KServiceTypeTrader.self().query('SystemSettingsCategory', "([X-KDE-System-Settings-Parent-Category] == '%s')"%(category))
	for subcategory in categories:
		print ("	"*depth)+'%s [%s]' % (subcategory.property('Name', QVariant.String).toString(), subcategory.desktopEntryPath())
		printLevel(subcategory.property('X-KDE-System-Settings-Category', QVariant.String).toString(), depth+1)
Ejemplo n.º 2
0
def printLevel(category, depth=0):
    results = KServiceTypeTrader.self().query(
        'KCModule',
        "([X-KDE-System-Settings-Parent-Category] == '%s')" % (category))
    for result in results:
        print("	" * depth) + '%s [%s]' % (result.property(
            'Name', QVariant.String).toString(), result.desktopEntryPath())
        if result.property('Comment', QVariant.String).toString().isEmpty():
            print("	" * depth) + "***No comment!***"
    categories = KServiceTypeTrader.self().query(
        'SystemSettingsCategory',
        "([X-KDE-System-Settings-Parent-Category] == '%s')" % (category))
    for subcategory in categories:
        print("	" * depth) + '%s [%s]' % (subcategory.property(
            'Name',
            QVariant.String).toString(), subcategory.desktopEntryPath())
        printLevel(
            subcategory.property('X-KDE-System-Settings-Category',
                                 QVariant.String).toString(), depth + 1)
Ejemplo n.º 3
0
		"security",
		"startup-and-shutdown"
	)

def printLevel(category, depth=0):
	results = KServiceTypeTrader.self().query('KCModule', "([X-KDE-System-Settings-Parent-Category] == '%s')"%(category))
	for result in results:
		print ("	"*depth)+'%s [%s]' % (result.property('Name', QVariant.String).toString(), result.desktopEntryPath())
		if result.property('Comment', QVariant.String).toString().isEmpty():
			print("	"*depth)+"***No comment!***"
	categories = KServiceTypeTrader.self().query('SystemSettingsCategory', "([X-KDE-System-Settings-Parent-Category] == '%s')"%(category))
	for subcategory in categories:
		print ("	"*depth)+'%s [%s]' % (subcategory.property('Name', QVariant.String).toString(), subcategory.desktopEntryPath())
		printLevel(subcategory.property('X-KDE-System-Settings-Category', QVariant.String).toString(), depth+1)

print "*** Current organization:"
printLevel('')

print "\n"
print "*** Searching for invalid categories:"
print "**** KCModules:"
results = KServiceTypeTrader.self().query('KCModule')
for result in results:
	if (not (result.property('X-KDE-System-Settings-Parent-Category', QVariant.String).toString() in VALID_CATEGORIES)):
		print "%s [%s]: %s"%(result.property('Name', QVariant.String).toString(), result.desktopEntryPath(), result.property('X-KDE-System-Settings-Parent-Category', QVariant.String).toString())
print "**** Categories:" 
results = KServiceTypeTrader.self().query('SystemSettingsCategory')
for result in results:
	if (not (result.property('X-KDE-System-Settings-Parent-Category', QVariant.String).toString() in VALID_CATEGORIES)):
		print "%s [%s]: %s"%(result.property('Name', QVariant.String).toString(), result.desktopEntryPath(), result.property('X-KDE-System-Settings-Parent-Category', QVariant.String).toString())
Ejemplo n.º 4
0
    for subcategory in categories:
        print("	" * depth) + '%s [%s]' % (subcategory.property(
            'Name',
            QVariant.String).toString(), subcategory.desktopEntryPath())
        printLevel(
            subcategory.property('X-KDE-System-Settings-Category',
                                 QVariant.String).toString(), depth + 1)


print "*** Current organization:"
printLevel('')

print "\n"
print "*** Searching for invalid categories:"
print "**** KCModules:"
results = KServiceTypeTrader.self().query('KCModule')
for result in results:
    if (not (result.property('X-KDE-System-Settings-Parent-Category',
                             QVariant.String).toString() in VALID_CATEGORIES)):
        print "%s [%s]: %s" % (result.property(
            'Name', QVariant.String).toString(), result.desktopEntryPath(),
                               result.property(
                                   'X-KDE-System-Settings-Parent-Category',
                                   QVariant.String).toString())
print "**** Categories:"
results = KServiceTypeTrader.self().query('SystemSettingsCategory')
for result in results:
    if (not (result.property('X-KDE-System-Settings-Parent-Category',
                             QVariant.String).toString() in VALID_CATEGORIES)):
        print "%s [%s]: %s" % (result.property(
            'Name', QVariant.String).toString(), result.desktopEntryPath(),