--Boundary-00=_yJYvCcxaxxMOhNN Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Currently you cannot use KHTMLPart::findTextNext (and methods elsewhere that make use of KFind) without invoking a KMessageBox with notication if no matches are found. This behaviour is not wanted in many cases, especially with automation tasks via DCOP and the like. Included is a patch that adds a "Silent" option to KFindDialog::Options which, when specified, stops KFind from displaying a message box ("x matches found." or "No matches found for 'foo'"). Please CC me, as I am not subscribed to the list. Thanks, Paul (aka Cerulean) --Boundary-00=_yJYvCcxaxxMOhNN Content-Type: text/x-diff; charset="us-ascii"; name="kfindpatch.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kfindpatch.diff" Index: kfinddialog.h =================================================================== --- kfinddialog.h (revision 428345) +++ kfinddialog.h (working copy) @@ -88,6 +88,9 @@ FindBackwards = 16, // Go backwards. RegularExpression = 32, // Interpret the pattern as a regular expression. FindIncremental = 64, // Find incremental. + Silent = 128, // Silent operation - no visual feedback, e.g + // message boxes informing the user that no + // text was found. // Note that KReplaceDialog uses 256 and 512 // User extensions can use boolean options above this value. MinimumUserOption = 65536 Index: kfind.cpp =================================================================== --- kfind.cpp (revision 428345) +++ kfind.cpp (working copy) @@ -624,7 +624,9 @@ message = i18n( "1 match found.", "%n matches found.", numMatches() ); else message = i18n("No matches found for '%1'.").arg(QStyleSheet::escape(m_pattern)); - KMessageBox::information(dialogsParent(), message); + // Disable the message box if the Silent flag is set + if(!(m_options & KFindDialog::Silent)) + KMessageBox::information(dialogsParent(), message); } bool KFind::shouldRestart( bool forceAsking, bool showNumMatches ) const --Boundary-00=_yJYvCcxaxxMOhNN--