-rw-r--r-- | noncore/apps/opie-console/configdialog.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 7 | ||||
-rw-r--r-- | noncore/apps/opie-console/modemconfigwidget.cpp | 9 |
3 files changed, 13 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp index b23f4d0..882cd3d 100644 --- a/noncore/apps/opie-console/configdialog.cpp +++ b/noncore/apps/opie-console/configdialog.cpp | |||
@@ -1,14 +1,16 @@ | |||
1 | #include <qlistview.h> | ||
2 | 1 | ||
2 | #include <qpe/qpeapplication.h> | ||
3 | |||
4 | #include <qlistview.h> | ||
3 | 5 | ||
4 | #include "configdialog.h" | 6 | #include "configdialog.h" |
5 | #include "profileeditordialog.h" | 7 | #include "profileeditordialog.h" |
6 | 8 | ||
7 | class ConfigListItem : public QListViewItem { | 9 | class ConfigListItem : public QListViewItem { |
8 | public: | 10 | public: |
9 | ConfigListItem( QListView* item, const Profile& ); | 11 | ConfigListItem( QListView* item, const Profile& ); |
10 | ~ConfigListItem(); | 12 | ~ConfigListItem(); |
11 | Profile profile()const; | 13 | Profile profile()const; |
12 | 14 | ||
13 | private: | 15 | private: |
14 | Profile m_prof; | 16 | Profile m_prof; |
@@ -64,45 +66,43 @@ void ConfigDialog::slotRemove() { | |||
64 | 66 | ||
65 | void ConfigDialog::slotEdit() { | 67 | void ConfigDialog::slotEdit() { |
66 | Profile p; | 68 | Profile p; |
67 | 69 | ||
68 | if(!lstView->currentItem()) return; | 70 | if(!lstView->currentItem()) return; |
69 | 71 | ||
70 | // Load profile | 72 | // Load profile |
71 | p = ((ConfigListItem*)lstView->currentItem())->profile(); | 73 | p = ((ConfigListItem*)lstView->currentItem())->profile(); |
72 | 74 | ||
73 | ProfileEditorDialog dlg(m_fact, p); | 75 | ProfileEditorDialog dlg(m_fact, p); |
74 | 76 | ||
75 | dlg.setCaption(tr("Edit Connection Profile")); | 77 | dlg.setCaption(tr("Edit Connection Profile")); |
76 | dlg.showMaximized(); | 78 | int ret = QPEApplication::execDialog( &dlg ); |
77 | int ret = dlg.exec(); | ||
78 | 79 | ||
79 | if(ret == QDialog::Accepted) | 80 | if(ret == QDialog::Accepted) |
80 | { | 81 | { |
81 | if(lstView->currentItem()) delete lstView->currentItem(); | 82 | if(lstView->currentItem()) delete lstView->currentItem(); |
82 | 83 | ||
83 | // use dlg.terminal()! | 84 | // use dlg.terminal()! |
84 | Profile p = dlg.profile(); | 85 | Profile p = dlg.profile(); |
85 | 86 | ||
86 | new ConfigListItem(lstView, p); | 87 | new ConfigListItem(lstView, p); |
87 | } | 88 | } |
88 | } | 89 | } |
89 | 90 | ||
90 | 91 | ||
91 | void ConfigDialog::slotAdd() { | 92 | void ConfigDialog::slotAdd() { |
92 | ProfileEditorDialog dlg(m_fact); | 93 | ProfileEditorDialog dlg(m_fact); |
93 | 94 | ||
94 | dlg.setCaption(tr("New Connection")); | 95 | dlg.setCaption(tr("New Connection")); |
95 | dlg.showMaximized(); | 96 | int ret = QPEApplication::execDialog( &dlg ); |
96 | int ret = dlg.exec(); | ||
97 | 97 | ||
98 | if(ret == QDialog::Accepted) | 98 | if(ret == QDialog::Accepted) |
99 | { | 99 | { |
100 | // TODO: Move into general profile save part | 100 | // TODO: Move into general profile save part |
101 | // assignments | 101 | // assignments |
102 | //QString type = dlg.term_type(); | 102 | //QString type = dlg.term_type(); |
103 | //if(type == "VT102") profile = Profile::VT102; | 103 | //if(type == "VT102") profile = Profile::VT102; |
104 | 104 | ||
105 | // get profile from editor | 105 | // get profile from editor |
106 | Profile p = dlg.profile(); | 106 | Profile p = dlg.profile(); |
107 | 107 | ||
108 | new ConfigListItem(lstView, p); | 108 | new ConfigListItem(lstView, p); |
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 2673335..3fe9040 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -1,22 +1,23 @@ | |||
1 | #include <assert.h> | 1 | #include <assert.h> |
2 | 2 | ||
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qmenubar.h> | 4 | #include <qmenubar.h> |
5 | #include <qtoolbar.h> | 5 | #include <qtoolbar.h> |
6 | #include <qmessagebox.h> | 6 | #include <qmessagebox.h> |
7 | #include <qwhatsthis.h> | 7 | #include <qwhatsthis.h> |
8 | #include <qfileinfo.h> | 8 | #include <qfileinfo.h> |
9 | 9 | ||
10 | #include <qpe/filemanager.h> | 10 | #include <qpe/filemanager.h> |
11 | #include <qpe/qpeapplication.h> | ||
11 | 12 | ||
12 | #include <opie/ofiledialog.h> | 13 | #include <opie/ofiledialog.h> |
13 | 14 | ||
14 | #include "TEmulation.h" | 15 | #include "TEmulation.h" |
15 | #include "profileeditordialog.h" | 16 | #include "profileeditordialog.h" |
16 | #include "configdialog.h" | 17 | #include "configdialog.h" |
17 | #include "default.h" | 18 | #include "default.h" |
18 | #include "profilemanager.h" | 19 | #include "profilemanager.h" |
19 | #include "mainwindow.h" | 20 | #include "mainwindow.h" |
20 | #include "tabwidget.h" | 21 | #include "tabwidget.h" |
21 | #include "transferdialog.h" | 22 | #include "transferdialog.h" |
22 | #include "function_keyboard.h" | 23 | #include "function_keyboard.h" |
@@ -301,27 +302,26 @@ MetaFactory* MainWindow::factory() { | |||
301 | } | 302 | } |
302 | 303 | ||
303 | Session* MainWindow::currentSession() { | 304 | Session* MainWindow::currentSession() { |
304 | return m_curSession; | 305 | return m_curSession; |
305 | } | 306 | } |
306 | 307 | ||
307 | QList<Session> MainWindow::sessions() { | 308 | QList<Session> MainWindow::sessions() { |
308 | return m_sessions; | 309 | return m_sessions; |
309 | } | 310 | } |
310 | 311 | ||
311 | void MainWindow::slotNew() { | 312 | void MainWindow::slotNew() { |
312 | ProfileEditorDialog dlg(factory() ); | 313 | ProfileEditorDialog dlg(factory() ); |
313 | dlg.showMaximized(); | ||
314 | dlg.setCaption( tr("New Connection") ); | 314 | dlg.setCaption( tr("New Connection") ); |
315 | int ret = dlg.exec(); | 315 | int ret = QPEApplication::execDialog( &dlg ); |
316 | 316 | ||
317 | if ( ret == QDialog::Accepted ) { | 317 | if ( ret == QDialog::Accepted ) { |
318 | create( dlg.profile() ); | 318 | create( dlg.profile() ); |
319 | } | 319 | } |
320 | } | 320 | } |
321 | 321 | ||
322 | void MainWindow::slotRecordScript() { | 322 | void MainWindow::slotRecordScript() { |
323 | if (currentSession()) { | 323 | if (currentSession()) { |
324 | currentSession()->emulationHandler()->startRecording(); | 324 | currentSession()->emulationHandler()->startRecording(); |
325 | m_saveScript->setEnabled(true); | 325 | m_saveScript->setEnabled(true); |
326 | m_recordScript->setEnabled(false); | 326 | m_recordScript->setEnabled(false); |
327 | } | 327 | } |
@@ -416,27 +416,26 @@ void MainWindow::slotQuickLaunch() { | |||
416 | create( prof ); | 416 | create( prof ); |
417 | } else { | 417 | } else { |
418 | Profile newProf = Profile( "default", "console", "default" , 0, 3, 0 ); | 418 | Profile newProf = Profile( "default", "console", "default" , 0, 3, 0 ); |
419 | newProf.setAutoConnect( true ); | 419 | newProf.setAutoConnect( true ); |
420 | create( newProf ); | 420 | create( newProf ); |
421 | slotSaveSession(); | 421 | slotSaveSession(); |
422 | } | 422 | } |
423 | 423 | ||
424 | } | 424 | } |
425 | 425 | ||
426 | void MainWindow::slotConfigure() { | 426 | void MainWindow::slotConfigure() { |
427 | ConfigDialog conf( manager()->all(), factory() ); | 427 | ConfigDialog conf( manager()->all(), factory() ); |
428 | conf.showMaximized(); | ||
429 | 428 | ||
430 | int ret = conf.exec(); | 429 | int ret = QPEApplication::execDialog( &conf ); |
431 | 430 | ||
432 | if ( QDialog::Accepted == ret ) { | 431 | if ( QDialog::Accepted == ret ) { |
433 | manager()->setProfiles( conf.list() ); | 432 | manager()->setProfiles( conf.list() ); |
434 | manager()->save(); | 433 | manager()->save(); |
435 | populateProfiles(); | 434 | populateProfiles(); |
436 | } | 435 | } |
437 | } | 436 | } |
438 | /* | 437 | /* |
439 | * we will remove | 438 | * we will remove |
440 | * this window from the tabwidget | 439 | * this window from the tabwidget |
441 | * remove it from the list | 440 | * remove it from the list |
442 | * delete it | 441 | * delete it |
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index e552990..3466e3a 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp | |||
@@ -1,12 +1,15 @@ | |||
1 | |||
2 | #include <qpe/qpeapplication.h> | ||
3 | |||
1 | #include <qlabel.h> | 4 | #include <qlabel.h> |
2 | #include <qlayout.h> | 5 | #include <qlayout.h> |
3 | #include <qcombobox.h> | 6 | #include <qcombobox.h> |
4 | #include <qpushbutton.h> | 7 | #include <qpushbutton.h> |
5 | #include <qhbox.h> | 8 | #include <qhbox.h> |
6 | 9 | ||
7 | #include "modemconfigwidget.h" | 10 | #include "modemconfigwidget.h" |
8 | #include "dialdialog.h" | 11 | #include "dialdialog.h" |
9 | 12 | ||
10 | namespace { | 13 | namespace { |
11 | void setCurrent( const QString& str, QComboBox* bo ) { | 14 | void setCurrent( const QString& str, QComboBox* bo ) { |
12 | uint b = bo->count(); | 15 | uint b = bo->count(); |
@@ -228,28 +231,26 @@ void ModemConfigWidget::save( Profile& prof ) { | |||
228 | prof.writeEntry( "Number", m_telNumber->text() ); | 231 | prof.writeEntry( "Number", m_telNumber->text() ); |
229 | 232 | ||
230 | 233 | ||
231 | atConf->writeConfig(prof); | 234 | atConf->writeConfig(prof); |
232 | } | 235 | } |
233 | 236 | ||
234 | void ModemConfigWidget::slotAT() { | 237 | void ModemConfigWidget::slotAT() { |
235 | // ATConfigDialog conf( this, "ATConfig", true ); | 238 | // ATConfigDialog conf( this, "ATConfig", true ); |
236 | // josef/Max I know why don't you create the stuff on the stack | 239 | // josef/Max I know why don't you create the stuff on the stack |
237 | // but making it a TopLevel Dialog and ignoring | 240 | // but making it a TopLevel Dialog and ignoring |
238 | // cancel is not fun either... | 241 | // cancel is not fun either... |
239 | // what to do? FIXME!!! -zecke | 242 | // what to do? FIXME!!! -zecke |
240 | atConf->showMaximized(); | 243 | if ( QPEApplication::execDialog( atConf ) != QDialog::Accepted ) { |
241 | if ( atConf->exec() != QDialog::Accepted ) { | ||
242 | // reload old settings | 244 | // reload old settings |
243 | } | 245 | } |
244 | } | 246 | } |
245 | 247 | ||
246 | void ModemConfigWidget::slotDial() { | 248 | void ModemConfigWidget::slotDial() { |
247 | DialDialog dial( this, "DialConfig", true ); | 249 | DialDialog dial( this, "DialConfig", true ); |
248 | if(!m_telNumber->text().isEmpty()) { | 250 | if(!m_telNumber->text().isEmpty()) { |
249 | dial.setNumber(m_telNumber->text().replace(QRegExp("[\\-\\/\\ \\.\\,]"), "")); | 251 | dial.setNumber(m_telNumber->text().replace(QRegExp("[\\-\\/\\ \\.\\,]"), "")); |
250 | } | 252 | } |
251 | dial.showMaximized(); | 253 | if ( QPEApplication::execDialog( &dial ) == QDialog::Accepted ) { |
252 | if ( dial.exec() == QDialog::Accepted ) { | ||
253 | m_telNumber->setText( dial.number() ); | 254 | m_telNumber->setText( dial.number() ); |
254 | } | 255 | } |
255 | } | 256 | } |