author | harlekin <harlekin> | 2002-10-27 18:17:54 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-27 18:17:54 (UTC) |
commit | 63894d36a26675655a4f74721ea1c19fb5e3e84c (patch) (unidiff) | |
tree | 84336f7750ee018d975b7a00255dcf4dcdc51843 | |
parent | 17888d7ee97ec67c3f8c0f69fa30930b5a634ace (diff) | |
download | opie-63894d36a26675655a4f74721ea1c19fb5e3e84c.zip opie-63894d36a26675655a4f74721ea1c19fb5e3e84c.tar.gz opie-63894d36a26675655a4f74721ea1c19fb5e3e84c.tar.bz2 |
other never handling
-rw-r--r-- | core/settings/light-and-power/light.cpp | 16 | ||||
-rw-r--r-- | core/settings/light-and-power/lightsettingsbase.ui | 14 |
2 files changed, 15 insertions, 15 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index d2618d9..bf94a21 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp | |||
@@ -77,25 +77,25 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) | |||
77 | int interval; | 77 | int interval; |
78 | // battery spinboxes | 78 | // battery spinboxes |
79 | interval = config.readNumEntry( "Interval_Dim", 20 ); | 79 | interval = config.readNumEntry( "Interval_Dim", 20 ); |
80 | if ( config.readNumEntry("Dim",1) == 0 ) { | 80 | if ( config.readNumEntry("Dim",1) == 0 ) { |
81 | interval_dim->setSpecialValueText( tr("never") ); | 81 | interval_dim->setValue( 0 ); |
82 | } else { | 82 | } else { |
83 | interval_dim->setValue( interval ); | 83 | interval_dim->setValue( interval ); |
84 | } | 84 | } |
85 | 85 | ||
86 | interval = config.readNumEntry( "Interval_LightOff", 30 ); | 86 | interval = config.readNumEntry( "Interval_LightOff", 30 ); |
87 | if ( config.readNumEntry("LightOff",1) == 0 ) { | 87 | if ( config.readNumEntry("LightOff",1) == 0 ) { |
88 | interval_lightoff->setSpecialValueText( tr("never") ); | 88 | interval_lightoff->setValue( 0 ); |
89 | } else { | 89 | } else { |
90 | interval_lightoff->setValue( interval ); | 90 | interval_lightoff->setValue( interval ); |
91 | } | 91 | } |
92 | 92 | ||
93 | interval = config.readNumEntry( "Interval", 60 ); | 93 | interval = config.readNumEntry( "Interval", 60 ); |
94 | if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) | 94 | if ( interval > 3600 ) interval /= 1000; // compatibility (was millisecs) |
95 | 95 | ||
96 | if ( config.readNumEntry("NoApm", 0) == 0 ) { | 96 | if ( config.readNumEntry("NoApm", 0 ) == 1 ) { |
97 | interval_suspend->setSpecialValueText( tr("never") ); | 97 | interval_suspend->setValue( 0 ); |
98 | } else { | 98 | } else { |
99 | interval_suspend->setValue( interval ); | 99 | interval_suspend->setValue( interval ); |
100 | } | 100 | } |
101 | 101 | ||
@@ -117,26 +117,26 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) | |||
117 | config.setGroup( "AC" ); | 117 | config.setGroup( "AC" ); |
118 | // ac spinboxes | 118 | // ac spinboxes |
119 | interval = config.readNumEntry( "Interval_Dim", 20 ); | 119 | interval = config.readNumEntry( "Interval_Dim", 20 ); |
120 | if ( config.readNumEntry("Dim",1) == 0 ) { | 120 | if ( config.readNumEntry("Dim",1) == 0 ) { |
121 | interval_dim_ac_3->setSpecialValueText( tr("never") ); | 121 | interval_dim_ac_3->setValue( 0 ); |
122 | } else { | 122 | } else { |
123 | interval_dim_ac_3->setValue( interval ); | 123 | interval_dim_ac_3->setValue( interval ); |
124 | } | 124 | } |
125 | 125 | ||
126 | interval = config.readNumEntry( "Interval_LightOff", 30 ); | 126 | interval = config.readNumEntry( "Interval_LightOff", 30 ); |
127 | if ( config.readNumEntry("LightOff",1) == 0 ) { | 127 | if ( config.readNumEntry("LightOff",1) == 0 ) { |
128 | interval_lightoff_ac_3->setSpecialValueText( tr("never") ); | 128 | interval_lightoff_ac_3->setValue( 0 ); |
129 | } else { | 129 | } else { |
130 | interval_lightoff_ac_3->setValue( interval ); | 130 | interval_lightoff_ac_3->setValue( interval ); |
131 | } | 131 | } |
132 | 132 | ||
133 | interval = config.readNumEntry( "Interval", 60 ); | 133 | interval = config.readNumEntry( "Interval", 60 ); |
134 | if ( interval > 3600 ) { | 134 | if ( interval > 3600 ) { |
135 | interval /= 1000; // compatibility (was millisecs) | 135 | interval /= 1000; // compatibility (was millisecs) |
136 | } | 136 | } |
137 | if ( config.readNumEntry("NoApm", 0) == 0 ) { | 137 | if ( config.readNumEntry("NoApm", 1) == 1 ) { |
138 | interval_suspend_ac_3->setSpecialValueText( tr("never") ); | 138 | interval_suspend_ac_3->setValue( 0 ); |
139 | } else { | 139 | } else { |
140 | interval_suspend_ac_3->setValue( interval ); | 140 | interval_suspend_ac_3->setValue( interval ); |
141 | } | 141 | } |
142 | 142 | ||
diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui index effa460..f41e5a6 100644 --- a/core/settings/light-and-power/lightsettingsbase.ui +++ b/core/settings/light-and-power/lightsettingsbase.ui | |||
@@ -10,9 +10,9 @@ | |||
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>403</width> | 14 | <width>399</width> |
15 | <height>532</height> | 15 | <height>532</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
@@ -149,9 +149,9 @@ | |||
149 | <number>3600</number> | 149 | <number>3600</number> |
150 | </property> | 150 | </property> |
151 | <property stdset="1"> | 151 | <property stdset="1"> |
152 | <name>minValue</name> | 152 | <name>minValue</name> |
153 | <number>10</number> | 153 | <number>0</number> |
154 | </property> | 154 | </property> |
155 | <property stdset="1"> | 155 | <property stdset="1"> |
156 | <name>lineStep</name> | 156 | <name>lineStep</name> |
157 | <number>10</number> | 157 | <number>10</number> |
@@ -209,9 +209,9 @@ | |||
209 | <number>3600</number> | 209 | <number>3600</number> |
210 | </property> | 210 | </property> |
211 | <property stdset="1"> | 211 | <property stdset="1"> |
212 | <name>minValue</name> | 212 | <name>minValue</name> |
213 | <number>10</number> | 213 | <number>0</number> |
214 | </property> | 214 | </property> |
215 | <property stdset="1"> | 215 | <property stdset="1"> |
216 | <name>lineStep</name> | 216 | <name>lineStep</name> |
217 | <number>10</number> | 217 | <number>10</number> |
@@ -240,9 +240,9 @@ | |||
240 | <number>3600</number> | 240 | <number>3600</number> |
241 | </property> | 241 | </property> |
242 | <property stdset="1"> | 242 | <property stdset="1"> |
243 | <name>minValue</name> | 243 | <name>minValue</name> |
244 | <number>10</number> | 244 | <number>0</number> |
245 | </property> | 245 | </property> |
246 | <property stdset="1"> | 246 | <property stdset="1"> |
247 | <name>lineStep</name> | 247 | <name>lineStep</name> |
248 | <number>10</number> | 248 | <number>10</number> |
@@ -592,9 +592,9 @@ | |||
592 | <number>3600</number> | 592 | <number>3600</number> |
593 | </property> | 593 | </property> |
594 | <property stdset="1"> | 594 | <property stdset="1"> |
595 | <name>minValue</name> | 595 | <name>minValue</name> |
596 | <number>10</number> | 596 | <number>0</number> |
597 | </property> | 597 | </property> |
598 | <property stdset="1"> | 598 | <property stdset="1"> |
599 | <name>lineStep</name> | 599 | <name>lineStep</name> |
600 | <number>10</number> | 600 | <number>10</number> |
@@ -641,9 +641,9 @@ | |||
641 | <number>3600</number> | 641 | <number>3600</number> |
642 | </property> | 642 | </property> |
643 | <property stdset="1"> | 643 | <property stdset="1"> |
644 | <name>minValue</name> | 644 | <name>minValue</name> |
645 | <number>10</number> | 645 | <number>0</number> |
646 | </property> | 646 | </property> |
647 | <property stdset="1"> | 647 | <property stdset="1"> |
648 | <name>lineStep</name> | 648 | <name>lineStep</name> |
649 | <number>10</number> | 649 | <number>10</number> |
@@ -683,9 +683,9 @@ | |||
683 | <number>3600</number> | 683 | <number>3600</number> |
684 | </property> | 684 | </property> |
685 | <property stdset="1"> | 685 | <property stdset="1"> |
686 | <name>minValue</name> | 686 | <name>minValue</name> |
687 | <number>10</number> | 687 | <number>0</number> |
688 | </property> | 688 | </property> |
689 | <property stdset="1"> | 689 | <property stdset="1"> |
690 | <name>lineStep</name> | 690 | <name>lineStep</name> |
691 | <number>10</number> | 691 | <number>10</number> |