[Pkg-wmaker-commits] [wmacpi] 12/105: wmacpi: Bump to version 1.99r4.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 18 01:13:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmacpi.

commit 661bfdcecd2ee6e7f7739a3ceaa45063e6f4a461
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Mon Aug 18 17:56:18 2014 -0500

    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 . . .
---
 ChangeLog | 18 ++++++++++++++++++
 Makefile  |  2 +-
 TODO      |  4 ++++
 wmacpi.1  | 16 ++++++++++++++--
 wmacpi.c  | 18 +++++++++++++++++-
 5 files changed, 54 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3adef3b..ddc4c65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
 	. . . and a fix for a fix that didn't fix it . . .
 	
diff --git a/Makefile b/Makefile
index 9b1f755..700e230 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 OPT	:= -O2 
 
 # 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)
 #OPT	+= -DLOW_COLOR
diff --git a/TODO b/TODO
index 3ddfbfa..ef29553 100644
--- a/TODO
+++ b/TODO
@@ -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
  * Expand libacpi to handle everything else under
    /proc/acpi. Basically, make it into a full ACPI reporting library. 
diff --git a/wmacpi.1 b/wmacpi.1
index a9a6f6c..dd27598 100644
--- a/wmacpi.1
+++ b/wmacpi.1
@@ -1,4 +1,4 @@
-.TH WMACPI-NG 1 "July 11, 2003"
+.TH WMACPI 1 "April 15 2004"
 .SH NAME
 wmacpi \- Battery status monitor for systems supporting ACPI
 .SH NAME
@@ -46,6 +46,12 @@ samples ]
 [
 .RI -V
 ]
+]
+.RI -b
+]
+[
+.RI -r
+]
 [
 .RI -h
 ]
@@ -110,6 +116,12 @@ each successive use increases the verbosity.
 .B \-V
 Print the version information.
 .TP
+.B \-b
+Make a noise when the battery is critically low.
+.TP
+.B \-r
+Disable scrolling message.
+.TP
 .B \-h
 Display help.
 .TP
@@ -141,4 +153,4 @@ This manual page was originally written by Simon Richter
 <sjr at debian.org> for the Debian GNU/Linux system, and then updated by
 Simon Fowler. 
 .br
-Last modification by Simon Fowler <simon at dreamcraft.com.au>, 2003-11-23.
+Last modification by Simon Fowler <simon at dreamcraft.com.au>, 2004-04-15.
diff --git a/wmacpi.c b/wmacpi.c
index 9f3b258..c9b384d 100644
--- a/wmacpi.c
+++ b/wmacpi.c
@@ -58,6 +58,7 @@ typedef struct {
     int update;			/* need to redraw? */
     int blink;			/* should we blink the LED? (critical battery) */
     int bell;			/* bell on critical low, or not? */
+    int scroll;			/* scroll message text? */
 } Dockapp;
 
 /* globals */
@@ -225,6 +226,12 @@ static void render_text(char *string)
 {
     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)
 	return;
 
@@ -275,6 +282,9 @@ static void scroll_text(int x, int y, int width, int tw, int reset)
 {
     static int pos, first, stop;
 
+    if (!dockapp->scroll) 
+	return;
+
     if (reset) {
 	pos = 0;
 	first = 0;
@@ -595,6 +605,7 @@ void usage(char *name)
     printf("%s - help\t\t[simon at dreamcraft.com.au]\n\n"
 	   "-d display\t\tdisplay on remote display <display>\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"
 	   "\t\t\t(default: 10 percent)\n"
 	   "-m <battery number>\tbattery number to monitor\n"
@@ -678,11 +689,12 @@ int main(int argc, char **argv)
 
     dockapp->blink = 1;
     dockapp->bell = 0;
+    dockapp->scroll = 1;
     globals->crit_level = 10;
     battery_no = 1;
 
     /* 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) {
 	case 'c':
 	    if (optarg) {
@@ -751,6 +763,10 @@ int main(int argc, char **argv)
 	case 'b':
 	    dockapp->blink = 1;
 	    break;
+	case 'r':
+	    printf("disabling scroll\n");
+	    dockapp->scroll = 0;
+	    break;
 	default:
 	    usage(argv[0]);
 	    return 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmacpi.git



More information about the Pkg-wmaker-commits mailing list