[gnome-panel] action-button: remove unneeded NULL check
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] action-button: remove unneeded NULL check
- Date: Wed, 14 Oct 2020 20:54:11 +0000 (UTC)
commit 4682ddf524039707307fde089e063164cdcda9c3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Oct 14 23:51:07 2020 +0300
action-button: remove unneeded NULL check
modules/action-button/gp-force-quit-applet.c | 7 +++----
modules/action-button/gp-lock-screen-applet.c | 7 +++----
modules/action-button/gp-logout-applet.c | 7 +++----
modules/action-button/gp-run-applet.c | 7 +++----
modules/action-button/gp-shutdown-applet.c | 7 +++----
5 files changed, 15 insertions(+), 20 deletions(-)
---
diff --git a/modules/action-button/gp-force-quit-applet.c b/modules/action-button/gp-force-quit-applet.c
index 7b7c58beb..23c4df853 100644
--- a/modules/action-button/gp-force-quit-applet.c
+++ b/modules/action-button/gp-force-quit-applet.c
@@ -131,10 +131,9 @@ gp_force_quit_applet_is_disabled (GpLockdownFlags flags,
if ((flags & GP_LOCKDOWN_FLAGS_FORCE_QUIT) != GP_LOCKDOWN_FLAGS_FORCE_QUIT)
return FALSE;
- if (reason != NULL)
- *reason = g_strdup (_("Disabled because “disable-force-quit” setting in "
- "“org.gnome.gnome-panel.lockdown” GSettings schema "
- "is set to true."));
+ *reason = g_strdup (_("Disabled because “disable-force-quit” setting in "
+ "“org.gnome.gnome-panel.lockdown” GSettings schema "
+ "is set to true."));
return TRUE;
}
diff --git a/modules/action-button/gp-lock-screen-applet.c b/modules/action-button/gp-lock-screen-applet.c
index c6e55c0a6..14ce595c3 100644
--- a/modules/action-button/gp-lock-screen-applet.c
+++ b/modules/action-button/gp-lock-screen-applet.c
@@ -431,10 +431,9 @@ gp_lock_screen_applet_is_disabled (GpLockdownFlags flags,
if ((flags & GP_LOCKDOWN_FLAGS_LOCK_SCREEN) != GP_LOCKDOWN_FLAGS_LOCK_SCREEN)
return FALSE;
- if (reason != NULL)
- *reason = g_strdup (_("Disabled because “disable-lock-screen” setting in "
- "“org.gnome.desktop.lockdown” GSettings schema is "
- "set to true."));
+ *reason = g_strdup (_("Disabled because “disable-lock-screen” setting in "
+ "“org.gnome.desktop.lockdown” GSettings schema is "
+ "set to true."));
return TRUE;
}
diff --git a/modules/action-button/gp-logout-applet.c b/modules/action-button/gp-logout-applet.c
index 459170171..0b4c83a53 100644
--- a/modules/action-button/gp-logout-applet.c
+++ b/modules/action-button/gp-logout-applet.c
@@ -219,10 +219,9 @@ gp_logout_applet_is_disabled (GpLockdownFlags flags,
if ((flags & GP_LOCKDOWN_FLAGS_LOG_OUT) != GP_LOCKDOWN_FLAGS_LOG_OUT)
return FALSE;
- if (reason != NULL)
- *reason = g_strdup (_("Disabled because “disable-log-out” setting in "
- "“org.gnome.desktop.lockdown” GSettings schema is "
- "set to true."));
+ *reason = g_strdup (_("Disabled because “disable-log-out” setting in "
+ "“org.gnome.desktop.lockdown” GSettings schema is "
+ "set to true."));
return TRUE;
}
diff --git a/modules/action-button/gp-run-applet.c b/modules/action-button/gp-run-applet.c
index 771e350a4..30a173aec 100644
--- a/modules/action-button/gp-run-applet.c
+++ b/modules/action-button/gp-run-applet.c
@@ -132,10 +132,9 @@ gp_run_applet_is_disabled (GpLockdownFlags flags,
if ((flags & GP_LOCKDOWN_FLAGS_COMMAND_LINE) != GP_LOCKDOWN_FLAGS_COMMAND_LINE)
return FALSE;
- if (reason != NULL)
- *reason = g_strdup (_("Disabled because “disable-command-line” setting in "
- "“org.gnome.desktop.lockdown” GSettings schema is "
- "set to true."));
+ *reason = g_strdup (_("Disabled because “disable-command-line” setting in "
+ "“org.gnome.desktop.lockdown” GSettings schema is "
+ "set to true."));
return TRUE;
}
diff --git a/modules/action-button/gp-shutdown-applet.c b/modules/action-button/gp-shutdown-applet.c
index 6ee0c2b14..7f8bd13a4 100644
--- a/modules/action-button/gp-shutdown-applet.c
+++ b/modules/action-button/gp-shutdown-applet.c
@@ -263,10 +263,9 @@ gp_shutdown_applet_is_disabled (GpLockdownFlags flags,
if ((flags & GP_LOCKDOWN_FLAGS_LOG_OUT) != GP_LOCKDOWN_FLAGS_LOG_OUT)
return FALSE;
- if (reason != NULL)
- *reason = g_strdup (_("Disabled because “disable-log-out” setting in "
- "“org.gnome.desktop.lockdown” GSettings schema is "
- "set to true."));
+ *reason = g_strdup (_("Disabled because “disable-log-out” setting in "
+ "“org.gnome.desktop.lockdown” GSettings schema is "
+ "set to true."));
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]