/usr/bin/kde-systemsettings-tree.py is in kdesdk-scripts 4:17.12.3-0ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | #!/usr/bin/env python
# A small script that validates the structure of systemsettings.
#
# Copyright (c) 2010 Trever Fischer <tdfischer@fedoraproject.org>
#
# You are free to modify and distribute this script under
# the terms of the GPLv2 or later
from PyKDE4.kdecore import KServiceTypeTrader
from PyQt4.QtCore import QVariant
VALID_CATEGORIES = (
"application-appearance-and-behavior",
"application-appearance",
"shortcuts-and-gestures",
"account-details",
"locale",
"application-and-system-notifications",
"personal-information",
"workspace-appearance-and-behavior",
"desktop-appearance",
"window-behaviour",
"hardware",
"display",
"audio-and-video",
"main-input-devices",
"other-input-devices",
"removable-devices",
"network-and-connectivity",
"sharing",
"network-settings",
"bluetooth",
"system-administration",
"permissions",
"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())
|