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

diff --git a/wmacpi/ChangeLog b/wmacpi/ChangeLog
index 3adef3b..ddc4c65 100644
--- a/wmacpi/ChangeLog
+++ b/wmacpi/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/wmacpi/Makefile b/wmacpi/Makefile
index 9b1f755..700e230 100644
--- a/wmacpi/Makefile
+++ b/wmacpi/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/wmacpi/TODO b/wmacpi/TODO
index 3ddfbfa..ef29553 100644
--- a/wmacpi/TODO
+++ b/wmacpi/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/wmacpi.1 b/wmacpi/wmacpi.1
index a9a6f6c..dd27598 100644
--- a/wmacpi/wmacpi.1
+++ b/wmacpi/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
 <s...@debian.org> for the Debian GNU/Linux system, and then updated by
 Simon Fowler. 
 .br
-Last modification by Simon Fowler <si...@dreamcraft.com.au>, 2003-11-23.
+Last modification by Simon Fowler <si...@dreamcraft.com.au>, 2004-04-15.
diff --git a/wmacpi/wmacpi.c b/wmacpi/wmacpi.c
index 9f3b258..c9b384d 100644
--- a/wmacpi/wmacpi.c
+++ b/wmacpi/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[si...@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;
-- 
1.9.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to