summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -4,25 +4,25 @@
#include "script.h"
/* OPIE */
#include <opie2/odebug.h>
using namespace Opie::Core;
EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name )
: QObject(0, name )
{
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 ) );
m_teEmu = new TEmuVt102(m_teWid );
connect(m_teEmu,SIGNAL(ImageSizeChanged(int,int) ),
this, SIGNAL(changeSize(int,int) ) );
connect(m_teEmu, SIGNAL(sndBlock(const char*,int) ),
this, SLOT(recvEmulation(const char*,int) ) );
m_teEmu->setConnect( true );
m_teEmu->setHistory( TRUE );
load( prof );
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
@@ -132,36 +132,37 @@ void MainWindow::initUI() {
m_transfer = new QAction( tr("Transfer file..."), Resource::loadPixmap("pass") , QString::null,
0, this, 0 );
m_transfer->addTo( m_console );
connect(m_transfer, SIGNAL(activated() ),
this, SLOT(slotTransfer() ) );
/*
* 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() ) );
/*
* fullscreen
*/
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() ) );
m_console->insertSeparator();
QAction *a = new QAction();
a->setText( tr("Save history") );
a->addTo( m_console );
connect(a, SIGNAL(activated() ),
this, SLOT(slotSaveHistory() ) );
/*
@@ -525,25 +526,24 @@ void MainWindow::create( const Profile& prof ) {
m_closewindow->setEnabled( true );
m_transfer->setEnabled( false );
m_recordScript->setEnabled( false );
m_saveScript->setEnabled( false );
m_scripts->setItemEnabled(m_runScript_id, false);
// is io_layer wants direct connection, then autoconnect
//if ( ( m_curSession->layer() )->supports()[0] == 1 ) {
if (prof.autoConnect()) {
slotConnect();
}
-
QWidget *w = currentSession()->widget();
if(w) w->setFocus();
if(currentSession()->profile().readNumEntry("Wrap", 80)){
m_isWrapped = true;
} else {
m_isWrapped = false;
}
m_kb->load(currentSession()->profile());
}
@@ -625,34 +625,26 @@ void MainWindow::slotSessionChanged( Session* ses ) {
m_kb->load(currentSession()->profile());
}
}
void MainWindow::slotWrap()
{
if(m_curSession)
{
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;
}
}
}
void MainWindow::slotFullscreen() {
if ( m_isFullscreen ) {
( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true );
( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() );
( m_curSession->emulationHandler() )->cornerButton()->hide();