[Konsole-devel] [Bug 129514] Add confirmation dialog to "Close session" menu item
Kurt V.Hindenburg
kurt.hindenburg at kdemail.net
Wed Jun 21 16:29:44 UTC 2006
------- 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
kurt.hindenburg kdemail net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From kurt.hindenburg kdemail net 2006-06-21 18:29 -------
SVN commit 553664 by hindenburg:
RMB->Close Session and tabbar menu->Close Session now uses the
Close Confirmation Dialog.
Will forward port once I get KDE4 compiling again.
BUG: 129514
M +6 -4 konsole.cpp
M +1 -1 konsole.h
--- branches/KDE/3.5/kdebase/konsole/konsole/konsole.cpp #553663:553664
@ -1109,7 +1109,7 @
// "Configure Shortcuts").
m_closeSession = new KAction(i18n("C&lose Session"), "fileclose", 0, this,
- SLOT(closeCurrentSession()), m_shortcuts, "close_session");
+ SLOT(confirmCloseCurrentSession()), m_shortcuts, "close_session");
m_print = new KAction(i18n("&Print Screen..."), "fileprint", 0, this, SLOT( slotPrint() ), m_shortcuts, "file_print");
m_quit = new KAction(i18n("&Quit"), "exit", 0, this, SLOT( close() ), m_shortcuts, "file_quit");
@ -1340,7 +1340,7 @
void Konsole::slotTabCloseSession()
{
- m_contextMenuSession->closeSession();
+ confirmCloseCurrentSession(m_contextMenuSession);
}
void Konsole::slotTabbarContextMenu(const QPoint & pos)
@ -2975,13 +2975,15 @
*/
}
-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()
--- branches/KDE/3.5/kdebase/konsole/konsole/konsole.h #553663:553664
@ -139,7 +139,7 @
void activateSession();
void activateSession(TESession*);
void closeCurrentSession();
- void confirmCloseCurrentSession();
+ void confirmCloseCurrentSession(TESession* _se=0);
void doneSession(TESession*);
void slotCouldNotClose();
void toggleFullScreen();
More information about the konsole-devel
mailing list