Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 3fe9040..0a475d8 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -7,13 +7,13 @@ #include <qwhatsthis.h> #include <qfileinfo.h> #include <qpe/filemanager.h> #include <qpe/qpeapplication.h> -#include <opie/ofiledialog.h> +#include <opie2/ofiledialog.h> #include "TEmulation.h" #include "profileeditordialog.h" #include "configdialog.h" #include "default.h" #include "profilemanager.h" @@ -330,13 +330,13 @@ void MainWindow::slotRecordScript() { void MainWindow::slotSaveScript() { if (currentSession() && currentSession()->emulationHandler()->isRecording()) { QMap<QString, QStringList> map; QStringList text; text << "text/plain"; map.insert(tr("Script"), text ); - QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); + QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); if (!filename.isEmpty()) { QFileInfo info(filename); if (info.extension(FALSE) != "script") filename += ".script"; DocLnk nf; nf.setType("text/plain"); @@ -444,14 +444,14 @@ void MainWindow::slotConfigure() { void MainWindow::slotClose() { if (!currentSession() ) return; Session* ses = currentSession(); qWarning("removing! currentSession %s", currentSession()->name().latin1() ); - /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ - m_curSession = NULL; + /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ + m_curSession = NULL; tabWidget()->remove( /*currentSession()*/ses ); /*it's autodelete */ m_sessions.remove( ses ); qWarning("after remove!!"); if (!currentSession() ) { @@ -480,25 +480,25 @@ void MainWindow::slotProfile( int id) { create( prof ); } void MainWindow::create( const Profile& prof ) { - if(m_curSession) - if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); + if(m_curSession) + if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); 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; - } + { + 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; @@ -533,22 +533,22 @@ void MainWindow::create( const Profile& prof ) { m_kb->load(currentSession()->profile()); } void MainWindow::slotTransfer() { if ( currentSession() ) { - Session *mysession = currentSession(); - TransferDialog dlg(/*mysession->widgetStack()*/this, this); - mysession->setTransferDialog(&dlg); - //dlg.reparent(mysession->widgetStack(), QPoint(0, 0)); - //dlg.showMaximized(); - currentSession()->widgetStack()->addWidget(&dlg, -1); - dlg.show(); - //dlg.exec(); - while(dlg.isRunning()) qApp->processEvents(); - mysession->setTransferDialog(0l); + Session *mysession = currentSession(); + TransferDialog dlg(/*mysession->widgetStack()*/this, this); + mysession->setTransferDialog(&dlg); + //dlg.reparent(mysession->widgetStack(), QPoint(0, 0)); + //dlg.showMaximized(); + currentSession()->widgetStack()->addWidget(&dlg, -1); + dlg.show(); + //dlg.exec(); + while(dlg.isRunning()) qApp->processEvents(); + mysession->setTransferDialog(0l); } } void MainWindow::slotOpenKeb(bool state) { @@ -569,16 +569,16 @@ void MainWindow::slotOpenButtons( bool state ) { void MainWindow::slotSessionChanged( Session* ses ) { qWarning("changed!"); - if(m_curSession) - if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); - if(ses) - if(ses->transferDialog()) ses->transferDialog()->show(); + if(m_curSession) + if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); + if(ses) + if(ses->transferDialog()) ses->transferDialog()->show(); if ( ses ) { m_curSession = ses; qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); if ( m_curSession->layer()->isConnected() ) { m_connect->setEnabled( false ); @@ -618,21 +618,21 @@ 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(80); + m_isWrapped = false; + } + else + { + e->setWrap(0); + m_isWrapped = true; + } } } } void MainWindow::slotFullscreen() { @@ -703,13 +703,13 @@ void MainWindow::slotSaveSession() { } void MainWindow::slotSaveHistory() { QMap<QString, QStringList> map; QStringList text; text << "text/plain"; map.insert(tr("History"), text ); - QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); + QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); if (filename.isEmpty() ) return; QFileInfo info(filename); DocLnk nf; nf.setType("text/plain"); |