Simplify conversion from bool
there is no need to explicitly convert to int
This commit is contained in:
@@ -394,10 +394,7 @@ wxgtk_webview_webkit_context_menu(WebKitWebView *,
|
|||||||
gboolean,
|
gboolean,
|
||||||
wxWebViewWebKit *webKitCtrl)
|
wxWebViewWebKit *webKitCtrl)
|
||||||
{
|
{
|
||||||
if(webKitCtrl->IsContextMenuEnabled())
|
return !webKitCtrl->IsContextMenuEnabled();
|
||||||
return FALSE;
|
|
||||||
else
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -796,8 +793,7 @@ void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom)
|
|||||||
void wxWebViewWebKit::SetZoomType(wxWebViewZoomType type)
|
void wxWebViewWebKit::SetZoomType(wxWebViewZoomType type)
|
||||||
{
|
{
|
||||||
webkit_web_view_set_full_content_zoom(m_web_view,
|
webkit_web_view_set_full_content_zoom(m_web_view,
|
||||||
(type == wxWEBVIEW_ZOOM_TYPE_LAYOUT ?
|
type == wxWEBVIEW_ZOOM_TYPE_LAYOUT);
|
||||||
TRUE : FALSE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWebViewZoomType wxWebViewWebKit::GetZoomType() const
|
wxWebViewZoomType wxWebViewWebKit::GetZoomType() const
|
||||||
|
@@ -369,10 +369,7 @@ wxgtk_webview_webkit_context_menu(WebKitWebView *,
|
|||||||
WebKitHitTestResult *,
|
WebKitHitTestResult *,
|
||||||
wxWebViewWebKit *webKitCtrl)
|
wxWebViewWebKit *webKitCtrl)
|
||||||
{
|
{
|
||||||
if(webKitCtrl->IsContextMenuEnabled())
|
return !webKitCtrl->IsContextMenuEnabled();
|
||||||
return FALSE;
|
|
||||||
else
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static WebKitWebView*
|
static WebKitWebView*
|
||||||
@@ -905,8 +902,7 @@ void wxWebViewWebKit::SetZoomType(wxWebViewZoomType type)
|
|||||||
{
|
{
|
||||||
WebKitSettings* settings = webkit_web_view_get_settings(m_web_view);
|
WebKitSettings* settings = webkit_web_view_get_settings(m_web_view);
|
||||||
webkit_settings_set_zoom_text_only(settings,
|
webkit_settings_set_zoom_text_only(settings,
|
||||||
(type == wxWEBVIEW_ZOOM_TYPE_TEXT ?
|
type == wxWEBVIEW_ZOOM_TYPE_TEXT);
|
||||||
TRUE : FALSE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWebViewZoomType wxWebViewWebKit::GetZoomType() const
|
wxWebViewZoomType wxWebViewWebKit::GetZoomType() const
|
||||||
|
Reference in New Issue
Block a user