summaryrefslogtreecommitdiffstats
path: root/python/pykde/examples/pykde-sampler/about.py
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit90825e2392b2d70e43c7a25b8a3752299a933894 (patch)
treee33aa27f02b74604afbfd0ea4f1cfca8833d882a /python/pykde/examples/pykde-sampler/about.py
downloadtdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz
tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'python/pykde/examples/pykde-sampler/about.py')
-rw-r--r--python/pykde/examples/pykde-sampler/about.py57
1 files changed, 57 insertions, 0 deletions
diff --git a/python/pykde/examples/pykde-sampler/about.py b/python/pykde/examples/pykde-sampler/about.py
new file mode 100644
index 00000000..61fdd8a3
--- /dev/null
+++ b/python/pykde/examples/pykde-sampler/about.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+""" About the PyKDE Sampler
+
+Defines the 'about' function to create a KAboutData instance for the
+sampler application.
+"""
+from os.path import dirname, join
+from kdecore import KAboutData
+
+
+appName = 'pykdesampler'
+progName = 'PyKDE Sampler'
+authorName = 'Troy Melhase'
+authorEmail = bugsEmailAddress = 'troy@gci.net'
+version = '0.1'
+shortDescription = 'The PyKDE Sampler'
+licenseType = KAboutData.License_GPL_V2
+copyrightStatement = '(c) 2006, %s' % (authorName, )
+homePageAddress = 'http://www.riverbankcomputing.co.uk/pykde/'
+aboutText = ("The application sampler for PyKDE.")
+contributors = [] # module-level global for keeping the strings around; intentional
+
+
+def about():
+ """ creates KAboutData instance for the app
+
+ """
+ about = KAboutData(
+ appName,
+ progName,
+ version,
+ shortDescription,
+ licenseType,
+ copyrightStatement,
+ aboutText,
+ homePageAddress,
+ bugsEmailAddress)
+ about.addAuthor(authorName, '', authorEmail)
+
+ try:
+ contrib = open(join(dirname(__file__), 'contributors.txt'))
+ contrib = [line.strip() for line in contrib]
+ contrib = [line for line in contrib if not line.startswith('#')]
+ for line in contrib:
+ try:
+ name, task, addr = [s.strip() for s in line.split(',')]
+ contributors.append((name, task, addr))
+ except:
+ pass
+ except:
+ pass
+
+ contributors.sort(lambda a, b:cmp(a[0], b[0]))
+ for name, task, addr in contributors:
+ about.addCredit(name, task, addr)
+
+ return about