author | llornkcor <llornkcor> | 2004-04-23 07:17:35 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-04-23 07:17:35 (UTC) |
commit | 448732c964768b5be8677a95aa1f9b07bad9e8a2 (patch) (unidiff) | |
tree | 9a42956b0f6153e1e4b188ee4f53827c5f663026 | |
parent | ba10e43945b15753e0438cd0176cfa61d61c7391 (diff) | |
download | opie-448732c964768b5be8677a95aa1f9b07bad9e8a2.zip opie-448732c964768b5be8677a95aa1f9b07bad9e8a2.tar.gz opie-448732c964768b5be8677a95aa1f9b07bad9e8a2.tar.bz2 |
doesnt make sense to turn light off before it dims for default
-rw-r--r-- | core/settings/light-and-power/light.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index ebcc25c..d64a063 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp | |||
@@ -56,98 +56,98 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) | |||
56 | m_bres = ODevice::inst ( )-> displayBrightnessResolution ( ); | 56 | m_bres = ODevice::inst ( )-> displayBrightnessResolution ( ); |
57 | m_cres = ODevice::inst ( )-> displayContrastResolution ( ); | 57 | m_cres = ODevice::inst ( )-> displayContrastResolution ( ); |
58 | 58 | ||
59 | // check whether to show the light sensor stuff | 59 | // check whether to show the light sensor stuff |
60 | 60 | ||
61 | if ( !ODevice::inst ( )-> hasLightSensor ( )) { | 61 | if ( !ODevice::inst ( )-> hasLightSensor ( )) { |
62 | auto_brightness-> hide ( ); | 62 | auto_brightness-> hide ( ); |
63 | CalibrateLightSensor-> hide ( ); | 63 | CalibrateLightSensor-> hide ( ); |
64 | auto_brightness_ac-> hide ( ); | 64 | auto_brightness_ac-> hide ( ); |
65 | CalibrateLightSensor_ac-> hide ( ); | 65 | CalibrateLightSensor_ac-> hide ( ); |
66 | } | 66 | } |
67 | 67 | ||
68 | // check whether to show the contrast stuff | 68 | // check whether to show the contrast stuff |
69 | 69 | ||
70 | if (m_cres) { | 70 | if (m_cres) { |
71 | GroupLight->setTitle(tr("Backlight && Contrast")); | 71 | GroupLight->setTitle(tr("Backlight && Contrast")); |
72 | GroupLight_ac->setTitle(GroupLight->title()); | 72 | GroupLight_ac->setTitle(GroupLight->title()); |
73 | } else { | 73 | } else { |
74 | contrast->hide(); | 74 | contrast->hide(); |
75 | contrast_ac->hide(); | 75 | contrast_ac->hide(); |
76 | } | 76 | } |
77 | 77 | ||
78 | // check whether to show the cpu frequency stuff | 78 | // check whether to show the cpu frequency stuff |
79 | 79 | ||
80 | QStrList freq = ODevice::inst()->allowedCpuFrequencies(); | 80 | QStrList freq = ODevice::inst()->allowedCpuFrequencies(); |
81 | if ( freq.count() ) { | 81 | if ( freq.count() ) { |
82 | frequency->insertStrList( freq ); | 82 | frequency->insertStrList( freq ); |
83 | frequency_ac->insertStrList( freq ); | 83 | frequency_ac->insertStrList( freq ); |
84 | } else { | 84 | } else { |
85 | frequencyLabel->hide(); | 85 | frequencyLabel->hide(); |
86 | frequency->hide(); | 86 | frequency->hide(); |
87 | frequencyLabel_ac->hide(); | 87 | frequencyLabel_ac->hide(); |
88 | frequency_ac->hide(); | 88 | frequency_ac->hide(); |
89 | } | 89 | } |
90 | 90 | ||
91 | // check whether to show the hinge action stuff | 91 | // check whether to show the hinge action stuff |
92 | 92 | ||
93 | if ( !ODevice::inst()->hasHingeSensor() ) { | 93 | if ( !ODevice::inst()->hasHingeSensor() ) { |
94 | closeHingeLabel->hide(); | 94 | closeHingeLabel->hide(); |
95 | closeHingeAction->hide(); | 95 | closeHingeAction->hide(); |
96 | closeHingeLabel_ac->hide(); | 96 | closeHingeLabel_ac->hide(); |
97 | closeHingeAction_ac->hide(); | 97 | closeHingeAction_ac->hide(); |
98 | } | 98 | } |
99 | 99 | ||
100 | Config config ( "apm" ); | 100 | Config config ( "apm" ); |
101 | config. setGroup ( "Battery" ); | 101 | config. setGroup ( "Battery" ); |
102 | 102 | ||
103 | // battery spinboxes | 103 | // battery spinboxes |
104 | interval_dim-> setValue ( config. readNumEntry ( "Dim", 30 )); | 104 | interval_dim-> setValue ( config. readNumEntry ( "Dim", 20 )); |
105 | interval_lightoff-> setValue ( config. readNumEntry ( "LightOff", 20 )); | 105 | interval_lightoff-> setValue ( config. readNumEntry ( "LightOff", 30 )); |
106 | interval_suspend-> setValue ( config. readNumEntry ( "Suspend", 60 )); | 106 | interval_suspend-> setValue ( config. readNumEntry ( "Suspend", 60 )); |
107 | 107 | ||
108 | // battery check and slider | 108 | // battery check and slider |
109 | LcdOffOnly->setChecked ( config. readBoolEntry ( "LcdOffOnly", false )); | 109 | LcdOffOnly->setChecked ( config. readBoolEntry ( "LcdOffOnly", false )); |
110 | 110 | ||
111 | // CPU frequency | 111 | // CPU frequency |
112 | frequency->setCurrentItem( config.readNumEntry("Freq", 0) ); | 112 | frequency->setCurrentItem( config.readNumEntry("Freq", 0) ); |
113 | 113 | ||
114 | // hinge action | 114 | // hinge action |
115 | closeHingeAction->setCurrentItem( config.readNumEntry("CloseHingeAction", 0) ); | 115 | closeHingeAction->setCurrentItem( config.readNumEntry("CloseHingeAction", 0) ); |
116 | 116 | ||
117 | int bright = config. readNumEntry ( "Brightness", 127 ); | 117 | int bright = config. readNumEntry ( "Brightness", 127 ); |
118 | int contr = m_oldcontrast = config. readNumEntry ( "Contrast", 127 ); | 118 | int contr = m_oldcontrast = config. readNumEntry ( "Contrast", 127 ); |
119 | brightness-> setTickInterval ( QMAX( 16, 256 / m_bres )); | 119 | brightness-> setTickInterval ( QMAX( 16, 256 / m_bres )); |
120 | brightness-> setLineStep ( QMAX( 1, 256 / m_bres )); | 120 | brightness-> setLineStep ( QMAX( 1, 256 / m_bres )); |
121 | brightness-> setPageStep ( QMAX( 1, 256 / m_bres )); | 121 | brightness-> setPageStep ( QMAX( 1, 256 / m_bres )); |
122 | brightness-> setValue ( bright ); | 122 | brightness-> setValue ( bright ); |
123 | 123 | ||
124 | if (m_cres) { | 124 | if (m_cres) { |
125 | contrast-> setTickInterval ( QMAX( 16, 256 / m_cres )); | 125 | contrast-> setTickInterval ( QMAX( 16, 256 / m_cres )); |
126 | contrast-> setLineStep ( QMAX( 1, 256 / m_cres )); | 126 | contrast-> setLineStep ( QMAX( 1, 256 / m_cres )); |
127 | contrast-> setPageStep ( QMAX( 1, 256 / m_cres )); | 127 | contrast-> setPageStep ( QMAX( 1, 256 / m_cres )); |
128 | contrast-> setValue ( contr ); | 128 | contrast-> setValue ( contr ); |
129 | } | 129 | } |
130 | 130 | ||
131 | // light sensor | 131 | // light sensor |
132 | auto_brightness-> setChecked ( config. readBoolEntry ( "LightSensor", false )); | 132 | auto_brightness-> setChecked ( config. readBoolEntry ( "LightSensor", false )); |
133 | m_sensordata = config. readListEntry ( "LightSensorData", ';' ); | 133 | m_sensordata = config. readListEntry ( "LightSensorData", ';' ); |
134 | 134 | ||
135 | config. setGroup ( "AC" ); | 135 | config. setGroup ( "AC" ); |
136 | 136 | ||
137 | // ac spinboxes | 137 | // ac spinboxes |
138 | interval_dim_ac-> setValue ( config. readNumEntry ( "Dim", 60 )); | 138 | interval_dim_ac-> setValue ( config. readNumEntry ( "Dim", 60 )); |
139 | interval_lightoff_ac-> setValue ( config. readNumEntry ( "LightOff", 120 )); | 139 | interval_lightoff_ac-> setValue ( config. readNumEntry ( "LightOff", 120 )); |
140 | interval_suspend_ac-> setValue ( config. readNumEntry ( "Suspend", 0 )); | 140 | interval_suspend_ac-> setValue ( config. readNumEntry ( "Suspend", 0 )); |
141 | 141 | ||
142 | // ac check and slider | 142 | // ac check and slider |
143 | LcdOffOnly_ac-> setChecked ( config. readBoolEntry ( "LcdOffOnly", false )); | 143 | LcdOffOnly_ac-> setChecked ( config. readBoolEntry ( "LcdOffOnly", false )); |
144 | 144 | ||
145 | // CPU frequency | 145 | // CPU frequency |
146 | frequency_ac->setCurrentItem( config.readNumEntry("Freq", 0) ); | 146 | frequency_ac->setCurrentItem( config.readNumEntry("Freq", 0) ); |
147 | 147 | ||
148 | // hinge action | 148 | // hinge action |
149 | closeHingeAction_ac->setCurrentItem( config.readNumEntry("CloseHingeAction", 0) ); | 149 | closeHingeAction_ac->setCurrentItem( config.readNumEntry("CloseHingeAction", 0) ); |
150 | 150 | ||
151 | bright = config. readNumEntry ( "Brightness", 255 ); | 151 | bright = config. readNumEntry ( "Brightness", 255 ); |
152 | brightness_ac-> setTickInterval ( QMAX( 16, 256 / m_bres )); | 152 | brightness_ac-> setTickInterval ( QMAX( 16, 256 / m_bres )); |
153 | brightness_ac-> setLineStep ( QMAX( 1, 256 / m_bres )); | 153 | brightness_ac-> setLineStep ( QMAX( 1, 256 / m_bres )); |