summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2005-08-10 08:14:56 (UTC)
committer llornkcor <llornkcor>2005-08-10 08:14:56 (UTC)
commitae7eb0bd76bd93cee70f258f3c4aef1accee766c (patch) (unidiff)
tree08fa3a0118b258b51b8107608e9632bb51de763c
parentcfc9ff35215081a33adde29872553513d08f58bb (diff)
downloadopie-ae7eb0bd76bd93cee70f258f3c4aef1accee766c.zip
opie-ae7eb0bd76bd93cee70f258f3c4aef1accee766c.tar.gz
opie-ae7eb0bd76bd93cee70f258f3c4aef1accee766c.tar.bz2
add close session button
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp10
-rw-r--r--core/apps/embeddedkonsole/konsole.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 7f3ea65..f4ca0bf 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -619,15 +619,18 @@ void Konsole::init(const char* _pgm, QStrList & _args)
619 QString::null, 0, this, 0 ); 619 QString::null, 0, this, 0 );
620 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolBar ); 620 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolBar );
621 a = new QAction( tr("Down"), Opie::Core::OResource::loadPixmap( "konsole/down", Opie::Core::OResource::SmallIcon ), 621 a = new QAction( tr("Down"), Opie::Core::OResource::loadPixmap( "konsole/down", Opie::Core::OResource::SmallIcon ),
622 QString::null, 0, this, 0 ); 622 QString::null, 0, this, 0 );
623 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolBar ); 623 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolBar );
624 624
625 a = new QAction( tr("Paste"), Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ), 625 a = new QAction( tr("Paste"), Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
626 QString::null, 0, this, 0 );
627 connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) ); 626 connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) );
627
628 a = new QAction( tr("Close"), Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ),QString::null, 0, this, 0 );
629 connect( a, SIGNAL( activated() ), this, SLOT( closeSession() ) );
630
628 a->addTo( toolBar ); 631 a->addTo( toolBar );
629 632
630 secondToolBar = new QToolBar( this ); 633 secondToolBar = new QToolBar( this );
631 secondToolBar->setHorizontalStretchable( TRUE ); 634 secondToolBar->setHorizontalStretchable( TRUE );
632 635
633 commonCombo = new QComboBox( secondToolBar ); 636 commonCombo = new QComboBox( secondToolBar );
@@ -1913,6 +1916,9 @@ void Konsole::doWrap()
1913 { 1916 {
1914 // te->setWrapAt(90); 1917 // te->setWrapAt(90);
1915 te->setWrapAt(120); 1918 te->setWrapAt(120);
1916 configMenu->setItemChecked( cm_wrap,FALSE); 1919 configMenu->setItemChecked( cm_wrap,FALSE);
1917 } 1920 }
1918} 1921}
1922void Konsole::closeSession() {
1923 doneSession(getTe(), 0);
1924}
diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h
index e163cb8..40f5284 100644
--- a/core/apps/embeddedkonsole/konsole.h
+++ b/core/apps/embeddedkonsole/konsole.h
@@ -98,12 +98,13 @@ private slots:
98 void parseCommandLine(); 98 void parseCommandLine();
99 void changeForegroundColor(const QColor &); 99 void changeForegroundColor(const QColor &);
100 void changeBackgroundColor(const QColor &); 100 void changeBackgroundColor(const QColor &);
101 101
102 void historyDialog(); 102 void historyDialog();
103 void fullscreenTimeout(); 103 void fullscreenTimeout();
104 void closeSession();
104 105
105private: 106private:
106 void doWrap(); 107 void doWrap();
107 void init(const char* _pgm, QStrList & _args); 108 void init(const char* _pgm, QStrList & _args);
108 void initSession(const char* _pgm, QStrList & _args); 109 void initSession(const char* _pgm, QStrList & _args);
109 void runSession(TESession* s); 110 void runSession(TESession* s);