Changeset 60651c6


Ignore:
Timestamp:
04/17/15 04:39:13 (4 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.1.2, releng/10.2
Children:
1d53212
Parents:
8238e3c
Message:

Fix a couple bugs in the new screen brightness controls in pc-sysconfig. Now they should work consistently.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pcbsd-utils/pc-sysconfig/daemon/Backend-screen.cpp

    r4ddedd3 r60651c6  
    1111  QStringList active = sysctl.filter(".active="); 
    1212  for(int i=0; i<active.length(); i++){ 
    13     if(active[i].endsWith("=0")){ 
    14       //inactive - remove it 
     13    if(active[i].endsWith("=0") || sysctl.filter(active[i].section(".active=",0,0)+".brightness=").isEmpty() ){ 
     14      //inactive or no corresponding brightness control - remove it 
    1515      active.removeAt(i); 
    1616      i--; 
     
    3636  percent.remove("%"); 
    3737  percent = percent.section(".",0,0).section(",",0,0); //only whole numbers 
    38   bool mode = -1; 
     38  int mode = -1; 
    3939  if(percent.startsWith("+")){ percent.remove("+"); mode = 0; } //increase by percent - not full number given 
    4040  else if(percent.startsWith("-")){ percent.remove("-"); mode = 1; } //decrease by percent 
     
    4444  QStringList active = sysctl.filter(".active="); 
    4545  for(int i=0; i<active.length(); i++){ 
    46     if(active[i].endsWith("=0")){ 
    47       //inactive - remove it 
     46    if(active[i].endsWith("=0") || sysctl.filter(active[i].section(".active=",0,0)+".brightness=").isEmpty() ){ 
     47      //inactive or no corresponding brightness control - remove it 
    4848      active.removeAt(i); 
    4949      i--; 
Note: See TracChangeset for help on using the changeset viewer.