This commit is contained in:
arcan1s 2013-05-12 04:30:09 +04:00
parent 33d42ed0a5
commit 3515f5c759
4 changed files with 7 additions and 8 deletions

View File

@ -701,8 +701,7 @@ class ConfigWindow(QWidget):
order.append(self.ui.slider_temp.value())
if (self.ui.checkBox_uptime.checkState() == 2):
order.append(self.ui.slider_uptime.value())
print order
for value in range(len(order)+1)[1:]:
if (order.count(value) == 0):
print value
return int(value)

View File

@ -421,7 +421,7 @@ class pyTextWidget(plasmascript.Applet):
self.hddTempBool = int(self.settings.get('hddTempBool', 1))
self.netBool = int(self.settings.get('netBool', 1))
self.batBool = int(self.settings.get('batBool', 1))
# small function for update if errors exists
# small function for update if errors exist
if (len(self.label_order) != sum([self.uptimeBool, self.cpuBool, self.cpuclockBool, self.tempBool, self.gpuMemBool, self.gpuTempBool, self.memBool, self.swapBool, self.hddBool, self.hddTempBool, self.netBool, self.batBool])):
self.uptimeBool = 1
self.settings.set('uptimeBool', self.uptimeBool)
@ -512,8 +512,8 @@ class pyTextWidget(plasmascript.Applet):
elif (order == "5"):
if (self.netBool == 1):
self.netNonFormat = str(self.settings.get('netNonFormat', '[net: $netKB/s]'))
if (self.netNonFormat.split('@@netdev=')[0] != self.netNonFormat):
self.netdev = self.netNonFormat.split('@@')[1].split('netdev=')[1]
if (self.netNonFormat.split('@@')[0] != self.netNonFormat):
self.netdev = self.netNonFormat.split('@@')[1]
self.netNonFormat = self.netNonFormat.split('@@')[0] + self.netNonFormat.split('@@')[2]
else:
self.num_dev = int(self.settings.get('num_dev', 0))
@ -886,7 +886,7 @@ class pyTextWidget(plasmascript.Applet):
self.updateNetdev = self.updateNetdev + 1
if (self.updateNetdev == 100):
self.updateNetdev = 0
if (self.netNonFormat.split('@@netdev=')[0] == self.netNonFormat):
if (self.netNonFormat.split('@@')[0] == self.netNonFormat):
self.systemmonitor.disconnectSource("network/interfaces/"+self.netdev+"/transmitter/data", self)
self.systemmonitor.disconnectSource("network/interfaces/"+self.netdev+"/receiver/data", self)
self.setupNetdev()

View File

@ -1292,7 +1292,7 @@ $swapmb - swap usage, MB</string>
<property name="toolTip">
<string notr="true">$net - network speed, down/up, KB/s
$netdev - current network device
@@netdev=eth0@@ - disable auto select device and set specified device</string>
@@eth0@@ - disable auto select device and set specified device</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View File

@ -9,7 +9,7 @@ X-Plasma-MainScript=code/main.py
X-KDE-PluginInfo-Author=Evgeniy Alexeev aka arcanis
X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=py-text-monitor
X-KDE-PluginInfo-Version=1.2.2
X-KDE-PluginInfo-Version=1.3.0a
X-KDE-PluginInfo-Website=http://kde-look.org/
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends=