From 97be4ef8e0579791095b2383e942cc53dd1e7fba Mon Sep 17 00:00:00 2001 From: josef Date: Sun, 20 Oct 2002 13:56:47 +0000 Subject: - display connection tab again, when it's due and has previously been removed e.g. for Concole profile - ensure only 1 connection tab is shown (otabdialog has no method for this to find out?) --- (limited to 'noncore/apps/opie-console') 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 @@ -60,8 +60,6 @@ void ProfileEditorDialog::initUI() tabWidget->setTabStyle(OTabWidget::TextTab); mainLayout->add(tabWidget); - QWidget *tabprof; - /* base tabs */ tabprof = new QWidget(this); m_tabTerm = new QWidget(this); @@ -92,8 +90,9 @@ void ProfileEditorDialog::initUI() 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 ); @@ -179,8 +178,15 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) { 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; } } /* diff --git a/noncore/apps/opie-console/profileeditordialog.h b/noncore/apps/opie-console/profileeditordialog.h index e01e636..cbda689 100644 --- a/noncore/apps/opie-console/profileeditordialog.h +++ b/noncore/apps/opie-console/profileeditordialog.h @@ -50,6 +50,8 @@ private: ProfileDialogWidget* m_con, *m_term; QHBoxLayout *m_layCon, *m_layTerm; OTabWidget *tabWidget; + QWidget *tabprof; + int m_showconntab; }; #endif -- cgit v0.9.0.2