[Goodies-commits] r5948 - in xfce4-sensors-plugin/trunk: . include lib src

Fabian Nowak timystery at xfce.org
Tue Nov 4 00:59:30 CET 2008


Author: timystery
Date: 2008-11-03 23:59:30 +0000 (Mon, 03 Nov 2008)
New Revision: 5948

Modified:
   xfce4-sensors-plugin/trunk/Makefile.am
   xfce4-sensors-plugin/trunk/configure.in.in
   xfce4-sensors-plugin/trunk/include/acpi.h
   xfce4-sensors-plugin/trunk/include/configuration.h
   xfce4-sensors-plugin/trunk/include/hddtemp.h
   xfce4-sensors-plugin/trunk/include/lmsensors.h
   xfce4-sensors-plugin/trunk/include/middlelayer.h
   xfce4-sensors-plugin/trunk/include/sensors-interface-common.h
   xfce4-sensors-plugin/trunk/include/sensors-interface.h
   xfce4-sensors-plugin/trunk/include/types.h
   xfce4-sensors-plugin/trunk/lib/acpi.c
   xfce4-sensors-plugin/trunk/lib/configuration.c
   xfce4-sensors-plugin/trunk/lib/hddtemp.c
   xfce4-sensors-plugin/trunk/lib/helpers.c
   xfce4-sensors-plugin/trunk/lib/libxfce4sensors-1.0.pc.in
   xfce4-sensors-plugin/trunk/lib/lmsensors.c
   xfce4-sensors-plugin/trunk/lib/middlelayer.c
   xfce4-sensors-plugin/trunk/lib/sensors-interface-common.c
   xfce4-sensors-plugin/trunk/lib/sensors-interface.c
   xfce4-sensors-plugin/trunk/src/actions.c
   xfce4-sensors-plugin/trunk/src/actions.h
   xfce4-sensors-plugin/trunk/src/callbacks.c
   xfce4-sensors-plugin/trunk/src/callbacks.h
   xfce4-sensors-plugin/trunk/src/interface.c
   xfce4-sensors-plugin/trunk/src/interface.h
   xfce4-sensors-plugin/trunk/src/main.c
   xfce4-sensors-plugin/trunk/src/xfce4-sensors.desktop.in
Log:
and again more id strings



Property changes on: xfce4-sensors-plugin/trunk/Makefile.am
___________________________________________________________________
Name: svn:keywords
   - author date id revision
   + Id

Modified: xfce4-sensors-plugin/trunk/configure.in.in
===================================================================
--- xfce4-sensors-plugin/trunk/configure.in.in	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/configure.in.in	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+dnl $Id$
 dnl configure.in.in
 dnl
 dnl xfce4-sensors-plugin - Sensors plugin for xfce4-panel
@@ -183,10 +184,33 @@
 fi
 
 if test x"$enable_procacpi" = x"yes"; then
-    AC_DEFINE([HAVE_ACPI], [1], [Define to 1 if proc/acpi is found])
+    AC_DEFINE([HAVE_ACPI], [1], [Define to 1 if /proc/acpi is found])
 fi
 
+dnl Check for interface for /sys/class/power_supply to be used
+AC_ARG_ENABLE([sysfsacpi], [AC_HELP_STRING([--enable-sysfsacpi], [Use /sys/class/power_supply to read your battery value @<:@default=yes@:>@])],
+[],
+[
+    enable_sysfsacpi=auto
+])
+
+if test x"$enable_sysfsacpi" = x"auto"; then
+    AC_CHECK_FILE([/sys/class/power_supply],
+    [
+        enable_sysfsacpi=yes
+    ],
+    [
+        enable_sysfsacpi=no
+    ])
+fi
+
+if test x"$enable_sysfsacpi" = x"yes"; then
+    AC_DEFINE([HAVE_SYSFS_ACPI], [1], [Define to 1 if /sys/class/power_supply is found])
+    enable_procacpi=yes
+fi
+
 AM_CONDITIONAL([HAVE_ACPI], [test x$enable_procacpi = x"yes"])
+AM_CONDITIONAL([HAVE_SYSFS_ACPI], [test x$enable_sysfsacpi = x"yes"])
 
 
 dnl Check for full debugging
@@ -211,6 +235,10 @@
 KERNEL=`uname -s`
 if test "$KERNEL" = "Linux"; then
     AC_DEFINE([HAVE_LINUX], [1], [Set this to 1 if using Linux or newer])
+dnl    KERNELVERSION=`uname -r`
+dnl    if test $KERNELVERSION -ge 2.6.24; then
+dnl        AC_DEFINE([HAVE_LINUX2624], [1], [Set this to 1 if using Linux or newer])
+dnl    fi
 fi
 dnl OS="$KERNEL"
 dnl AC_DEFINE([OS], ["$OS"], [Set this to the name of the operating system.])
@@ -330,6 +358,9 @@
 if test x"$enable_procacpi" = x"yes"; then
 echo "*  /proc/acpi"
 fi
+if test x"$enable_sysfsacpi" = x"yes"; then
+echo "   /sys/class/power_supply"
+fi
 echo
 if test x"$LIBNOTIFY_FOUND" = x"yes"; then
 echo "Support for libnotify will be built in."

Modified: xfce4-sensors-plugin/trunk/include/acpi.h
===================================================================
--- xfce4-sensors-plugin/trunk/include/acpi.h	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/include/acpi.h	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*  Copyright 2004-2007 Fabian Nowak (timystery at arcor.de)
  *
  *  This program is free software; you can redistribute it and/or modify


