summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-09-07 21:08:46 (UTC)
committer mickeyl <mickeyl>2004-09-07 21:08:46 (UTC)
commit9c92eb6569b2b3bcb1ad4a2edb2ad263ec9feaa4 (patch) (unidiff)
tree4a67a2a2129060582f8b9f020e19199d18d1c173
parent16d38d11f57750551530017e92ba267fa55ebbac (diff)
downloadopie-9c92eb6569b2b3bcb1ad4a2edb2ad263ec9feaa4.zip
opie-9c92eb6569b2b3bcb1ad4a2edb2ad263ec9feaa4.tar.gz
opie-9c92eb6569b2b3bcb1ad4a2edb2ad263ec9feaa4.tar.bz2
an attempt to fix #1393 - line wrap issues - at least for the default profile.
i can't see a connectio from the emulation handler back to the GUI so it's probably still broken for non-default profiles
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp2
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp20
2 files changed, 7 insertions, 15 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index c8022b9..956ac76 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -13,7 +13,7 @@ EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const c
13 m_teWid = new TEWidget( parent, "TerminalMain"); 13 m_teWid = new TEWidget( parent, "TerminalMain");
14 // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar) 14 // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar)
15 // use setWrapAt(80) for normal console with scrollbar 15 // use setWrapAt(80) for normal console with scrollbar
16 setWrap(prof.readNumEntry("Wrap", 0) ? 0 : 80); 16 setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80);
17 m_teWid->setMinimumSize(150, 70 ); 17 m_teWid->setMinimumSize(150, 70 );
18 m_script = 0; 18 m_script = 0;
19 parent->resize( m_teWid->calcSize(80, 24 ) ); 19 parent->resize( m_teWid->calcSize(80, 24 ) );
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index b160604..15290ce 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -141,9 +141,10 @@ void MainWindow::initUI() {
141 /* 141 /*
142 * immediate change of line wrap policy 142 * immediate change of line wrap policy
143 */ 143 */
144 m_isWrapped = false; 144 m_isWrapped = true;
145 m_wrap = new QAction( tr("Line wrap"), Resource::loadPixmap( "linewrap" ), QString::null, 0, this, 0 ); 145 m_wrap = new QAction( tr("Line wrap"), Resource::loadPixmap( "linewrap" ), QString::null, 0, this, 0, true );
146 m_wrap->addTo( m_console ); 146 m_wrap->addTo( m_console );
147 m_wrap->setOn( true );
147 connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) ); 148 connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) );
148 149
149 /* 150 /*
@@ -152,7 +153,7 @@ void MainWindow::initUI() {
152 m_isFullscreen = false; 153 m_isFullscreen = false;
153 154
154 m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" ) 155 m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" )
155 , QString::null, 0, this, 0); 156 , QString::null, 0, this, 0, true );
156 m_fullscreen->addTo( m_console ); 157 m_fullscreen->addTo( m_console );
157 connect( m_fullscreen, SIGNAL( activated() ), 158 connect( m_fullscreen, SIGNAL( activated() ),
158 this, SLOT( slotFullscreen() ) ); 159 this, SLOT( slotFullscreen() ) );
@@ -534,7 +535,6 @@ void MainWindow::create( const Profile& prof ) {
534 slotConnect(); 535 slotConnect();
535 } 536 }
536 537
537
538 QWidget *w = currentSession()->widget(); 538 QWidget *w = currentSession()->widget();
539 if(w) w->setFocus(); 539 if(w) w->setFocus();
540 540
@@ -634,16 +634,8 @@ void MainWindow::slotWrap()
634 EmulationHandler *e = m_curSession->emulationHandler(); 634 EmulationHandler *e = m_curSession->emulationHandler();
635 if(e) 635 if(e)
636 { 636 {
637 if(m_isWrapped) 637 e->setWrap( m_isWrapped ? 80:0 );
638 { 638 m_isWrapped = !m_isWrapped;
639 e->setWrap(80);
640 m_isWrapped = false;
641 }
642 else
643 {
644 e->setWrap(0);
645 m_isWrapped = true;
646 }
647 } 639 }
648 } 640 }
649} 641}