-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index 3cb1c0a..5171bf1 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -1380,25 +1380,25 @@ void TEWidget::dropEvent(QDropEvent* event) | |||
1380 | } | 1380 | } |
1381 | else if(QTextDrag::decode(event, dropText)) { | 1381 | else if(QTextDrag::decode(event, dropText)) { |
1382 | // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; | 1382 | // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; |
1383 | if (currentSession) { | 1383 | if (currentSession) { |
1384 | currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1384 | currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1385 | } | 1385 | } |
1386 | // Paste it | 1386 | // Paste it |
1387 | } | 1387 | } |
1388 | } | 1388 | } |
1389 | #endif | 1389 | #endif |
1390 | 1390 | ||
1391 | 1391 | ||
1392 | void TEWidget::drop_menu_activated(int /*item*/) | 1392 | void TEWidget::drop_menu_activated(int item) |
1393 | { | 1393 | { |
1394 | #ifndef QT_NO_DRAGANDDROP | 1394 | #ifndef QT_NO_DRAGANDDROP |
1395 | switch (item) | 1395 | switch (item) |
1396 | { | 1396 | { |
1397 | case 0: // paste | 1397 | case 0: // paste |
1398 | currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1398 | currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1399 | // KWM::activate((Window)this->winId()); | 1399 | // KWM::activate((Window)this->winId()); |
1400 | break; | 1400 | break; |
1401 | case 1: // cd ... | 1401 | case 1: // cd ... |
1402 | currentSession->getEmulation()->sendString("cd "); | 1402 | currentSession->getEmulation()->sendString("cd "); |
1403 | struct stat statbuf; | 1403 | struct stat statbuf; |
1404 | if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 ) | 1404 | if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 ) |
@@ -1409,21 +1409,23 @@ void TEWidget::drop_menu_activated(int /*item*/) | |||
1409 | KURL url; | 1409 | KURL url; |
1410 | url.setPath( dropText ); | 1410 | url.setPath( dropText ); |
1411 | dropText = url.directory( true, false ); // remove filename | 1411 | dropText = url.directory( true, false ); // remove filename |
1412 | */ | 1412 | */ |
1413 | } | 1413 | } |
1414 | } | 1414 | } |
1415 | dropText.replace(QRegExp(" "), "\\ "); // escape spaces | 1415 | dropText.replace(QRegExp(" "), "\\ "); // escape spaces |
1416 | currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1416 | currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1417 | currentSession->getEmulation()->sendString("\n"); | 1417 | currentSession->getEmulation()->sendString("\n"); |
1418 | // KWM::activate((Window)this->winId()); | 1418 | // KWM::activate((Window)this->winId()); |
1419 | break; | 1419 | break; |
1420 | } | 1420 | } |
1421 | #else | ||
1422 | Q_UNUSED(item); | ||
1421 | #endif | 1423 | #endif |
1422 | } | 1424 | } |
1423 | 1425 | ||
1424 | void TEWidget::setWrapAt(int columns) | 1426 | void TEWidget::setWrapAt(int columns) |
1425 | { | 1427 | { |
1426 | vcolumns = columns; | 1428 | vcolumns = columns; |
1427 | propagateSize(); | 1429 | propagateSize(); |
1428 | update(); | 1430 | update(); |
1429 | } | 1431 | } |