mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
ksmserver: set the title text before starting the timer in the shutdown dialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8e96ce1aa8
commit
b67914031d
1 changed files with 4 additions and 3 deletions
|
@ -158,6 +158,7 @@ KSMShutdownDlg::KSMShutdownDlg(QWidget* parent,
|
||||||
m_layout->addItem(m_cancelbutton, 1, 1, 1, 1);
|
m_layout->addItem(m_cancelbutton, 1, 1, 1, 1);
|
||||||
m_layout->setRowMaximumHeight(1, m_cancelbutton->preferredSize().height() + m_layout->verticalSpacing());
|
m_layout->setRowMaximumHeight(1, m_cancelbutton->preferredSize().height() + m_layout->verticalSpacing());
|
||||||
|
|
||||||
|
slotTimeout();
|
||||||
m_timer = new QTimer(this);
|
m_timer = new QTimer(this);
|
||||||
m_timer->setInterval(1000);
|
m_timer->setInterval(1000);
|
||||||
connect(
|
connect(
|
||||||
|
@ -321,7 +322,7 @@ void KSMShutdownDlg::slotTimeout()
|
||||||
i18np("Restarting computer in 1 second.", "Restarting computer in %1 seconds.", m_second)
|
i18np("Restarting computer in 1 second.", "Restarting computer in %1 seconds.", m_second)
|
||||||
);
|
);
|
||||||
m_second--;
|
m_second--;
|
||||||
if (m_second <= 0) {
|
if (m_second <= -1) {
|
||||||
slotReboot();
|
slotReboot();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -331,7 +332,7 @@ void KSMShutdownDlg::slotTimeout()
|
||||||
i18np("Turning off computer in 1 second.", "Turning off computer in %1 seconds.", m_second)
|
i18np("Turning off computer in 1 second.", "Turning off computer in %1 seconds.", m_second)
|
||||||
);
|
);
|
||||||
m_second--;
|
m_second--;
|
||||||
if (m_second <= 0) {
|
if (m_second <= -1) {
|
||||||
slotHalt();
|
slotHalt();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -341,7 +342,7 @@ void KSMShutdownDlg::slotTimeout()
|
||||||
i18np("Logging out in 1 second.", "Logging out in %1 seconds.", m_second)
|
i18np("Logging out in 1 second.", "Logging out in %1 seconds.", m_second)
|
||||||
);
|
);
|
||||||
m_second--;
|
m_second--;
|
||||||
if (m_second <= 0) {
|
if (m_second <= -1) {
|
||||||
slotLogout();
|
slotLogout();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue