9front - general discussion about 9front
 help / color / mirror / Atom feed
From: sirjofri+ml-9front@sirjofri.de
To: 9front@9front.org
Subject: Re: [9front] patch: faces -c remove faces on click
Date: Fri, 04 Dec 2020 09:28:34 +0100	[thread overview]
Message-ID: <986B00BF344BEA5138FCE87D1E515963@sirjofri.de> (raw)
In-Reply-To: <609D21C8EF9760D5791F1710BBF1CA12@sirjofri.de>

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

hello again,

I guess this is the final patch version, this time with an updated
'usage' message.

So in total we have:

- The change itself.
- Notes in the man page.
- Updated 'usage' message.

sirjofri
.


[-- Attachment #2: Type: text/plain, Size: 1525 bytes --]

diff -r 73caf2698436 sys/man/1/faces
--- a/sys/man/1/faces	Tue Dec 01 09:23:16 2020 +0100
+++ b/sys/man/1/faces	Fri Dec 04 09:24:34 2020 +0100
@@ -4,7 +4,7 @@
 .SH SYNOPSIS
 .B faces
 [
-.B -ih
+.B -ihc
 ] [
 .B -m
 .I maildir
@@ -86,6 +86,12 @@
 .B -m
 flags may be used to watch multiple mailboxes.
 .PP
+Starting
+.I faces
+with the
+.B -c
+flag allows the user to remove faces with a click with button 1.
+.PP
 The
 .B -h
 flag causes a different, venerable behavior in which
diff -r 73caf2698436 sys/src/cmd/faces/main.c
--- a/sys/src/cmd/faces/main.c	Tue Dec 01 09:23:16 2020 +0100
+++ b/sys/src/cmd/faces/main.c	Fri Dec 04 09:24:34 2020 +0100
@@ -9,6 +9,7 @@
 
 int	history = 0;	/* use old interface, showing history of mailbox rather than current state */
 int	initload = 0;	/* initialize program with contents of mail box */
+int	clickrm = 0;	/* allows removing mail faces by left clicking */
 
 enum
 {
@@ -600,7 +601,7 @@
 		}else{
 			for(i=first; i<last; i++)	/* clear vwhois faces */
 				if(ptinrect(p, facerect(i-first)) 
-				&& strstr(faces[i]->str[Sshow], "/XXXvwhois")){
+				&& (clickrm || strstr(faces[i]->str[Sshow], "/XXXvwhois"))){
 					delface(i);
 					flushimage(display, 1);
 				}
@@ -675,7 +676,7 @@
 void
 usage(void)
 {
-	fprint(2, "usage: faces [-hi] [-m maildir]\n");
+	fprint(2, "usage: faces [-chi] [-m maildir]\n");
 	exits("usage");
 }
 
@@ -695,6 +696,9 @@
 		addmaildir(EARGF(usage()));
 		maildir = nil;
 		break;
+	case 'c':
+		clickrm++;
+		break;
 	default:
 		usage();
 	}ARGEND

       reply	other threads:[~2020-12-04  8:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <609D21C8EF9760D5791F1710BBF1CA12@sirjofri.de>
2020-12-04  8:28 ` sirjofri+ml-9front [this message]
2020-12-04  8:35   ` Sigrid Solveig Haflínudóttir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=986B00BF344BEA5138FCE87D1E515963@sirjofri.de \
    --to=sirjofri+ml-9front@sirjofri.de \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).