summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp1
-rw-r--r--noncore/apps/opie-console/modemconfigwidget.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index ccecdf8..c44b359 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -369,48 +369,49 @@ void MainWindow::populateScripts() {
369 } 369 }
370 370
371} 371}
372 372
373MainWindow::~MainWindow() { 373MainWindow::~MainWindow() {
374 delete m_factory; 374 delete m_factory;
375 manager()->save(); 375 manager()->save();
376} 376}
377 377
378MetaFactory* MainWindow::factory() { 378MetaFactory* MainWindow::factory() {
379 return m_factory; 379 return m_factory;
380} 380}
381 381
382Session* MainWindow::currentSession() { 382Session* MainWindow::currentSession() {
383 return m_curSession; 383 return m_curSession;
384} 384}
385 385
386QList<Session> MainWindow::sessions() { 386QList<Session> MainWindow::sessions() {
387 return m_sessions; 387 return m_sessions;
388} 388}
389 389
390void MainWindow::slotNew() { 390void MainWindow::slotNew() {
391 ProfileEditorDialog dlg(factory() ); 391 ProfileEditorDialog dlg(factory() );
392 dlg.showMaximized(); 392 dlg.showMaximized();
393 dlg.setCaption( tr("New Connection") );
393 int ret = dlg.exec(); 394 int ret = dlg.exec();
394 395
395 if ( ret == QDialog::Accepted ) { 396 if ( ret == QDialog::Accepted ) {
396 create( dlg.profile() ); 397 create( dlg.profile() );
397 } 398 }
398} 399}
399 400
400void MainWindow::slotRecordScript() { 401void MainWindow::slotRecordScript() {
401 if (currentSession()) { 402 if (currentSession()) {
402 currentSession()->emulationHandler()->startRecording(); 403 currentSession()->emulationHandler()->startRecording();
403 m_saveScript->setEnabled(true); 404 m_saveScript->setEnabled(true);
404 m_recordScript->setEnabled(false); 405 m_recordScript->setEnabled(false);
405 } 406 }
406} 407}
407 408
408void MainWindow::slotSaveScript() { 409void MainWindow::slotSaveScript() {
409 if (currentSession() && currentSession()->emulationHandler()->isRecording()) { 410 if (currentSession() && currentSession()->emulationHandler()->isRecording()) {
410 QMap<QString, QStringList> map; 411 QMap<QString, QStringList> map;
411 QStringList text; 412 QStringList text;
412 text << "text/plain"; 413 text << "text/plain";
413 map.insert(tr("Script"), text ); 414 map.insert(tr("Script"), text );
414 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 415 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
415 if (!filename.isEmpty()) { 416 if (!filename.isEmpty()) {
416 QFileInfo info(filename); 417 QFileInfo info(filename);
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp
index da5db83..ec83b9f 100644
--- a/noncore/apps/opie-console/modemconfigwidget.cpp
+++ b/noncore/apps/opie-console/modemconfigwidget.cpp
@@ -17,48 +17,49 @@ namespace {
17 bo->setCurrentItem( i ); 17 bo->setCurrentItem( i );
18 return; 18 return;
19 } 19 }
20 } 20 }
21 bo->insertItem( str ); 21 bo->insertItem( str );
22 bo->setCurrentItem( b ); 22 bo->setCurrentItem( b );
23 } 23 }
24} 24}
25 25
26ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent, 26ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent,
27 const char* na ) 27 const char* na )
28 : ProfileDialogConnectionWidget( name, parent, na ) { 28 : ProfileDialogConnectionWidget( name, parent, na ) {
29 29
30 m_lay = new QVBoxLayout( this ); 30 m_lay = new QVBoxLayout( this );
31 m_device = new QLabel(tr( "Modem is attached to:" ), this ); 31 m_device = new QLabel(tr( "Modem is attached to:" ), this );
32 m_deviceCmb = new QComboBox(this ); 32 m_deviceCmb = new QComboBox(this );
33 m_deviceCmb->setEditable( TRUE ); 33 m_deviceCmb->setEditable( TRUE );
34 34
35 QLabel* telLabel = new QLabel( this ); 35 QLabel* telLabel = new QLabel( this );
36 telLabel->setText( tr( "Enter telefon number here:" ) ); 36 telLabel->setText( tr( "Enter telefon number here:" ) );
37 m_telNumber = new QLineEdit( this ); 37 m_telNumber = new QLineEdit( this );
38 QHBox *buttonBox = new QHBox( this ); 38 QHBox *buttonBox = new QHBox( this );
39 QPushButton *atButton = new QPushButton( buttonBox ); 39 QPushButton *atButton = new QPushButton( buttonBox );
40 atButton->setText( tr( "AT commands" ) ); 40 atButton->setText( tr( "AT commands" ) );
41 // disabled for now
41 atButton->hide(); 42 atButton->hide();
42 connect( atButton, SIGNAL( clicked() ), this, SLOT( slotAT() ) ); 43 connect( atButton, SIGNAL( clicked() ), this, SLOT( slotAT() ) );
43 44
44 QPushButton *dialButton = new QPushButton( buttonBox ); 45 QPushButton *dialButton = new QPushButton( buttonBox );
45 dialButton->setText( tr( "Enter number" ) ); 46 dialButton->setText( tr( "Enter number" ) );
46 connect( dialButton, SIGNAL( clicked() ), this, SLOT( slotDial() ) ); 47 connect( dialButton, SIGNAL( clicked() ), this, SLOT( slotDial() ) );
47 48
48 49
49 m_base = new IOLayerBase( this, "base" ); 50 m_base = new IOLayerBase( this, "base" );
50 51
51 m_lay->addWidget( m_device ); 52 m_lay->addWidget( m_device );
52 m_lay->addWidget( m_deviceCmb ); 53 m_lay->addWidget( m_deviceCmb );
53 m_lay->addWidget( telLabel ); 54 m_lay->addWidget( telLabel );
54 m_lay->addWidget( m_telNumber ); 55 m_lay->addWidget( m_telNumber );
55 m_lay->addWidget( buttonBox ); 56 m_lay->addWidget( buttonBox );
56 m_lay->addWidget( m_base ); 57 m_lay->addWidget( m_base );
57 58
58 m_deviceCmb->insertItem( "/dev/ttyS0" ); 59 m_deviceCmb->insertItem( "/dev/ttyS0" );
59 m_deviceCmb->insertItem( "/dev/ttyS1" ); 60 m_deviceCmb->insertItem( "/dev/ttyS1" );
60 m_deviceCmb->insertItem( "/dev/ttyS2" ); 61 m_deviceCmb->insertItem( "/dev/ttyS2" );
61 62
62 atConf = new ATConfigDialog( this, "ATConfig", true ); 63 atConf = new ATConfigDialog( this, "ATConfig", true );
63} 64}
64 65