xfce4-power-manager: update to 4.16.0.

This commit is contained in:
Peter Bui 2020-12-22 20:59:22 -05:00 committed by Đoàn Trần Công Danh
parent da31f1a894
commit b71e7e723b
2 changed files with 37 additions and 33 deletions

View file

@ -14,9 +14,9 @@
#define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/zzz" #define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/zzz"
#define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/ZZZ" #define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/ZZZ"
#endif #endif
--- src/xfpm-suspend.c.orig 2019-08-13 12:19:21.476080088 +0200 --- src/xfpm-suspend.c.orig 2020-12-22 20:56:08.139119371 -0500
+++ src/xfpm-suspend.c 2019-08-13 12:20:59.699286887 +0200 +++ src/xfpm-suspend.c 2020-12-22 20:56:52.359241485 -0500
@@ -101,35 +101,6 @@ freebsd_supports_sleep_state (const gcha @@ -105,40 +105,6 @@
} }
#endif #endif
@ -24,49 +24,54 @@
-static gboolean -static gboolean
-linux_supports_sleep_state (const gchar *state) -linux_supports_sleep_state (const gchar *state)
-{ -{
- gboolean ret = FALSE; - gboolean ret = FALSE;
- gchar *command; - gchar *command;
- GError *error = NULL; - GError *error = NULL;
- gint exit_status; - gint exit_status;
- -
- XFPM_DEBUG("entering"); - XFPM_DEBUG("entering");
- -
- /* run script from pm-utils */ - /* run script from pm-utils */
- command = g_strdup_printf ("/usr/bin/pm-is-supported --%s", state); - command = g_strdup_printf ("/usr/bin/pm-is-supported --%s", state);
- g_debug ("executing command: %s", command); - g_debug ("executing command: %s", command);
- ret = g_spawn_command_line_sync (command, NULL, NULL, &exit_status, &error); - ret = g_spawn_command_line_sync (command, NULL, NULL, &exit_status, &error);
- if (!ret) { -
- g_warning ("failed to run script: %s", error->message); - if (!ret) {
- g_error_free (error); - if (error)
- goto out; - {
- g_warning ("failed to run script: %s", error->message);
- g_error_free (error);
- } - }
- ret = (WIFEXITED(exit_status) && (WEXITSTATUS(exit_status) == EXIT_SUCCESS)); - goto out;
- }
- ret = (WIFEXITED(exit_status) && (WEXITSTATUS(exit_status) == EXIT_SUCCESS));
- -
-out: -out:
- g_free (command); - g_free (command);
- -
- return ret; - return ret;
-} -}
-#endif -#endif
- -
-
gboolean gboolean
xfpm_suspend_can_suspend (void) xfpm_suspend_can_suspend (void)
@@ -139,7 +110,7 @@ xfpm_suspend_can_suspend (void) {
return freebsd_supports_sleep_state ("S3"); @@ -147,7 +113,7 @@
return freebsd_supports_sleep_state ("S3");
#endif #endif
#ifdef BACKEND_TYPE_LINUX #ifdef BACKEND_TYPE_LINUX
- return linux_supports_sleep_state ("suspend"); - return linux_supports_sleep_state ("suspend");
+ return TRUE; + return TRUE;
#endif #endif
#ifdef BACKEND_TYPE_OPENBSD #ifdef BACKEND_TYPE_OPENBSD
return TRUE; return TRUE;
@@ -156,7 +127,7 @@ xfpm_suspend_can_hibernate (void) @@ -164,7 +130,7 @@
return freebsd_supports_sleep_state ("S4"); return freebsd_supports_sleep_state ("S4");
#endif #endif
#ifdef BACKEND_TYPE_LINUX #ifdef BACKEND_TYPE_LINUX
- return linux_supports_sleep_state ("hibernate"); - return linux_supports_sleep_state ("hibernate");
+ return TRUE; + return TRUE;
#endif #endif
#ifdef BACKEND_TYPE_OPENBSD #ifdef BACKEND_TYPE_OPENBSD
return TRUE; return TRUE;

View file

@ -1,7 +1,6 @@
# Template file for 'xfce4-power-manager' # Template file for 'xfce4-power-manager'
pkgname=xfce4-power-manager pkgname=xfce4-power-manager
reverts=1.7.0_1 version=4.16.0
version=1.6.6
revision=1 revision=1
build_style=gnu-configure build_style=gnu-configure
configure_args="--disable-static" configure_args="--disable-static"
@ -13,4 +12,4 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later" license="GPL-2.0-or-later"
homepage="https://xfce.org/" homepage="https://xfce.org/"
distfiles="https://archive.xfce.org/src/xfce/$pkgname/${version%.*}/$pkgname-$version.tar.bz2" distfiles="https://archive.xfce.org/src/xfce/$pkgname/${version%.*}/$pkgname-$version.tar.bz2"
checksum=1b7bf0d3e8af69b10f7b6a518451e01fc7888e0d9d360bc33f6c89179bb6080b checksum=eb9c587c01b502fa45a32e7fc2aba98fa6d8391475133883654f77e562c43bf3