[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 04/06: Use implicit boolean comparisons.
noreply at xfce.org
noreply at xfce.org
Wed Jan 22 21:48:24 CET 2020
This is an automated email from the git hooks/post-receive script.
g o t t c o d e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit 82817aa5bed53ad1142800f14e6d4d3c36733ac9
Author: Graeme Gott <graeme at gottcode.org>
Date: Wed Jan 22 07:05:37 2020 -0500
Use implicit boolean comparisons.
---
panel-plugin/applications-page.cpp | 2 +-
panel-plugin/command.cpp | 2 +-
panel-plugin/configuration-dialog.cpp | 2 +-
panel-plugin/page.cpp | 2 +-
panel-plugin/plugin.cpp | 2 +-
panel-plugin/run-action.cpp | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/panel-plugin/applications-page.cpp b/panel-plugin/applications-page.cpp
index 1dca32c..71cc089 100644
--- a/panel-plugin/applications-page.cpp
+++ b/panel-plugin/applications-page.cpp
@@ -127,7 +127,7 @@ Launcher* ApplicationsPage::get_application(const std::string& desktop_id) const
void ApplicationsPage::apply_filter(GtkToggleButton* togglebutton)
{
// Only apply filter for active button
- if (gtk_toggle_button_get_active(togglebutton) == false)
+ if (!gtk_toggle_button_get_active(togglebutton))
{
return;
}
diff --git a/panel-plugin/command.cpp b/panel-plugin/command.cpp
index 3beb8f6..a34c870 100644
--- a/panel-plugin/command.cpp
+++ b/panel-plugin/command.cpp
@@ -218,7 +218,7 @@ void Command::activate()
}
GError* error = NULL;
- if (g_spawn_command_line_async(m_command, &error) == false)
+ if (!g_spawn_command_line_async(m_command, &error))
{
xfce_dialog_show_error(NULL, error, m_error_text, NULL);
g_error_free(error);
diff --git a/panel-plugin/configuration-dialog.cpp b/panel-plugin/configuration-dialog.cpp
index 97d8334..daea5ec 100644
--- a/panel-plugin/configuration-dialog.cpp
+++ b/panel-plugin/configuration-dialog.cpp
@@ -543,7 +543,7 @@ void ConfigurationDialog::response(GtkDialog*, int response_id)
{
bool result = g_spawn_command_line_async("exo-open --launch WebBrowser " PLUGIN_WEBSITE, NULL);
- if (G_UNLIKELY(result == false))
+ if (G_UNLIKELY(!result))
{
g_warning(_("Unable to open the following url: %s"), PLUGIN_WEBSITE);
}
diff --git a/panel-plugin/page.cpp b/panel-plugin/page.cpp
index 0c75435..293f75c 100644
--- a/panel-plugin/page.cpp
+++ b/panel-plugin/page.cpp
@@ -551,7 +551,7 @@ void Page::edit_selected()
gchar* command = g_strconcat("exo-desktop-item-edit ", quoted_uri, NULL);
g_free(uri);
g_free(quoted_uri);
- if (g_spawn_command_line_async(command, &error) == false)
+ if (!g_spawn_command_line_async(command, &error))
{
xfce_dialog_show_error(NULL, error, _("Unable to edit launcher."));
g_error_free(error);
diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index 329103b..05fefc1 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -303,7 +303,7 @@ void Plugin::set_loaded(bool loaded)
void Plugin::button_toggled(GtkToggleButton* button)
{
- if (gtk_toggle_button_get_active(button) == false)
+ if (!gtk_toggle_button_get_active(button))
{
if (gtk_widget_get_visible(m_window->get_widget()))
{
diff --git a/panel-plugin/run-action.cpp b/panel-plugin/run-action.cpp
index 35eb6c8..dc1e46c 100644
--- a/panel-plugin/run-action.cpp
+++ b/panel-plugin/run-action.cpp
@@ -36,7 +36,7 @@ RunAction::RunAction()
void RunAction::run(GdkScreen* screen) const
{
GError* error = NULL;
- if (xfce_spawn_command_line_on_screen(screen, m_command_line.c_str(), false, false, &error) == false)
+ if (!xfce_spawn_command_line_on_screen(screen, m_command_line.c_str(), false, false, &error))
{
xfce_dialog_show_error(NULL, error, _("Failed to execute command \"%s\"."), m_command_line.c_str());
g_error_free(error);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list