revert fix for 106546 was causing other problems

svn path=/trunk/KDE/kdegraphics/kpdf/; revision=421672
remotes/origin/kpdf
Albert Astals Cid 21 years ago
parent d599aebde9
commit 12e6eefcfe
  1. 24
      ui/pageview.cpp

@ -588,14 +588,18 @@ void PageView::keyPressEvent( QKeyEvent * e )
{ {
// part doesn't get this key event because of the keyboard grab // part doesn't get this key event because of the keyboard grab
d->findTimeoutTimer->stop(); // restore normal operation during possible messagebox is displayed d->findTimeoutTimer->stop(); // restore normal operation during possible messagebox is displayed
//commenting as seems to cause bug 106546 and does not seem to give anything // it is needed to grab the keyboard becase people may have Space assigned to a
//releaseKeyboard(); // accel and without grabbing the keyboard you can not vim-search for space
// because it activates the accel
releaseKeyboard();
if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) ) if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) )
d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()), d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()),
PageViewMessage::Find, 3000 ); PageViewMessage::Find, 3000 );
d->findTimeoutTimer->start( 3000, true ); d->findTimeoutTimer->start( 3000, true );
//commenting as seems to cause bug 106546 and does not seem to give anything // it is needed to grab the keyboard becase people may have Space assigned to a
// grabKeyboard(); // accel and without grabbing the keyboard you can not vim-search for space
// because it activates the accel
grabKeyboard();
} }
// esc and return: end search // esc and return: end search
else if( e->key() == Key_Escape || e->key() == Key_Return ) else if( e->key() == Key_Escape || e->key() == Key_Return )
@ -634,8 +638,10 @@ void PageView::keyPressEvent( QKeyEvent * e )
connect( d->findTimeoutTimer, SIGNAL( timeout() ), this, SLOT( findAheadStop() ) ); connect( d->findTimeoutTimer, SIGNAL( timeout() ), this, SLOT( findAheadStop() ) );
} }
d->findTimeoutTimer->start( 3000, true ); d->findTimeoutTimer->start( 3000, true );
//commenting as seems to cause bug 106546 and does not seem to give anything // it is needed to grab the keyboard becase people may have Space assigned to a
// grabKeyboard(); // accel and without grabbing the keyboard you can not vim-search for space
// because it activates the accel
grabKeyboard();
return; return;
} }
@ -1848,8 +1854,10 @@ void PageView::findAheadStop()
d->typeAheadActive = false; d->typeAheadActive = false;
d->typeAheadString = ""; d->typeAheadString = "";
d->messageWindow->display( i18n("Find stopped."), PageViewMessage::Find, 1000 ); d->messageWindow->display( i18n("Find stopped."), PageViewMessage::Find, 1000 );
//commenting as seems to cause bug 106546 and does not seem to give anything // it is needed to grab the keyboard becase people may have Space assigned to a
//releaseKeyboard(); // accel and without grabbing the keyboard you can not vim-search for space
// because it activates the accel
releaseKeyboard();
} }
void PageView::slotZoom() void PageView::slotZoom()

Loading…
Cancel
Save