From 20c2a4eb6b6847685a30e9c12f7861faf25591ab Mon Sep 17 00:00:00 2001 From: arcan1s Date: Wed, 2 Apr 2014 23:48:44 +0400 Subject: [PATCH] release 1.7.1 * fix bug with zero values in tooltip - removed error label --- sources/CMakeLists.txt | 2 +- sources/ptm/contents/code/main.py | 3 --- sources/ptm/contents/code/tooltip.py | 5 ++++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 84c8dee..e1a13f2 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -8,7 +8,7 @@ cmake_policy (SET CMP0015 NEW) project (pytextmonitor) set (PROJECT_VERSION_MAJOR 1) set (PROJECT_VERSION_MINOR 7) -set (PROJECT_VERSION_PATCH 0) +set (PROJECT_VERSION_PATCH 1) set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) message (STATUS "Version: ${PROJECT_VERSION}") diff --git a/sources/ptm/contents/code/main.py b/sources/ptm/contents/code/main.py index 9d9ebc5..5f9362e 100644 --- a/sources/ptm/contents/code/main.py +++ b/sources/ptm/contents/code/main.py @@ -171,9 +171,6 @@ class pyTextWidget(plasmascript.Applet): self.tooltip.setSubText('') except Exception as strerror: self.tooltip.setSubText(str(strerror)) - self.label_error = Plasma.Label(self.applet) - self.label_error.setText('ERROR') - self.layout.addItem(self.label_error) return diff --git a/sources/ptm/contents/code/tooltip.py b/sources/ptm/contents/code/tooltip.py index 87a0d46..3880f02 100644 --- a/sources/ptm/contents/code/tooltip.py +++ b/sources/ptm/contents/code/tooltip.py @@ -48,7 +48,10 @@ class Tooltip(): bound[0] = value elif (value > bound[1]): bound[1] = value - norm = [maxOne[0] / len(values[type]), maxOne[1] / (1.5*(bound[1] - bound[0]))] + if ((bound[0] == 0.0) and (bound[0] == 0.0)): + norm = [maxOne[0] / len(values[type]), maxOne[1] / 1.5] + else: + norm = [maxOne[0] / len(values[type]), maxOne[1] / (1.5*(bound[1] - bound[0]))] pen.setColor(QColor(colors[type])) if (down): shift = (types.index(type) - 1) * maxOne[0]