Confirmation when closing session with tabbar button (Ã#83316)

svn path=/trunk/kdebase/konsole/; revision=327682
wilder-portage
Stephan Binner 22 years ago
parent 24031325a2
commit ca780145bb
  1. 13
      konsole/konsole.cpp
  2. 1
      konsole/konsole.h

@ -908,7 +908,7 @@ void Konsole::makeTabWidget()
QToolTip::add(m_removeSessionButton,i18n("Close the current session"));
m_removeSessionButton->setIconSet( SmallIcon( "tab_remove" ) );
m_removeSessionButton->adjustSize();
connect(m_removeSessionButton, SIGNAL(clicked()), SLOT(closeCurrentSession()));
connect(m_removeSessionButton, SIGNAL(clicked()), SLOT(confirmCloseCurrentSession()));
tabwidget->setCornerWidget( m_removeSessionButton, BottomRight );
}
@ -1502,7 +1502,7 @@ void Konsole::readProperties(KConfig* config, const QString &schema, bool global
checkSoundSystem();
if ( !b_soundSystemEnabled && (n_bell == BELLNOTIFY) )
n_bell = BELLSYSTEM;
// Options that should be applied to all sessions /////////////
// (1) set menu items and Konsole members
@ -2783,6 +2783,15 @@ void Konsole::newSession(const QString& sURL, const QString& title)
*/
}
void Konsole::confirmCloseCurrentSession()
{
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();
}
void Konsole::closeCurrentSession()
{
se->closeSession();

@ -130,6 +130,7 @@ private slots:
void activateSession();
void activateSession(TESession*);
void closeCurrentSession();
void confirmCloseCurrentSession();
void doneChild(KonsoleChild*, TESession*);
void doneSession(TESession*);
void slotCouldNotClose();

Loading…
Cancel
Save