author | hash <hash> | 2002-10-18 17:50:05 (UTC) |
---|---|---|
committer | hash <hash> | 2002-10-18 17:50:05 (UTC) |
commit | 351d2f95d3f5beba26e5879659ddafb84b0f98f4 (patch) (side-by-side diff) | |
tree | f48d66f766ca02950d6295ea00d912d40081c43d | |
parent | addfc9900cbf3da2cdbfa54ea849bc7f7fb1b296 (diff) | |
download | opie-351d2f95d3f5beba26e5879659ddafb84b0f98f4.zip opie-351d2f95d3f5beba26e5879659ddafb84b0f98f4.tar.gz opie-351d2f95d3f5beba26e5879659ddafb84b0f98f4.tar.bz2 |
always autoconnect bug fixed
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 27407d9..cf1fbc3 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -387,147 +387,147 @@ void MainWindow::slotClose() { m_terminate->setEnabled( false ); m_transfer->setEnabled( false ); m_recordScript->setEnabled( false ); m_saveScript->setEnabled( false ); m_runScript->setEnabled( false ); m_fullscreen->setEnabled( false ); m_closewindow->setEnabled( false ); } } /* * We will get the name * Then the profile * and then we will make a profile */ 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 ); 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_transfer->setEnabled( true ); m_recordScript->setEnabled( true ); m_saveScript->setEnabled( true ); m_runScript->setEnabled( true ); m_fullscreen->setEnabled( true ); m_closewindow->setEnabled( true ); // is io_layer wants direct connection, then autoconnect - if ( ( m_curSession->layer() )->supports()[0] = 1 ) { + if ( ( m_curSession->layer() )->supports()[0] == 1 ) { slotConnect(); } } void MainWindow::slotTransfer() { if ( currentSession() ) { TransferDialog dlg(currentSession()->widgetStack(), this); dlg.showMaximized(); //currentSession()->widgetStack()->add(dlg); dlg.exec(); } } void MainWindow::slotOpenKeb(bool state) { if (state) m_keyBar->show(); 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 ); } else { m_connect->setEnabled( true ); m_disconnect->setEnabled( false ); } } } void MainWindow::slotFullscreen() { if ( m_isFullscreen ) { ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), false ); ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); setCentralWidget( m_consoleWindow ); ( m_curSession->widgetStack() )->show(); ( 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(); ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); } m_isFullscreen = !m_isFullscreen; } void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool pressed, bool) { - qWarning("unicode: %x, qkey: %x, %s", u, q, pressed ? "pressed" : "released"); + //qWarning("unicode: %x, qkey: %x, %s", u, q, pressed ? "pressed" : "released"); if ( m_curSession ) { QEvent::Type state; if (pressed) state = QEvent::KeyPress; else state = QEvent::KeyRelease; QKeyEvent ke(state, q, u, 0, QString(QChar(u))); // where should i send this event? doesnt work sending it here QApplication::sendEvent((QObject *)m_curSession->widget(), &ke); ke.ignore(); } } |