ports/sysutils/xfce4-power-manager/files/patch-src_xfpm-dpms.c
Guido Falsi b2f2269daf Welcome XFCE 4.16 to the FreeBSD ports tree!
Upstream announce: https://xfce.org/about/news/?post=1608595200

This XFCE release dropped support for GTK2 plugins and also dropped
GTK2 from all components.

WARNING: please check UPDATING before upgrading your packages. In
case of problems also read the libexo pkg-message.

Due to this some panel plugins and libraries will be removed since
they cannot compile anymore:

- print/xfce4-print
- x11/xfce4-quicklauncher-plugin
- x11/xfce4-wmdock-plugin
- x11-toolkits/libxfce4gui

These further components also fail to build or work and are being
marked BROKEN, deprecated and marked for removal:

- science/xfce4-equake-plugin
- x11/xfce4-embed-plugin
- deskutils/orage
- deskutils/xfce4-volumed [1]

deskutils/xfce4-notes-plugin will be also marked BROKEN, but there
is active development in it's upstream repository and a fixed release
is expected soon.

deskutils/xfce4-generic-slider will also be marked broken, since
it fails to compile. [2]

Thanks also to riggs, Olivier Duchateau <duchateau.olivier@gmail.com>
and the people in Approved and Reviewed lines below for help and
contributions.

Reviewed by:		woodsb02
Approved by:		sergey.dyatko@gmail.com (maintainer) [1],
			ehaupt [2]
Differential Revision:	https://reviews.freebsd.org/D27846
2021-01-02 16:36:33 +00:00

18 lines
586 B
C

--- src/xfpm-dpms.c.orig 2020-01-26 23:15:39 UTC
+++ src/xfpm-dpms.c
@@ -119,13 +119,13 @@ xfpm_dpms_get_enabled (XfpmDpms *dpms, gboolean *dpms_
static void
xfpm_dpms_get_sleep_mode (XfpmDpms *dpms, gboolean *ret_standby_mode)
{
- gchar *sleep_mode;
+ gchar *sleep_mode = NULL;
g_object_get (G_OBJECT (dpms->priv->conf),
DPMS_SLEEP_MODE, &sleep_mode,
NULL);
- if ( !g_strcmp0 (sleep_mode, "Standby"))
+ if ( sleep_mode != NULL && !g_strcmp0 (sleep_mode, "Standby"))
*ret_standby_mode = TRUE;
else
*ret_standby_mode = FALSE;