summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp7
-rw-r--r--noncore/apps/opie-console/emulation_handler.h2
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp43
-rw-r--r--noncore/apps/opie-console/mainwindow.h3
4 files changed, 54 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index e0f63cd..7924568 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -16,3 +16,3 @@ EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const c
16 // use setWrapAt(80) for normal console with scrollbar 16 // use setWrapAt(80) for normal console with scrollbar
17 m_teWid->setWrapAt(prof.readNumEntry("Wrap", 0) ? 0 : 80); 17 setWrap(prof.readNumEntry("Wrap", 0) ? 0 : 80);
18 m_teWid->setMinimumSize(150, 70 ); 18 m_teWid->setMinimumSize(150, 70 );
@@ -201 +201,6 @@ void EmulationHandler::paste() {
201} 201}
202
203void EmulationHandler::setWrap(int columns) {
204 m_teWid->setWrapAt(columns);
205}
206
diff --git a/noncore/apps/opie-console/emulation_handler.h b/noncore/apps/opie-console/emulation_handler.h
index 12abbc5..7bc6f16 100644
--- a/noncore/apps/opie-console/emulation_handler.h
+++ b/noncore/apps/opie-console/emulation_handler.h
@@ -68,2 +68,4 @@ public:
68 68
69 /* Propagate change to widget */
70 void setWrap(int columns);
69signals: 71signals:
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 936b1b2..d221715 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -223,2 +223,9 @@ void MainWindow::initUI() {
223 223
224 /*
225 * immediate change of line wrap policy
226 */
227 m_isWrapped = false;
228 m_wrap = new QAction( tr("Line wrap"), Resource::loadPixmap( "linewrap" ), QString::null, 0, this, 0 );
229 m_wrap->addTo( m_console );
230 connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) );
224 231
@@ -326,2 +333,3 @@ void MainWindow::initUI() {
326 m_closewindow->setEnabled( false ); 333 m_closewindow->setEnabled( false );
334 m_wrap->setEnabled( false );
327 335
@@ -527,2 +535,3 @@ void MainWindow::slotClose() {
527 m_fullscreen->setEnabled( false ); 535 m_fullscreen->setEnabled( false );
536 m_wrap->setEnabled( false );
528 m_closewindow->setEnabled( false ); 537 m_closewindow->setEnabled( false );
@@ -567,2 +576,3 @@ void MainWindow::create( const Profile& prof ) {
567 m_fullscreen->setEnabled( true ); 576 m_fullscreen->setEnabled( true );
577 m_wrap->setEnabled( true );
568 m_closewindow->setEnabled( true ); 578 m_closewindow->setEnabled( true );
@@ -583,2 +593,8 @@ void MainWindow::create( const Profile& prof ) {
583 593
594 if(currentSession()->profile().readNumEntry("Wrap", 80)){
595 m_isWrapped = true;
596 } else {
597 m_isWrapped = false;
598 }
599
584 m_kb->load(currentSession()->profile()); 600 m_kb->load(currentSession()->profile());
@@ -656,2 +672,8 @@ void MainWindow::slotSessionChanged( Session* ses ) {
656 672
673 if(currentSession()->profile().readNumEntry("Wrap", 80)){
674 m_isWrapped = true;
675 } else {
676 m_isWrapped = false;
677 }
678
657 m_kb->load(currentSession()->profile()); 679 m_kb->load(currentSession()->profile());
@@ -660,2 +682,23 @@ void MainWindow::slotSessionChanged( Session* ses ) {
660 682
683void MainWindow::slotWrap()
684{
685 if(m_curSession)
686 {
687 EmulationHandler *e = m_curSession->emulationHandler();
688 if(e)
689 {
690 if(m_isWrapped)
691 {
692 e->setWrap(80);
693 m_isWrapped = false;
694 }
695 else
696 {
697 e->setWrap(0);
698 m_isWrapped = true;
699 }
700 }
701 }
702}
703
661void MainWindow::slotFullscreen() { 704void MainWindow::slotFullscreen() {
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h
index 3b16f0a..37219c5 100644
--- a/noncore/apps/opie-console/mainwindow.h
+++ b/noncore/apps/opie-console/mainwindow.h
@@ -69,2 +69,3 @@ private slots:
69 void slotFullscreen(); 69 void slotFullscreen();
70 void slotWrap();
70 void slotSessionChanged( Session* ); 71 void slotSessionChanged( Session* );
@@ -121,2 +122,3 @@ private:
121 QAction* m_fullscreen; 122 QAction* m_fullscreen;
123 QAction* m_wrap;
122 QAction* m_closewindow; 124 QAction* m_closewindow;
@@ -126,2 +128,3 @@ private:
126 bool m_isFullscreen; 128 bool m_isFullscreen;
129 bool m_isWrapped;
127 130