From 52475c81f81c41ffc15e8de9ba74715ba8e2ffd8 Mon Sep 17 00:00:00 2001 From: martti Date: Tue, 1 May 2007 17:41:59 +0000 Subject: Updated sysutils/xfce4-battery-plugin to 0.5.0nb1 - Don't change behavior of remaining time on Linux and FreeBSD. - Don't print remaining percentage as `100%' if there are no batteries. --- sysutils/xfce4-battery-plugin/Makefile | 3 ++- sysutils/xfce4-battery-plugin/buildlink3.mk | 4 +-- sysutils/xfce4-battery-plugin/distinfo | 4 +-- sysutils/xfce4-battery-plugin/patches/patch-aa | 35 +++++++++++++++----------- 4 files changed, 27 insertions(+), 19 deletions(-) (limited to 'sysutils') diff --git a/sysutils/xfce4-battery-plugin/Makefile b/sysutils/xfce4-battery-plugin/Makefile index ebb36ceaf2d..fe63409fa29 100644 --- a/sysutils/xfce4-battery-plugin/Makefile +++ b/sysutils/xfce4-battery-plugin/Makefile @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.1.1.1 2007/04/27 10:48:06 martti Exp $ +# $NetBSD: Makefile,v 1.2 2007/05/01 17:41:59 martti Exp $ .include "../../meta-pkgs/xfce4/Makefile.common" XFCE4_VERSION= 0.5.0 DISTNAME= xfce4-battery-plugin-${XFCE4_VERSION} +PKGREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://goodies.xfce.org/releases/xfce4-battery-plugin/ COMMENT= Xfce battey monitor plugin diff --git a/sysutils/xfce4-battery-plugin/buildlink3.mk b/sysutils/xfce4-battery-plugin/buildlink3.mk index acde680a1c6..efa3af9fd84 100644 --- a/sysutils/xfce4-battery-plugin/buildlink3.mk +++ b/sysutils/xfce4-battery-plugin/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.1 2007/04/27 11:09:26 martti Exp $ +# $NetBSD: buildlink3.mk,v 1.2 2007/05/01 17:42:00 martti Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ XFCE4_BATTERY_PLUGIN_BUILDLINK3_MK:= ${XFCE4_BATTERY_PLUGIN_BUILDLINK3_MK}+ @@ -12,7 +12,7 @@ BUILDLINK_PACKAGES+= xfce4-battery-plugin BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}xfce4-battery-plugin .if ${XFCE4_BATTERY_PLUGIN_BUILDLINK3_MK} == "+" -BUILDLINK_API_DEPENDS.xfce4-battery-plugin+= xfce4-battery-plugin>=0.5.0 +BUILDLINK_API_DEPENDS.xfce4-battery-plugin+= xfce4-battery-plugin>=0.5.0nb1 BUILDLINK_PKGSRCDIR.xfce4-battery-plugin?= ../../sysutils/xfce4-battery-plugin .endif # XFCE4_BATTERY_PLUGIN_BUILDLINK3_MK diff --git a/sysutils/xfce4-battery-plugin/distinfo b/sysutils/xfce4-battery-plugin/distinfo index 3d287e6a780..7614b4a1fd0 100644 --- a/sysutils/xfce4-battery-plugin/distinfo +++ b/sysutils/xfce4-battery-plugin/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.1.1.1 2007/04/27 10:48:06 martti Exp $ +$NetBSD: distinfo,v 1.2 2007/05/01 17:42:00 martti Exp $ SHA1 (xfce4-battery-plugin-0.5.0.tar.bz2) = 63439d32bfe8411458d41c38824cb393bc31d6e0 RMD160 (xfce4-battery-plugin-0.5.0.tar.bz2) = bbf64994c7686b11b6a51bd7728569cd2a5d9777 Size (xfce4-battery-plugin-0.5.0.tar.bz2) = 222269 bytes -SHA1 (patch-aa) = a4cc107c41cde28e94f66a40b90ce1cb9909a6d8 +SHA1 (patch-aa) = 59c9bda919abd16c25da75ea4d9946fd7bb18514 diff --git a/sysutils/xfce4-battery-plugin/patches/patch-aa b/sysutils/xfce4-battery-plugin/patches/patch-aa index 3cfcbadec4b..8d66f1b2b74 100644 --- a/sysutils/xfce4-battery-plugin/patches/patch-aa +++ b/sysutils/xfce4-battery-plugin/patches/patch-aa @@ -1,12 +1,12 @@ -$NetBSD: patch-aa,v 1.1.1.1 2007/04/27 10:48:06 martti Exp $ +$NetBSD: patch-aa,v 1.2 2007/05/01 17:42:00 martti Exp $ --- panel-plugin/battery.c.orig 2007-01-18 02:56:51.000000000 +0900 -+++ panel-plugin/battery.c 2007-04-25 02:57:46.000000000 +0900 ++++ panel-plugin/battery.c 2007-05-01 01:32:49.000000000 +0900 @@ -35,6 +35,7 @@ #include #include #define APMDEVICE "/dev/apm" -+#define _APM_BATT_UNKNOWN 0xffff /* from sys/dev/acpi/acpi_apm.c */ ++#define _ACPI_APM_BATT_UNKNOWN 0xffff /* from sys/dev/acpi/acpi_apm.c */ #elif __linux__ #include #endif @@ -37,20 +37,27 @@ $NetBSD: patch-aa,v 1.1.1.1 2007/04/27 10:48:06 martti Exp $ #else struct apm_info apm; DBG ("Updating battery status..."); -@@ -477,7 +481,15 @@ +@@ -460,6 +464,11 @@ + + if(battmon->options.display_percentage && !(battmon->options.hide_when_full && acline && charge >= 99)){ + gtk_widget_show((GtkWidget *)battmon->charge); ++#if defined(__NetBSD__) || defined(__OpenBSD__) ++ if (apm.nbattery == 0) ++ g_snprintf(buffer, sizeof(buffer),"--%% "); ++ else ++#endif + g_snprintf(buffer, sizeof(buffer),"%d%% ", charge); + gtk_label_set_text(battmon->charge,buffer); + } else { +@@ -477,6 +486,11 @@ } gtk_widget_show((GtkWidget *)active_label); -- g_snprintf(buffer, sizeof(buffer),"%02d:%02d ",time_remaining/60,time_remaining%60); -+ if (acline -+#ifdef __NetBSD__ -+ || time_remaining == _APM_BATT_UNKNOWN ++#if defined(__NetBSD__) ++ if (acline || time_remaining == _ACPI_APM_BATT_UNKNOWN) ++ g_snprintf(buffer, sizeof(buffer), "--:--"); ++ else +#endif -+ ) -+ g_snprintf(buffer, sizeof(buffer), "--:--"); -+ else -+ g_snprintf(buffer, sizeof(buffer),"%02d:%02d ", -+ time_remaining/60,time_remaining%60); + g_snprintf(buffer, sizeof(buffer),"%02d:%02d ",time_remaining/60,time_remaining%60); gtk_label_set_text(active_label,buffer); - } else { -- cgit v1.2.3