[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Save message box
I got a patch from Brian O'Donnell who dislikes the message box that says
a file has been saved. Instead an asterisk was placed on the titlebar of
modified files. Due to various bugs that creates I moved the asterisk
between the filetype and line number display at the bottom left of the
window.
(The filetype is the 'A' at the bottom left. If you load a file as a binary
file it becomes a 'B' but for the most part it remains an 'A'.)
Unrelated Bug: Search and Replace on read-only files works even though it
shouldn't.
Dennis Payne
payned@rpi.edu
diff -u ../xwpe-1.5.8a/we_edit.c ./we_edit.c
--- ../xwpe-1.5.8a/we_edit.c Sun Apr 19 11:01:57 1998
+++ ./we_edit.c Sun Apr 26 11:35:48 1998
@@ -1480,7 +1480,7 @@
if(sw != 0)
{ iold = e_lst_zeichen(f->e.x, f->a.y+1, f->e.y-f->a.y-1, 0,
f->fb->em.fb, b->mxlines, iold, b->b.y);
- jold = e_lst_zeichen(f->a.x+18, f->e.y, f->e.x-f->a.x-19, 1,
+ jold = e_lst_zeichen(f->a.x+19, f->e.y, f->e.x-f->a.x-20, 1,
f->fb->em.fb, b->mx.x, jold, b->b.x);
}
b->cl = b->b.x+j;
@@ -1799,7 +1799,11 @@
if (f->dtmd <= 'Z')
return;
sprintf(str,"%5d:%-4d", f->b->b.y + 1, f->b->cl + 1);
- e_puts(str,f->a.x+4,f->e.y,f->fb->er.fb);
+ e_puts(str,f->a.x+5,f->e.y,f->fb->er.fb);
+ if (f->save)
+ e_pr_char(f->a.x+3, f->e.y, '*', f->fb->er.fb);
+ else
+ e_pr_char(f->a.x+3, f->e.y, ' ', f->fb->er.fb);
/*
sprintf(str,"%4d:", f->b->b.y + 1);
e_puts(str,f->a.x+5,f->e.y,f->fb->er.fb);
@@ -1808,7 +1812,10 @@
*/
#ifdef NEWSTYLE
if (WpeIsXwin())
- e_make_xrect(f->a.x+4, f->e.y, f->a.x+13, f->e.y, 0);
+ {
+ e_make_xrect(f->a.x + 1, f->e.y, f->e.x - 1, f->e.y, 0);
+ e_make_xrect(f->a.x + 5, f->e.y, f->a.x + 14, f->e.y, 0);
+ }
#endif
}
diff -u ../xwpe-1.5.8a/we_fl_fkt.c ./we_fl_fkt.c
--- ../xwpe-1.5.8a/we_fl_fkt.c Sun Apr 19 11:01:56 1998
+++ ./we_fl_fkt.c Sun Apr 26 10:49:55 1998
@@ -189,7 +189,7 @@
FENSTER *f;
{
int ret = e_save(f);
- if(ret != ESC) e_message(0, e_msg[ERR_MSG_SAVE], f);
+ if(ret == ESC) e_message(0, e_msg[ERR_MSG_SAVE], f);
return(ret);
}
@@ -220,7 +220,7 @@
{ if(cn->f[i]->save != 0 && cn->f[i]->ins != 8)
if(e_save(cn->f[i]) == ESC) ret = ESC;
}
- if(ret != ESC) e_message(0, e_msg[ERR_MSG_SAVEALL], f);
+ if(ret == ESC) e_message(0, e_msg[ERR_MSG_SAVEALL], f);
return(ret);
}
diff -u ../xwpe-1.5.8a/we_fl_unix.c ./we_fl_unix.c
--- ../xwpe-1.5.8a/we_fl_unix.c Sun Apr 19 11:01:56 1998
+++ ./we_fl_unix.c Sun Apr 26 10:52:23 1998
@@ -897,9 +897,10 @@
if(f->dirct[strlen(f->dirct)-1] == DIRC)
sprintf(fw->df->name[i], "%s%s", f->dirct, filen);
else sprintf(fw->df->name[i], "%s/%s", f->dirct, filen);
+/* Don't bother notifying the user for each file added to project
sprintf(ftmp, "File added to Project:\n%s",
fw->df->name[i]);
- e_message(0, ftmp, f);
+ e_message(0, ftmp, f);*/
fw->nf++;
if(fw->nf-fw->ia >= fw->ye - fw->ya)
fw->ia = fw->nf+fw->ya-fw->ye+1;
diff -u ../xwpe-1.5.8a/we_main.c ./we_main.c
--- ../xwpe-1.5.8a/we_main.c Sun Apr 19 11:01:57 1998
+++ ./we_main.c Sun Apr 26 10:51:04 1998
@@ -80,8 +80,8 @@
"Not Installed",
"Can\'t open Option-File",
"Can\'t write to Option-File",
- "File saved",
- "All Files saved", /* Number 15 */
+ "File failed to save",
+ "Not all files saved", /* Number 15 */
"Can\'t Print File",
"No more Redo"
};
diff -u ../xwpe-1.5.8a/we_mouse.c ./we_mouse.c
--- ../xwpe-1.5.8a/we_mouse.c Sun Apr 19 11:01:57 1998
+++ ./we_mouse.c Sun Apr 26 10:59:32 1998
@@ -671,7 +671,7 @@
e_cursor(f, 1);
e_refresh();
}
- else if(e_mouse.y == f->e.y && e_mouse.x == f->a.x+18)
+ else if(e_mouse.y == f->e.y && e_mouse.x == f->a.x+19)
{ while(e_mshit())
{ f->b->b.x = f->b->b.x > 0 ? f->b->b.x - 1 : 0;
e_cursor(f, 1);
@@ -687,8 +687,8 @@
}
}
else if(e_mouse.y == f->e.y
- && e_mouse.x > f->a.x+18 && e_mouse.x < f->e.x-2)
- { f->b->b.x = e_lst_mouse(f->a.x+18, f->e.y, f->e.x-f->a.x-19, 1,
+ && e_mouse.x > f->a.x+19 && e_mouse.x < f->e.x-2)
+ { f->b->b.x = e_lst_mouse(f->a.x+19, f->e.y, f->e.x-f->a.x-20, 1,
f->b->mx.x, NUM_COLS_OFF_SCREEN_LEFT);
e_cursor(f, 1);
e_refresh();
diff -u ../xwpe-1.5.8a/we_wind.c ./we_wind.c
--- ../xwpe-1.5.8a/we_wind.c Sun Apr 19 11:01:57 1998
+++ ./we_wind.c Sun Apr 26 11:38:52 1998
@@ -166,15 +166,23 @@
int e_pr_filetype(FENSTER *f)
{
- int frb = f->fb->es.fb;
- if(f->dtmd == 'b') e_pr_char(f->a.x+2, f->e.y, 'B', frb);
- else e_pr_char(f->a.x+2, f->e.y, 'A', frb);
- if(f->ins == 0 || f->ins == 2) e_pr_char(f->a.x+15, f->e.y, 'O', frb);
- else if(f->ins == 8) e_pr_char(f->a.x+15, f->e.y, 'R', frb);
- else e_pr_char(f->a.x+15, f->e.y, 'I', frb);
- if(f->ins > 1) e_pr_char(f->a.x+16, f->e.y, 'S', frb);
- else e_pr_char(f->a.x+16, f->e.y, 'L', frb);
- return(0);
+ int frb = f->fb->es.fb;
+
+ if (f->dtmd == 'b')
+ e_pr_char(f->a.x+2, f->e.y, 'B', frb);
+ else
+ e_pr_char(f->a.x+2, f->e.y, 'A', frb);
+ if (f->ins == 0 || f->ins == 2)
+ e_pr_char(f->a.x+16, f->e.y, 'O', frb);
+ else if (f->ins == 8)
+ e_pr_char(f->a.x+16, f->e.y, 'R', frb);
+ else
+ e_pr_char(f->a.x+16, f->e.y, 'I', frb);
+ if (f->ins > 1)
+ e_pr_char(f->a.x+17, f->e.y, 'S', frb);
+ else
+ e_pr_char(f->a.x+17, f->e.y, 'L', frb);
+ return(0);
}
/*
open section of screen and save background */
@@ -333,7 +341,7 @@
f->fb->er.fb, f->fb->es.fb);
if(sw > 0)
{ e_mouse_leiste(f->e.x, f->a.y+1, NUM_LINES_ON_SCREEN - 1, 0, f->fb->em.fb);
- e_mouse_leiste(f->a.x+18, f->e.y, NUM_COLS_ON_SCREEN - 19,
+ e_mouse_leiste(f->a.x+19, f->e.y, NUM_COLS_ON_SCREEN - 20,
1, f->fb->em.fb);
if(f->zoom == 0)
e_pr_char(f->e.x-3, f->a.y, WZN, f->fb->es.fb);
@@ -383,20 +391,6 @@
e_pr_char(f->e.x-6, f->a.y, '0' + f->winnum, f->fb->er.fb);
else if(f->winnum >= 0)
e_pr_char(f->e.x-6, f->a.y, 'A' - 10 + f->winnum, f->fb->er.fb);
-/*
- if(f->datnam[0])
- { if(strcmp(f->dirct, f->ed->dirct) == 0 || f->dtmd == 'm' || f->dtmd == 'F'
- || strcmp(f->datnam, BUFFER_NAME) == 0 || NUM_COLS_ON_SCREEN < 40)
- strcpy(tmp, f->datnam);
- else
- { strcpy(tmp, f->dirct);
- if(tmp[0] != '\0' && tmp[strlen(tmp)-1] != DIRC) strcat(tmp, DIRS);
- strcat(tmp, f->datnam);
- }
- }
- e_pr_str((f->e.x + f->a.x - e_str_len((unsigned char *)tmp))/2,
- f->a.y, tmp, f->fb->er.fb, 0, 0, 0, 0);
-*/
#ifdef NEWSTYLE
if(WpeIsXwin()) e_make_xr_rahmen(f->a.x, f->a.y, f->e.x, f->e.y, sw);
#endif