Changeset View
Changeset View
Standalone View
Standalone View
daemon/actions/bundled/suspendsessionconfig.cpp
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 70 | { | |||
---|---|---|---|---|---|
81 | QSet< Solid::PowerManagement::SleepState > methods = Solid::PowerManagement::supportedSleepStates(); | 81 | QSet< Solid::PowerManagement::SleepState > methods = Solid::PowerManagement::supportedSleepStates(); | ||
82 | 82 | | |||
83 | if (methods.contains(Solid::PowerManagement::SuspendState)) { | 83 | if (methods.contains(Solid::PowerManagement::SuspendState)) { | ||
84 | m_comboBox->addItem(QIcon::fromTheme("system-suspend"), i18n("Suspend"), (uint)SuspendSession::ToRamMode); | 84 | m_comboBox->addItem(QIcon::fromTheme("system-suspend"), i18n("Suspend"), (uint)SuspendSession::ToRamMode); | ||
85 | } | 85 | } | ||
86 | if (methods.contains(Solid::PowerManagement::HibernateState)) { | 86 | if (methods.contains(Solid::PowerManagement::HibernateState)) { | ||
87 | m_comboBox->addItem(QIcon::fromTheme("system-suspend-hibernate"), i18n("Hibernate"), (uint)SuspendSession::ToDiskMode); | 87 | m_comboBox->addItem(QIcon::fromTheme("system-suspend-hibernate"), i18n("Hibernate"), (uint)SuspendSession::ToDiskMode); | ||
88 | } | 88 | } | ||
89 | if (methods.contains(Solid::PowerManagement::HybridSuspendState)) { | ||||
90 | m_comboBox->addItem(QIcon::fromTheme("system-suspend-hybrid"), i18n("Hybrid suspend"), (uint)SuspendSession::SuspendHybridMode); | ||||
91 | } | ||||
89 | m_comboBox->addItem(QIcon::fromTheme("system-shutdown"), i18n("Shut down"), (uint)SuspendSession::ShutdownMode); | 92 | m_comboBox->addItem(QIcon::fromTheme("system-shutdown"), i18n("Shut down"), (uint)SuspendSession::ShutdownMode); | ||
90 | m_comboBox->addItem(QIcon::fromTheme("system-lock-screen"), i18n("Lock screen"), (uint)SuspendSession::LockScreenMode); | 93 | m_comboBox->addItem(QIcon::fromTheme("system-lock-screen"), i18n("Lock screen"), (uint)SuspendSession::LockScreenMode); | ||
91 | 94 | | |||
92 | hlay->addWidget(m_idleTime); | 95 | hlay->addWidget(m_idleTime); | ||
93 | hlay->addWidget(m_comboBox); | 96 | hlay->addWidget(m_comboBox); | ||
94 | hlay->addStretch(); | 97 | hlay->addStretch(); | ||
95 | 98 | | |||
96 | tempWidget->setLayout(hlay); | 99 | tempWidget->setLayout(hlay); | ||
Show All 14 Lines |