-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/serialconfigwidget.cpp | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index b709cf3..5c5c2b3 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp @@ -6,8 +6,6 @@ #include <qcombobox.h> -#include <opie/otabwidget.h> - #include "profileeditorplugins.h" #include "metafactory.h" #include "profileeditordialog.h" @@ -57,7 +55,7 @@ void ProfileEditorDialog::initUI() m_con = m_term = 0l; QVBoxLayout *mainLayout = new QVBoxLayout( this ); - OTabWidget *tabWidget = new OTabWidget( this ); + tabWidget = new OTabWidget( this ); tabWidget->setTabStyle(OTabWidget::TextTab); mainLayout->add(tabWidget); @@ -173,9 +171,11 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) { delete m_con; m_con = m_fact->newConnectionPlugin( str, m_tabCon ); - if (m_con ) { + if ( m_con ) { m_con->load( m_prof ); m_layCon->addWidget( m_con ); + } else { + tabWidget->removePage( m_tabCon ); } } /* diff --git a/noncore/apps/opie-console/profileeditordialog.h b/noncore/apps/opie-console/profileeditordialog.h index 3b67bb3..6fde839 100644 --- a/noncore/apps/opie-console/profileeditordialog.h +++ b/noncore/apps/opie-console/profileeditordialog.h @@ -2,6 +2,7 @@ #define PROFILE_EDITOR_DIALOG #include <qdialog.h> +#include <opie/otabwidget.h> #include "profile.h" @@ -46,6 +47,7 @@ private: QWidget *m_tabCon, *m_tabTerm; ProfileDialogWidget* m_con, *m_term; QHBoxLayout *m_layCon, *m_layTerm; + OTabWidget *tabWidget; }; #endif diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp index d216c92..1e97a24 100644 --- a/noncore/apps/opie-console/serialconfigwidget.cpp +++ b/noncore/apps/opie-console/serialconfigwidget.cpp @@ -56,7 +56,7 @@ void SerialConfigWidget::load( const Profile& prof ) { } else if (rad_flow == 2) { m_base->setFlow( IOLayerBase::Software ); } else { - m_base->setFlow( IOLayerBase::None ); + m_base->setFlow( IOLayerBase::None ); } if (rad_parity == 1) { |