Make Konqueror's searchbar plugin work with any KPart based browser engine...

Dawit A. adawit at kde.org
Fri Sep 25 20:01:23 BST 2009


On Friday 25 September 2009 14:24:52 Friedrich W. H. Kossebau wrote:
> Hi Dawit,
> 
> Vendredi, le 25 septembre 2009, à 18:02, Dawit A. a écrit:
> > Hello,
> >
> > Since there is no "Konqueror" or "Konq-plugins" group in reviewboard, I
> > am going to post this patch here. As the subject states the attached
> > patch makes it possible for the searchbar plugin to be used with
> > rendering engines other other than khtml, e.g. webkitpart.
> >
> > Please CC me when you reply since I am not subscribed to kfm-devel.
> 
> @@ -458,7 +459,7 @@
> 
>  void SearchBarPlugin::updateComboVisibility()
>  {
> -    bool isBrowser = m_part && dynamic_cast<KHTMLPart *>(m_part);
> +    bool isBrowser = (m_part && m_part->browserExtension());
> 
> The name "browserExtension()" might have lead you to the wrong assumption.
>  The BrowserExtension [BE] is an extension of KParts for better support
>  _of_ browser-a-like containers like Konqueror, for stuff like going back
>  and forward in history. It is not the extension of a (HTML) browsing-able
>  KPart.
> 
> Besides the KHtmlPart at least the KParts of Kate and Okteta are
>  implementing this extension. So this check for "isBrowser" does not work I
>  fear.

Indeed... That check was accidentally left there by me when I was orginally 
playing with it. You only need to check whether or not there is a part. That 
is sufficient since the install directory for the .desktop file determines to 
which application the plugin belongs ; so there is no need to check the type 
of KPart you dealing with. You only need to make sure that features specific 
only to a given KPart are invoked correctly which is what the patch was 
intended to address.

Attached is the corrected version of the patch... Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: searchbar.patch
Type: text/x-patch
Size: 4046 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20090925/bc40aa1b/attachment.bin>


More information about the kfm-devel mailing list