summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp6
-rw-r--r--noncore/apps/opie-console/profileeditordialog.h2
-rw-r--r--noncore/apps/opie-console/serialconfigwidget.cpp0
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
@@ -3,14 +3,12 @@
#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 ) {
@@ -54,13 +52,13 @@ Profile ProfileEditorDialog::profile() const
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 */
@@ -173,12 +171,14 @@ 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 ) {
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,10 +1,11 @@
#ifndef PROFILE_EDITOR_DIALOG
#define PROFILE_EDITOR_DIALOG
#include <qdialog.h>
+#include <opie/otabwidget.h>
#include "profile.h"
class MetaFactory;
class EditBase;
class QTabWidget;
@@ -43,9 +44,10 @@ private:
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