summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp74
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
@@ -9,9 +9,9 @@
9 9
10#include <qpe/filemanager.h> 10#include <qpe/filemanager.h>
11#include <qpe/qpeapplication.h> 11#include <qpe/qpeapplication.h>
12 12
13#include <opie/ofiledialog.h> 13#include <opie2/ofiledialog.h>
14 14
15#include "TEmulation.h" 15#include "TEmulation.h"
16#include "profileeditordialog.h" 16#include "profileeditordialog.h"
17#include "configdialog.h" 17#include "configdialog.h"
@@ -332,9 +332,9 @@ void MainWindow::slotSaveScript() {
332 QMap<QString, QStringList> map; 332 QMap<QString, QStringList> map;
333 QStringList text; 333 QStringList text;
334 text << "text/plain"; 334 text << "text/plain";
335 map.insert(tr("Script"), text ); 335 map.insert(tr("Script"), text );
336 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 336 QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
337 if (!filename.isEmpty()) { 337 if (!filename.isEmpty()) {
338 QFileInfo info(filename); 338 QFileInfo info(filename);
339 if (info.extension(FALSE) != "script") 339 if (info.extension(FALSE) != "script")
340 filename += ".script"; 340 filename += ".script";
@@ -446,10 +446,10 @@ void MainWindow::slotClose() {
446 return; 446 return;
447 447
448 Session* ses = currentSession(); 448 Session* ses = currentSession();
449 qWarning("removing! currentSession %s", currentSession()->name().latin1() ); 449 qWarning("removing! currentSession %s", currentSession()->name().latin1() );
450 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ 450 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */
451 m_curSession = NULL; 451 m_curSession = NULL;
452 tabWidget()->remove( /*currentSession()*/ses ); 452 tabWidget()->remove( /*currentSession()*/ses );
453 /*it's autodelete */ 453 /*it's autodelete */
454 m_sessions.remove( ses ); 454 m_sessions.remove( ses );
455 qWarning("after remove!!"); 455 qWarning("after remove!!");
@@ -482,21 +482,21 @@ void MainWindow::slotProfile( int id) {
482 482
483 483
484 484
485void MainWindow::create( const Profile& prof ) { 485void MainWindow::create( const Profile& prof ) {
486 if(m_curSession) 486 if(m_curSession)
487 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); 487 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
488 488
489 Session *ses = manager()->fromProfile( prof, tabWidget() ); 489 Session *ses = manager()->fromProfile( prof, tabWidget() );
490 490
491 if((!ses) || (!ses->layer()) || (!ses->widgetStack())) 491 if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
492 { 492 {
493 QMessageBox::warning(this, 493 QMessageBox::warning(this,
494 QObject::tr("Session failed"), 494 QObject::tr("Session failed"),
495 QObject::tr("<qt>Cannot open session: Not all components were found.</qt>")); 495 QObject::tr("<qt>Cannot open session: Not all components were found.</qt>"));
496 //if(ses) delete ses; 496 //if(ses) delete ses;
497 return; 497 return;
498 } 498 }
499 499
500 m_sessions.append( ses ); 500 m_sessions.append( ses );
501 tabWidget()->add( ses ); 501 tabWidget()->add( ses );
502 tabWidget()->repaint(); 502 tabWidget()->repaint();
@@ -535,18 +535,18 @@ void MainWindow::create( const Profile& prof ) {
535 535
536void MainWindow::slotTransfer() 536void MainWindow::slotTransfer()
537{ 537{
538 if ( currentSession() ) { 538 if ( currentSession() ) {
539 Session *mysession = currentSession(); 539 Session *mysession = currentSession();
540 TransferDialog dlg(/*mysession->widgetStack()*/this, this); 540 TransferDialog dlg(/*mysession->widgetStack()*/this, this);
541 mysession->setTransferDialog(&dlg); 541 mysession->setTransferDialog(&dlg);
542 //dlg.reparent(mysession->widgetStack(), QPoint(0, 0)); 542 //dlg.reparent(mysession->widgetStack(), QPoint(0, 0));
543 //dlg.showMaximized(); 543 //dlg.showMaximized();
544 currentSession()->widgetStack()->addWidget(&dlg, -1); 544 currentSession()->widgetStack()->addWidget(&dlg, -1);
545 dlg.show(); 545 dlg.show();
546 //dlg.exec(); 546 //dlg.exec();
547 while(dlg.isRunning()) qApp->processEvents(); 547 while(dlg.isRunning()) qApp->processEvents();
548 mysession->setTransferDialog(0l); 548 mysession->setTransferDialog(0l);
549 } 549 }
550} 550}
551 551
552 552
@@ -571,12 +571,12 @@ void MainWindow::slotOpenButtons( bool state ) {
571 571
572void MainWindow::slotSessionChanged( Session* ses ) { 572void MainWindow::slotSessionChanged( Session* ses ) {
573 qWarning("changed!"); 573 qWarning("changed!");
574 574
575 if(m_curSession) 575 if(m_curSession)
576 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); 576 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
577 if(ses) 577 if(ses)
578 if(ses->transferDialog()) ses->transferDialog()->show(); 578 if(ses->transferDialog()) ses->transferDialog()->show();
579 579
580 if ( ses ) { 580 if ( ses ) {
581 m_curSession = ses; 581 m_curSession = ses;
582 qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); 582 qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) );
@@ -620,17 +620,17 @@ void MainWindow::slotWrap()
620 EmulationHandler *e = m_curSession->emulationHandler(); 620 EmulationHandler *e = m_curSession->emulationHandler();
621 if(e) 621 if(e)
622 { 622 {
623 if(m_isWrapped) 623 if(m_isWrapped)
624 { 624 {
625 e->setWrap(80); 625 e->setWrap(80);
626 m_isWrapped = false; 626 m_isWrapped = false;
627 } 627 }
628 else 628 else
629 { 629 {
630 e->setWrap(0); 630 e->setWrap(0);
631 m_isWrapped = true; 631 m_isWrapped = true;
632 } 632 }
633 } 633 }
634 } 634 }
635} 635}
636 636
@@ -705,9 +705,9 @@ void MainWindow::slotSaveHistory() {
705 QMap<QString, QStringList> map; 705 QMap<QString, QStringList> map;
706 QStringList text; 706 QStringList text;
707 text << "text/plain"; 707 text << "text/plain";
708 map.insert(tr("History"), text ); 708 map.insert(tr("History"), text );
709 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 709 QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
710 if (filename.isEmpty() ) return; 710 if (filename.isEmpty() ) return;
711 711
712 QFileInfo info(filename); 712 QFileInfo info(filename);
713 713