Bug 62568 - [PATCH] Allow closing current session in 'Really Quit?' dialog
Summary: [PATCH] Allow closing current session in 'Really Quit?' dialog
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-12 19:55 UTC by Andreas Leuner
Modified: 2003-11-02 18:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
adds 'close session' button to 'Really Quit?' dialog (1.38 KB, patch)
2003-08-12 20:00 UTC, Andreas Leuner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Leuner 2003-08-12 19:55:29 UTC
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.
Comment 1 Andreas Leuner 2003-08-12 20:00:08 UTC
Created attachment 2223 [details]
adds 'close session' button to 'Really Quit?' dialog

This patch does not even need new i18n strings.
Comment 2 Andreas Leuner 2003-08-12 20:07:37 UTC
This patch also applies to KDE_3_1_BRANCH (not tested, but should work anyway) 
Comment 3 Dirk Mueller 2003-11-02 18:12:37 UTC
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; 
+            }
+        }
     }