Diffstat (limited to 'noncore/apps/opie-console/widget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/widget.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/widget.cpp b/noncore/apps/opie-console/widget.cpp index b8f2906..d948179 100644 --- a/noncore/apps/opie-console/widget.cpp +++ b/noncore/apps/opie-console/widget.cpp | |||
@@ -18,12 +18,13 @@ | |||
18 | 18 | ||
19 | /* ibot: | 19 | /* ibot: |
20 | i changed | 20 | i changed |
21 | "currentSession->getEmulation()->sendString()" to | 21 | "currentSession->getEmulation()->sendString()" to |
22 | "currentSession->layer()->send()" | 22 | "currentSession->layer()->send()" |
23 | # this is not right! EmulationLayer should send it... | 23 | # this is not right! EmulationLayer should send it... |
24 | i changed all those to use emulationLayer()->send() instead | ||
24 | i had to create a QByteArray before... | 25 | i had to create a QByteArray before... |
25 | 26 | ||
26 | TODO: | 27 | TODO: |
27 | alter Widget to use only QByteArray, where applicable. | 28 | alter Widget to use only QByteArray, where applicable. |
28 | */ | 29 | */ |
29 | 30 | ||
@@ -1227,24 +1228,25 @@ void Widget::dropEvent(QDropEvent* event) | |||
1227 | else | 1228 | else |
1228 | { | 1229 | { |
1229 | if (currentSession) { | 1230 | if (currentSession) { |
1230 | //currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1231 | //currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1231 | QByteArray tmp; | 1232 | QByteArray tmp; |
1232 | // ibot: this should be pretty wrong... | 1233 | // ibot: this should be pretty wrong... |
1233 | currentSession->layer()->send( tmp.setRawData( dropText.local8Bit())); | 1234 | // now it sends to the right layer |
1235 | currentSession-> emulationLayer()->send( tmp.setRawData( dropText.local8Bit())); | ||
1234 | } | 1236 | } |
1235 | // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; | 1237 | // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; |
1236 | } | 1238 | } |
1237 | } | 1239 | } |
1238 | } | 1240 | } |
1239 | else if(QTextDrag::decode(event, dropText)) { | 1241 | else if(QTextDrag::decode(event, dropText)) { |
1240 | // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; | 1242 | // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; |
1241 | if (currentSession) { | 1243 | if (currentSession) { |
1242 | //currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1244 | //currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1243 | QByteArray tmp; | 1245 | QByteArray tmp; |
1244 | currentSession->layer()->send( tmp.setRawData( dropText.local8Bit())); | 1246 | currentSession->emulationLayer()->send( tmp.setRawData( dropText.local8Bit())); |
1245 | } | 1247 | } |
1246 | // Paste it | 1248 | // Paste it |
1247 | } | 1249 | } |
1248 | } | 1250 | } |
1249 | #endif | 1251 | #endif |
1250 | 1252 | ||
@@ -1254,20 +1256,20 @@ void Widget::drop_menu_activated(int item) | |||
1254 | #ifndef QT_NO_DRAGANDDROP | 1256 | #ifndef QT_NO_DRAGANDDROP |
1255 | QByteArray tmp; | 1257 | QByteArray tmp; |
1256 | switch (item) | 1258 | switch (item) |
1257 | { | 1259 | { |
1258 | case 0: // paste | 1260 | case 0: // paste |
1259 | //currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1261 | //currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1260 | currentSession->layer()->send( tmp.setRawData( dropText.local8Bit())); | 1262 | currentSession->emulationLayer()->send( tmp.setRawData( dropText.local8Bit())); |
1261 | 1263 | ||
1262 | // KWM::activate((Window)this->winId()); | 1264 | // KWM::activate((Window)this->winId()); |
1263 | break; | 1265 | break; |
1264 | case 1: // cd ... | 1266 | case 1: // cd ... |
1265 | //currentSession->getEmulation()->sendString("cd "); | 1267 | //currentSession->getEmulation()->sendString("cd "); |
1266 | tmp.setRawData( "cd " ); | 1268 | tmp.setRawData( "cd " ); |
1267 | currentSession->layer()->send( tmp ); | 1269 | currentSession->emulationLayer()->send( tmp ); |
1268 | struct stat statbuf; | 1270 | struct stat statbuf; |
1269 | if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 ) | 1271 | if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 ) |
1270 | { | 1272 | { |
1271 | if ( !S_ISDIR(statbuf.st_mode) ) | 1273 | if ( !S_ISDIR(statbuf.st_mode) ) |
1272 | { | 1274 | { |
1273 | /* | 1275 | /* |
@@ -1279,13 +1281,13 @@ void Widget::drop_menu_activated(int item) | |||
1279 | } | 1281 | } |
1280 | dropText.replace(QRegExp(" "), "\\ "); // escape spaces | 1282 | dropText.replace(QRegExp(" "), "\\ "); // escape spaces |
1281 | QByteArray tmp2; | 1283 | QByteArray tmp2; |
1282 | tmp.setRawDate( dropText.local8Bit() + "\n" ); | 1284 | tmp.setRawDate( dropText.local8Bit() + "\n" ); |
1283 | //currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1285 | //currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1284 | //currentSession->getEmulation()->sendString("\n"); | 1286 | //currentSession->getEmulation()->sendString("\n"); |
1285 | currentSession->layer()->send( tmp ); | 1287 | currentSession->emulationLayer()->send( tmp ); |
1286 | // KWM::activate((Window)this->winId()); | 1288 | // KWM::activate((Window)this->winId()); |
1287 | break; | 1289 | break; |
1288 | } | 1290 | } |
1289 | #endif | 1291 | #endif |
1290 | } | 1292 | } |
1291 | 1293 | ||