summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profileeditordialog.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index c48ea53..d124067 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -57,14 +57,12 @@ void ProfileEditorDialog::initUI()
QVBoxLayout *mainLayout = new QVBoxLayout( 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);
m_tabCon = new QWidget(this);
/* base layout for tabs */
@@ -89,14 +87,15 @@ void ProfileEditorDialog::initUI()
vbox3->add(m_conCmb );
vbox3->add(term );
vbox3->add(m_termCmb );
vbox3->add(m_autoConnect);
vbox3->addStretch(1);
+ m_showconntab = 0;
tabWidget->addTab(tabprof, "", QObject::tr("Profile"));
- tabWidget->addTab(m_tabCon, "", QObject::tr("Connection"));
+ //tabWidget->addTab(m_tabCon, "", QObject::tr("Connection"));
tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal"));
tabWidget->setCurrentTab( tabprof );
// fill the comboboxes
QStringList list = m_fact->connectionWidgets();
@@ -176,14 +175,21 @@ 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 );
+ if(!m_showconntab)
+ {
+ tabWidget->addTab( m_tabCon, "", QObject::tr("Connection") );
+ tabWidget->setCurrentTab( tabprof );
+ m_showconntab = 1;
+ }
} else {
tabWidget->removePage( m_tabCon );
+ m_showconntab = 0;
}
}
/*
* we need to switch the widget
*/
void ProfileEditorDialog::slotTermActivated( const QString& str ) {