author | llornkcor <llornkcor> | 2003-03-16 20:50:47 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-03-16 20:50:47 (UTC) |
commit | 75ebe1838923e121cb093310f7f7c1b021abdcc1 (patch) (unidiff) | |
tree | a7b6e735b7faa08ba1689a7ed6155ceaca5ea1e4 | |
parent | 0aff3e917df1fb56eb1f2a6b2ed98355b25ad653 (diff) | |
download | opie-75ebe1838923e121cb093310f7f7c1b021abdcc1.zip opie-75ebe1838923e121cb093310f7f7c1b021abdcc1.tar.gz opie-75ebe1838923e121cb093310f7f7c1b021abdcc1.tar.bz2 |
fix Ctrl-C
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index a989e10..8214e7d 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -293,17 +293,17 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) | |||
293 | scrollbar = new QScrollBar(this); | 293 | scrollbar = new QScrollBar(this); |
294 | scrollbar->setCursor( arrowCursor ); | 294 | scrollbar->setCursor( arrowCursor ); |
295 | connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); | 295 | connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); |
296 | 296 | ||
297 | hScrollbar = new QScrollBar(this); | 297 | hScrollbar = new QScrollBar(this); |
298 | hScrollbar->setCursor( arrowCursor ); | 298 | hScrollbar->setCursor( arrowCursor ); |
299 | hScrollbar->setOrientation(QScrollBar::Horizontal); | 299 | hScrollbar->setOrientation(QScrollBar::Horizontal); |
300 | hScrollbar->setMaximumHeight(16); | 300 | hScrollbar->setMaximumHeight(16); |
301 | 301 | ||
302 | connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int))); | 302 | connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int))); |
303 | 303 | ||
304 | Config cfg("Konsole"); | 304 | Config cfg("Konsole"); |
305 | cfg.setGroup("ScrollBar"); | 305 | cfg.setGroup("ScrollBar"); |
306 | switch( cfg.readNumEntry("Position",2)){ | 306 | switch( cfg.readNumEntry("Position",2)){ |
307 | case 0: | 307 | case 0: |
308 | scrollLoc = SCRNONE; | 308 | scrollLoc = SCRNONE; |
309 | break; | 309 | break; |
@@ -329,17 +329,17 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) | |||
329 | columns = 1; | 329 | columns = 1; |
330 | font_w = 1; | 330 | font_w = 1; |
331 | font_h = 1; | 331 | font_h = 1; |
332 | font_a = 1; | 332 | font_a = 1; |
333 | word_selection_mode = FALSE; | 333 | word_selection_mode = FALSE; |
334 | hposition = 0; | 334 | hposition = 0; |
335 | vcolumns = 0; | 335 | vcolumns = 0; |
336 | useBeep = true; | 336 | useBeep = true; |
337 | 337 | ||
338 | setMouseMarks(TRUE); | 338 | setMouseMarks(TRUE); |
339 | setVTFont( QFont("fixed") ); | 339 | setVTFont( QFont("fixed") ); |
340 | setColorTable(base_color_table); // init color table | 340 | setColorTable(base_color_table); // init color table |
341 | 341 | ||
342 | qApp->installEventFilter( this ); //FIXME: see below | 342 | qApp->installEventFilter( this ); //FIXME: see below |
343 | // KCursor::setAutoHideCursor( this, true ); | 343 | // KCursor::setAutoHideCursor( this, true ); |
344 | 344 | ||
345 | // Init DnD //////////////////////////////////////////////////////////////// | 345 | // Init DnD //////////////////////////////////////////////////////////////// |
@@ -872,17 +872,17 @@ void TEWidget::mouseDoubleClickEvent(QMouseEvent* ev) | |||
872 | emit extendSelectionSignal( endSel.x(), endSel.y() ); | 872 | emit extendSelectionSignal( endSel.x(), endSel.y() ); |
873 | emit endSelectionSignal(preserve_line_breaks); | 873 | emit endSelectionSignal(preserve_line_breaks); |
874 | preserve_line_breaks = TRUE; | 874 | preserve_line_breaks = TRUE; |
875 | } | 875 | } |
876 | } | 876 | } |
877 | 877 | ||
878 | void TEWidget::focusInEvent( QFocusEvent * ) | 878 | void TEWidget::focusInEvent( QFocusEvent * ) |
879 | { | 879 | { |
880 | 880 | ||
881 | // do nothing, to prevent repainting | 881 | // do nothing, to prevent repainting |
882 | } | 882 | } |
883 | 883 | ||
884 | 884 | ||
885 | void TEWidget::focusOutEvent( QFocusEvent * ) | 885 | void TEWidget::focusOutEvent( QFocusEvent * ) |
886 | { | 886 | { |
887 | // do nothing, to prevent repainting | 887 | // do nothing, to prevent repainting |
888 | } | 888 | } |
@@ -1063,19 +1063,19 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) | |||
1063 | //lets hardcode this sucker | 1063 | //lets hardcode this sucker |
1064 | 1064 | ||
1065 | // qDebug("key pressed 2 is 0x%x", ke->key()); | 1065 | // qDebug("key pressed 2 is 0x%x", ke->key()); |
1066 | emitText("\\"); // expose | 1066 | emitText("\\"); // expose |
1067 | } | 1067 | } |
1068 | else if( ke->state() == ControlButton && ke->key() == Key_V) { | 1068 | else if( ke->state() == ControlButton && ke->key() == Key_V) { |
1069 | pasteClipboard(); | 1069 | pasteClipboard(); |
1070 | } | 1070 | } |
1071 | else if( ke->state() == ControlButton && ke->key() == Key_C) { | 1071 | // else if( ke->state() == ControlButton && ke->key() == Key_C) { |
1072 | // pasteClipboard(); | 1072 | // pasteClipboard(); |
1073 | } | 1073 | // } |
1074 | else | 1074 | else |
1075 | emit keyPressedSignal(ke); // expose | 1075 | emit keyPressedSignal(ke); // expose |
1076 | ke->accept(); | 1076 | ke->accept(); |
1077 | #ifdef FAKE_CTRL_AND_ALT | 1077 | #ifdef FAKE_CTRL_AND_ALT |
1078 | if ( dele ) delete e; | 1078 | if ( dele ) delete e; |
1079 | #endif | 1079 | #endif |
1080 | return true; // stop the event | 1080 | return true; // stop the event |
1081 | } | 1081 | } |
@@ -1107,25 +1107,25 @@ void TEWidget::frameChanged() | |||
1107 | /* Sound */ | 1107 | /* Sound */ |
1108 | /* */ | 1108 | /* */ |
1109 | /* ------------------------------------------------------------------------- */ | 1109 | /* ------------------------------------------------------------------------- */ |
1110 | 1110 | ||
1111 | void TEWidget::Bell() | 1111 | void TEWidget::Bell() |
1112 | { | 1112 | { |
1113 | //#ifdef QT_QWS_SHARP | 1113 | //#ifdef QT_QWS_SHARP |
1114 | //# ifndef QT_NO_COP | 1114 | //# ifndef QT_NO_COP |
1115 | if(useBeep) | 1115 | if(useBeep) |
1116 | QCopEnvelope( "QPE/TaskBar", "soundAlarm()" ); | 1116 | QCopEnvelope( "QPE/TaskBar", "soundAlarm()" ); |
1117 | 1117 | ||
1118 | //# endif | 1118 | //# endif |
1119 | //#else | 1119 | //#else |
1120 | //# ifndef QT_NO_SOUND | 1120 | //# ifndef QT_NO_SOUND |
1121 | // QSound::play(Resource::findSound("alarm")); | 1121 | // QSound::play(Resource::findSound("alarm")); |
1122 | //# endif | 1122 | //# endif |
1123 | //#endif | 1123 | //#endif |
1124 | 1124 | ||
1125 | // QApplication::beep(); | 1125 | // QApplication::beep(); |
1126 | } | 1126 | } |
1127 | 1127 | ||
1128 | /* ------------------------------------------------------------------------- */ | 1128 | /* ------------------------------------------------------------------------- */ |
1129 | /* */ | 1129 | /* */ |
1130 | /* Auxiluary */ | 1130 | /* Auxiluary */ |
1131 | /* */ | 1131 | /* */ |
@@ -1204,17 +1204,17 @@ void TEWidget::calcGeometry() | |||
1204 | hScrollbar->resize(contentsRect().width() - hwidth, hwidth); | 1204 | hScrollbar->resize(contentsRect().width() - hwidth, hwidth); |
1205 | hScrollbar->setRange(0, vcolumns - dcolumns); | 1205 | hScrollbar->setRange(0, vcolumns - dcolumns); |
1206 | 1206 | ||
1207 | QPoint p = contentsRect().bottomLeft(); | 1207 | QPoint p = contentsRect().bottomLeft(); |
1208 | if(scrollLoc == SCRLEFT) | 1208 | if(scrollLoc == SCRLEFT) |
1209 | hScrollbar->move(QPoint(p.x()+hwidth, p.y() - hwidth)); | 1209 | hScrollbar->move(QPoint(p.x()+hwidth, p.y() - hwidth)); |
1210 | else | 1210 | else |
1211 | hScrollbar->move(QPoint(p.x(), p.y() - hwidth)); | 1211 | hScrollbar->move(QPoint(p.x(), p.y() - hwidth)); |
1212 | 1212 | ||
1213 | hScrollbar->show(); | 1213 | hScrollbar->show(); |
1214 | } | 1214 | } |
1215 | else hScrollbar->hide(); | 1215 | else hScrollbar->hide(); |
1216 | 1216 | ||
1217 | if(showhscrollbar == 1) { | 1217 | if(showhscrollbar == 1) { |
1218 | lines = lines - (hwidth / font_h) - 1; | 1218 | lines = lines - (hwidth / font_h) - 1; |
1219 | if(lines < 1) lines = 1; | 1219 | if(lines < 1) lines = 1; |
1220 | } | 1220 | } |