mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
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:
parent
3ba4b676a3
commit
79455c64d7
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
17
src/widget.c
17
src/widget.c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user