summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/widget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/widget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/widget.cpp12
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
@@ -1,47 +1,48 @@
/* ------------------------------------------------------------------------ */
/* */
/* [TEWidget.C] Terminal Emulation Widget */
/* */
/* ------------------------------------------------------------------------ */
/* */
/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */
/* */
/* This file is part of Konsole - an X terminal for KDE */
/* */
/* ------------------------------------------------------------------------ */
/* */
/* Ported Konsole to Qt/Embedded */
/* */
/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
/* */
/* -------------------------------------------------------------------------- */
/* ibot:
i changed
"currentSession->getEmulation()->sendString()" to
"currentSession->layer()->send()"
# this is not right! EmulationLayer should send it...
+ i changed all those to use emulationLayer()->send() instead
i had to create a QByteArray before...
TODO:
alter Widget to use only QByteArray, where applicable.
*/
/*! \class Widget
\brief Visible screen contents
This class is responsible to map the `image' of a terminal emulation to the
display. All the dependency of the emulation to a specific GUI or toolkit is
localized here. Further, this widget has no knowledge about being part of an
emulation, it simply work within the terminal emulation framework by exposing
size and key events and by being ordered to show a new image.
<ul>
<li> The internal image has the size of the widget (evtl. rounded up)
<li> The external image used in setImage can have any size.
<li> (internally) the external image is simply copied to the internal
when a setImage happens. During a resizeEvent no painting is done
a paintEvent is expected to follow anyway.
@@ -1209,83 +1210,84 @@ void Widget::dropEvent(QDropEvent* event)
}
/*
KURL url(p);
if (url.isLocalFile()) {
dropText += url.path(); // local URL : remove protocol
}
else {
dropText += url.prettyURL();
bPopup = false; // a non-local file, don't popup
}
*/
}
if (bPopup)
// m_drop->popup(pos() + event->pos());
m_drop->popup(mapToGlobal(event->pos()));
else
{
if (currentSession) {
//currentSession->getEmulation()->sendString(dropText.local8Bit());
QByteArray tmp;
// ibot: this should be pretty wrong...
- currentSession->layer()->send( tmp.setRawData( dropText.local8Bit()));
+ // now it sends to the right layer
+ currentSession-> emulationLayer()->send( tmp.setRawData( dropText.local8Bit()));
}
// kdDebug() << "Drop:" << dropText.local8Bit() << "\n";
}
}
}
else if(QTextDrag::decode(event, dropText)) {
// kdDebug() << "Drop:" << dropText.local8Bit() << "\n";
if (currentSession) {
//currentSession->getEmulation()->sendString(dropText.local8Bit());
QByteArray tmp;
- currentSession->layer()->send( tmp.setRawData( dropText.local8Bit()));
+ currentSession->emulationLayer()->send( tmp.setRawData( dropText.local8Bit()));
}
// Paste it
}
}
#endif
void Widget::drop_menu_activated(int item)
{
#ifndef QT_NO_DRAGANDDROP
QByteArray tmp;
switch (item)
{
case 0: // paste
//currentSession->getEmulation()->sendString(dropText.local8Bit());
- currentSession->layer()->send( tmp.setRawData( dropText.local8Bit()));
+ currentSession->emulationLayer()->send( tmp.setRawData( dropText.local8Bit()));
// KWM::activate((Window)this->winId());
break;
case 1: // cd ...
//currentSession->getEmulation()->sendString("cd ");
tmp.setRawData( "cd " );
- currentSession->layer()->send( tmp );
+ currentSession->emulationLayer()->send( tmp );
struct stat statbuf;
if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 )
{
if ( !S_ISDIR(statbuf.st_mode) )
{
/*
KURL url;
url.setPath( dropText );
dropText = url.directory( true, false ); // remove filename
*/
}
}
dropText.replace(QRegExp(" "), "\\ "); // escape spaces
QByteArray tmp2;
tmp.setRawDate( dropText.local8Bit() + "\n" );
//currentSession->getEmulation()->sendString(dropText.local8Bit());
//currentSession->getEmulation()->sendString("\n");
- currentSession->layer()->send( tmp );
+ currentSession->emulationLayer()->send( tmp );
// KWM::activate((Window)this->winId());
break;
}
#endif
}