Release 1.3.6

* fix bug #1
* fix bug #2
This commit is contained in:
arcan1s 2013-09-29 05:57:06 +04:00
parent 013cf8d335
commit e7babdfde4
8 changed files with 18 additions and 16 deletions

View File

@ -3,7 +3,7 @@
pkgname=kdeplasma-applets-pytextmonitor
_pkgname=py-text-monitor
pkgver=1.3.5
pkgver=1.3.6
pkgrel=1
_dtengine=ext-sysmon
_dtver=1.2
@ -19,8 +19,8 @@ makedepends=('automoc4' 'cmake')
source=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}.plasmoid
https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_dtengine}-${_dtver}.zip)
install=${pkgname}.install
md5sums=('d99c8a152693b6b10ebe8fb1a076a333'
'9b547781732ab19ad103710b7bd07d8d')
md5sums=('5f619e6770bec8dbf7d18907d3a2143e'
'775bc3a6057f2dc1696f09b8d315a3e9')
build ()
{

Binary file not shown.

Binary file not shown.

View File

@ -147,7 +147,7 @@ class ConfigDefinition:
settings.set('label_order', self.parent.label_order)
# reinitializate
self.parent.reinit.reinit()
self.parent.reinit.reinit(confAccept=True)
def createConfigurationInterface(self, parent):

View File

@ -153,7 +153,7 @@ class DataEngine:
if (self.parent.netNonFormat.split('@@')[0] == self.parent.netNonFormat):
self.parent.systemmonitor.disconnectSource("network/interfaces/"+self.parent.netdev+"/transmitter/data", self.parent)
self.parent.systemmonitor.disconnectSource("network/interfaces/"+self.parent.netdev+"/receiver/data", self.parent)
self.parent.setupNetdev()
self.parent.netdev = self.parent.setupNetdev()
self.parent.systemmonitor.connectSource("network/interfaces/"+self.parent.netdev+"/transmitter/data", self.parent, self.parent.interval)
self.parent.systemmonitor.connectSource("network/interfaces/"+self.parent.netdev+"/receiver/data", self.parent, self.parent.interval)
if (self.parent.netNonFormat.split('$netdev')[0] != self.parent.netNonFormat):

View File

@ -36,7 +36,7 @@ class pyTextWidget(plasmascript.Applet):
QObject.connect(self.timer, SIGNAL("timeout()"), self.updateLabel)
self.setupVar()
self.reinit.reinit()
self.reinit.reinit(confAccept=False)
self.setHasConfigurationInterface(True)
@ -60,24 +60,25 @@ class pyTextWidget(plasmascript.Applet):
def mouseDoubleClickEvent(self, event):
"""function to doubleclick event"""
os.system("ksysguard")
os.system("ksysguard &")
def setupNetdev(self):
"""function to setup network device"""
self.netdev = "lo"
netdev = "lo"
try:
interfaces = []
for line in commands.getoutput("ifconfig -a").split("\n"):
if ((line != '') and (line[0] != ' ') and (line.split(":")[0].split()[0] != 'lo')):
interfaces.append(line.split(":")[0].split()[0])
for line in commands.getoutput("ifconfig -a -s").split("\n"):
if ((line.split()[0] != 'Iface') and (line.split()[0] != 'lo')):
interfaces.append(line.split()[0])
for device in interfaces:
if (commands.getoutput("ifconfig " + device + " | grep 'inet '") != ''):
self.netdev = device
netdev = device
break
except:
pass
return netdev
def setupVar(self):

View File

@ -11,7 +11,7 @@ class Reinit():
"""class definition"""
self.parent = parent
def reinit(self):
def reinit(self, confAccept=False):
"""function to reinitializate widget"""
settings = config.Config(self.parent)
self.parent.interval = settings.get('interval', 2000).toInt()[0]
@ -132,7 +132,7 @@ class Reinit():
self.parent.netdev = self.parent.netNonFormat.split('@@')[1]
self.parent.netNonFormat = self.parent.netNonFormat.split('@@')[0] + self.parent.netNonFormat.split('@@')[2]
else:
self.parent.setupNetdev()
self.parent.netdev = self.parent.setupNetdev()
if (self.parent.netNonFormat.split('$netdev')[0] != self.parent.netNonFormat):
self.parent.netFormat = self.parent.netNonFormat.split('$netdev')[0] + self.parent.netdev + self.parent.netNonFormat.split('$netdev')[1]
else:
@ -270,6 +270,7 @@ class Reinit():
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
self.parent.label_hddtemp.setText(text)
self.parent.layout.addItem(self.parent.label_hddtemp)
if not confAccept:
self.parent.applet.setLayout(self.parent.layout)
self.parent.theme = Plasma.Svg(self.parent)
self.parent.theme.setImagePath("widgets/background")

View File

@ -12,7 +12,7 @@ X-Plasma-RequiredExtensions=LaunchApp,LocalIO,FileDialog
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=py-text-monitor
X-KDE-PluginInfo-Version=1.3.5
X-KDE-PluginInfo-Version=1.3.6
X-KDE-PluginInfo-Website=http://kde-look.org/
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends=