Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/sessionlock.cpp
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Line(s) | 151 | { | |||
---|---|---|---|---|---|
203 | choose.setText(i18nc("@action:button", "Choose another session")); | 203 | choose.setText(i18nc("@action:button", "Choose another session")); | ||
204 | 204 | | |||
205 | KGuiItem cancel = KStandardGuiItem::quit(); | 205 | KGuiItem cancel = KStandardGuiItem::quit(); | ||
206 | int ret = KMessageBox::warningYesNoCancel(nullptr, errmsg, i18nc("@title:window", "Failed to Lock Session %1", sessionName), | 206 | int ret = KMessageBox::warningYesNoCancel(nullptr, errmsg, i18nc("@title:window", "Failed to Lock Session %1", sessionName), | ||
207 | retry, choose, cancel); | 207 | retry, choose, cancel); | ||
208 | switch( ret ) { | 208 | switch( ret ) { | ||
209 | case KMessageBox::Yes: | 209 | case KMessageBox::Yes: | ||
210 | return sessionId; | 210 | return sessionId; | ||
211 | break; | | |||
212 | 211 | | |||
213 | case KMessageBox::No: { | 212 | case KMessageBox::No: { | ||
214 | QString errmsg = i18nc("@info", "The session %1 is already active in another running instance.", | 213 | QString errmsg = i18nc("@info", "The session %1 is already active in another running instance.", | ||
215 | sessionName); | 214 | sessionName); | ||
216 | return SessionController::showSessionChooserDialog(errmsg); | 215 | return SessionController::showSessionChooserDialog(errmsg); | ||
217 | break; | | |||
218 | } | 216 | } | ||
219 | 217 | | |||
220 | case KMessageBox::Cancel: | 218 | case KMessageBox::Cancel: | ||
221 | default: | 219 | default: | ||
222 | break; | 220 | break; | ||
223 | } | 221 | } | ||
224 | 222 | | |||
225 | return QString(); | 223 | return QString(); | ||
226 | } | 224 | } |