summaryrefslogtreecommitdiff
path: root/noncore
authorjosef <josef>2002-10-20 13:56:47 (UTC)
committer josef <josef>2002-10-20 13:56:47 (UTC)
commit97be4ef8e0579791095b2383e942cc53dd1e7fba (patch) (side-by-side diff)
tree8b0599529ce424c6fa4a7701eb97346ea539c441 /noncore
parent89ed0106d3de43c0f39250524bc80de00f2b596c (diff)
downloadopie-97be4ef8e0579791095b2383e942cc53dd1e7fba.zip
opie-97be4ef8e0579791095b2383e942cc53dd1e7fba.tar.gz
opie-97be4ef8e0579791095b2383e942cc53dd1e7fba.tar.bz2
- 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?)
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp12
-rw-r--r--noncore/apps/opie-console/profileeditordialog.h2
2 files changed, 11 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
@@ -51,26 +51,24 @@ Profile ProfileEditorDialog::profile() const
return m_prof;
}
void ProfileEditorDialog::initUI()
{
m_con = m_term = 0l;
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 */
m_layCon = new QHBoxLayout( m_tabCon , 2 );
m_layTerm = new QHBoxLayout( m_tabTerm, 2 );
// profile tab
QLabel *name = new QLabel(QObject::tr("Profile name"), tabprof);
@@ -83,26 +81,27 @@ void ProfileEditorDialog::initUI()
// layouting
QVBoxLayout *vbox3 = new QVBoxLayout(tabprof, 2);
vbox3->add(name);
vbox3->add(m_name);
vbox3->add(con );
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();
QStringList::Iterator it;
for (it =list.begin(); it != list.end(); ++it ) {
m_conCmb->insertItem( (*it) );
}
list = m_fact->terminalWidgets();
for (it =list.begin(); it != list.end(); ++it ) {
@@ -170,26 +169,33 @@ QCString ProfileEditorDialog::profType()const
return QCString();
}
/*
* we need to switch the widget
*/
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 ) {
delete m_term;
m_term = m_fact->newTerminalPlugin( str, m_tabTerm );
if (m_term) {
m_term->load(m_prof );
m_layTerm->addWidget( m_term );
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
@@ -41,15 +41,17 @@ private:
MetaFactory* m_fact;
QHBoxLayout* m_lay;
Profile m_prof;
QLineEdit *m_name;
QComboBox *m_conCmb, *m_termCmb;
QCheckBox *m_autoConnect;
QWidget *m_tabCon, *m_tabTerm;
ProfileDialogWidget* m_con, *m_term;
QHBoxLayout *m_layCon, *m_layTerm;
OTabWidget *tabWidget;
+ QWidget *tabprof;
+ int m_showconntab;
};
#endif