Make the New button a Delayed popup menu, and make it open a new session when clicking it.

It starts a new "Linux Console" right now. Would it be better to start a "Shell" session ?

svn path=/trunk/kdebase/konsole/; revision=56656
wilder-portage
Antonio Larrosa Jimenez 26 years ago
parent 4159a40b35
commit c8a022f8f7
  1. 1
      include/konsole.h
  2. 11
      src/konsole.C

@ -63,6 +63,7 @@ private slots:
void pixmap_menu_activated(int item);
void keytab_menu_activated(int item);
void tecRef();
void newSession();
void newSession(int kind);
void newSessionSelect();

@ -242,7 +242,11 @@ void Konsole::makeMenu()
newsession->plug(toolBar());
QObjectList *l = toolBar()->queryList( "KToolBarButton" );
if ( l && l->first() )
( (KToolBarButton*)l->first() )->setPopup( m_file );
{
( (KToolBarButton*)l->first() )->setDelayedPopup( m_file );
connect( (KToolBarButton*)l->first() , SIGNAL(clicked()), this, SLOT(newSession()));
}
delete l;
toolBar()->insertLineSeparator();
@ -855,6 +859,11 @@ void Konsole::newSessionSelect()
{
}
void Konsole::newSession()
{
newSession(1);
}
void Konsole::newSession(int i)
{
const char* shell = getenv("SHELL");

Loading…
Cancel
Save