author | hash <hash> | 2002-10-18 19:50:27 (UTC) |
---|---|---|
committer | hash <hash> | 2002-10-18 19:50:27 (UTC) |
commit | bb98ac35db9807efbcc1b59dd8abbdb05ad7656b (patch) (unidiff) | |
tree | 60f83f4c10c68da1ca7641b26b91b8970ef0eaa3 | |
parent | 081001a515f23626b6299e39af4511f36db46d07 (diff) | |
download | opie-bb98ac35db9807efbcc1b59dd8abbdb05ad7656b.zip opie-bb98ac35db9807efbcc1b59dd8abbdb05ad7656b.tar.gz opie-bb98ac35db9807efbcc1b59dd8abbdb05ad7656b.tar.bz2 |
added autoconnect support. feel free to revert if i messed something up.
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/profile.cpp | 11 | ||||
-rw-r--r-- | noncore/apps/opie-console/profile.h | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 7 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/profilemanager.cpp | 2 |
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 ) { | |||
434 | // is io_layer wants direct connection, then autoconnect | 434 | // is io_layer wants direct connection, then autoconnect |
435 | if ( ( m_curSession->layer() )->supports()[0] == 1 ) { | 435 | //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { |
436 | if (prof.autoConnect()) { | ||
436 | slotConnect(); | 437 | 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, | |||
11 | int terminal ) | 11 | int terminal ) |
12 | : m_name( name ), m_ioLayer( iolayerName ), m_term( termName), | 12 | : m_name( name ), m_ioLayer( iolayerName ), m_term( termName), m_autoConnect(0), |
13 | m_back( background ), m_fore( foreground ), m_terminal( terminal ) | 13 | m_back( background ), m_fore( foreground ), m_terminal( terminal ) |
@@ -26,2 +26,3 @@ Profile &Profile::operator=( const Profile& prof ) { | |||
26 | m_ioLayer = prof.m_ioLayer; | 26 | m_ioLayer = prof.m_ioLayer; |
27 | m_autoConnect = prof.m_autoConnect; | ||
27 | m_back = prof.m_back; | 28 | m_back = prof.m_back; |
@@ -48,2 +49,6 @@ QCString Profile::terminalName( )const { | |||
48 | } | 49 | } |
50 | bool Profile::autoConnect()const { | ||
51 | |||
52 | return m_autoConnect; | ||
53 | } | ||
49 | int Profile::foreground()const { | 54 | int Profile::foreground()const { |
@@ -66,2 +71,6 @@ void Profile::setTerminalName( const QCString& str ) { | |||
66 | } | 71 | } |
72 | void Profile::setAutoConnect( const bool c) { | ||
73 | |||
74 | m_autoConnect = c; | ||
75 | } | ||
67 | void Profile::setBackground( int back ) { | 76 | 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: | |||
39 | QCString terminalName()const; | 39 | QCString terminalName()const; |
40 | bool autoConnect()const; | ||
40 | int foreground()const; | 41 | int foreground()const; |
@@ -59,2 +60,3 @@ public: | |||
59 | void setTerminalName( const QCString& ); | 60 | void setTerminalName( const QCString& ); |
61 | void setAutoConnect( const bool ); | ||
60 | void setBackground( int back ); | 62 | void setBackground( int back ); |
@@ -67,2 +69,3 @@ private: | |||
67 | QCString m_ioLayer, m_term; | 69 | QCString m_ioLayer, m_term; |
70 | bool m_autoConnect; | ||
68 | int m_back; | 71 | 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 @@ | |||
6 | #include <qcombobox.h> | 6 | #include <qcombobox.h> |
7 | #include <qcheckbox.h> | ||
7 | 8 | ||
8 | 9 | ||
9 | #include "profileeditorplugins.h" | 10 | //#include "profileeditorplugins.h" |
10 | #include "metafactory.h" | 11 | #include "metafactory.h" |
@@ -80,2 +81,3 @@ void ProfileEditorDialog::initUI() | |||
80 | m_termCmb = new QComboBox( tabprof ); | 81 | m_termCmb = new QComboBox( tabprof ); |
82 | m_autoConnect = new QCheckBox(tr("Auto connect after load"), tabprof); | ||
81 | 83 | ||
@@ -89,2 +91,3 @@ void ProfileEditorDialog::initUI() | |||
89 | vbox3->add(m_termCmb ); | 91 | vbox3->add(m_termCmb ); |
92 | vbox3->add(m_autoConnect); | ||
90 | vbox3->addStretch(1); | 93 | vbox3->addStretch(1); |
@@ -114,2 +117,3 @@ void ProfileEditorDialog::initUI() | |||
114 | setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); | 117 | setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); |
118 | m_autoConnect->setChecked(m_prof.autoConnect()); | ||
115 | 119 | ||
@@ -143,2 +147,3 @@ void ProfileEditorDialog::accept() | |||
143 | m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) ); | 147 | m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) ); |
148 | m_prof.setAutoConnect( m_autoConnect->isChecked() ); | ||
144 | 149 | ||
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; | |||
14 | class QComboBox; | 14 | class QComboBox; |
15 | class QCheckBox; | ||
15 | class QLabel; | 16 | class QLabel; |
@@ -45,2 +46,3 @@ private: | |||
45 | QComboBox *m_conCmb, *m_termCmb; | 46 | QComboBox *m_conCmb, *m_termCmb; |
47 | QCheckBox *m_autoConnect; | ||
46 | 48 | ||
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() { | |||
40 | prof.setTerminalName( conf.readEntry("term").utf8() ); | 40 | prof.setTerminalName( conf.readEntry("term").utf8() ); |
41 | prof.setAutoConnect( conf.readBoolEntry("autoConnect") ); | ||
41 | prof.setBackground( conf.readNumEntry("back") ); | 42 | prof.setBackground( conf.readNumEntry("back") ); |
@@ -116,2 +117,3 @@ void ProfileManager::save( ) { | |||
116 | conf.writeEntry( "term", QString::fromUtf8( (*it2).terminalName() ) ); | 117 | conf.writeEntry( "term", QString::fromUtf8( (*it2).terminalName() ) ); |
118 | conf.writeEntry( "autoConnect", (*it2).autoConnect()); | ||
117 | conf.writeEntry( "back", (*it2).background() ); | 119 | conf.writeEntry( "back", (*it2).background() ); |