]> code.delx.au - bg-scripts/commitdiff
Removing old kde (kdcop) interface. This does not work anymore, since KDE switched...
authorGreg Darke <greg@tsukasa.net.au>
Fri, 13 Mar 2009 09:38:13 +0000 (20:38 +1100)
committerGreg Darke <greg@tsukasa.net.au>
Fri, 13 Mar 2009 09:38:13 +0000 (20:38 +1100)
kde_randombg.py [deleted file]

diff --git a/kde_randombg.py b/kde_randombg.py
deleted file mode 100755 (executable)
index 15de2c8..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env python
-# coding:utf-8
-# This is an example of a DCOP enabled application written in Python, using
-# PyKDE and the dcopexport module. Taken from server.py example in kde-bindings
-# which was written by Torben Weis and Julian Rockey
-
-import sys
-import randombg2
-from kdecore import KApplication, KCmdLineArgs, KAboutData
-from dcopexport import DCOPExObj
-from qt import QString, QStringList
-
-# the class which will expose methods to DCOP - the methods do NOT
-# need to be a member of this class.
-class RandomBGIface (DCOPExObj):
-       def __init__ (self, id = 'RandomBGIface'):
-               DCOPExObj.__init__ (self, id)
-
-               # the methods available from this app via DCOP
-               #         addMethod (<signature>, <Python method>)
-               self.addMethod('QString getCurrentWallpaper()', self.getCurrent)
-               self.addMethod('void setCurrentWallpaper(QString)', self.changeTo)
-               self.addMethod('void cycleNextWallpaper()', self.cycleNext)
-               self.addMethod('void cyclePrevWallpaper()', self.cyclePrev)
-               self.addMethod('bool writeCache()', self.writeCache)
-               
-               self.filelist = randombg2.AllRandomFileList()
-               self.filelist.doAddPaths([
-                               # Add paths here
-                       ])
-               if not  self.filelist.attemptCacheLoad(randombg2.CACHE_LOCATION):
-                       self.filelist.doScanPaths()
-               self.randombg = randombg2.RandomBG(self.filelist)
-
-       def getCurrent(self):
-               return self.filelist.getLastImage()
-
-       def changeTo(self, wallpaper):
-               self.randombg._randombg(wallpaper)
-
-       def cycleNext(self):
-               self.randombg.cycleNext()
-
-       def cyclePrev(self):
-               self.randombg.cyclePrev()
-       
-       def writeCache(self):
-               if self.filelist.doStoreCache(randombg2.CACHE_LOCATION):
-                       return True
-               else:
-                       return False
-
-description = "A basic application template"
-version                = "1.0"
-aboutData      = KAboutData ("testdcopexport", "randombg",\
-       version, description, KAboutData.License_GPL,\
-       "(C) 2006 Greg Darke")
-
-aboutData.addAuthor ("James Bunton", "Origional Version", "jbun5313@usyd.edu.au")
-aboutData.addAuthor ("Greg Darke", "Coded the WMaker/KDE backends, the persistent random lists, and general bug fixes", "gdar9540@usyd.edu.au")
-
-KCmdLineArgs.init (sys.argv, aboutData)
-
-KCmdLineArgs.addCmdLineOptions ([("+paths", "Paths to scan for images")])
-
-MYAPPID = 'randombg'
-app   = KApplication()
-dcop  = app.dcopClient()
-appid = str(dcop.registerAs(MYAPPID, False))
-if appid != MYAPPID:
-       print >>sys.stderr, 'Failed to get the applicationid of "%s", this means this program is already running' % MYAPPID
-       print 'Got "%s"' % appid
-       sys.exit(1)
-
-print "DCOP Application: %s starting" % appid
-
-randombgIface = RandomBGIface()
-
-app.exec_loop()
-
-randombgIface.filelist.doStoreCache(randombg2.CACHE_LOCATION)