mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-23 18:32:51 +00:00
kgreeter: fallback to the first session on initialization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a224a6c6ba
commit
88d53a0a60
1 changed files with 12 additions and 0 deletions
|
@ -158,6 +158,18 @@ KGreeter::KGreeter(QWidget *parent)
|
|||
setSession(lastsession);
|
||||
}
|
||||
|
||||
// if no default session is specified and no last session is saved use the first
|
||||
bool sessionchecked = false;
|
||||
Q_FOREACH (QAction *sessionaction, m_sessionactions) {
|
||||
if (sessionaction->isChecked()) {
|
||||
sessionchecked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!sessionchecked && !m_sessionactions.isEmpty()) {
|
||||
m_sessionactions.first()->setChecked(true);
|
||||
}
|
||||
|
||||
m_ui.groupbox->setTitle(QString::fromUtf8(lightdm_get_hostname()));
|
||||
|
||||
m_ui.actionSuspend->setVisible(lightdm_get_can_suspend());
|
||||
|
|
Loading…
Add table
Reference in a new issue