By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 2122
Collapse All | Expand All

(-)a/kcontrol/energy/energy.cpp (-7 / +28 lines)
Lines 143-148 KEnergy::KEnergy(TQWidget *parent, const char *name) Link Here
143
    m_Off = DFLT_OFF;
143
    m_Off = DFLT_OFF;
144
    m_bDPMS = false;
144
    m_bDPMS = false;
145
    m_bKPowersave = false;
145
    m_bKPowersave = false;
146
    m_bTDEPowersave = false;
146
    m_bMaintainSanity = true;
147
    m_bMaintainSanity = true;
147
148
148
    setQuickHelp( i18n("<h1>Display Power Control</h1> If your display supports"
149
    setQuickHelp( i18n("<h1>Display Power Control</h1> If your display supports"
Lines 164-169 KEnergy::KEnergy(TQWidget *parent, const char *name) Link Here
164
        m_bKPowersave = managingDPMS;
165
        m_bKPowersave = managingDPMS;
165
        m_bDPMS = !m_bKPowersave;
166
        m_bDPMS = !m_bKPowersave;
166
    }
167
    }
168
169
    DCOPRef tdepowersave("tdepowersave", "tdepowersaveIface");
170
    managingDPMS = tdepowersave.call("currentSchemeManagesDPMS()");
171
    if (managingDPMS.isValid()) {
172
        m_bTDEPowersave = managingDPMS;
173
        m_bDPMS = !m_bTDEPowersave;
174
    }
167
#endif
175
#endif
168
176
169
    TQVBoxLayout *top = new TQVBoxLayout(this, 0, KDialog::spacingHint());
177
    TQVBoxLayout *top = new TQVBoxLayout(this, 0, KDialog::spacingHint());
Lines 181-187 KEnergy::KEnergy(TQWidget *parent, const char *name) Link Here
181
        TQWhatsThis::add( m_pCBEnable, i18n("Check this option to enable the"
189
        TQWhatsThis::add( m_pCBEnable, i18n("Check this option to enable the"
182
           " power saving features of your display.") );
190
           " power saving features of your display.") );
183
        // ###
191
        // ###
184
    } else if(m_bKPowersave) {
192
    } else if(m_bKPowersave || m_bTDEPowersave) {
185
        m_pCBEnable = new TQCheckBox(i18n("&Enable specific display power management"), this);
193
        m_pCBEnable = new TQCheckBox(i18n("&Enable specific display power management"), this);
186
        hbox->addWidget(m_pCBEnable);
194
        hbox->addWidget(m_pCBEnable);
187
        m_bEnabled = false;
195
        m_bEnabled = false;
Lines 203-209 connect(logo, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(openURL(cons Link Here
203
    hbox->addWidget(logo);
211
    hbox->addWidget(logo);
204
212
205
    // Sliders
213
    // Sliders
206
    if (!m_bKPowersave) {
214
    if (!m_bKPowersave && !m_bTDEPowersave) {
207
    m_pStandbySlider = new KIntNumInput(m_Standby, this);
215
    m_pStandbySlider = new KIntNumInput(m_Standby, this);
208
    m_pStandbySlider->setLabel(i18n("&Standby after:"));
216
    m_pStandbySlider->setLabel(i18n("&Standby after:"));
209
    m_pStandbySlider->setRange(0, 120, 10);
217
    m_pStandbySlider->setRange(0, 120, 10);
Lines 243-252 connect(logo, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(openURL(cons Link Here
243
        m_pStandbySlider = 0;
251
        m_pStandbySlider = 0;
244
        m_pSuspendSlider = 0;
252
        m_pSuspendSlider = 0;
245
        m_pOffSlider = 0;
253
        m_pOffSlider = 0;
246
        TQPushButton* btnKPowersave = new TQPushButton(this);
254
        if(m_bKPowersave) {
247
        btnKPowersave->setText(i18n("Configure KPowersave..."));
255
            TQPushButton* btnKPowersave = new TQPushButton(this);
248
        connect(btnKPowersave, TQT_SIGNAL(clicked()), TQT_SLOT(slotLaunchKPowersave()));
256
            btnKPowersave->setText(i18n("Configure KPowersave..."));
249
        top->addWidget(btnKPowersave);
257
            connect(btnKPowersave, TQT_SIGNAL(clicked()), TQT_SLOT(slotLaunchKPowersave()));
258
            top->addWidget(btnKPowersave);
259
        }
260
        if(m_bTDEPowersave) {
261
            TQPushButton* btnTDEPowersave = new TQPushButton(this);
262
            btnTDEPowersave->setText(i18n("Configure TDEPowersave..."));
263
            connect(btnTDEPowersave, TQT_SIGNAL(clicked()), TQT_SLOT(slotLaunchTDEPowersave()));
264
            top->addWidget(btnTDEPowersave);
265
		}
250
    }
266
    }
251
267
252
    top->addStretch();
268
    top->addStretch();
Lines 337-342 void KEnergy::slotLaunchKPowersave() Link Here
337
    r.send("openConfigureDialog()");
353
    r.send("openConfigureDialog()");
338
}
354
}
339
355
356
void KEnergy::slotLaunchTDEPowersave()
357
{
358
    DCOPRef r("tdepowersave", "tdepowersaveIface");
359
    r.send("openConfigureDialog()");
360
}
340
361
341
void KEnergy::showSettings()
362
void KEnergy::showSettings()
342
{
363
{
Lines 346-352 void KEnergy::showSettings() Link Here
346
        m_pCBEnable->setChecked(m_bEnabled);
367
        m_pCBEnable->setChecked(m_bEnabled);
347
    }
368
    }
348
369
349
    if (!m_bKPowersave) {
370
    if (!m_bKPowersave && !m_bTDEPowersave) {
350
        m_pStandbySlider->setEnabled(m_bEnabled);
371
        m_pStandbySlider->setEnabled(m_bEnabled);
351
        m_pStandbySlider->setValue(m_Standby);
372
        m_pStandbySlider->setValue(m_Standby);
352
        m_pSuspendSlider->setEnabled(m_bEnabled);
373
        m_pSuspendSlider->setEnabled(m_bEnabled);
(-)a/kcontrol/energy/energy.h (-1 / +2 lines)
Lines 45-50 private slots: Link Here
45
    void slotChangeSuspend(int);
45
    void slotChangeSuspend(int);
46
    void slotChangeOff(int);
46
    void slotChangeOff(int);
47
    void slotLaunchKPowersave();
47
    void slotLaunchKPowersave();
48
    void slotLaunchTDEPowersave();
48
    void openURL(const TQString &);
49
    void openURL(const TQString &);
49
50
50
private:
51
private:
Lines 55-61 private: Link Here
55
    static void applySettings(bool, int, int, int);
56
    static void applySettings(bool, int, int, int);
56
    friend void init_energy();
57
    friend void init_energy();
57
58
58
    bool m_bChanged, m_bDPMS, m_bKPowersave, m_bEnabled, m_bMaintainSanity;
59
    bool m_bChanged, m_bDPMS, m_bKPowersave, m_bTDEPowersave, m_bEnabled, m_bMaintainSanity;
59
    int m_Standby, m_Suspend, m_Off;
60
    int m_Standby, m_Suspend, m_Off;
60
    int m_StandbyDesired, m_SuspendDesired, m_OffDesired;
61
    int m_StandbyDesired, m_SuspendDesired, m_OffDesired;
61
62

Return to bug 2122