aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/mail
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2007-06-23 06:14:23 +0000
committerrsc <devnull@localhost>2007-06-23 06:14:23 +0000
commit7cc0e47fa896d9261d8f6e9787ffd6a36a746dd1 (patch)
treef69adca3ff573a20901f156d5a189a70fcf14253 /src/cmd/acme/mail
parentbb70a84b1ffa914a1043f521940d8293423aab1b (diff)
downloadplan9port-7cc0e47fa896d9261d8f6e9787ffd6a36a746dd1.tar.gz
plan9port-7cc0e47fa896d9261d8f6e9787ffd6a36a746dd1.tar.bz2
plan9port-7cc0e47fa896d9261d8f6e9787ffd6a36a746dd1.zip
add Get, Refresh commands; refresh at startup
Diffstat (limited to 'src/cmd/acme/mail')
-rw-r--r--src/cmd/acme/mail/mail.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/acme/mail/mail.c b/src/cmd/acme/mail/mail.c
index 8f165fe1..c61f0c12 100644
--- a/src/cmd/acme/mail/mail.c
+++ b/src/cmd/acme/mail/mail.c
@@ -233,6 +233,7 @@ threadmain(int argc, char *argv[])
proccreate(plumbproc, nil, STACK);
proccreate(plumbshowproc, nil, STACK);
threadcreate(plumbshowthread, nil, STACK);
+ fswrite(mbox.ctlfd, "refresh", 7);
/* ... and use this thread to read the messages */
plumbthread();
}
@@ -441,6 +442,25 @@ mboxcommand(Window *w, char *s)
rewritembox(wbox, &mbox);
return 1;
}
+ if(strcmp(s, "Get") == 0){
+ if(mbox.dirty){
+ mbox.dirty = 0;
+ fprint(2, "mail: mailbox not written\n");
+ return 1;
+ }
+ winsetaddr(w, ",", 1);
+ if(w->data == nil)
+ w->data = winopenfile(w, "data");
+ fswrite(w->data, "", 0);
+ mesgmenu(wbox, &mbox);
+ winclean(wbox);
+ fswrite(mbox.ctlfd, "refresh", 7);
+ return 1;
+ }
+ if(strcmp(s, "Refresh") == 0){
+ fswrite(mbox.ctlfd, "refresh", 7);
+ return 1;
+ }
if(strcmp(s, "Delmesg") == 0){
save = nil;
if(nargs > 1)