[Bug #5401] xfce4-battery-plugin does not see ac_adapter status

[email protected]
Newsgroups gmane.comp.desktop.xfce.goodies.devel
Message-ID <[email protected]>
Bug #5401, was updated on 2005-Oct-20 17:54
Here is a current snapshot of the bug.

Project: Goodies for the Xfce desktop
Category: xfce4-battery-plugin
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: josem
Assigned to : none
Summary: xfce4-battery-plugin does not see ac_adapter status

Details: This is a bug showed a long time ago.
I am using debian testing and the battery plugin does not know then I am using only battery. I shows-me the "ac" allways.

I "corrected" the bug on my pc, but it's a bad solution. (It's no solution at all.)
Just added the line to get the right /proc/acpi file (libacpi.c):

   if (!(acpi = fopen ("/proc/acpi/ac_adapter/0/status", "r")))
    if (!(acpi = fopen ("/proc/acpi/ac_adapter/ACAD/state", "r")))
      if (!(acpi = fopen ("/proc/acpi/ac_adapter/AC/state", "r")))
+      if (!(acpi = fopen ("/proc/acpi/ac_adapter/AC0/state", "r")))
        if (!(acpi = fopen ("/proc/acpi/ac_adapter/ADP1/state", "r")))
                return -1;

Maybe you can think in a more elegant way to get this file (like you do with the battery state).

Thanks for the pacience.
José Martins
[email protected]

For detailed info, follow this link:
http://developer.berlios.de/bugs/?func=detailbug&bug_id=5401&group_id=910
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.