Ignore:
Timestamp:
Feb 1, 2010, 4:20:49 PM (15 years ago)
Author:
joergs
Message:

added program to dump all KDE resource types

File:
1 copied

Legend:

Unmodified
Added
Removed
  • kde/kreadconfig/kread-desktopfile.py

    r816 r817  
    1919
    2020import sys
    21 from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs, KCmdLineOptions, KConfig
     21from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs, KCmdLineOptions, KConfig, KDesktopFile
    2222from PyKDE4.kdeui import KApplication
    2323 
     
    4949    print getFullName( config )
    5050    #print dir(config)
    51     for i in config.entryMap():
     51    #for i in config.entryMap():
     52    for i in config.keyList():
    5253      immutaleString = ''
    5354      if config.isEntryImmutable( i ):
     
    109110#print configfilename
    110111
    111 config = KConfig(configfilename, KConfig.NoGlobals)
     112if not KDesktopFile.isDesktopFile(configfilename):
     113    print "failed: no desktop file '", configfilename, "' found"
     114    exit(1)
    112115
     116#config = KConfig(configfilename, KConfig.NoGlobals)
     117config = KDesktopFile(configfilename)
     118
     119
     120print "filename:  ", config.fileName()
     121print "name:      ", config.readName()
     122print "icon:      ", config.readIcon()
     123print "nodisplay: ", config.noDisplay()
     124
     125print
     126print "dump:"
    113127
    114128# only show the sub-groups.
Note: See TracChangeset for help on using the changeset viewer.