author | josef <josef> | 2002-10-20 13:56:47 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-20 13:56:47 (UTC) |
commit | 97be4ef8e0579791095b2383e942cc53dd1e7fba (patch) (unidiff) | |
tree | 8b0599529ce424c6fa4a7701eb97346ea539c441 /noncore | |
parent | 89ed0106d3de43c0f39250524bc80de00f2b596c (diff) | |
download | opie-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?)
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 12 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.h | 2 |
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 | |||
@@ -59,10 +59,8 @@ void ProfileEditorDialog::initUI() | |||
59 | tabWidget = new OTabWidget( this ); | 59 | tabWidget = new OTabWidget( this ); |
60 | tabWidget->setTabStyle(OTabWidget::TextTab); | 60 | tabWidget->setTabStyle(OTabWidget::TextTab); |
61 | mainLayout->add(tabWidget); | 61 | mainLayout->add(tabWidget); |
62 | 62 | ||
63 | QWidget *tabprof; | ||
64 | |||
65 | /* base tabs */ | 63 | /* base tabs */ |
66 | tabprof = new QWidget(this); | 64 | tabprof = new QWidget(this); |
67 | m_tabTerm = new QWidget(this); | 65 | m_tabTerm = new QWidget(this); |
68 | m_tabCon = new QWidget(this); | 66 | m_tabCon = new QWidget(this); |
@@ -91,10 +89,11 @@ void ProfileEditorDialog::initUI() | |||
91 | vbox3->add(m_termCmb ); | 89 | vbox3->add(m_termCmb ); |
92 | vbox3->add(m_autoConnect); | 90 | vbox3->add(m_autoConnect); |
93 | vbox3->addStretch(1); | 91 | vbox3->addStretch(1); |
94 | 92 | ||
93 | m_showconntab = 0; | ||
95 | tabWidget->addTab(tabprof, "", QObject::tr("Profile")); | 94 | tabWidget->addTab(tabprof, "", QObject::tr("Profile")); |
96 | tabWidget->addTab(m_tabCon, "", QObject::tr("Connection")); | 95 | //tabWidget->addTab(m_tabCon, "", QObject::tr("Connection")); |
97 | tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal")); | 96 | tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal")); |
98 | tabWidget->setCurrentTab( tabprof ); | 97 | tabWidget->setCurrentTab( tabprof ); |
99 | 98 | ||
100 | 99 | ||
@@ -178,10 +177,17 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) { | |||
178 | 177 | ||
179 | if ( m_con ) { | 178 | if ( m_con ) { |
180 | m_con->load( m_prof ); | 179 | m_con->load( m_prof ); |
181 | m_layCon->addWidget( m_con ); | 180 | m_layCon->addWidget( m_con ); |
181 | if(!m_showconntab) | ||
182 | { | ||
183 | tabWidget->addTab( m_tabCon, "", QObject::tr("Connection") ); | ||
184 | tabWidget->setCurrentTab( tabprof ); | ||
185 | m_showconntab = 1; | ||
186 | } | ||
182 | } else { | 187 | } else { |
183 | tabWidget->removePage( m_tabCon ); | 188 | tabWidget->removePage( m_tabCon ); |
189 | m_showconntab = 0; | ||
184 | } | 190 | } |
185 | } | 191 | } |
186 | /* | 192 | /* |
187 | * we need to switch the widget | 193 | * we need to switch the widget |
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 | |||
@@ -49,7 +49,9 @@ private: | |||
49 | QWidget *m_tabCon, *m_tabTerm; | 49 | QWidget *m_tabCon, *m_tabTerm; |
50 | ProfileDialogWidget* m_con, *m_term; | 50 | ProfileDialogWidget* m_con, *m_term; |
51 | QHBoxLayout *m_layCon, *m_layTerm; | 51 | QHBoxLayout *m_layCon, *m_layTerm; |
52 | OTabWidget *tabWidget; | 52 | OTabWidget *tabWidget; |
53 | QWidget *tabprof; | ||
54 | int m_showconntab; | ||
53 | }; | 55 | }; |
54 | 56 | ||
55 | #endif | 57 | #endif |