summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/BUGS1
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp3
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/BUGS b/noncore/apps/opie-console/BUGS
index e6339e1..8195dc5 100644
--- a/noncore/apps/opie-console/BUGS
+++ b/noncore/apps/opie-console/BUGS
@@ -1,31 +1,32 @@
1Ok we all know we write perfect code 1Ok we all know we write perfect code
2but sometimes the compiler produces bad code 2but sometimes the compiler produces bad code
3and we need to work around some compiler bugs!! -zecke 3and we need to work around some compiler bugs!! -zecke
4 4
5 5
6Send/receive: lrzsz behaves strange when trying to use 6Send/receive: lrzsz behaves strange when trying to use
7--overwrite or --rename. 7--overwrite or --rename.
8 8
9- transfer dialog is still a top dialog instead on the widgetstack of of the 9- transfer dialog is still a top dialog instead on the widgetstack of of the
10connection its used on 10connection its used on
11 11
12- keys and buttonbar merge 12- keys and buttonbar merge
13 13
14- keys really working 14- keys really working
15 mc is working 15 mc is working
16 but F11 on bar seems to be the F10 key and so on 16 but F11 on bar seems to be the F10 key and so on
17 F9 is F8... -zecke 17 F9 is F8... -zecke
18 Should be fixed -zecke 18 Should be fixed -zecke
19 19
20- scripting with "direct subpopup" 20- scripting with "direct subpopup"
21 also: 21 also:
22 - an indication that it is currently recording, also change menu entry to 22 - an indication that it is currently recording, also change menu entry to
23 "cancel recording" then 23 "cancel recording" then
24 24
25- scripts need an extension and also an icon 25- scripts need an extension and also an icon
26 26
27- help documentation needs to be extended 27- help documentation needs to be extended
28 - new connection and save connection 28 - new connection and save connection
29 - paste button 29 - paste button
30 - keys button 30 - keys button
31 31
32- exit / strg + d does not close conection / tab \ No newline at end of file
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 127009b..36daaef 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -1,74 +1,73 @@
1#include <qlayout.h> 1#include <qlayout.h>
2#include <qlineedit.h> 2#include <qlineedit.h>
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qmessagebox.h> 4#include <qmessagebox.h>
5#include <qstringlist.h> 5#include <qstringlist.h>
6#include <qcombobox.h> 6#include <qcombobox.h>
7#include <qcheckbox.h> 7#include <qcheckbox.h>
8#include <qscrollview.h> 8#include <qscrollview.h>
9 9
10//#include "profileeditorplugins.h"
11#include "metafactory.h" 10#include "metafactory.h"
12#include "profileeditordialog.h" 11#include "profileeditordialog.h"
13 12
14namespace { 13namespace {
15 void setCurrent( const QString& str, QComboBox* bo ) { 14 void setCurrent( const QString& str, QComboBox* bo ) {
16 for (int i = 0; i < bo->count(); i++ ) { 15 for (int i = 0; i < bo->count(); i++ ) {
17 if ( bo->text(i) == str ) { 16 if ( bo->text(i) == str ) {
18 bo->setCurrentItem( i ); 17 bo->setCurrentItem( i );
19 } 18 }
20 } 19 }
21 }; 20 };
22} 21}
23 22
24ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, 23ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact,
25 const Profile& prof ) 24 const Profile& prof )
26 : QDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof ) 25 : QDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof )
27{ 26{
28 initUI(); 27 initUI();
29 28
30 // Apply current profile 29 // Apply current profile
31 // plugin_plugin->load(profile); 30 // plugin_plugin->load(profile);
32 // ... (reset profile name line edit etc.) 31 // ... (reset profile name line edit etc.)
33} 32}
34 33
35ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) 34ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact )
36 : QDialog(0, 0, TRUE), m_fact( fact ) 35 : QDialog(0, 0, TRUE), m_fact( fact )
37{ 36{
38 // Default profile 37 // Default profile
39 m_prof = Profile("New Profile", "serial", "default", Profile::Black, Profile::White, Profile::VT102); 38 m_prof = Profile("New Profile", "serial", "default", Profile::Black, Profile::White, Profile::VT102);
40 39
41 initUI(); 40 initUI();
42 41
43 // Apply current profile 42 // Apply current profile
44 // plugin_plugin->load(profile); 43 // plugin_plugin->load(profile);
45} 44}
46 45
47Profile ProfileEditorDialog::profile() const 46Profile ProfileEditorDialog::profile() const
48{ 47{
49 return m_prof; 48 return m_prof;
50} 49}
51 50
52void ProfileEditorDialog::initUI() 51void ProfileEditorDialog::initUI()
53{ 52{
54 m_con = m_term = m_key = 0l; 53 m_con = m_term = m_key = 0l;
55 54
56 55
57 QVBoxLayout *mainLayout = new QVBoxLayout( this ); 56 QVBoxLayout *mainLayout = new QVBoxLayout( this );
58 tabWidget = new OTabWidget( this ); 57 tabWidget = new OTabWidget( this );
59 tabWidget->setTabStyle(OTabWidget::TextTab); 58 tabWidget->setTabStyle(OTabWidget::TextTab);
60 mainLayout->add(tabWidget); 59 mainLayout->add(tabWidget);
61 60
62 /* base tabs */ 61 /* base tabs */
63 tabprof = new QWidget(this); 62 tabprof = new QWidget(this);
64 m_tabTerm = new QWidget(this); 63 m_tabTerm = new QWidget(this);
65 m_tabCon = new QWidget(this); 64 m_tabCon = new QWidget(this);
66 m_tabKey = new QWidget(this); 65 m_tabKey = new QWidget(this);
67 66
68 m_svCon = new QScrollView( m_tabCon ); 67 m_svCon = new QScrollView( m_tabCon );
69 m_svCon->setResizePolicy( QScrollView::AutoOneFit ); 68 m_svCon->setResizePolicy( QScrollView::AutoOneFit );
70 m_svCon->setHScrollBarMode( QScrollView::AlwaysOff ); 69 m_svCon->setHScrollBarMode( QScrollView::AlwaysOff );
71 m_svCon->setFrameShape( QFrame::NoFrame ); 70 m_svCon->setFrameShape( QFrame::NoFrame );
72 m_svTerm = new QScrollView( m_tabTerm ); 71 m_svTerm = new QScrollView( m_tabTerm );
73 m_svTerm->setResizePolicy( QScrollView::AutoOneFit ); 72 m_svTerm->setResizePolicy( QScrollView::AutoOneFit );
74 m_svTerm->setHScrollBarMode( QScrollView::AlwaysOff ); 73 m_svTerm->setHScrollBarMode( QScrollView::AlwaysOff );
@@ -140,101 +139,101 @@ void ProfileEditorDialog::initUI()
140 139
141} 140}
142 141
143ProfileEditorDialog::~ProfileEditorDialog() { 142ProfileEditorDialog::~ProfileEditorDialog() {
144 143
145} 144}
146void ProfileEditorDialog::accept() 145void ProfileEditorDialog::accept()
147{ 146{
148 if(profName().isEmpty()) 147 if(profName().isEmpty())
149 { 148 {
150 QMessageBox::information(this, 149 QMessageBox::information(this,
151 QObject::tr("Invalid profile"), 150 QObject::tr("Invalid profile"),
152 QObject::tr("Please enter a profile name.")); 151 QObject::tr("Please enter a profile name."));
153 return; 152 return;
154 } 153 }
155 // Save profile and plugin profile 154 // Save profile and plugin profile
156 //if(plugin_plugin) plugin_plugin->save(); 155 //if(plugin_plugin) plugin_plugin->save();
157 156
158 // Save general values 157 // Save general values
159 m_prof.setName( profName() ); 158 m_prof.setName( profName() );
160 m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) ); 159 m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) );
161 m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) ); 160 m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) );
162 m_prof.setAutoConnect( m_autoConnect->isChecked() ); 161 m_prof.setAutoConnect( m_autoConnect->isChecked() );
163 162
164 if (m_con ) 163 if (m_con )
165 m_con->save( m_prof ); 164 m_con->save( m_prof );
166 if (m_term ) 165 if (m_term )
167 m_term->save( m_prof ); 166 m_term->save( m_prof );
168 if (m_key) 167 if (m_key)
169 m_key->save( m_prof ); 168 m_key->save( m_prof );
170 169
171 QDialog::accept(); 170 QDialog::accept();
172} 171}
173 172
174 173
175QString ProfileEditorDialog::profName()const 174QString ProfileEditorDialog::profName()const
176{ 175{
177 return m_name->text(); 176 return m_name->text();
178} 177}
179 178
180QCString ProfileEditorDialog::profType()const 179QCString ProfileEditorDialog::profType()const
181{ 180{
182 /*QStringList w = m_fact->configWidgets(); 181 /*QStringList w = m_fact->configWidgets();
183 for(QStringList::Iterator it = w.begin(); it != w.end(); it++) 182 for(QStringList::Iterator it = w.begin(); it != w.end(); it++)
184 if(device_box->currentText() == m_fact->name((*it))) return (*it); 183 if(device_box->currentText() == m_fact->name((*it))) return (*it);
185 */ 184 */
186 return QCString(); 185 return QCString();
187} 186}
188/* 187/*
189 * we need to switch the widget 188 * we need to switch the widget
190 */ 189 */
191void ProfileEditorDialog::slotConActivated( const QString& str ) { 190void ProfileEditorDialog::slotConActivated( const QString& str ) {
192 191
193 delete m_con; 192 delete m_con;
194 193
195 m_con = m_fact->newConnectionPlugin( str, m_svCon->viewport() ); 194 m_con = m_fact->newConnectionPlugin( str, m_svCon->viewport() );
196 195
197 if ( !m_con ) { 196 if ( !m_con ) {
198 m_con = new NoOptions( str, m_svCon->viewport(), "name"); 197 m_con = new NoOptions( str, m_svCon->viewport(), "name");
199 } 198 }
200 199
201 // FIXME ugly hack right. Right solution would be to look into the layer and see if it 200 // FIXME ugly hack right. Right solution would be to look into the layer and see if it
202 // supports auto connect and then set it as prefered 201 // supports auto connect and then set it as prefered
203 //if ( ( )->layer()->supports()[0] == 1 ) { 202 //if ( ( )->layer()->supports()[0] == 1 ) {
204 if ( m_conCmb ->currentText() == "local Console" ) { 203 if ( m_conCmb ->currentText() == tr("local Console") ) {
205 m_autoConnect->setChecked( true ); 204 m_autoConnect->setChecked( true );
206 } else { 205 } else {
207 m_autoConnect->setChecked( false ); 206 m_autoConnect->setChecked( false );
208 } 207 }
209 208
210 m_con->load( m_prof ); 209 m_con->load( m_prof );
211 m_svCon->addChild( m_con ); 210 m_svCon->addChild( m_con );
212} 211}
213 212
214 213
215/* 214/*
216 * we need to switch the widget 215 * we need to switch the widget
217 */ 216 */
218void ProfileEditorDialog::slotTermActivated( const QString& str ) { 217void ProfileEditorDialog::slotTermActivated( const QString& str ) {
219 218
220 delete m_term; 219 delete m_term;
221 220
222 m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() ); 221 m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() );
223 222
224 if (m_term) { 223 if (m_term) {
225 m_term->load( m_prof ); 224 m_term->load( m_prof );
226 m_svTerm->addChild( m_term ); 225 m_svTerm->addChild( m_term );
227 } 226 }
228} 227}
229 228
230void ProfileEditorDialog::slotKeyActivated(const QString &str) { 229void ProfileEditorDialog::slotKeyActivated(const QString &str) {
231 delete m_key; 230 delete m_key;
232 m_key = m_fact->newKeyboardPlugin( str, m_tabKey ); 231 m_key = m_fact->newKeyboardPlugin( str, m_tabKey );
233 232
234 if (m_key) { 233 if (m_key) {
235 234
236 m_key->load(m_prof); 235 m_key->load(m_prof);
237 m_layKey->addWidget(m_key); 236 m_layKey->addWidget(m_key);
238 } 237 }
239 238
240} 239}