summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp3
-rw-r--r--noncore/apps/opie-console/profile.cpp11
-rw-r--r--noncore/apps/opie-console/profile.h3
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp7
-rw-r--r--noncore/apps/opie-console/profileeditordialog.h2
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp2
6 files changed, 25 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index cf1fbc3..5900785 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -434,3 +434,4 @@ void MainWindow::create( const Profile& prof ) {
// is io_layer wants direct connection, then autoconnect
- if ( ( m_curSession->layer() )->supports()[0] == 1 ) {
+ //if ( ( m_curSession->layer() )->supports()[0] == 1 ) {
+ if (prof.autoConnect()) {
slotConnect();
diff --git a/noncore/apps/opie-console/profile.cpp b/noncore/apps/opie-console/profile.cpp
index 1a94619..51d1aa8 100644
--- a/noncore/apps/opie-console/profile.cpp
+++ b/noncore/apps/opie-console/profile.cpp
@@ -11,3 +11,3 @@ Profile::Profile( const QString& name,
int terminal )
- : m_name( name ), m_ioLayer( iolayerName ), m_term( termName),
+ : m_name( name ), m_ioLayer( iolayerName ), m_term( termName), m_autoConnect(0),
m_back( background ), m_fore( foreground ), m_terminal( terminal )
@@ -26,2 +26,3 @@ Profile &Profile::operator=( const Profile& prof ) {
m_ioLayer = prof.m_ioLayer;
+ m_autoConnect = prof.m_autoConnect;
m_back = prof.m_back;
@@ -48,2 +49,6 @@ QCString Profile::terminalName( )const {
}
+bool Profile::autoConnect()const {
+
+ return m_autoConnect;
+}
int Profile::foreground()const {
@@ -66,2 +71,6 @@ void Profile::setTerminalName( const QCString& str ) {
}
+void Profile::setAutoConnect( const bool c) {
+
+ m_autoConnect = c;
+}
void Profile::setBackground( int back ) {
diff --git a/noncore/apps/opie-console/profile.h b/noncore/apps/opie-console/profile.h
index 64eb022..4f9e9c2 100644
--- a/noncore/apps/opie-console/profile.h
+++ b/noncore/apps/opie-console/profile.h
@@ -39,2 +39,3 @@ public:
QCString terminalName()const;
+ bool autoConnect()const;
int foreground()const;
@@ -59,2 +60,3 @@ public:
void setTerminalName( const QCString& );
+ void setAutoConnect( const bool );
void setBackground( int back );
@@ -67,2 +69,3 @@ private:
QCString m_ioLayer, m_term;
+ bool m_autoConnect;
int m_back;
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 5c5c2b3..c48ea53 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -6,5 +6,6 @@
#include <qcombobox.h>
+#include <qcheckbox.h>
-#include "profileeditorplugins.h"
+//#include "profileeditorplugins.h"
#include "metafactory.h"
@@ -80,2 +81,3 @@ void ProfileEditorDialog::initUI()
m_termCmb = new QComboBox( tabprof );
+ m_autoConnect = new QCheckBox(tr("Auto connect after load"), tabprof);
@@ -89,2 +91,3 @@ void ProfileEditorDialog::initUI()
vbox3->add(m_termCmb );
+ vbox3->add(m_autoConnect);
vbox3->addStretch(1);
@@ -114,2 +117,3 @@ void ProfileEditorDialog::initUI()
setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb );
+ m_autoConnect->setChecked(m_prof.autoConnect());
@@ -143,2 +147,3 @@ void ProfileEditorDialog::accept()
m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) );
+ m_prof.setAutoConnect( m_autoConnect->isChecked() );
diff --git a/noncore/apps/opie-console/profileeditordialog.h b/noncore/apps/opie-console/profileeditordialog.h
index 6fde839..e01e636 100644
--- a/noncore/apps/opie-console/profileeditordialog.h
+++ b/noncore/apps/opie-console/profileeditordialog.h
@@ -14,2 +14,3 @@ class QLineEdit;
class QComboBox;
+class QCheckBox;
class QLabel;
@@ -45,2 +46,3 @@ private:
QComboBox *m_conCmb, *m_termCmb;
+ QCheckBox *m_autoConnect;
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp
index 7c15560..5d39d96 100644
--- a/noncore/apps/opie-console/profilemanager.cpp
+++ b/noncore/apps/opie-console/profilemanager.cpp
@@ -40,2 +40,3 @@ void ProfileManager::load() {
prof.setTerminalName( conf.readEntry("term").utf8() );
+ prof.setAutoConnect( conf.readBoolEntry("autoConnect") );
prof.setBackground( conf.readNumEntry("back") );
@@ -116,2 +117,3 @@ void ProfileManager::save( ) {
conf.writeEntry( "term", QString::fromUtf8( (*it2).terminalName() ) );
+ conf.writeEntry( "autoConnect", (*it2).autoConnect());
conf.writeEntry( "back", (*it2).background() );