-rw-r--r-- | noncore/apps/opie-console/atconfigdialog.cpp | 41 | ||||
-rw-r--r-- | noncore/apps/opie-console/atconfigdialog.h | 5 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_modem.cpp | 16 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/modemconfigwidget.cpp | 23 | ||||
-rw-r--r-- | noncore/apps/opie-console/modemconfigwidget.h | 6 |
6 files changed, 58 insertions, 39 deletions
diff --git a/noncore/apps/opie-console/atconfigdialog.cpp b/noncore/apps/opie-console/atconfigdialog.cpp index ef6d1ae..87a08f6 100644 --- a/noncore/apps/opie-console/atconfigdialog.cpp +++ b/noncore/apps/opie-console/atconfigdialog.cpp | |||
@@ -153,4 +153,4 @@ QWidget* ATConfigDialog::tab1( QWidget* parent ) { | |||
153 | 153 | ||
154 | void ATConfigDialog::readConfig() { | 154 | void ATConfigDialog::readConfig( const Profile& config ) { |
155 | /* | 155 | |
156 | initStringLine->setText( config.readEntry("InitString", MODEM_DEFAULT_INIT_STRING ) ); | 156 | initStringLine->setText( config.readEntry("InitString", MODEM_DEFAULT_INIT_STRING ) ); |
@@ -163,15 +163,32 @@ void ATConfigDialog::readConfig() { | |||
163 | dialSuf3Line->setText( config.readEntry("DialSuffix3", MODEM_DEFAULT_DIAL_SUFFIX1 ) ); | 163 | dialSuf3Line->setText( config.readEntry("DialSuffix3", MODEM_DEFAULT_DIAL_SUFFIX1 ) ); |
164 | connectLine->setText( config.readEntry("DefaultConnect" MODEM_DEFAULT_CONNECT_STRING ) ); | 164 | connectLine->setText( config.readEntry("DefaultConnect", MODEM_DEFAULT_CONNECT_STRING ) ); |
165 | hangupLine->setText( config.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) ); | 165 | hangupLine->setText( config.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) ); |
166 | dialTimeSpin; | 166 | dialTimeSpin->setValue( config.readNumEntry("DialTime", MODEM_DEFAULT_DIAL_TIME ) ); |
167 | delayRedialSpin; | 167 | delayRedialSpin->setValue( config.readNumEntry("DelayRedial", MODEM_DEFAULT_DELAY_REDIAL ) ); |
168 | numberTriesSpin; | 168 | numberTriesSpin->setValue( config.readNumEntry("NumberTries", MODEM_DEFAULT_NUMBER_TRIES ) ); |
169 | dtrDropTimeSpin; | 169 | dtrDropTimeSpin->setValue( config.readNumEntry("DTRDRopTime", MODEM_DEFAULT_DTR_DROP_TIME ) ); |
170 | bpsDetectBox; | 170 | bpsDetectBox->setCurrentItem( config.readBoolEntry("BPSDetect", MODEM_DEFAULT_BPS_DETECT ) ); |
171 | cdLinesBox; | 171 | dcdLinesBox->setCurrentItem( config.readBoolEntry("DCDLines", MODEM_DEFAULT_DCD_LINES ) ); |
172 | multiLineUntagBox; | 172 | multiLineUntagBox->setCurrentItem( config.readBoolEntry("MultiLineUntag", MODEM_DEFAULT_MULTI_LINE_UNTAG ) ); |
173 | */ | ||
174 | } | 173 | } |
175 | 174 | ||
176 | void ATConfigDialog::writeConfig() { | 175 | void ATConfigDialog::writeConfig( Profile& config ) { |
176 | |||
177 | config.writeEntry( "InitString", initStringLine->text() ); | ||
178 | config.writeEntry( "ResetString", resetStringLine->text() ); | ||
179 | config.writeEntry( "DialPrefix1", dialPref1Line->text() ); | ||
180 | config.writeEntry( "DialSuffix1", dialSuf1Line->text() ); | ||
181 | config.writeEntry( "DialPrefix2", dialPref2Line->text() ); | ||
182 | config.writeEntry( "DialSuffix2", dialSuf2Line->text() ); | ||
183 | config.writeEntry( "DialPrefix3", dialPref3Line->text() ); | ||
184 | config.writeEntry( "DialSuffix3", dialSuf3Line->text() ); | ||
185 | config.writeEntry( "DefaultConnect", connectLine->text() ); | ||
186 | config.writeEntry( "HangupString", hangupLine->text() ); | ||
187 | config.writeEntry( "DialTime", dialTimeSpin->value() ); | ||
188 | config.writeEntry( "DelayRedial", delayRedialSpin->value() ); | ||
189 | config.writeEntry( "NumberTries", numberTriesSpin->value() ); | ||
190 | config.writeEntry( "DTRDRopTime", dtrDropTimeSpin->value() ); | ||
191 | config.writeEntry( "BPSDetect", bpsDetectBox->currentItem() ); | ||
192 | config.writeEntry( "DCDLines", dcdLinesBox->currentItem() ); | ||
193 | config.writeEntry( "MultiLineUntag", multiLineUntagBox->currentItem() ); | ||
177 | 194 | ||
diff --git a/noncore/apps/opie-console/atconfigdialog.h b/noncore/apps/opie-console/atconfigdialog.h index 47ff01d..4dd033b 100644 --- a/noncore/apps/opie-console/atconfigdialog.h +++ b/noncore/apps/opie-console/atconfigdialog.h | |||
@@ -5,2 +5,3 @@ | |||
5 | #include <qdialog.h> | 5 | #include <qdialog.h> |
6 | #include "profile.h" | ||
6 | 7 | ||
@@ -38,4 +39,4 @@ public: | |||
38 | 39 | ||
39 | void readConfig(); | 40 | void readConfig( const Profile& ); |
40 | void writeConfig(); | 41 | void writeConfig( Profile& ); |
41 | 42 | ||
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp index 41febfb..eb0aeb7 100644 --- a/noncore/apps/opie-console/io_modem.cpp +++ b/noncore/apps/opie-console/io_modem.cpp | |||
@@ -51,10 +51,10 @@ void IOModem::reload( const Profile &config ) { | |||
51 | m_hangup = config.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ); | 51 | m_hangup = config.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ); |
52 | m_cancel = config.readEntry("CancelString" MODEM_DEFAULT_CANCEL_STRING ); | 52 | m_cancel = config.readEntry("CancelString", MODEM_DEFAULT_CANCEL_STRING ); |
53 | m_dialTime = config.readEntry("DialTime" MODEM_DEFAULT_DIAL_TIME ); | 53 | m_dialTime = config.readNumEntry("DialTime", MODEM_DEFAULT_DIAL_TIME ); |
54 | m_delayRedial = config.readEntry("DelayRedial", MODEM_DEFAULT_DELAY_REDIAL ); | 54 | m_delayRedial = config.readNumEntry("DelayRedial", MODEM_DEFAULT_DELAY_REDIAL ); |
55 | m_numberTries = config.readEntry("NumberTries", MODEM_DEFAULT_NUMBER_TRIES ); | 55 | m_numberTries = config.readNumEntry("NumberTries", MODEM_DEFAULT_NUMBER_TRIES ); |
56 | m_dtrDropTime = config.readEntry("DTRDRopTime", MODEM_DEFAULT_DTR_DROP_TIME ); | 56 | m_dtrDropTime = config.readNumEntry("DTRDRopTime", MODEM_DEFAULT_DTR_DROP_TIME ); |
57 | m_bpsDetect = config.readEntry("BPSDetect", MODEM_DEFAULT_BPS_DETECT ); | 57 | m_bpsDetect = config.readBoolEntry("BPSDetect", MODEM_DEFAULT_BPS_DETECT ); |
58 | m_dcdLines = config.readEntry("DCDLines", MODEM_DEFAULT_DCD_LINES ); | 58 | m_dcdLines = config.readBoolEntry("DCDLines", MODEM_DEFAULT_DCD_LINES ); |
59 | m_multiLineUntag = config.readEntry("MultiLineUntag", MODEM_DEFAULT_MULTI_LINE_UNTAG ); | 59 | m_multiLineUntag = config.readBoolEntry("MultiLineUntag", MODEM_DEFAULT_MULTI_LINE_UNTAG ); |
60 | } | 60 | } |
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index bfd1c2e..27bcc09 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -318,7 +318,7 @@ void MainWindow::slotTransfer() | |||
318 | { | 318 | { |
319 | if ( currentSession() ) { | 319 | // if ( currentSession() ) { |
320 | TransferDialog dlg(this); | 320 | TransferDialog dlg(this); |
321 | //dlg.showMaximized(); | 321 | dlg.showMaximized(); |
322 | dlg.exec(); | 322 | dlg.exec(); |
323 | } | 323 | // } |
324 | } | 324 | } |
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index 0968f62..ac62e45 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp | |||
@@ -7,5 +7,4 @@ | |||
7 | 7 | ||
8 | #include "iolayerbase.h" | 8 | |
9 | #include "modemconfigwidget.h" | 9 | #include "modemconfigwidget.h" |
10 | #include "atconfigdialog.h" | ||
11 | #include "dialdialog.h" | 10 | #include "dialdialog.h" |
@@ -26,4 +25,3 @@ namespace { | |||
26 | 25 | ||
27 | ModemConfigWidget::ModemConfigWidget( const QString& name, | 26 | ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent, |
28 | QWidget* parent, | ||
29 | const char* na ) | 27 | const char* na ) |
@@ -62,3 +60,3 @@ ModemConfigWidget::ModemConfigWidget( const QString& name, | |||
62 | 60 | ||
63 | 61 | atConf = new ATConfigDialog( this, "ATConfig", true ); | |
64 | } | 62 | } |
@@ -112,6 +110,10 @@ void ModemConfigWidget::load( const Profile& prof ) { | |||
112 | 110 | ||
113 | if ( prof.readEntry("Device").isEmpty() ) return; | 111 | if ( prof.readEntry( "Device" ).isEmpty() ) { |
112 | return; | ||
113 | } | ||
114 | setCurrent( prof.readEntry("Device"), m_deviceCmb ); | 114 | setCurrent( prof.readEntry("Device"), m_deviceCmb ); |
115 | 115 | ||
116 | atConf->readConfig( prof ); | ||
116 | } | 117 | } |
118 | |||
117 | /* | 119 | /* |
@@ -172,7 +174,6 @@ void ModemConfigWidget::save( Profile& prof ) { | |||
172 | void ModemConfigWidget::slotAT() { | 174 | void ModemConfigWidget::slotAT() { |
173 | ATConfigDialog conf( this, "ATConfig", true ); | 175 | // ATConfigDialog conf( this, "ATConfig", true ); |
174 | conf.readConfig(); | 176 | atConf->showMaximized(); |
175 | conf.showMaximized(); | 177 | if ( atConf->exec() == QDialog::Accepted ) { |
176 | if ( conf.exec() == QDialog::Accepted ) { | 178 | // atConf->writeConfig(); |
177 | conf.writeConfig(); | ||
178 | } | 179 | } |
diff --git a/noncore/apps/opie-console/modemconfigwidget.h b/noncore/apps/opie-console/modemconfigwidget.h index 1363f78..4fdde0c 100644 --- a/noncore/apps/opie-console/modemconfigwidget.h +++ b/noncore/apps/opie-console/modemconfigwidget.h | |||
@@ -4,3 +4,4 @@ | |||
4 | #include "profiledialogwidget.h" | 4 | #include "profiledialogwidget.h" |
5 | 5 | #include "iolayerbase.h" | |
6 | #include "atconfigdialog.h" | ||
6 | 7 | ||
@@ -27,4 +28,3 @@ private: | |||
27 | QLineEdit* m_telNumber; | 28 | QLineEdit* m_telNumber; |
28 | 29 | ATConfigDialog *atConf; | |
29 | |||
30 | private slots: | 30 | private slots: |