Use explicit conversion to bool
This commit is contained in:
@@ -581,13 +581,13 @@ void wxWebViewWebKit::GoForward()
|
|||||||
|
|
||||||
bool wxWebViewWebKit::CanGoBack() const
|
bool wxWebViewWebKit::CanGoBack() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_go_back(m_web_view);
|
return webkit_web_view_can_go_back(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool wxWebViewWebKit::CanGoForward() const
|
bool wxWebViewWebKit::CanGoForward() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_go_forward(m_web_view);
|
return webkit_web_view_can_go_forward(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewWebKit::ClearHistory()
|
void wxWebViewWebKit::ClearHistory()
|
||||||
@@ -664,17 +664,17 @@ void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item)
|
|||||||
|
|
||||||
bool wxWebViewWebKit::CanCut() const
|
bool wxWebViewWebKit::CanCut() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_cut_clipboard(m_web_view);
|
return webkit_web_view_can_cut_clipboard(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWebViewWebKit::CanCopy() const
|
bool wxWebViewWebKit::CanCopy() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_copy_clipboard(m_web_view);
|
return webkit_web_view_can_copy_clipboard(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWebViewWebKit::CanPaste() const
|
bool wxWebViewWebKit::CanPaste() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_paste_clipboard(m_web_view);
|
return webkit_web_view_can_paste_clipboard(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewWebKit::Cut()
|
void wxWebViewWebKit::Cut()
|
||||||
@@ -694,12 +694,12 @@ void wxWebViewWebKit::Paste()
|
|||||||
|
|
||||||
bool wxWebViewWebKit::CanUndo() const
|
bool wxWebViewWebKit::CanUndo() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_undo(m_web_view);
|
return webkit_web_view_can_undo(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWebViewWebKit::CanRedo() const
|
bool wxWebViewWebKit::CanRedo() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_redo(m_web_view);
|
return webkit_web_view_can_redo(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewWebKit::Undo()
|
void wxWebViewWebKit::Undo()
|
||||||
@@ -877,7 +877,7 @@ void wxWebViewWebKit::SetEditable(bool enable)
|
|||||||
|
|
||||||
bool wxWebViewWebKit::IsEditable() const
|
bool wxWebViewWebKit::IsEditable() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_get_editable(m_web_view);
|
return webkit_web_view_get_editable(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewWebKit::DeleteSelection()
|
void wxWebViewWebKit::DeleteSelection()
|
||||||
@@ -887,7 +887,7 @@ void wxWebViewWebKit::DeleteSelection()
|
|||||||
|
|
||||||
bool wxWebViewWebKit::HasSelection() const
|
bool wxWebViewWebKit::HasSelection() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_has_selection(m_web_view);
|
return webkit_web_view_has_selection(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewWebKit::SelectAll()
|
void wxWebViewWebKit::SelectAll()
|
||||||
|
@@ -632,13 +632,13 @@ void wxWebViewWebKit::GoForward()
|
|||||||
|
|
||||||
bool wxWebViewWebKit::CanGoBack() const
|
bool wxWebViewWebKit::CanGoBack() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_go_back(m_web_view);
|
return webkit_web_view_can_go_back(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool wxWebViewWebKit::CanGoForward() const
|
bool wxWebViewWebKit::CanGoForward() const
|
||||||
{
|
{
|
||||||
return webkit_web_view_can_go_forward(m_web_view);
|
return webkit_web_view_can_go_forward(m_web_view) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewWebKit::ClearHistory()
|
void wxWebViewWebKit::ClearHistory()
|
||||||
@@ -731,7 +731,7 @@ bool wxWebViewWebKit::CanExecuteEditingCommand(const gchar* command) const
|
|||||||
NULL);
|
NULL);
|
||||||
g_object_unref(result);
|
g_object_unref(result);
|
||||||
|
|
||||||
return can_execute;
|
return can_execute != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWebViewWebKit::CanCut() const
|
bool wxWebViewWebKit::CanCut() const
|
||||||
@@ -962,7 +962,7 @@ bool wxWebViewWebKit::IsEditable() const
|
|||||||
{
|
{
|
||||||
gboolean editable;
|
gboolean editable;
|
||||||
g_object_get(m_web_view, "editable", &editable, NULL);
|
g_object_get(m_web_view, "editable", &editable, NULL);
|
||||||
return editable;
|
return editable != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewWebKit::DeleteSelection()
|
void wxWebViewWebKit::DeleteSelection()
|
||||||
@@ -997,7 +997,7 @@ bool wxWebViewWebKit::HasSelection() const
|
|||||||
gboolean has_selection = FALSE;
|
gboolean has_selection = FALSE;
|
||||||
g_variant_get(retval, "(b)", &has_selection);
|
g_variant_get(retval, "(b)", &has_selection);
|
||||||
g_variant_unref(retval);
|
g_variant_unref(retval);
|
||||||
return has_selection;
|
return has_selection != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user