diff options
author | marcus <marcus@FreeBSD.org> | 2005-06-10 09:59:25 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2005-06-10 09:59:25 +0800 |
commit | 928dc4d3a39306d02cb5ea7607a0fe53d67fb59d (patch) | |
tree | 04231de00cd5478cd55f1a0dd6e129155de33a10 /x11/gnomeapplets2 | |
parent | 15dd49c7f137edb23afdf585025cc41acb25dd5f (diff) | |
download | freebsd-ports-graphics-928dc4d3a39306d02cb5ea7607a0fe53d67fb59d.tar.gz freebsd-ports-graphics-928dc4d3a39306d02cb5ea7607a0fe53d67fb59d.tar.zst freebsd-ports-graphics-928dc4d3a39306d02cb5ea7607a0fe53d67fb59d.zip |
Update the battstat status a bit quicker.
Diffstat (limited to 'x11/gnomeapplets2')
-rw-r--r-- | x11/gnomeapplets2/Makefile | 2 | ||||
-rw-r--r-- | x11/gnomeapplets2/files/patch-battstat-acpi | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/x11/gnomeapplets2/Makefile b/x11/gnomeapplets2/Makefile index c763c40dd6d..cc7bbb080f7 100644 --- a/x11/gnomeapplets2/Makefile +++ b/x11/gnomeapplets2/Makefile @@ -7,7 +7,7 @@ PORTNAME= gnomeapplets2 PORTVERSION= 2.10.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-applets/2.10 diff --git a/x11/gnomeapplets2/files/patch-battstat-acpi b/x11/gnomeapplets2/files/patch-battstat-acpi index ce52971f369..a3b505291e8 100644 --- a/x11/gnomeapplets2/files/patch-battstat-acpi +++ b/x11/gnomeapplets2/files/patch-battstat-acpi @@ -349,7 +349,7 @@ +} +#endif --- battstat/power-management.c.orig Sun Mar 20 05:20:55 2005 -+++ battstat/power-management.c Wed May 11 10:22:17 2005 ++++ battstat/power-management.c Thu Jun 9 21:56:14 2005 @@ -73,9 +73,18 @@ static int pm_initialised; * the problem might be. This error message is not to be freed. */ @@ -362,16 +362,16 @@ +#endif +#include "acpi-freebsd.h" + -+struct acpi_info acpiinfo; -+gboolean using_acpi; -+int acpi_count; -+struct apm_info apminfo; ++static struct acpi_info acpiinfo; ++static gboolean using_acpi; ++static int acpi_count; ++static struct apm_info apminfo; + +gboolean acpi_freebsd_read(struct apm_info *apminfo, struct acpi_info *acpiinfo); #define APMDEVICE "/dev/apm" -@@ -86,32 +95,45 @@ apm_readinfo (BatteryStatus *status) +@@ -86,32 +95,46 @@ apm_readinfo (BatteryStatus *status) FreeBSD. Each time this functions is called (once every second) the APM device is opened, read from and then closed. */ @@ -387,7 +387,8 @@ - return ERR_OPEN_APMDEV; + if (using_acpi) { + if (acpi_count <= 0) { -+ acpi_count = 30; ++ acpi_count = 3; ++ acpi_process_event(&acpiinfo); + acpi_freebsd_read(&apminfo, &acpiinfo); + } + acpi_count--; @@ -429,7 +430,7 @@ return NULL; } -@@ -339,6 +361,13 @@ power_management_initialise( void ) +@@ -339,6 +362,13 @@ power_management_initialise( void ) G_IO_IN | G_IO_ERR | G_IO_HUP, acpi_callback, NULL); } @@ -443,7 +444,7 @@ #endif pm_initialised = 1; -@@ -360,6 +389,10 @@ power_management_cleanup( void ) +@@ -360,6 +390,10 @@ power_management_cleanup( void ) g_source_remove(acpiwatch); acpiwatch = 0; acpi_linux_cleanup(&acpiinfo); |