What i changed to display the warning message.

Rogerio Pereira <[email protected]>
Newsgroups gmane.comp.desktop.xfce.goodies.devel
Message-ID <[email protected]>
//  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/ADP1/state", "r")))
//	        return -1;

  if (!(acpi = fopen ("/proc/acpi/battery/BAT1/state", "r")))
        return -1;

  fread (buf, 512, 1, acpi);
  fclose (acpi);
  if (!acadstate) acadstate=(ACADstate *)malloc(sizeof(ACADstate));

  if ( (ptr = strstr(buf, "charging state:")) )
  {
    stat = *(ptr + 25);
    if (stat == 'c') acadstate->state = 1;
    if (stat == 'd')
  	{
	    acadstate->state = 0;
	    return 0;
  	}
  }
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.