[Pkg-wmaker-commits] [wmbiff] 76/84: a method for not using the withdrawn state

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:02:05 UTC 2015


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

dtorrance-guest pushed a commit to tag wmbiff_0_4_10
in repository wmbiff.

commit 37e9a909b9135f8728ef4adcc386992f109f2882
Author: bluehal <bluehal>
Date:   Wed Nov 13 06:44:08 2002 +0000

    a method for not using the withdrawn state
---
 wmbiff/wmbiff.1       | 16 ++++++++++++----
 wmbiff/wmbiff.c       | 16 ++++++++++++++--
 wmgeneral/wmgeneral.c |  6 ++++--
 wmgeneral/wmgeneral.h |  2 +-
 4 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/wmbiff/wmbiff.1 b/wmbiff/wmbiff.1
index a9aca9d..acbf3c7 100644
--- a/wmbiff/wmbiff.1
+++ b/wmbiff/wmbiff.1
@@ -1,5 +1,5 @@
 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
-.\" $Id: wmbiff.1,v 1.10 2002/10/20 21:58:58 jordi Exp $
+.\" $Id: wmbiff.1,v 1.11 2002/11/13 06:44:08 bluehal Exp $
 .\"
 .\" wmbiff.1 and wmbiffrc.5 are copyright 1999-2001 by
 .\" Jordi Mallach <jordi at debian.org>
@@ -13,12 +13,13 @@ WMBiff \- A dockable Mailbox Monitor
 
 .SH SYNOPSIS
 .B wmbiff
-[-display <display name>] [-geometry +XPOS+YPOS] [-c <filename>] [-h] [-v] [-debug] [-fg <foreground-color>] [-font <X11 font>|default] [-hi <highlight-color>]
+[-display <display name>] [-geometry +XPOS+YPOS] [-c <filename>] [-h] [-v] [-debug] [-fg <foreground-color>] [-font <X11 font>|default] [-hi <highlight-color>] [+w]
 .br
 
 .SH DESCRIPTION
-WMbiff displays the status of up to five mailboxes. It gives information
-about new mail, if any, or total number of messages. It also has mail
+WMbiff displays the status of up to five mailboxes. It shows the number
+of new mail messages, if any, or the total number of messages.
+It also has mail
 retrieval capabilies, and can be configured to do this automatically. At the
 moment, UNIX-style, maildir, POP3, APOP and IMAP4 mailboxes are supported.
 WMbiff also supports Licq history files and gnomeicu, displaying the number of new
@@ -69,6 +70,13 @@ time default.
 .B \-hi <color>
 Use specified X11 color for new mail counters.  Implies -font
 default, unless overridden.
+.TP
+.B \+w 
+Do not use the "withdrawn" state: the wmbiff window will not
+be captured as an icon and placed in the dock, but will
+instead have its own window.  This option starts with a '+'
+for consistency with other software programs: many use '-w'
+to mean the opposite.
 
 .SH BUGS
 Send bug reports or suggestions to the WMBiff Development
diff --git a/wmbiff/wmbiff.c b/wmbiff/wmbiff.c
index e40f4e6..2a6084d 100644
--- a/wmbiff/wmbiff.c
+++ b/wmbiff/wmbiff.c
@@ -1,4 +1,4 @@
-/* $Id: wmbiff.c,v 1.34 2002/11/12 08:27:45 bluehal Exp $ */
+/* $Id: wmbiff.c,v 1.35 2002/11/13 06:44:08 bluehal Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -88,6 +88,7 @@ int debug_default = DEBUG_ERROR;
 /* color from wmbiff's xpm, down to 24 bits. */
 const char *foreground = "#21B3AF";
 const char *highlight = "yellow";
+int notWithdrawn = 0;
 
 int num_mailboxes = 1;
 const int x_origin = 5;
@@ -439,7 +440,7 @@ void do_biff(int argc, char **argv)
 					 wmbiff_mask_width, wmbiff_mask_height);
 
 	openXwindow(argc, argv, bkg_xpm, skin_xpm, wmbiff_mask_bits,
-				wmbiff_mask_width, wmbiff_mask_height);
+				wmbiff_mask_width, wmbiff_mask_height, notWithdrawn);
 
 	if (font != NULL) {
 		if (loadFont(font) < 0) {
@@ -1026,6 +1027,16 @@ void parse_cmd(int argc, char **argv, /*@out@ */ char *config_file)
 				exit(EXIT_SUCCESS);
 				break;
 			}
+		} else if (*arg == '+') {
+			switch (arg[1]) {
+			case 'w':
+				notWithdrawn = 1;
+				break;
+			default:
+				usage();
+				exit(EXIT_SUCCESS);
+				break;
+			}
 		}
 	}
 }
@@ -1047,6 +1058,7 @@ void usage(void)
 		   "    -h                        this help screen\n"
 		   "    -hi <color>               highlight color for new mail\n"
 		   "    -v                        print the version number\n"
+		   "    +w                        not withdrawn: run as a window\n"
 		   "\n");
 }
 
diff --git a/wmgeneral/wmgeneral.c b/wmgeneral/wmgeneral.c
index caefcf5..6289b31 100644
--- a/wmgeneral/wmgeneral.c
+++ b/wmgeneral/wmgeneral.c
@@ -449,7 +449,8 @@ void setMaskXY(int x, int y)
 \*******************************************************************************/
 void openXwindow(int argc, char *argv[], const char *pixmap_bytes_bkg[],
 				 const char *pixmap_bytes_src[],
-				 char *pixmask_bits, int pixmask_width, int pixmask_height)
+				 char *pixmask_bits,
+				 int pixmask_width, int pixmask_height, int notWithdrawn)
 {
 
 	unsigned int borderwidth = 1;
@@ -563,7 +564,8 @@ void openXwindow(int argc, char *argv[], const char *pixmap_bytes_bkg[],
 	mywmhints.icon_y = mysizehints.y;
 	mywmhints.window_group = win;
 	mywmhints.flags =
-		StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
+		(notWithdrawn ? 0 : StateHint) | IconWindowHint |
+		IconPositionHint | WindowGroupHint;
 
 	XSetWMHints(display, win, &mywmhints);
 
diff --git a/wmgeneral/wmgeneral.h b/wmgeneral/wmgeneral.h
index dfe79ec..7d86e3e 100644
--- a/wmgeneral/wmgeneral.h
+++ b/wmgeneral/wmgeneral.h
@@ -47,7 +47,7 @@ void AddMouseRegion(int rgn_index, int left, int top, int right,
 int CheckMouseRegion(int x, int y);
 
 void openXwindow(int argc, char *argv[], const char **,
-				 const char **, char *, int, int);
+				 const char **, char *, int, int, int);
 void RedrawWindow(void);
 void RedrawWindowXY(int x, int y);
 

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



More information about the Pkg-wmaker-commits mailing list