Commit 5ff13898 authored by Enrico Ros's avatar Enrico Ros

applying patch_102,103,108 (merge from head: tinyurl.com/8t5ec)

svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=426801
parent 1bf71498
......@@ -623,11 +623,17 @@ void PageView::keyPressEvent( QKeyEvent * e )
{
// part doesn't get this key event because of the keyboard grab
d->findTimeoutTimer->stop(); // restore normal operation during possible messagebox is displayed
// (1/4) it is needed to grab the keyboard becase people may have Space assigned
// to a 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 ) )
d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()),
PageViewMessage::Find, 3000 );
d->findTimeoutTimer->start( 3000, true );
// (2/4) it is needed to grab the keyboard becase people may have Space assigned
// to a accel and without grabbing the keyboard you can not vim-search for space
// because it activates the accel
grabKeyboard();
}
// esc and return: end search
......@@ -667,6 +673,9 @@ void PageView::keyPressEvent( QKeyEvent * e )
connect( d->findTimeoutTimer, SIGNAL( timeout() ), this, SLOT( slotStopFindAhead() ) );
}
d->findTimeoutTimer->start( 3000, true );
// (3/4) it is needed to grab the keyboard becase people may have Space assigned
// to a accel and without grabbing the keyboard you can not vim-search for space
// because it activates the accel
grabKeyboard();
return;
}
......@@ -1970,6 +1979,9 @@ void PageView::slotStopFindAhead()
d->typeAheadActive = false;
d->typeAheadString = "";
d->messageWindow->display( i18n("Find stopped."), PageViewMessage::Find, 1000 );
// (4/4) it is needed to grab the keyboard becase people may have Space assigned
// to a accel and without grabbing the keyboard you can not vim-search for space
// because it activates the accel
releaseKeyboard();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment