Version: (using KDE Devel) Installed from: Compiled sources If I close a Konsole with several sessions open a confirmation dialog appears that asks whether I want to quit Konsole or not. The additional option to close the current session would be convenient.
Created attachment 2223 [details] adds 'close session' button to 'Really Quit?' dialog This patch does not even need new i18n strings.
This patch also applies to KDE_3_1_BRANCH (not tested, but should work anyway)
Subject: kdebase/konsole/konsole CVS commit by mueller: implement "close session" in the multiple-tab-close-case. Thanks for the patch. CCMAIL: 62568-done@bugs.kde.org M +22 -12 konsole.cpp 1.436 --- kdebase/konsole/konsole/konsole.cpp #1.435:1.436 @@ -1068,16 +1068,26 @@ bool Konsole::queryClose() if ( b_warnQuit) { - if( (sessions.count()>1) && - ( KMessageBox::warningYesNo( this, + if(sessions.count()>1) { + switch ( + KMessageBox::warningYesNoCancel( + this, i18n( "You have open sessions (besides the current one). " "These will be killed if you continue.\n" "Are you sure you want to quit?" ), i18n("Really Quit?"), - i18n("&Quit"), i18n("&Cancel") ) - - == KMessageBox::No ) + i18n("&Quit"), + KGuiItem(i18n("C&lose Session"),"fileclose") + ) ) { + case KMessageBox::Yes : + break; + case KMessageBox::No : + { closeCurrentSession(); return false; } + break; + case KMessageBox::Cancel : return false; + } + } }