diff options
author | François Andriot <albator78@libertysurf.fr> | 2013-07-25 13:56:11 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2013-07-25 13:56:11 +0200 |
commit | 7a1e65b00db8fb8f317020bc86856de8a4044a26 (patch) | |
tree | 6e7d17e22d1ffd6a83a54294d6b793737c585bb7 /redhat/extras/ksensors/ksensors-0.7.3-fix-min-max.patch | |
parent | 400dd73349695d15f67e4e145f42893026cb3ab9 (diff) | |
download | tde-packaging-7a1e65b00db8fb8f317020bc86856de8a4044a26.tar.gz tde-packaging-7a1e65b00db8fb8f317020bc86856de8a4044a26.zip |
RPM packaging: add mplayerthumbs
Diffstat (limited to 'redhat/extras/ksensors/ksensors-0.7.3-fix-min-max.patch')
-rw-r--r-- | redhat/extras/ksensors/ksensors-0.7.3-fix-min-max.patch | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/redhat/extras/ksensors/ksensors-0.7.3-fix-min-max.patch b/redhat/extras/ksensors/ksensors-0.7.3-fix-min-max.patch deleted file mode 100644 index 14b3cc61c..000000000 --- a/redhat/extras/ksensors/ksensors-0.7.3-fix-min-max.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff -up ksensors-0.7.3/src/lmsensor.cpp.minmax ksensors-0.7.3/src/lmsensor.cpp ---- ksensors-0.7.3/src/lmsensor.cpp.minmax 2007-11-11 15:12:24.000000000 +0100 -+++ ksensors-0.7.3/src/lmsensor.cpp 2007-11-11 15:26:30.000000000 +0100 -@@ -40,17 +40,30 @@ bool LMSensor::init(const sensors_featur - char *label; - QString str; - -- bool min_max=false; -+ bool min_found=false; -+ bool max_found=false; - while( (*data= sensors_get_all_features(*chip_name, nr1, nr2)) && (*data)->mapping!=SENSORS_NO_MAPPING) { -- str= (*data)->name; -- if(str.find("_min")>=0 || str.find("_low")>=0) { -- sensors_get_feature(*chip_name, (*data)->number, &valMin); -- min_max=true; -- } -- else if(str.find("_max")>=0 || str.find("_over")>=0 || str.find("_high")>=0) { -- sensors_get_feature(*chip_name, (*data)->number, &valMax); -- min_max=true; -+ int len = strlen((*data)->name); -+ const char *postfix = (*data)->name + len - 4; -+ -+ if (len < 5) -+ continue; -+ -+ if((!strcmp(postfix, "_min") || !strcmp(postfix, "_low")) && -+ !sensors_get_feature(*chip_name, (*data)->number, &valMin)) -+ min_found=true; -+ -+ if(!strcmp(postfix, "_max") && -+ !sensors_get_feature(*chip_name, (*data)->number, &valMax)) { -+ max_found=true; -+ continue; - } -+ -+ postfix--; -+ -+ if((!strcmp(postfix, "_over") || !strcmp(postfix, "_high")) && -+ !sensors_get_feature(*chip_name, (*data)->number, &valMax)) -+ max_found=true; - } - - double newVal; -@@ -87,22 +100,21 @@ bool LMSensor::init(const sensors_featur - sensors_get_label(*chip_name,feature,&label); - setDescription(QString(label)); - -- if(min_max){ -- if(min>max) { -- double pivot= valMin; -- min= max; -- max= pivot; -- } -- setValueMax(max,dgCelsius); -- setValueMin(min,dgCelsius); -- setValue((max+min)/2,dgCelsius); -- } -- else { -- setValueMax(70,dgCelsius); -- setValueMin(0,dgCelsius); -- setValue(newVal,dgCelsius); -+ if(min_found) -+ min = valMin; -+ -+ if(max_found) -+ max = valMax; -+ -+ if(min>max) { -+ double pivot= min; -+ min= max; -+ max= pivot; - } - -+ setValueMax(max,dgCelsius); -+ setValueMin(min,dgCelsius); -+ - readConfig(); - updateValue(); - setValueIdeal(getValue()); |