summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-24 14:02:21 (UTC)
committer harlekin <harlekin>2002-10-24 14:02:21 (UTC)
commita33f6eae4730a7ca0bec18b72becd3bc73a20aa5 (patch) (side-by-side diff)
tree2bc87e75f01105ed3b5caa03743f682bb8403897
parent9de347605b9457a0d5b56e1f951c143a71acf6ac (diff)
downloadopie-a33f6eae4730a7ca0bec18b72becd3bc73a20aa5.zip
opie-a33f6eae4730a7ca0bec18b72becd3bc73a20aa5.tar.gz
opie-a33f6eae4730a7ca0bec18b72becd3bc73a20aa5.tar.bz2
de- /active script entries right
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/BUGS3
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp22
2 files changed, 22 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/BUGS b/noncore/apps/opie-console/BUGS
index 8195dc5..694bc8b 100644
--- a/noncore/apps/opie-console/BUGS
+++ b/noncore/apps/opie-console/BUGS
@@ -8,25 +8,28 @@ Send/receive: lrzsz behaves strange when trying to use
- transfer dialog is still a top dialog instead on the widgetstack of of the
connection its used on
- keys and buttonbar merge
- keys really working
mc is working
but F11 on bar seems to be the F10 key and so on
F9 is F8... -zecke
Should be fixed -zecke
- scripting with "direct subpopup"
also:
- an indication that it is currently recording, also change menu entry to
"cancel recording" then
- scripts need an extension and also an icon
- help documentation needs to be extended
- new connection and save connection
- paste button
- keys button
+- dial dialog - ugly , better use a qlineedit there to for showing or
+ disable
+
- exit / strg + d does not close conection / tab \ No newline at end of file
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index c7750be..406586c 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -316,58 +316,64 @@ void MainWindow::slotRunScript() {
MimeTypes types;
QStringList script;
script << "text/plain";
script << "text/all";
script << "application/octet-stream";
types.insert("Script", script);
QString filename = OFileDialog::getOpenFileName(2, "/", QString::null, types);
if (!filename.isEmpty()) {
Script script(DocLnk(filename).file());
currentSession()->emulationHandler()->runScript(&script);
}
}
}
void MainWindow::slotConnect() {
if ( currentSession() ) {
bool ret = currentSession()->layer()->open();
if(!ret) QMessageBox::warning(currentSession()->widgetStack(),
QObject::tr("Failed"),
QObject::tr("Connecting failed for this session."));
else {
m_connect->setEnabled( false );
m_disconnect->setEnabled( true );
m_transfer->setEnabled( true );
+ m_recordScript->setEnabled( true );
+ m_saveScript->setEnabled( true );
+ m_runScript->setEnabled( true );
}
}
}
void MainWindow::slotDisconnect() {
if ( currentSession() ) {
currentSession()->layer()->close();
m_connect->setEnabled( true );
m_disconnect->setEnabled( false );
m_transfer->setEnabled( false );
+ m_recordScript->setEnabled( false);
+ m_saveScript->setEnabled( false );
+ m_runScript->setEnabled( false );
}
}
void MainWindow::slotTerminate() {
if ( currentSession() )
currentSession()->layer()->close();
slotClose();
/* FIXME move to the next session */
}
void MainWindow::slotConfigure() {
ConfigDialog conf( manager()->all(), factory() );
conf.showMaximized();
int ret = conf.exec();
if ( QDialog::Accepted == ret ) {
manager()->setProfiles( conf.list() );
manager()->save();
populateProfiles();
}
}
/*
@@ -412,54 +418,54 @@ void MainWindow::slotProfile( int id) {
Profile prof = manager()->profile( m_sessionsPop->text( id) );
create( prof );
}
void MainWindow::create( const Profile& prof ) {
Session *ses = manager()->fromProfile( prof, tabWidget() );
if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
{
QMessageBox::warning(this,
QObject::tr("Session failed"),
QObject::tr("<qt>Cannot open session: Not all components were found.</qt>"));
//if(ses) delete ses;
return;
}
m_sessions.append( ses );
tabWidget()->add( ses );
tabWidget()->repaint();
m_curSession = ses;
// dicide if its a local term ( then no connction and no tranfer), maybe make a wrapper method out of it
m_connect->setEnabled( true );
m_disconnect->setEnabled( false );
m_terminate->setEnabled( true );
- m_recordScript->setEnabled( true );
- m_saveScript->setEnabled( true );
- m_runScript->setEnabled( true );
m_fullscreen->setEnabled( true );
m_closewindow->setEnabled( true );
m_transfer->setEnabled( false );
+ m_recordScript->setEnabled( false );
+ m_saveScript->setEnabled( false );
+ m_runScript->setEnabled( 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();
}
void MainWindow::slotTransfer()
{
if ( currentSession() ) {
TransferDialog dlg(currentSession()->widgetStack(), this);
dlg.showMaximized();
//currentSession()->widgetStack()->add(dlg);
dlg.exec();
}
}
@@ -469,59 +475,69 @@ void MainWindow::slotOpenKeb(bool state) {
else m_keyBar->hide();
}
void MainWindow::slotOpenButtons( bool state ) {
if ( state ) {
m_buttonBar->show();
} else {
m_buttonBar->hide();
}
}
void MainWindow::slotSessionChanged( Session* ses ) {
qWarning("changed!");
if ( ses ) {
m_curSession = ses;
qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) );
if ( m_curSession->layer()->isConnected() ) {
m_connect->setEnabled( false );
m_disconnect->setEnabled( true );
+ m_recordScript->setEnabled( true );
+ m_saveScript->setEnabled( true );
+ m_runScript->setEnabled( true );
} else {
m_connect->setEnabled( true );
m_disconnect->setEnabled( false );
+ m_recordScript->setEnabled( false );
+ m_saveScript->setEnabled( false );
+ m_runScript->setEnabled( false );
}
if ( ( m_curSession->layer() )->supports()[1] == 0 ) {
m_transfer->setEnabled( false );
} else {
m_transfer->setEnabled( true );
}
+
+
+
+
QWidget *w = m_curSession->widget();
if(w) w->setFocus();
}
}
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();
disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
} else {
savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget();
( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop
, QPoint(0,0), false );
( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() );
( m_curSession->widgetStack() )->setFocus();
( m_curSession->widgetStack() )->show();