diff --git a/source/contents/code/configwindow.py b/source/contents/code/configwindow.py index cf96584..978db81 100644 --- a/source/contents/code/configwindow.py +++ b/source/contents/code/configwindow.py @@ -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) diff --git a/source/contents/code/main.py b/source/contents/code/main.py index dea5b7c..71ecc09 100755 --- a/source/contents/code/main.py +++ b/source/contents/code/main.py @@ -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() diff --git a/source/contents/ui/configwindow.ui b/source/contents/ui/configwindow.ui index d0b68b3..823cc40 100644 --- a/source/contents/ui/configwindow.ui +++ b/source/contents/ui/configwindow.ui @@ -1292,7 +1292,7 @@ $swapmb - swap usage, MB $net - network speed, down/up, KB/s $netdev - current network device -@@netdev=eth0@@ - disable auto select device and set specified device +@@eth0@@ - disable auto select device and set specified device Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/source/metadata.desktop b/source/metadata.desktop index 3c432ad..6054c1e 100644 --- a/source/metadata.desktop +++ b/source/metadata.desktop @@ -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=