wmacpi: Bump to version 1.99r4.

Source obtained from http://sourceforge.net/projects/wmacpi/files/.

2004 April 15 1.99r4
	Collected fixes for various small issues.

	* Fixed a problem with placement of the window when using the
	click to place mode - turned out to be a sizehints problem.

	* Some fixes to the manpage.

	* Reenabled the CLI build by default - the Debian patches can
	handle disabling it themselves.

	* Added a way to disable the scrolling message, since some users
	find this annoying.

	I've left the big changes that are needed (like using libdockapp,
	in the hope that it'll solve the docking problems) until later, so
	that I can get these smaller fixes out. Hopefully soon . . .
This commit is contained in:
Doug Torrance 2014-08-18 17:56:18 -05:00 committed by Carlos R. Mafra
parent 9c6f407b38
commit e5eb888b1f
5 changed files with 54 additions and 4 deletions

View file

@ -1,3 +1,21 @@
2004 April 15 1.99r4
Collected fixes for various small issues.
* Fixed a problem with placement of the window when using the
click to place mode - turned out to be a sizehints problem.
* Some fixes to the manpage.
* Reenabled the CLI build by default - the Debian patches can
handle disabling it themselves.
* Added a way to disable the scrolling message, since some users
find this annoying.
I've left the big changes that are needed (like using libdockapp,
in the hope that it'll solve the docking problems) until later, so
that I can get these smaller fixes out. Hopefully soon . . .
2004 January 12 1.99r3 2004 January 12 1.99r3
. . . and a fix for a fix that didn't fix it . . . . . . and a fix for a fix that didn't fix it . . .

View file

@ -4,7 +4,7 @@
OPT := -O2 OPT := -O2
# uncomment this to build the command line acpi tool # uncomment this to build the command line acpi tool
#BUILD_CLI = 1 BUILD_CLI = 1
# uncomment this to make wmacpi use less system colors (looks uglier too) # uncomment this to make wmacpi use less system colors (looks uglier too)
#OPT += -DLOW_COLOR #OPT += -DLOW_COLOR

View file

@ -1,3 +1,7 @@
2004 January 18 1.99r3
* Correctly handle changing batteries at runtime, if possible. Note
the bug reported by Joey Hess against wmacpi 1.33 . . .
2003 November 23 1.99 2003 November 23 1.99
* Expand libacpi to handle everything else under * Expand libacpi to handle everything else under
/proc/acpi. Basically, make it into a full ACPI reporting library. /proc/acpi. Basically, make it into a full ACPI reporting library.

View file

@ -1,4 +1,4 @@
.TH WMACPI-NG 1 "July 11, 2003" .TH WMACPI 1 "April 15 2004"
.SH NAME .SH NAME
wmacpi \- Battery status monitor for systems supporting ACPI wmacpi \- Battery status monitor for systems supporting ACPI
.SH NAME .SH NAME
@ -46,6 +46,12 @@ samples ]
[ [
.RI -V .RI -V
] ]
]
.RI -b
]
[
.RI -r
]
[ [
.RI -h .RI -h
] ]
@ -110,6 +116,12 @@ each successive use increases the verbosity.
.B \-V .B \-V
Print the version information. Print the version information.
.TP .TP
.B \-b
Make a noise when the battery is critically low.
.TP
.B \-r
Disable scrolling message.
.TP
.B \-h .B \-h
Display help. Display help.
.TP .TP
@ -141,4 +153,4 @@ This manual page was originally written by Simon Richter
<sjr@debian.org> for the Debian GNU/Linux system, and then updated by <sjr@debian.org> for the Debian GNU/Linux system, and then updated by
Simon Fowler. Simon Fowler.
.br .br
Last modification by Simon Fowler <simon@dreamcraft.com.au>, 2003-11-23. Last modification by Simon Fowler <simon@dreamcraft.com.au>, 2004-04-15.

View file

@ -58,6 +58,7 @@ typedef struct {
int update; /* need to redraw? */ int update; /* need to redraw? */
int blink; /* should we blink the LED? (critical battery) */ int blink; /* should we blink the LED? (critical battery) */
int bell; /* bell on critical low, or not? */ int bell; /* bell on critical low, or not? */
int scroll; /* scroll message text? */
} Dockapp; } Dockapp;
/* globals */ /* globals */
@ -225,6 +226,12 @@ static void render_text(char *string)
{ {
int i, c, k; int i, c, k;
/* drop out immediately if scrolling is disabled - we don't render
* any text at all, since there's not much else we could do
* sensibly without scrolling. */
if (!dockapp->scroll)
return;
if (strlen(string) > 53) if (strlen(string) > 53)
return; return;
@ -275,6 +282,9 @@ static void scroll_text(int x, int y, int width, int tw, int reset)
{ {
static int pos, first, stop; static int pos, first, stop;
if (!dockapp->scroll)
return;
if (reset) { if (reset) {
pos = 0; pos = 0;
first = 0; first = 0;
@ -595,6 +605,7 @@ void usage(char *name)
printf("%s - help\t\t[simon@dreamcraft.com.au]\n\n" printf("%s - help\t\t[simon@dreamcraft.com.au]\n\n"
"-d display\t\tdisplay on remote display <display>\n" "-d display\t\tdisplay on remote display <display>\n"
"-b\t\t\tmake noise when battery is critical low (beep)\n" "-b\t\t\tmake noise when battery is critical low (beep)\n"
"-r\t\t\tdisable scrolling message\n"
"-c value\t\tset critical low alarm at <value> percent\n" "-c value\t\tset critical low alarm at <value> percent\n"
"\t\t\t(default: 10 percent)\n" "\t\t\t(default: 10 percent)\n"
"-m <battery number>\tbattery number to monitor\n" "-m <battery number>\tbattery number to monitor\n"
@ -678,11 +689,12 @@ int main(int argc, char **argv)
dockapp->blink = 1; dockapp->blink = 1;
dockapp->bell = 0; dockapp->bell = 0;
dockapp->scroll = 1;
globals->crit_level = 10; globals->crit_level = 10;
battery_no = 1; battery_no = 1;
/* parse command-line options */ /* parse command-line options */
while ((ch = getopt(argc, argv, "d:c:m:s:a:hnwbvV")) != EOF) { while ((ch = getopt(argc, argv, "d:c:m:s:a:hnwbrvV")) != EOF) {
switch (ch) { switch (ch) {
case 'c': case 'c':
if (optarg) { if (optarg) {
@ -751,6 +763,10 @@ int main(int argc, char **argv)
case 'b': case 'b':
dockapp->blink = 1; dockapp->blink = 1;
break; break;
case 'r':
printf("disabling scroll\n");
dockapp->scroll = 0;
break;
default: default:
usage(argv[0]); usage(argv[0]);
return 1; return 1;