summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-04-28 22:47:19 (UTC)
committer llornkcor <llornkcor>2002-04-28 22:47:19 (UTC)
commit28d8806d21ec8fbc806d80614fd496f6b5ca6b55 (patch) (unidiff)
tree6cfe74bb3ad852662a7e0854d5d589df25fd56ee
parent726d985ddb6a5c7eb25a48efdadb189eb38b9a2a (diff)
downloadopie-28d8806d21ec8fbc806d80614fd496f6b5ca6b55.zip
opie-28d8806d21ec8fbc806d80614fd496f6b5ca6b55.tar.gz
opie-28d8806d21ec8fbc806d80614fd496f6b5ca6b55.tar.bz2
whoops
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index adcfb7f..f13d0c9 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -107,130 +107,129 @@ static const char *commonCmds[] =
107 "cardctl eject", 107 "cardctl eject",
108 "cat ", 108 "cat ",
109 "cd ", 109 "cd ",
110 "chmod ", 110 "chmod ",
111 "clear", 111 "clear",
112 "cp ", 112 "cp ",
113 "dc ", 113 "dc ",
114 "df ", 114 "df ",
115 "dmesg", 115 "dmesg",
116 "echo ", 116 "echo ",
117 "env", 117 "env",
118 "find ", 118 "find ",
119 "free", 119 "free",
120 "grep ", 120 "grep ",
121 "ifconfig ", 121 "ifconfig ",
122 "ipkg ", 122 "ipkg ",
123 "mkdir ", 123 "mkdir ",
124 "mv ", 124 "mv ",
125 "nc localhost 7776", 125 "nc localhost 7776",
126 "nc localhost 7777", 126 "nc localhost 7777",
127 "netstat ", 127 "netstat ",
128 "nslookup ", 128 "nslookup ",
129 "ping ", 129 "ping ",
130 "ps aux", 130 "ps aux",
131 "pwd ", 131 "pwd ",
132 "rm ", 132 "rm ",
133 "rmdir ", 133 "rmdir ",
134 "route ", 134 "route ",
135 "set ", 135 "set ",
136 "traceroute", 136 "traceroute",
137 137
138/* 138/*
139 "gzip", 139 "gzip",
140 "gunzip", 140 "gunzip",
141 "chgrp", 141 "chgrp",
142 "chown", 142 "chown",
143 "date", 143 "date",
144 "dd", 144 "dd",
145 "df", 145 "df",
146 "dmesg", 146 "dmesg",
147 "fuser", 147 "fuser",
148 "hostname", 148 "hostname",
149 "kill", 149 "kill",
150 "killall", 150 "killall",
151 "ln", 151 "ln",
152 "ping", 152 "ping",
153 "mount", 153 "mount",
154 "more", 154 "more",
155 "sort", 155 "sort",
156 "touch", 156 "touch",
157 "umount", 157 "umount",
158 "mknod", 158 "mknod",
159 "netstat", 159 "netstat",
160*/ 160*/
161 161
162 "exit", 162 "exit",
163 NULL 163 NULL
164}; 164};
165 165
166 166
167Konsole::Konsole(QWidget* parent, const char* name, WFlags fl) : 167Konsole::Konsole(QWidget* parent, const char* name, WFlags fl) :
168 QMainWindow(parent, name, fl) 168 QMainWindow(parent, name, fl)
169{ 169{
170 QStrList args; 170 QStrList args;
171 init("/bin/ash",args); 171 init("/bin/sh",args);
172// init("/bin/sh",args);
173} 172}
174 173
175Konsole::Konsole(const char* name, const char* _pgm, QStrList & _args, int) 174Konsole::Konsole(const char* name, const char* _pgm, QStrList & _args, int)
176 : QMainWindow(0, name) 175 : QMainWindow(0, name)
177{ 176{
178 init(_pgm,_args); 177 init(_pgm,_args);
179} 178}
180 179
181void Konsole::initCommandList() 180void Konsole::initCommandList()
182{ 181{
183// qDebug("Konsole::initCommandList"); 182// qDebug("Konsole::initCommandList");
184 Config cfg("Konsole"); 183 Config cfg("Konsole");
185 cfg.setGroup("Commands"); 184 cfg.setGroup("Commands");
186 commonCombo->setInsertionPolicy(QComboBox::AtCurrent); 185 commonCombo->setInsertionPolicy(QComboBox::AtCurrent);
187 commonCombo->clear(); 186 commonCombo->clear();
188 if (cfg.readEntry("Commands Set","FALSE") == "FALSE") { 187 if (cfg.readEntry("Commands Set","FALSE") == "FALSE") {
189 for (int i = 0; commonCmds[i] != NULL; i++) { 188 for (int i = 0; commonCmds[i] != NULL; i++) {
190 commonCombo->insertItem(commonCmds[i],i); 189 commonCombo->insertItem(commonCmds[i],i);
191 } 190 }
192 } else { 191 } else {
193 for (int i = 0; i < 100; i++) { 192 for (int i = 0; i < 100; i++) {
194 if (!(cfg.readEntry( QString::number(i),"")).isEmpty()) 193 if (!(cfg.readEntry( QString::number(i),"")).isEmpty())
195 commonCombo->insertItem((cfg.readEntry( QString::number(i),""))); 194 commonCombo->insertItem((cfg.readEntry( QString::number(i),"")));
196 } 195 }
197 } 196 }
198 197
199} 198}
200 199
201void Konsole::init(const char* _pgm, QStrList & _args) 200void Konsole::init(const char* _pgm, QStrList & _args)
202{ 201{
203 b_scroll = TRUE; // histon; 202 b_scroll = TRUE; // histon;
204 n_keytab = 0; 203 n_keytab = 0;
205 n_render = 0; 204 n_render = 0;
206 startUp=0; 205 startUp=0;
207 setCaption( tr("Terminal") ); 206 setCaption( tr("Terminal") );
208 setIcon( Resource::loadPixmap( "konsole" ) ); 207 setIcon( Resource::loadPixmap( "konsole" ) );
209 208
210 Config cfg("Konsole"); 209 Config cfg("Konsole");
211 cfg.setGroup("Konsole"); 210 cfg.setGroup("Konsole");
212 QString tmp; 211 QString tmp;
213 // initialize the list of allowed fonts /////////////////////////////////// 212 // initialize the list of allowed fonts ///////////////////////////////////
214 cfont = cfg.readNumEntry("FontID", 1); 213 cfont = cfg.readNumEntry("FontID", 1);
215 QFont f = QFont("Micro", 4, QFont::Normal); 214 QFont f = QFont("Micro", 4, QFont::Normal);
216 f.setFixedPitch(TRUE); 215 f.setFixedPitch(TRUE);
217 fonts.append(new VTFont(tr("Micro"), f)); 216 fonts.append(new VTFont(tr("Micro"), f));
218 217
219 f = QFont("Fixed", 7, QFont::Normal); 218 f = QFont("Fixed", 7, QFont::Normal);
220 f.setFixedPitch(TRUE); 219 f.setFixedPitch(TRUE);
221 fonts.append(new VTFont(tr("Small Fixed"), f)); 220 fonts.append(new VTFont(tr("Small Fixed"), f));
222 221
223 f = QFont("Fixed", 12, QFont::Normal); 222 f = QFont("Fixed", 12, QFont::Normal);
224 f.setFixedPitch(TRUE); 223 f.setFixedPitch(TRUE);
225 fonts.append(new VTFont(tr("Medium Fixed"), f)); 224 fonts.append(new VTFont(tr("Medium Fixed"), f));
226 225
227 // create terminal emulation framework //////////////////////////////////// 226 // create terminal emulation framework ////////////////////////////////////
228 nsessions = 0; 227 nsessions = 0;
229 228
230 tab = new EKNumTabWidget(this); 229 tab = new EKNumTabWidget(this);
231 230
232 connect(tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(switchSession(QWidget*))); 231 connect(tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(switchSession(QWidget*)));
233 232
234 // create terminal toolbar //////////////////////////////////////////////// 233 // create terminal toolbar ////////////////////////////////////////////////
235 setToolBarsMovable( FALSE ); 234 setToolBarsMovable( FALSE );
236 QPEToolBar *menuToolBar = new QPEToolBar( this ); 235 QPEToolBar *menuToolBar = new QPEToolBar( this );