prepare to release 1.10.3

+ added ability to set transparent background
This commit is contained in:
arcan1s
2014-07-08 10:12:20 +04:00
parent 43ee40a65d
commit 11a6f01ae3
20 changed files with 794 additions and 703 deletions

View File

@ -96,12 +96,10 @@ class pyTextWidget(plasmascript.Applet):
self.timer = QTimer()
QObject.connect(self.timer, SIGNAL("timeout()"), self.startPolling)
self.theme = Plasma.Svg(self)
self.initTooltip()
self.reInit()
self.applet.setLayout(self.ptm['layout'])
self.theme = Plasma.Svg(self)
self.theme.setImagePath("widgets/background")
self.setBackgroundHints(Plasma.Applet.DefaultBackground)
self.setHasConfigurationInterface(True)
@ -694,6 +692,19 @@ class pyTextWidget(plasmascript.Applet):
self.startPolling()
def setTransparentBackground(self, hasBackground=2):
"""function to set background to the widget"""
if self.debug: qDebug("[PTM] [main.py] [setTransparentBackground]")
if self.debug: qDebug("[PTM] [main.py] [setTransparentBackground] : Run function with hasBackground '%s'" %(hasBackground))
if (hasBackground == 2):
self.theme.setImagePath("widgets/background")
self.setBackgroundHints(Plasma.Applet.DefaultBackground)
else:
self.theme.setImagePath("")
self.setBackgroundHints(Plasma.Applet.NoBackground)
def setNetdev(self):
"""function to set network device"""
if self.debug: qDebug("[PTM] [main.py] [setNetdev]")