author | josef <josef> | 2002-10-14 17:21:03 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-14 17:21:03 (UTC) |
commit | 51e18b363eb37621479a059af58da3040db1be7e (patch) (unidiff) | |
tree | 0099ca456633dda2ef68c3336a1541ecb95d1ae8 /noncore/apps/opie-console/mainwindow.cpp | |
parent | 49d40f92a6988a3deaf9b775803092616d312403 (diff) | |
download | opie-51e18b363eb37621479a059af58da3040db1be7e.zip opie-51e18b363eb37621479a059af58da3040db1be7e.tar.gz opie-51e18b363eb37621479a059af58da3040db1be7e.tar.bz2 |
- only allow sessions if all components (layer, widgetstack) are available
- add io_modem to .pro file so it gets compiled
- fix io_modem compilation (untested, but better than nothing)
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 415259e..1adb43d 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -3,12 +3,13 @@ | |||
3 | #include <qmenubar.h> | 3 | #include <qmenubar.h> |
4 | #include <qlabel.h> | 4 | #include <qlabel.h> |
5 | #include <qpopupmenu.h> | 5 | #include <qpopupmenu.h> |
6 | #include <qtoolbar.h> | 6 | #include <qtoolbar.h> |
7 | #include <qpe/resource.h> | 7 | #include <qpe/resource.h> |
8 | #include <opie/ofiledialog.h> | 8 | #include <opie/ofiledialog.h> |
9 | #include <qmessagebox.h> | ||
9 | 10 | ||
10 | #include "profileeditordialog.h" | 11 | #include "profileeditordialog.h" |
11 | #include "configdialog.h" | 12 | #include "configdialog.h" |
12 | #include "default.h" | 13 | #include "default.h" |
13 | #include "metafactory.h" | 14 | #include "metafactory.h" |
14 | #include "profile.h" | 15 | #include "profile.h" |
@@ -306,12 +307,21 @@ void MainWindow::slotProfile( int id) { | |||
306 | Profile prof = manager()->profile( m_sessionsPop->text( id) ); | 307 | Profile prof = manager()->profile( m_sessionsPop->text( id) ); |
307 | create( prof ); | 308 | create( prof ); |
308 | } | 309 | } |
309 | void MainWindow::create( const Profile& prof ) { | 310 | void MainWindow::create( const Profile& prof ) { |
310 | Session *ses = manager()->fromProfile( prof, tabWidget() ); | 311 | Session *ses = manager()->fromProfile( prof, tabWidget() ); |
311 | 312 | ||
313 | if((!ses) || (!ses->layer()) || (!ses->widgetStack())) | ||
314 | { | ||
315 | QMessageBox::warning(this, | ||
316 | QObject::tr("Session failed"), | ||
317 | QObject::tr("Cannot open session: Not all components were found.")); | ||
318 | //if(ses) delete ses; | ||
319 | return; | ||
320 | } | ||
321 | |||
312 | m_sessions.append( ses ); | 322 | m_sessions.append( ses ); |
313 | tabWidget()->add( ses ); | 323 | tabWidget()->add( ses ); |
314 | m_curSession = ses; | 324 | m_curSession = ses; |
315 | 325 | ||
316 | } | 326 | } |
317 | 327 | ||