-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/serialconfigwidget.cpp | 0 |
3 files changed, 5 insertions, 3 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 @@ -1,18 +1,16 @@ #include <qlayout.h> #include <qlineedit.h> #include <qlabel.h> #include <qmessagebox.h> #include <qstringlist.h> #include <qcombobox.h> -#include <opie/otabwidget.h> - #include "profileeditorplugins.h" #include "metafactory.h" #include "profileeditordialog.h" namespace { void setCurrent( const QString& str, QComboBox* bo ) { for (uint i = 0; i < bo->count(); i++ ) { if ( bo->text(i) == str ) { @@ -52,17 +50,17 @@ Profile ProfileEditorDialog::profile() const return m_prof; } 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); QWidget *tabprof; /* base tabs */ tabprof = new QWidget(this); m_tabTerm = new QWidget(this); @@ -171,16 +169,18 @@ QCString ProfileEditorDialog::profType()const */ void ProfileEditorDialog::slotConActivated( const QString& str ) { delete m_con; m_con = m_fact->newConnectionPlugin( str, m_tabCon ); if (m_con ) { m_con->load( m_prof ); m_layCon->addWidget( m_con ); + } else { + tabWidget->removePage( m_tabCon ); } } /* * we need to switch the widget */ void ProfileEditorDialog::slotTermActivated( const QString& str ) { delete m_term; m_term = m_fact->newTerminalPlugin( str, m_tabTerm ); 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 @@ -1,12 +1,13 @@ #ifndef PROFILE_EDITOR_DIALOG #define PROFILE_EDITOR_DIALOG #include <qdialog.h> +#include <opie/otabwidget.h> #include "profile.h" class MetaFactory; class EditBase; class QTabWidget; class QHBoxLayout; class QLineEdit; @@ -41,11 +42,12 @@ private: Profile m_prof; QLineEdit *m_name; QComboBox *m_conCmb, *m_termCmb; 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 |