Tabbar button for closing tabs, patch by Kurt V. Hindenburg (#77875)

svn path=/trunk/kdebase/konsole/; revision=309165
wilder-portage
Stephan Binner 22 years ago
parent cf55816029
commit 8f91a2ddaf
  1. 9
      konsole/konsole.cpp
  2. 1
      konsole/konsole.h

@ -258,6 +258,7 @@ Konsole::Konsole(const char* name, const QString& _program, QStrList & _args, in
,m_histSize(DEFAULT_HISTORY_SIZE)
,m_separator_id(-1)
,m_newSessionButton(0)
,m_removeSessionButton(0)
{
isRestored = b_inRestore;
connect( kapp,SIGNAL(backgroundChanged(int)),this, SLOT(slotBackgroundChanged(int)));
@ -913,6 +914,14 @@ void Konsole::makeTabWidget()
connect(m_newSessionButton, SIGNAL(clicked()), SLOT(newSession()));
tabwidget->setCornerWidget( m_newSessionButton, BottomLeft );
m_newSessionButton->installEventFilter(this);
m_removeSessionButton = new QToolButton( tabwidget );
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()));
tabwidget->setCornerWidget( m_removeSessionButton, BottomRight );
}
}

@ -414,6 +414,7 @@ private:
TESession* m_contextMenuSession;
QToolButton* m_newSessionButton;
QToolButton* m_removeSessionButton;
QPoint m_newSessionButtonMousePressPos;
};

Loading…
Cancel
Save