Mon May 4 10:21:31 1998 Norbert Warmuth <k3190@fh-sw.de>

* background.c (message_1s1d): the unprocessed string with %d was
passed to message_1s; fixed small memory leak

* widget.c (button_callback): WIDGET_CURSOR: make cursor position
dependend from button type (fixes the off by one bug in advanced
changeown).
This commit is contained in:
Norbert Warmuth 1998-05-04 09:44:49 +00:00
parent 3ba4b676a3
commit 79455c64d7
3 changed files with 25 additions and 2 deletions

View File

@ -1,5 +1,12 @@
Mon May 4 10:21:31 1998 Norbert Warmuth <k3190@fh-sw.de>
* background.c (message_1s1d): the unprocessed string with %d was
passed to message_1s; fixed small memory leak
* widget.c (button_callback): WIDGET_CURSOR: make cursor position
dependend from button type (fixes the off by one bug in advanced
changeown).
* file.c (copy_file_file): Schedule deletion of short target file
only when we created or truncated the target file and not already
when we decided to overwrite an existing file.

View File

@ -555,7 +555,8 @@ message_1s1d (int flags, char *title, char *str, int d)
p = xmalloc (strlen (str) + 30, "1s1d");
sprintf (p, str, d);
message_1s (flags, title, str);
message_1s (flags, title, p);
free (p);
}
/* }}} */

View File

@ -117,7 +117,22 @@ button_callback (Dlg_head *h, WButton *b, int Msg, int Par)
#else
case WIDGET_CURSOR:
widget_move (&b->widget, 0, b->hotpos);
switch (b->flags) {
case DEFPUSH_BUTTON:
off = 3;
break;
case NORMAL_BUTTON:
off = 2;
break;
case NARROW_BUTTON:
off = 1;
break;
case HIDDEN_BUTTON:
default:
off = 0;
break;
}
widget_move (&b->widget, 0, b->hotpos + off);
return 1;
case WIDGET_UNFOCUS: