summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (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
m_teWid = new TEWidget( parent, "TerminalMain");
// use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar)
// use setWrapAt(80) for normal console with scrollbar
- setWrap(prof.readNumEntry("Wrap", 0) ? 0 : 80);
+ setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80);
m_teWid->setMinimumSize(150, 70 );
m_script = 0;
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() {
/*
* immediate change of line wrap policy
*/
- m_isWrapped = false;
- m_wrap = new QAction( tr("Line wrap"), Resource::loadPixmap( "linewrap" ), QString::null, 0, this, 0 );
+ m_isWrapped = true;
+ m_wrap = new QAction( tr("Line wrap"), Resource::loadPixmap( "linewrap" ), QString::null, 0, this, 0, true );
m_wrap->addTo( m_console );
+ m_wrap->setOn( true );
connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) );
/*
@@ -152,7 +153,7 @@ void MainWindow::initUI() {
m_isFullscreen = false;
m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" )
- , QString::null, 0, this, 0);
+ , QString::null, 0, this, 0, true );
m_fullscreen->addTo( m_console );
connect( m_fullscreen, SIGNAL( activated() ),
this, SLOT( slotFullscreen() ) );
@@ -534,7 +535,6 @@ void MainWindow::create( const Profile& prof ) {
slotConnect();
}
-
QWidget *w = currentSession()->widget();
if(w) w->setFocus();
@@ -634,16 +634,8 @@ void MainWindow::slotWrap()
EmulationHandler *e = m_curSession->emulationHandler();
if(e)
{
- if(m_isWrapped)
- {
- e->setWrap(80);
- m_isWrapped = false;
- }
- else
- {
- e->setWrap(0);
- m_isWrapped = true;
- }
+ e->setWrap( m_isWrapped ? 80:0 );
+ m_isWrapped = !m_isWrapped;
}
}
}