-rw-r--r-- | noncore/apps/opie-console/btconfigwidget.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/default.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/dialer.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/dialer.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/function_keyboard.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_modem.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/iolayerbase.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/irdaconfigwidget.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/main.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/modemconfigwidget.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/procctl.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/serialconfigwidget.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/transferdialog.cpp | 8 |
14 files changed, 26 insertions, 16 deletions
diff --git a/noncore/apps/opie-console/btconfigwidget.cpp b/noncore/apps/opie-console/btconfigwidget.cpp index 6246f92..64046d8 100644 --- a/noncore/apps/opie-console/btconfigwidget.cpp +++ b/noncore/apps/opie-console/btconfigwidget.cpp | |||
@@ -2,25 +2,25 @@ | |||
2 | #include <qlayout.h> | 2 | #include <qlayout.h> |
3 | #include <qlineedit.h> | 3 | #include <qlineedit.h> |
4 | #include <qcombobox.h> | 4 | #include <qcombobox.h> |
5 | #include <qhbox.h> | 5 | #include <qhbox.h> |
6 | #include <qradiobutton.h> | 6 | #include <qradiobutton.h> |
7 | 7 | ||
8 | #include "iolayerbase.h" | 8 | #include "iolayerbase.h" |
9 | #include "btconfigwidget.h" | 9 | #include "btconfigwidget.h" |
10 | 10 | ||
11 | namespace { | 11 | namespace { |
12 | void setCurrent( const QString& str, QComboBox* bo ) { | 12 | void setCurrent( const QString& str, QComboBox* bo ) { |
13 | uint b = bo->count(); | 13 | uint b = bo->count(); |
14 | for (uint i = 0; i < bo->count(); i++ ) { | 14 | for (int i = 0; i < bo->count(); i++ ) { |
15 | if ( bo->text(i) == str ) { | 15 | if ( bo->text(i) == str ) { |
16 | bo->setCurrentItem( i ); | 16 | bo->setCurrentItem( i ); |
17 | return; | 17 | return; |
18 | } | 18 | } |
19 | } | 19 | } |
20 | bo->insertItem( str ); | 20 | bo->insertItem( str ); |
21 | bo->setCurrentItem( b ); | 21 | bo->setCurrentItem( b ); |
22 | } | 22 | } |
23 | } | 23 | } |
24 | 24 | ||
25 | BTConfigWidget::BTConfigWidget( const QString& name, | 25 | BTConfigWidget::BTConfigWidget( const QString& name, |
26 | QWidget* parent, | 26 | QWidget* parent, |
@@ -107,24 +107,25 @@ void BTConfigWidget::load( const Profile& prof ) { | |||
107 | 107 | ||
108 | if ( prof.readEntry("Device").isEmpty() ) return; | 108 | if ( prof.readEntry("Device").isEmpty() ) return; |
109 | setCurrent( prof.readEntry("Device"), m_deviceCmb ); | 109 | setCurrent( prof.readEntry("Device"), m_deviceCmb ); |
110 | 110 | ||
111 | } | 111 | } |
112 | /* | 112 | /* |
113 | * save speed, | 113 | * save speed, |
114 | * flow, | 114 | * flow, |
115 | * parity | 115 | * parity |
116 | */ | 116 | */ |
117 | void BTConfigWidget::save( Profile& prof ) { | 117 | void BTConfigWidget::save( Profile& prof ) { |
118 | int flow, parity, speed; | 118 | int flow, parity, speed; |
119 | flow = parity = speed = 0; | ||
119 | prof.writeEntry("Device", m_deviceCmb->currentText() ); | 120 | prof.writeEntry("Device", m_deviceCmb->currentText() ); |
120 | 121 | ||
121 | 122 | ||
122 | switch( m_base->flow() ) { | 123 | switch( m_base->flow() ) { |
123 | case IOLayerBase::None: | 124 | case IOLayerBase::None: |
124 | flow = 0; | 125 | flow = 0; |
125 | break; | 126 | break; |
126 | case IOLayerBase::Software: | 127 | case IOLayerBase::Software: |
127 | flow = 2; | 128 | flow = 2; |
128 | break; | 129 | break; |
129 | case IOLayerBase::Hardware: | 130 | case IOLayerBase::Hardware: |
130 | flow = 1; | 131 | flow = 1; |
@@ -147,24 +148,25 @@ void BTConfigWidget::save( Profile& prof ) { | |||
147 | case IOLayerBase::Baud_115200: | 148 | case IOLayerBase::Baud_115200: |
148 | speed = 115200; | 149 | speed = 115200; |
149 | break; | 150 | break; |
150 | case IOLayerBase::Baud_57600: | 151 | case IOLayerBase::Baud_57600: |
151 | speed = 57600; | 152 | speed = 57600; |
152 | break; | 153 | break; |
153 | case IOLayerBase::Baud_38400: | 154 | case IOLayerBase::Baud_38400: |
154 | speed = 38400; | 155 | speed = 38400; |
155 | break; | 156 | break; |
156 | case IOLayerBase::Baud_19200: | 157 | case IOLayerBase::Baud_19200: |
157 | speed = 19200; | 158 | speed = 19200; |
158 | break; | 159 | break; |
160 | default: | ||
159 | case IOLayerBase::Baud_9600: | 161 | case IOLayerBase::Baud_9600: |
160 | speed = 9600; | 162 | speed = 9600; |
161 | break; | 163 | break; |
162 | } | 164 | } |
163 | 165 | ||
164 | prof.writeEntry("Flow", flow); | 166 | prof.writeEntry("Flow", flow); |
165 | prof.writeEntry("Parity", parity); | 167 | prof.writeEntry("Parity", parity); |
166 | prof.writeEntry("Speed", speed); | 168 | prof.writeEntry("Speed", speed); |
167 | prof.writeEntry("Mac", m_mac->text() ); | 169 | prof.writeEntry("Mac", m_mac->text() ); |
168 | } | 170 | } |
169 | 171 | ||
170 | void BTConfigWidget::slotMacRadio( bool on ) { | 172 | void BTConfigWidget::slotMacRadio( bool on ) { |
diff --git a/noncore/apps/opie-console/default.cpp b/noncore/apps/opie-console/default.cpp index 0160b56..19640d8 100644 --- a/noncore/apps/opie-console/default.cpp +++ b/noncore/apps/opie-console/default.cpp | |||
@@ -58,25 +58,25 @@ extern "C" { | |||
58 | ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { | 58 | ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { |
59 | return new SerialConfigWidget( str, wid ); | 59 | return new SerialConfigWidget( str, wid ); |
60 | } | 60 | } |
61 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) { | 61 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) { |
62 | return new IrdaConfigWidget( str, wid ); | 62 | return new IrdaConfigWidget( str, wid ); |
63 | } | 63 | } |
64 | ProfileDialogWidget* newModemWidget( const QString& str, QWidget* wid ) { | 64 | ProfileDialogWidget* newModemWidget( const QString& str, QWidget* wid ) { |
65 | return new ModemConfigWidget(str, wid ); | 65 | return new ModemConfigWidget(str, wid ); |
66 | } | 66 | } |
67 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) { | 67 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) { |
68 | return new BTConfigWidget(str, wid ); | 68 | return new BTConfigWidget(str, wid ); |
69 | } | 69 | } |
70 | ProfileDialogWidget* newConsoleWid( const QString& str, QWidget* wid ) { | 70 | ProfileDialogWidget* newConsoleWid( const QString& , QWidget* ) { |
71 | return 0l; | 71 | return 0l; |
72 | } | 72 | } |
73 | 73 | ||
74 | 74 | ||
75 | // Terminal Widget(s) | 75 | // Terminal Widget(s) |
76 | ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) { | 76 | ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) { |
77 | return new TerminalWidget(na, wid,0 ); | 77 | return new TerminalWidget(na, wid,0 ); |
78 | } | 78 | } |
79 | 79 | ||
80 | // Function Keyboard Widget | 80 | // Function Keyboard Widget |
81 | ProfileDialogWidget* newKeyboardWidget(const QString& na, QWidget *wid) { | 81 | ProfileDialogWidget* newKeyboardWidget(const QString& na, QWidget *wid) { |
82 | return new FunctionKeyboardConfig(na, wid); | 82 | return new FunctionKeyboardConfig(na, wid); |
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp index d37e406..5056040 100644 --- a/noncore/apps/opie-console/dialer.cpp +++ b/noncore/apps/opie-console/dialer.cpp | |||
@@ -216,25 +216,25 @@ void Dialer::send(const QString& msg) | |||
216 | bytes = ::write(m_fd, m.local8Bit(), strlen(m.local8Bit())); | 216 | bytes = ::write(m_fd, m.local8Bit(), strlen(m.local8Bit())); |
217 | if(bytes < 0) | 217 | if(bytes < 0) |
218 | { | 218 | { |
219 | reset(); | 219 | reset(); |
220 | } | 220 | } |
221 | } | 221 | } |
222 | 222 | ||
223 | QString Dialer::receive() | 223 | QString Dialer::receive() |
224 | { | 224 | { |
225 | QString buf; | 225 | QString buf; |
226 | char buffer[1024]; | 226 | char buffer[1024]; |
227 | int ret; | 227 | int ret; |
228 | int counter; | 228 | int counter = 0; |
229 | 229 | ||
230 | while(1) | 230 | while(1) |
231 | { | 231 | { |
232 | ret = ::read(m_fd, buffer, sizeof(buffer)); | 232 | ret = ::read(m_fd, buffer, sizeof(buffer)); |
233 | 233 | ||
234 | if(ret > 0) | 234 | if(ret > 0) |
235 | { | 235 | { |
236 | for(int i = 0; i < ret; i++) | 236 | for(int i = 0; i < ret; i++) |
237 | buffer[i] = buffer[i] & 0x7F; | 237 | buffer[i] = buffer[i] & 0x7F; |
238 | buffer[ret] = 0; | 238 | buffer[ret] = 0; |
239 | //qWarning("Got: '%s'", buffer); | 239 | //qWarning("Got: '%s'", buffer); |
240 | buf.append(QString(buffer)); | 240 | buf.append(QString(buffer)); |
diff --git a/noncore/apps/opie-console/dialer.h b/noncore/apps/opie-console/dialer.h index 28303f3..88681a3 100644 --- a/noncore/apps/opie-console/dialer.h +++ b/noncore/apps/opie-console/dialer.h | |||
@@ -36,19 +36,19 @@ class Dialer : public QDialog | |||
36 | state_init, | 36 | state_init, |
37 | state_options, | 37 | state_options, |
38 | state_dialtone, | 38 | state_dialtone, |
39 | state_dialing, | 39 | state_dialing, |
40 | state_online | 40 | state_online |
41 | }; | 41 | }; |
42 | 42 | ||
43 | QLabel *status; | 43 | QLabel *status; |
44 | QProgressBar *progress; | 44 | QProgressBar *progress; |
45 | QPushButton *cancel; | 45 | QPushButton *cancel; |
46 | int state; | 46 | int state; |
47 | int usercancel; | 47 | int usercancel; |
48 | const Profile& m_profile; | ||
49 | int m_fd; | 48 | int m_fd; |
49 | const Profile& m_profile; | ||
50 | int cleanshutdown; | 50 | int cleanshutdown; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | #endif | 53 | #endif |
54 | 54 | ||
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp index fd20e99..100fdfc 100644 --- a/noncore/apps/opie-console/function_keyboard.cpp +++ b/noncore/apps/opie-console/function_keyboard.cpp | |||
@@ -165,18 +165,18 @@ FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* par | |||
165 | FunctionKeyboard *kb = new FunctionKeyboard(this); | 165 | FunctionKeyboard *kb = new FunctionKeyboard(this); |
166 | QGroupBox *dimentions = new QGroupBox(2, Qt::Horizontal, tr("Dimentions"), this); | 166 | QGroupBox *dimentions = new QGroupBox(2, Qt::Horizontal, tr("Dimentions"), this); |
167 | QGroupBox *editKey = new QGroupBox(2, Qt::Horizontal, tr("Edit"), this); | 167 | QGroupBox *editKey = new QGroupBox(2, Qt::Horizontal, tr("Edit"), this); |
168 | 168 | ||
169 | QVBoxLayout *root = new QVBoxLayout(this, 2); | 169 | QVBoxLayout *root = new QVBoxLayout(this, 2); |
170 | root->addWidget(kb); | 170 | root->addWidget(kb); |
171 | root->addWidget(dimentions); | 171 | root->addWidget(dimentions); |
172 | root->addWidget(editKey); | 172 | root->addWidget(editKey); |
173 | } | 173 | } |
174 | FunctionKeyboardConfig::~FunctionKeyboardConfig() { | 174 | FunctionKeyboardConfig::~FunctionKeyboardConfig() { |
175 | 175 | ||
176 | } | 176 | } |
177 | void FunctionKeyboardConfig::load (const Profile& prof) { | 177 | void FunctionKeyboardConfig::load (const Profile& ) { |
178 | 178 | ||
179 | } | 179 | } |
180 | void FunctionKeyboardConfig::save (Profile& prof) { | 180 | void FunctionKeyboardConfig::save (Profile& ) { |
181 | 181 | ||
182 | } | 182 | } |
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp index f246d81..d4ea0b2 100644 --- a/noncore/apps/opie-console/io_modem.cpp +++ b/noncore/apps/opie-console/io_modem.cpp | |||
@@ -76,14 +76,16 @@ void IOModem::reload( const Profile &config ) { | |||
76 | 76 | ||
77 | 77 | ||
78 | QString IOModem::identifier() const { | 78 | QString IOModem::identifier() const { |
79 | return "modem"; | 79 | return "modem"; |
80 | } | 80 | } |
81 | 81 | ||
82 | QString IOModem::name() const { | 82 | QString IOModem::name() const { |
83 | return "Modem IO Layer"; | 83 | return "Modem IO Layer"; |
84 | } | 84 | } |
85 | 85 | ||
86 | void IOModem::slotExited(OProcess* proc ){ | 86 | void IOModem::slotExited(OProcess* proc ){ |
87 | close(); | 87 | close(); |
88 | /* delete it afterwards */ | ||
89 | delete proc; | ||
88 | } | 90 | } |
89 | 91 | ||
diff --git a/noncore/apps/opie-console/iolayerbase.cpp b/noncore/apps/opie-console/iolayerbase.cpp index b0df02d..47f9e76 100644 --- a/noncore/apps/opie-console/iolayerbase.cpp +++ b/noncore/apps/opie-console/iolayerbase.cpp | |||
@@ -98,38 +98,39 @@ void IOLayerBase::setParity( Parity par ) { | |||
98 | case NonePar: | 98 | case NonePar: |
99 | m_parityNone->setChecked( true ); | 99 | m_parityNone->setChecked( true ); |
100 | break; | 100 | break; |
101 | case Odd: | 101 | case Odd: |
102 | m_parityOdd->setChecked( true ); | 102 | m_parityOdd->setChecked( true ); |
103 | break; | 103 | break; |
104 | case Even: | 104 | case Even: |
105 | m_parityEven->setChecked( true ); | 105 | m_parityEven->setChecked( true ); |
106 | break; | 106 | break; |
107 | } | 107 | } |
108 | } | 108 | } |
109 | void IOLayerBase::setSpeed( Speed sp ) { | 109 | void IOLayerBase::setSpeed( Speed sp ) { |
110 | int index; | 110 | int index = -1; |
111 | switch( sp ) { | 111 | switch( sp ) { |
112 | case Baud_115200: | 112 | case Baud_115200: |
113 | index = id_baud_115200; | 113 | index = id_baud_115200; |
114 | break; | 114 | break; |
115 | case Baud_57600: | 115 | case Baud_57600: |
116 | index = id_baud_57600; | 116 | index = id_baud_57600; |
117 | break; | 117 | break; |
118 | case Baud_38400: | 118 | case Baud_38400: |
119 | index = id_baud_38400; | 119 | index = id_baud_38400; |
120 | break; | 120 | break; |
121 | case Baud_19200: | 121 | case Baud_19200: |
122 | index = id_baud_19200; | 122 | index = id_baud_19200; |
123 | break; | 123 | break; |
124 | default: | ||
124 | case Baud_9600: | 125 | case Baud_9600: |
125 | index = id_baud_9600; | 126 | index = id_baud_9600; |
126 | break; | 127 | break; |
127 | } | 128 | } |
128 | m_speedBox->setCurrentItem(index ); | 129 | m_speedBox->setCurrentItem(index ); |
129 | } | 130 | } |
130 | IOLayerBase::Flow IOLayerBase::flow()const { | 131 | IOLayerBase::Flow IOLayerBase::flow()const { |
131 | if (m_flowHw->isChecked() ) { | 132 | if (m_flowHw->isChecked() ) { |
132 | return Hardware; | 133 | return Hardware; |
133 | }else if( m_flowSw->isChecked() ) { | 134 | }else if( m_flowSw->isChecked() ) { |
134 | return Software; | 135 | return Software; |
135 | } else { | 136 | } else { |
@@ -151,17 +152,18 @@ IOLayerBase::Speed IOLayerBase::speed()const{ | |||
151 | case id_baud_115200: | 152 | case id_baud_115200: |
152 | return Baud_115200; | 153 | return Baud_115200; |
153 | break; | 154 | break; |
154 | case id_baud_57600: | 155 | case id_baud_57600: |
155 | return Baud_57600; | 156 | return Baud_57600; |
156 | break; | 157 | break; |
157 | case id_baud_38400: | 158 | case id_baud_38400: |
158 | return Baud_38400; | 159 | return Baud_38400; |
159 | break; | 160 | break; |
160 | case id_baud_19200: | 161 | case id_baud_19200: |
161 | return Baud_19200; | 162 | return Baud_19200; |
162 | break; | 163 | break; |
164 | default: | ||
163 | case id_baud_9600: | 165 | case id_baud_9600: |
164 | return Baud_9600; | 166 | return Baud_9600; |
165 | break; | 167 | break; |
166 | } | 168 | } |
167 | } | 169 | } |
diff --git a/noncore/apps/opie-console/irdaconfigwidget.cpp b/noncore/apps/opie-console/irdaconfigwidget.cpp index 72e99a1..059530d 100644 --- a/noncore/apps/opie-console/irdaconfigwidget.cpp +++ b/noncore/apps/opie-console/irdaconfigwidget.cpp | |||
@@ -1,23 +1,23 @@ | |||
1 | #include <qlabel.h> | 1 | #include <qlabel.h> |
2 | #include <qlayout.h> | 2 | #include <qlayout.h> |
3 | #include <qcombobox.h> | 3 | #include <qcombobox.h> |
4 | 4 | ||
5 | #include "iolayerbase.h" | 5 | #include "iolayerbase.h" |
6 | #include "irdaconfigwidget.h" | 6 | #include "irdaconfigwidget.h" |
7 | 7 | ||
8 | namespace { | 8 | namespace { |
9 | void setCurrent( const QString& str, QComboBox* bo ) { | 9 | void setCurrent( const QString& str, QComboBox* bo ) { |
10 | uint b = bo->count(); | 10 | uint b = bo->count(); |
11 | for (uint i = 0; i < bo->count(); i++ ) { | 11 | for (int i = 0; i < bo->count(); i++ ) { |
12 | if ( bo->text(i) == str ) { | 12 | if ( bo->text(i) == str ) { |
13 | bo->setCurrentItem( i ); | 13 | bo->setCurrentItem( i ); |
14 | return; | 14 | return; |
15 | } | 15 | } |
16 | } | 16 | } |
17 | bo->insertItem( str ); | 17 | bo->insertItem( str ); |
18 | bo->setCurrentItem( b ); | 18 | bo->setCurrentItem( b ); |
19 | } | 19 | } |
20 | 20 | ||
21 | 21 | ||
22 | } | 22 | } |
23 | 23 | ||
@@ -86,24 +86,25 @@ void IrdaConfigWidget::load( const Profile& prof ) { | |||
86 | 86 | ||
87 | if ( prof.readEntry("Device").isEmpty() ) return; | 87 | if ( prof.readEntry("Device").isEmpty() ) return; |
88 | setCurrent( prof.readEntry("Device"), m_deviceCmb ); | 88 | setCurrent( prof.readEntry("Device"), m_deviceCmb ); |
89 | 89 | ||
90 | } | 90 | } |
91 | /* | 91 | /* |
92 | * save speed, | 92 | * save speed, |
93 | * flow, | 93 | * flow, |
94 | * parity | 94 | * parity |
95 | */ | 95 | */ |
96 | void IrdaConfigWidget::save( Profile& prof ) { | 96 | void IrdaConfigWidget::save( Profile& prof ) { |
97 | int flow, parity, speed; | 97 | int flow, parity, speed; |
98 | flow = parity = speed = 0; | ||
98 | prof.writeEntry("Device", m_deviceCmb->currentText() ); | 99 | prof.writeEntry("Device", m_deviceCmb->currentText() ); |
99 | 100 | ||
100 | switch( m_base->flow() ) { | 101 | switch( m_base->flow() ) { |
101 | case IOLayerBase::None: | 102 | case IOLayerBase::None: |
102 | flow = 0; | 103 | flow = 0; |
103 | break; | 104 | break; |
104 | case IOLayerBase::Software: | 105 | case IOLayerBase::Software: |
105 | flow = 2; | 106 | flow = 2; |
106 | break; | 107 | break; |
107 | case IOLayerBase::Hardware: | 108 | case IOLayerBase::Hardware: |
108 | flow = 1; | 109 | flow = 1; |
109 | break; | 110 | break; |
@@ -126,21 +127,22 @@ void IrdaConfigWidget::save( Profile& prof ) { | |||
126 | case IOLayerBase::Baud_115200: | 127 | case IOLayerBase::Baud_115200: |
127 | speed = 115200; | 128 | speed = 115200; |
128 | break; | 129 | break; |
129 | case IOLayerBase::Baud_57600: | 130 | case IOLayerBase::Baud_57600: |
130 | speed = 57600; | 131 | speed = 57600; |
131 | break; | 132 | break; |
132 | case IOLayerBase::Baud_38400: | 133 | case IOLayerBase::Baud_38400: |
133 | speed = 38400; | 134 | speed = 38400; |
134 | break; | 135 | break; |
135 | case IOLayerBase::Baud_19200: | 136 | case IOLayerBase::Baud_19200: |
136 | speed = 19200; | 137 | speed = 19200; |
137 | break; | 138 | break; |
139 | default: | ||
138 | case IOLayerBase::Baud_9600: | 140 | case IOLayerBase::Baud_9600: |
139 | speed = 9600; | 141 | speed = 9600; |
140 | break; | 142 | break; |
141 | } | 143 | } |
142 | 144 | ||
143 | prof.writeEntry("Flow", flow); | 145 | prof.writeEntry("Flow", flow); |
144 | prof.writeEntry("Parity", parity); | 146 | prof.writeEntry("Parity", parity); |
145 | prof.writeEntry("Speed", speed); | 147 | prof.writeEntry("Speed", speed); |
146 | } | 148 | } |
diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp index 78a91a2..7f9f038 100644 --- a/noncore/apps/opie-console/main.cpp +++ b/noncore/apps/opie-console/main.cpp | |||
@@ -82,24 +82,25 @@ void FixIt::fixIt() { | |||
82 | ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" ); | 82 | ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" ); |
83 | QFile file( "/etc/inittab" ); | 83 | QFile file( "/etc/inittab" ); |
84 | if ( file.open(IO_WriteOnly | IO_Raw ) ) { | 84 | if ( file.open(IO_WriteOnly | IO_Raw ) ) { |
85 | file.writeBlock(m_file,strlen(m_file) ); | 85 | file.writeBlock(m_file,strlen(m_file) ); |
86 | } | 86 | } |
87 | file.close(); | 87 | file.close(); |
88 | ::kill( SIGHUP, 1 ); | 88 | ::kill( SIGHUP, 1 ); |
89 | } | 89 | } |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | 92 | ||
93 | int main(int argc, char **argv) { | 93 | int main(int argc, char **argv) { |
94 | argv[0]="embeddedkonsole"; | ||
94 | QPEApplication app( argc, argv ); | 95 | QPEApplication app( argc, argv ); |
95 | 96 | ||
96 | #ifdef FSCKED_DISTRIBUTION | 97 | #ifdef FSCKED_DISTRIBUTION |
97 | qWarning("fscked"); | 98 | qWarning("fscked"); |
98 | FixIt it; | 99 | FixIt it; |
99 | it.fixIt(); | 100 | it.fixIt(); |
100 | #endif | 101 | #endif |
101 | 102 | ||
102 | MainWindow mw; | 103 | MainWindow mw; |
103 | mw.setCaption(QObject::tr("Opie console") ); | 104 | mw.setCaption(QObject::tr("Opie console") ); |
104 | app.showMainWidget( &mw ); | 105 | app.showMainWidget( &mw ); |
105 | 106 | ||
diff --git a/noncore/apps/opie-console/modemconfigwidget.cpp b/noncore/apps/opie-console/modemconfigwidget.cpp index d3a23fa..c37fafd 100644 --- a/noncore/apps/opie-console/modemconfigwidget.cpp +++ b/noncore/apps/opie-console/modemconfigwidget.cpp | |||
@@ -3,25 +3,25 @@ | |||
3 | #include <qcombobox.h> | 3 | #include <qcombobox.h> |
4 | #include <qlineedit.h> | 4 | #include <qlineedit.h> |
5 | #include <qpushbutton.h> | 5 | #include <qpushbutton.h> |
6 | #include <qhbox.h> | 6 | #include <qhbox.h> |
7 | #include <qregexp.h> | 7 | #include <qregexp.h> |
8 | 8 | ||
9 | #include "modemconfigwidget.h" | 9 | #include "modemconfigwidget.h" |
10 | #include "dialdialog.h" | 10 | #include "dialdialog.h" |
11 | 11 | ||
12 | namespace { | 12 | namespace { |
13 | void setCurrent( const QString& str, QComboBox* bo ) { | 13 | void setCurrent( const QString& str, QComboBox* bo ) { |
14 | uint b = bo->count(); | 14 | uint b = bo->count(); |
15 | for (uint i = 0; i < bo->count(); i++ ) { | 15 | for (int i = 0; i < bo->count(); i++ ) { |
16 | if ( bo->text(i) == str ) { | 16 | if ( bo->text(i) == str ) { |
17 | bo->setCurrentItem( i ); | 17 | bo->setCurrentItem( i ); |
18 | return; | 18 | return; |
19 | } | 19 | } |
20 | } | 20 | } |
21 | bo->insertItem( str ); | 21 | bo->insertItem( str ); |
22 | bo->setCurrentItem( b ); | 22 | bo->setCurrentItem( b ); |
23 | } | 23 | } |
24 | } | 24 | } |
25 | 25 | ||
26 | ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent, | 26 | ModemConfigWidget::ModemConfigWidget( const QString& name, QWidget* parent, |
27 | const char* na ) | 27 | const char* na ) |
@@ -117,24 +117,25 @@ void ModemConfigWidget::load( const Profile& prof ) { | |||
117 | setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); | 117 | setCurrent( prof.readEntry( "Device" ), m_deviceCmb ); |
118 | 118 | ||
119 | atConf->readConfig( prof ); | 119 | atConf->readConfig( prof ); |
120 | } | 120 | } |
121 | 121 | ||
122 | /* | 122 | /* |
123 | * save speed, | 123 | * save speed, |
124 | * flow, | 124 | * flow, |
125 | * parity | 125 | * parity |
126 | */ | 126 | */ |
127 | void ModemConfigWidget::save( Profile& prof ) { | 127 | void ModemConfigWidget::save( Profile& prof ) { |
128 | int flow, parity, speed; | 128 | int flow, parity, speed; |
129 | flow = parity = speed = 0; | ||
129 | prof.writeEntry( "Device", m_deviceCmb->currentText() ); | 130 | prof.writeEntry( "Device", m_deviceCmb->currentText() ); |
130 | 131 | ||
131 | 132 | ||
132 | switch( m_base->flow() ) { | 133 | switch( m_base->flow() ) { |
133 | case IOLayerBase::None: | 134 | case IOLayerBase::None: |
134 | flow = 0; | 135 | flow = 0; |
135 | break; | 136 | break; |
136 | case IOLayerBase::Software: | 137 | case IOLayerBase::Software: |
137 | flow = 2; | 138 | flow = 2; |
138 | break; | 139 | break; |
139 | case IOLayerBase::Hardware: | 140 | case IOLayerBase::Hardware: |
140 | flow = 1; | 141 | flow = 1; |
diff --git a/noncore/apps/opie-console/procctl.cpp b/noncore/apps/opie-console/procctl.cpp index ff6bea8..a44529b 100644 --- a/noncore/apps/opie-console/procctl.cpp +++ b/noncore/apps/opie-console/procctl.cpp | |||
@@ -8,24 +8,25 @@ | |||
8 | ProcContainer *ProcCtl::m_last = 0; | 8 | ProcContainer *ProcCtl::m_last = 0; |
9 | ProcCtl* ProcCtl::m_self = 0; | 9 | ProcCtl* ProcCtl::m_self = 0; |
10 | 10 | ||
11 | ProcCtl::ProcCtl() { | 11 | ProcCtl::ProcCtl() { |
12 | signal( SIGCHLD, signal_handler ); | 12 | signal( SIGCHLD, signal_handler ); |
13 | } | 13 | } |
14 | ProcCtl::~ProcCtl() { | 14 | ProcCtl::~ProcCtl() { |
15 | } | 15 | } |
16 | ProcCtl* ProcCtl::self() { | 16 | ProcCtl* ProcCtl::self() { |
17 | if (!m_self ) { | 17 | if (!m_self ) { |
18 | m_self = new ProcCtl; | 18 | m_self = new ProcCtl; |
19 | } | 19 | } |
20 | return m_self; | ||
20 | } | 21 | } |
21 | void ProcCtl::add(pid_t pi, int fd ) { | 22 | void ProcCtl::add(pid_t pi, int fd ) { |
22 | ProcContainer * con = new ProcContainer; | 23 | ProcContainer * con = new ProcContainer; |
23 | //memset(con, 0, sizeof(con) ); | 24 | //memset(con, 0, sizeof(con) ); |
24 | con->pid = pi; | 25 | con->pid = pi; |
25 | con->fd = fd; | 26 | con->fd = fd; |
26 | con->status = 0; | 27 | con->status = 0; |
27 | con->prev = m_last; | 28 | con->prev = m_last; |
28 | 29 | ||
29 | m_last = con; | 30 | m_last = con; |
30 | 31 | ||
31 | } | 32 | } |
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index 413e80b..1765d42 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp | |||
@@ -83,25 +83,25 @@ void ProfileEditorDialog::initUI() | |||
83 | QVBoxLayout *vbox3 = new QVBoxLayout(tabprof, 2); | 83 | QVBoxLayout *vbox3 = new QVBoxLayout(tabprof, 2); |
84 | vbox3->add(name); | 84 | vbox3->add(name); |
85 | vbox3->add(m_name); | 85 | vbox3->add(m_name); |
86 | vbox3->add(con ); | 86 | vbox3->add(con ); |
87 | vbox3->add(m_conCmb ); | 87 | vbox3->add(m_conCmb ); |
88 | vbox3->add(term ); | 88 | vbox3->add(term ); |
89 | vbox3->add(m_termCmb ); | 89 | vbox3->add(m_termCmb ); |
90 | vbox3->add(m_autoConnect); | 90 | vbox3->add(m_autoConnect); |
91 | vbox3->addStretch(1); | 91 | vbox3->addStretch(1); |
92 | 92 | ||
93 | m_showconntab = 0; | 93 | m_showconntab = 0; |
94 | tabWidget->addTab(tabprof, "", QObject::tr("Profile")); | 94 | tabWidget->addTab(tabprof, "", QObject::tr("Profile")); |
95 | //tabWidget->addTab(m_tabCon, "", QObject::tr("Connection")); | 95 | tabWidget->addTab(m_tabCon, "", QObject::tr("Connection")); |
96 | tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal")); | 96 | tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal")); |
97 | tabWidget->addTab(m_tabKey, "", QObject::tr("Special Keys")); | 97 | tabWidget->addTab(m_tabKey, "", QObject::tr("Special Keys")); |
98 | tabWidget->setCurrentTab( tabprof ); | 98 | tabWidget->setCurrentTab( tabprof ); |
99 | 99 | ||
100 | 100 | ||
101 | // fill the comboboxes | 101 | // fill the comboboxes |
102 | QStringList list = m_fact->connectionWidgets(); | 102 | QStringList list = m_fact->connectionWidgets(); |
103 | QStringList::Iterator it; | 103 | QStringList::Iterator it; |
104 | for (it =list.begin(); it != list.end(); ++it ) { | 104 | for (it =list.begin(); it != list.end(); ++it ) { |
105 | m_conCmb->insertItem( (*it) ); | 105 | m_conCmb->insertItem( (*it) ); |
106 | } | 106 | } |
107 | list = m_fact->terminalWidgets(); | 107 | list = m_fact->terminalWidgets(); |
@@ -176,25 +176,24 @@ QCString ProfileEditorDialog::profType()const | |||
176 | * we need to switch the widget | 176 | * we need to switch the widget |
177 | */ | 177 | */ |
178 | void ProfileEditorDialog::slotConActivated( const QString& str ) { | 178 | void ProfileEditorDialog::slotConActivated( const QString& str ) { |
179 | delete m_con; | 179 | delete m_con; |
180 | m_con = m_fact->newConnectionPlugin( str, m_tabCon ); | 180 | m_con = m_fact->newConnectionPlugin( str, m_tabCon ); |
181 | 181 | ||
182 | if ( !m_con ) { | 182 | if ( !m_con ) { |
183 | m_con = new NoOptions( str, m_tabCon, "name"); | 183 | m_con = new NoOptions( str, m_tabCon, "name"); |
184 | } | 184 | } |
185 | m_con->load( m_prof ); | 185 | m_con->load( m_prof ); |
186 | m_layCon->addWidget( m_con ); | 186 | m_layCon->addWidget( m_con ); |
187 | 187 | ||
188 | tabWidget->addTab( m_tabCon, "", QObject::tr("Connection") ); | ||
189 | tabWidget->setCurrentTab( tabprof ); | 188 | tabWidget->setCurrentTab( tabprof ); |
190 | 189 | ||
191 | } | 190 | } |
192 | /* | 191 | /* |
193 | * we need to switch the widget | 192 | * we need to switch the widget |
194 | */ | 193 | */ |
195 | void ProfileEditorDialog::slotTermActivated( const QString& str ) { | 194 | void ProfileEditorDialog::slotTermActivated( const QString& str ) { |
196 | delete m_term; | 195 | delete m_term; |
197 | m_term = m_fact->newTerminalPlugin( str, m_tabTerm ); | 196 | m_term = m_fact->newTerminalPlugin( str, m_tabTerm ); |
198 | 197 | ||
199 | if (m_term) { | 198 | if (m_term) { |
200 | m_term->load(m_prof ); | 199 | m_term->load(m_prof ); |
diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp index bd0312a..5c6d975 100644 --- a/noncore/apps/opie-console/serialconfigwidget.cpp +++ b/noncore/apps/opie-console/serialconfigwidget.cpp | |||
@@ -1,23 +1,23 @@ | |||
1 | #include <qlabel.h> | 1 | #include <qlabel.h> |
2 | #include <qlayout.h> | 2 | #include <qlayout.h> |
3 | #include <qcombobox.h> | 3 | #include <qcombobox.h> |
4 | 4 | ||
5 | #include "iolayerbase.h" | 5 | #include "iolayerbase.h" |
6 | #include "serialconfigwidget.h" | 6 | #include "serialconfigwidget.h" |
7 | 7 | ||
8 | namespace { | 8 | namespace { |
9 | void setCurrent( const QString& str, QComboBox* bo ) { | 9 | void setCurrent( const QString& str, QComboBox* bo ) { |
10 | uint b = bo->count(); | 10 | uint b = bo->count(); |
11 | for (uint i = 0; i < bo->count(); i++ ) { | 11 | for (int i = 0; i < bo->count(); i++ ) { |
12 | if ( bo->text(i) == str ) { | 12 | if ( bo->text(i) == str ) { |
13 | bo->setCurrentItem( i ); | 13 | bo->setCurrentItem( i ); |
14 | return; | 14 | return; |
15 | } | 15 | } |
16 | } | 16 | } |
17 | bo->insertItem( str ); | 17 | bo->insertItem( str ); |
18 | bo->setCurrentItem( b ); | 18 | bo->setCurrentItem( b ); |
19 | } | 19 | } |
20 | 20 | ||
21 | 21 | ||
22 | } | 22 | } |
23 | 23 | ||
diff --git a/noncore/apps/opie-console/transferdialog.cpp b/noncore/apps/opie-console/transferdialog.cpp index f89723c..75c4c72 100644 --- a/noncore/apps/opie-console/transferdialog.cpp +++ b/noncore/apps/opie-console/transferdialog.cpp | |||
@@ -8,25 +8,25 @@ | |||
8 | #include <qradiobutton.h> | 8 | #include <qradiobutton.h> |
9 | #include <qbuttongroup.h> | 9 | #include <qbuttongroup.h> |
10 | 10 | ||
11 | #include <opie/ofiledialog.h> | 11 | #include <opie/ofiledialog.h> |
12 | 12 | ||
13 | #include "file_layer.h" | 13 | #include "file_layer.h" |
14 | #include "receive_layer.h" | 14 | #include "receive_layer.h" |
15 | #include "metafactory.h" | 15 | #include "metafactory.h" |
16 | #include "mainwindow.h" | 16 | #include "mainwindow.h" |
17 | 17 | ||
18 | #include "transferdialog.h" | 18 | #include "transferdialog.h" |
19 | 19 | ||
20 | TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *name) | 20 | TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *) |
21 | : QDialog(parent, 0l, true), m_win(mainwindow) | 21 | : QDialog(parent, 0l, true), m_win(mainwindow) |
22 | { | 22 | { |
23 | m_lay = 0l; | 23 | m_lay = 0l; |
24 | m_recvlay = 0l; | 24 | m_recvlay = 0l; |
25 | QVBoxLayout *vbox, *vbox2; | 25 | QVBoxLayout *vbox, *vbox2; |
26 | QHBoxLayout *hbox, *hbox2, *hbox3; | 26 | QHBoxLayout *hbox, *hbox2, *hbox3; |
27 | QLabel *file, *mode, *progress, *status; | 27 | QLabel *file, *mode, *progress, *status; |
28 | QButtonGroup *group; | 28 | QButtonGroup *group; |
29 | QRadioButton *mode_send, *mode_receive; | 29 | QRadioButton *mode_send, *mode_receive; |
30 | 30 | ||
31 | m_autocleanup = 0; | 31 | m_autocleanup = 0; |
32 | 32 | ||
@@ -172,30 +172,30 @@ void TransferDialog::slotCancel() | |||
172 | { | 172 | { |
173 | QMessageBox::information(this, | 173 | QMessageBox::information(this, |
174 | QObject::tr("Cancelled"), | 174 | QObject::tr("Cancelled"), |
175 | QObject::tr("The file transfer has been cancelled.")); | 175 | QObject::tr("The file transfer has been cancelled.")); |
176 | } | 176 | } |
177 | } | 177 | } |
178 | else | 178 | else |
179 | { | 179 | { |
180 | close(); | 180 | close(); |
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
184 | void TransferDialog::slotProgress(const QString& file, int progress, int speed, int hours, int minutes, int seconds) | 184 | void TransferDialog::slotProgress(const QString& , int progress, int , int , int, int ) |
185 | { | 185 | { |
186 | progressbar->setProgress(progress); | 186 | progressbar->setProgress(progress); |
187 | } | 187 | } |
188 | 188 | ||
189 | void TransferDialog::slotError(int error, const QString& message) | 189 | void TransferDialog::slotError(int error, const QString& ) |
190 | { | 190 | { |
191 | statusbar->setText(QObject::tr("Ready")); | 191 | statusbar->setText(QObject::tr("Ready")); |
192 | 192 | ||
193 | switch(error) | 193 | switch(error) |
194 | { | 194 | { |
195 | case FileTransferLayer::NotSupported: | 195 | case FileTransferLayer::NotSupported: |
196 | QMessageBox::critical(this, | 196 | QMessageBox::critical(this, |
197 | QObject::tr("Error"), | 197 | QObject::tr("Error"), |
198 | QObject::tr("Operation not supported.")); | 198 | QObject::tr("Operation not supported.")); |
199 | break; | 199 | break; |
200 | case FileTransferLayer::StartError: | 200 | case FileTransferLayer::StartError: |
201 | QMessageBox::critical(this, | 201 | QMessageBox::critical(this, |
@@ -229,25 +229,25 @@ void TransferDialog::slotError(int error, const QString& message) | |||
229 | } | 229 | } |
230 | 230 | ||
231 | void TransferDialog::slotSent() | 231 | void TransferDialog::slotSent() |
232 | { | 232 | { |
233 | progressbar->setProgress(100); | 233 | progressbar->setProgress(100); |
234 | QMessageBox::information(this, QObject::tr("Sent"), QObject::tr("File has been sent.")); | 234 | QMessageBox::information(this, QObject::tr("Sent"), QObject::tr("File has been sent.")); |
235 | ok->setEnabled(true); | 235 | ok->setEnabled(true); |
236 | progressbar->setProgress(0); | 236 | progressbar->setProgress(0); |
237 | statusbar->setText(QObject::tr("Ready")); | 237 | statusbar->setText(QObject::tr("Ready")); |
238 | m_autocleanup = 1; | 238 | m_autocleanup = 1; |
239 | } | 239 | } |
240 | 240 | ||
241 | void TransferDialog::slotReceived(const QString& file) | 241 | void TransferDialog::slotReceived(const QString& ) |
242 | { | 242 | { |
243 | progressbar->setProgress(100); | 243 | progressbar->setProgress(100); |
244 | QMessageBox::information(this, QObject::tr("Received"), QObject::tr("File has been received.")); | 244 | QMessageBox::information(this, QObject::tr("Received"), QObject::tr("File has been received.")); |
245 | //QMessageBox::information(this, QObject::tr("Sent"), QObject::tr("File has been received as %1.").arg(file)); | 245 | //QMessageBox::information(this, QObject::tr("Sent"), QObject::tr("File has been received as %1.").arg(file)); |
246 | ok->setEnabled(true); | 246 | ok->setEnabled(true); |
247 | progressbar->setProgress(0); | 247 | progressbar->setProgress(0); |
248 | statusbar->setText(QObject::tr("Ready")); | 248 | statusbar->setText(QObject::tr("Ready")); |
249 | m_autocleanup = 1; | 249 | m_autocleanup = 1; |
250 | } | 250 | } |
251 | 251 | ||
252 | void TransferDialog::slotMode(int id) | 252 | void TransferDialog::slotMode(int id) |
253 | { | 253 | { |