[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konsole-devel
Subject:    [Konsole-devel] [Bug 129514] Add confirmation dialog to "Close
From:       "Kurt V.Hindenburg" <kurt.hindenburg () kdemail ! net>
Date:       2006-07-03 17:17:16
Message-ID: 20060703171716.16224.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=129514         




------- Additional Comments From kurt.hindenburg kdemail net  2006-07-03 19:17 \
------- SVN commit 557634 by hindenburg:

RMB->Close Session and tabbar menu->Close Session now uses the 
Close Confirmation Dialog.

CCBUG: 129514


 M  +7 -4      konsole.cpp  
 M  +1 -1      konsole.h  


--- trunk/KDE/kdebase/apps/konsole/konsole/konsole.cpp #557633:557634
 @ -1135,7 +1135,7  @
      // "Configure Shortcuts").
 
   m_closeSession = new KAction(KIcon("fileclose"), i18n("C&lose Session"), \
                m_shortcuts, "close_session");
-  connect(m_closeSession, SIGNAL(triggered(bool) ), SLOT(closeCurrentSession()));
+  connect(m_closeSession, SIGNAL(triggered(bool) ), SLOT( \
confirmCloseCurrentSession() ));  m_print = new KAction(KIcon("fileprint"), \
i18n("&Print Screen..."), m_shortcuts, "file_print");  connect(m_print, \
SIGNAL(triggered(bool) ), SLOT( slotPrint() ));  m_quit = new KAction(KIcon("exit"), \
i18n("&Quit"), m_shortcuts, "file_quit");  @ -1393,7 +1393,7  @
 
 void Konsole::slotTabCloseSession()
 {
-  m_contextMenuSession->closeSession();
+  confirmCloseCurrentSession(m_contextMenuSession);
 }
 
 void Konsole::slotTabbarContextMenu(const QPoint & pos)
 @ -3001,13 +3001,16  @
    */
 }
 
-void Konsole::confirmCloseCurrentSession()
+void Konsole::confirmCloseCurrentSession( TESession* _se )
 {
+   if ( !_se )
+      _se = se;
+
   if (KMessageBox::warningContinueCancel(this,
         i18n("Are you sure that you want to close the current session?"),
         i18n("Close Confirmation"), KGuiItem(i18n("C&lose Session"),"tab_remove"),
         "ConfirmCloseSession")==KMessageBox::Continue)
-    closeCurrentSession();
+    _se->closeSession();
 }
 
 void Konsole::closeCurrentSession()
--- trunk/KDE/kdebase/apps/konsole/konsole/konsole.h #557633:557634
 @ -140,7 +140,7  @
   void activateSession();
   void activateSession(TESession*);
   void closeCurrentSession();
-  void confirmCloseCurrentSession();
+  void confirmCloseCurrentSession(TESession* _se=0);
   void doneSession(TESession*);
   void slotCouldNotClose();
   void toggleFullScreen();
_______________________________________________
konsole-devel mailing list
konsole-devel@kde.org
https://mail.kde.org/mailman/listinfo/konsole-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic