mirror of https://github.com/MidnightCommander/mc
* color.c (load_dialog_colors): Make a separate color for
hotkeys in red dialogs. * color.h: Likewise. * view.c (view_ok_to_quit): Add hotkey to dialog.
This commit is contained in:
parent
71ffc327b5
commit
f27d0e157f
|
@ -1,3 +1,10 @@
|
|||
2004-09-02 Pavel S. Shirshov <pavelsh@mail.ru>
|
||||
|
||||
* color.c (load_dialog_colors): Make a separate color for
|
||||
hotkeys in red dialogs.
|
||||
* color.h: Likewise.
|
||||
* view.c (view_ok_to_quit): Add hotkey to dialog.
|
||||
|
||||
2004-09-01 Pavel S. Shirshov <pavelsh@mail.ru>
|
||||
|
||||
* user.c (check_format_var): Use more suitable function
|
||||
|
|
12
src/color.c
12
src/color.c
|
@ -96,6 +96,10 @@ static struct colorpair color_map [] = {
|
|||
{ "editnormal=", 0, 0 }, /* normal */ /* 34 */
|
||||
{ "editbold=", 0, 0 }, /* search->found */
|
||||
{ "editmarked=", 0, 0 }, /* marked/selected */
|
||||
|
||||
/* error dialog colors start at 37 */
|
||||
{ "errdhotnormal=", 0, 0 }, /* Error dialog normal/hot */ /* 37 */
|
||||
{ "errdhotfocus=", 0, 0 }, /* Error dialog focused/hot */
|
||||
};
|
||||
|
||||
struct color_table_s {
|
||||
|
@ -156,7 +160,9 @@ static const char *default_colors =
|
|||
"special=black,blue:"
|
||||
"editnormal=lightgray,blue:"
|
||||
"editbold=yellow,blue:"
|
||||
"editmarked=black,cyan";
|
||||
"editmarked=black,cyan:"
|
||||
"errdhotnormal=yellow,red:"
|
||||
"errdhotfocus=yellow,lightgray";
|
||||
|
||||
#ifdef HAVE_SLANG
|
||||
# define color_value(i) color_table [i].name
|
||||
|
@ -269,8 +275,8 @@ load_dialog_colors (void)
|
|||
|
||||
alarm_colors [0] = ERROR_COLOR;
|
||||
alarm_colors [1] = REVERSE_COLOR;
|
||||
alarm_colors [2] = ERROR_COLOR;
|
||||
alarm_colors [3] = COLOR_HOT_NORMAL;
|
||||
alarm_colors [2] = ERROR_HOT_NORMAL;
|
||||
alarm_colors [3] = ERROR_HOT_FOCUS;
|
||||
}
|
||||
|
||||
void init_colors (void)
|
||||
|
|
|
@ -79,6 +79,10 @@ extern int alarm_colors[4];
|
|||
#define EDITOR_BOLD_COLOR IF_COLOR (35, A_BOLD)
|
||||
#define EDITOR_MARKED_COLOR IF_COLOR (36, A_REVERSE)
|
||||
|
||||
/* Error dialog colors */
|
||||
#define ERROR_HOT_NORMAL IF_COLOR (37, 0)
|
||||
#define ERROR_HOT_FOCUS IF_COLOR (38, 0)
|
||||
|
||||
#ifdef HAVE_SLANG
|
||||
# define CTYPE const char *
|
||||
#else
|
||||
|
|
|
@ -462,7 +462,7 @@ view_ok_to_quit (WView *view)
|
|||
|
||||
r = query_dialog (_("Quit"),
|
||||
_(" File was modified, Save with exit? "), 2, 3,
|
||||
_("Cancel quit"), _("&Yes"), _("&No"));
|
||||
_("&Cancel quit"), _("&Yes"), _("&No"));
|
||||
|
||||
switch (r) {
|
||||
case 1:
|
||||
|
|
Loading…
Reference in New Issue