Property changes on: xfce4-sensors-plugin/trunk/include/acpi.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/include/configuration.h
===================================================================
--- xfce4-sensors-plugin/trunk/include/configuration.h	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/include/configuration.h	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /* File configuration.h
  *
  *  Copyright 2004-2007 Fabian Nowak (timystery at arcor.de)


Property changes on: xfce4-sensors-plugin/trunk/include/configuration.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/include/hddtemp.h
===================================================================
--- xfce4-sensors-plugin/trunk/include/hddtemp.h	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/include/hddtemp.h	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*  Copyright 2004-2007 Fabian Nowak (timystery at arcor.de)
  *
  *  This program is free software; you can redistribute it and/or modify


Property changes on: xfce4-sensors-plugin/trunk/include/hddtemp.h
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/include/lmsensors.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/include/middlelayer.h
===================================================================
--- xfce4-sensors-plugin/trunk/include/middlelayer.h	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/include/middlelayer.h	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*
  *      middlelayer.h
  *


Property changes on: xfce4-sensors-plugin/trunk/include/middlelayer.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/include/sensors-interface-common.h
===================================================================
--- xfce4-sensors-plugin/trunk/include/sensors-interface-common.h	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/include/sensors-interface-common.h	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*  Copyright 2004-2008 Fabian Nowak (timystery at arcor.de)
  *
  *  This program is free software; you can redistribute it and/or modify


Property changes on: xfce4-sensors-plugin/trunk/include/sensors-interface-common.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/include/sensors-interface.h
===================================================================
--- xfce4-sensors-plugin/trunk/include/sensors-interface.h	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/include/sensors-interface.h	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*  Copyright 2008 Fabian Nowak (timystery at arcor.de)
  *
  *  This program is free software; you can redistribute it and/or modify


Property changes on: xfce4-sensors-plugin/trunk/include/sensors-interface.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/include/types.h
===================================================================
--- xfce4-sensors-plugin/trunk/include/types.h	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/include/types.h	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*
  *      middlelayer.h
  *


Property changes on: xfce4-sensors-plugin/trunk/include/types.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/lib/acpi.c
===================================================================
--- xfce4-sensors-plugin/trunk/lib/acpi.c	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/lib/acpi.c	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*  Copyright 2004-2007 Fabian Nowak (timystery at arcor.de)
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -306,9 +307,13 @@
 
     TRACE ("enters get_battery_max_value");
 
+#ifdef HAVE_SYSFSACPI
+    filename = g_strdup_printf ("/sys/class/power_supply/%s/energy_full", name);
+#else
     filename = g_strdup_printf ("%s/%s/%s/%s", ACPI_PATH,
                                             ACPI_DIR_BATTERY, name,
                                             ACPI_FILE_BATTERY_INFO);
+#endif
     file = fopen (filename, "r");
     if (file)
     {
@@ -317,7 +322,11 @@
             if (strncmp (buf, "last full capacity:", 19)==0)
             {
 
+#ifndef HAVE_SYSFSACPI
                 tmp = strip_key_colon_spaces(buf);
+#else
+                tmp = buf;
+#endif
                 chipfeature->max_value = strtod (tmp, NULL);
             }
         }


Property changes on: xfce4-sensors-plugin/trunk/lib/acpi.c
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/lib/configuration.c
===================================================================
--- xfce4-sensors-plugin/trunk/lib/configuration.c	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/lib/configuration.c	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /* File configuration.c
  *
  *  Copyright 2004-2007 Fabian Nowak (timystery at arcor.de)


Property changes on: xfce4-sensors-plugin/trunk/lib/configuration.c
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/lib/hddtemp.c
===================================================================
--- xfce4-sensors-plugin/trunk/lib/hddtemp.c	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/lib/hddtemp.c	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*  Copyright 2004-2007 Fabian Nowak (timystery at arcor.de)
  *
  *  This program is free software; you can redistribute it and/or modify


Property changes on: xfce4-sensors-plugin/trunk/lib/hddtemp.c
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/lib/helpers.c
===================================================================
--- xfce4-sensors-plugin/trunk/lib/helpers.c	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/lib/helpers.c	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,4 +1,4 @@
-/* $Id:$ */
+/* $Id$ */
 
 /*  Copyright 2008 Fabian Nowak (timystery at arcor.de)
  *


Property changes on: xfce4-sensors-plugin/trunk/lib/helpers.c
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/lib/libxfce4sensors-1.0.pc.in
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/lib/lmsensors.c
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-sensors-plugin/trunk/lib/middlelayer.c
===================================================================
--- xfce4-sensors-plugin/trunk/lib/middlelayer.c	2008-11-03 23:59:03 UTC (rev 5947)
+++ xfce4-sensors-plugin/trunk/lib/middlelayer.c	2008-11-03 23:59:30 UTC (rev 5948)
@@ -1,3 +1,4 @@
+/* $Id$ */
 /*
  *      middlelayer.c
  *


Property changes on: xfce4-sensors-plugin/trunk/lib/middlelayer.c
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/lib/sensors-interface-common.c
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/lib/sensors-interface.c
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/src/actions.c
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/src/actions.h
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/src/callbacks.c
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/src/callbacks.h
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/src/interface.c
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/src/interface.h
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/src/main.c
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: xfce4-sensors-plugin/trunk/src/xfce4-sensors.desktop.in
___________________________________________________________________
Name: svn:keywords
   + Id




More information about the Goodies-commits mailing list